/* Western Technical College brand — Brand Guide 2026 */
:root {
  --wtc-red: #ba0c2f;
  --wtc-red-dark: #76232f;
  --wtc-black: #1a1a1a;
  --wtc-gray-85: #262626;
  --wtc-gray-55: #737373;
  --wtc-gray-30: #b3b3b3;
  --wtc-gray-10: #e6e6e6;
  --wtc-white: #ffffff;
  --wtc-accent-blue: #00587c;
  --font-head: "Oswald", "Century Gothic", sans-serif;
  --font-body: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 6px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--wtc-black);
  background: var(--wtc-gray-10);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--wtc-black);
  margin-top: 0;
}

a {
  color: var(--wtc-red);
  text-decoration: none;
}

a:hover {
  color: var(--wtc-red-dark);
  text-decoration: underline;
}

.site-header {
  background: var(--wtc-black);
  color: var(--wtc-white);
  border-bottom: 4px solid var(--wtc-red);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.95;
}

.brand-mark {
  background: var(--wtc-red);
  color: var(--wtc-white);
  font-family: var(--font-head);
  font-weight: 700;
  padding: 0.35rem 0.5rem;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.brand-title {
  display: block;
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-sub {
  display: block;
  font-size: 0.8rem;
  opacity: 0.85;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  flex: 1;
}

.main-nav a {
  color: var(--wtc-white);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--wtc-white);
  border-bottom-color: var(--wtc-red);
  text-decoration: none;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.user-name {
  opacity: 0.9;
}

.site-main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  width: 100%;
}

.site-footer {
  background: var(--wtc-gray-85);
  color: var(--wtc-gray-30);
  padding: 1rem 1.25rem;
  font-size: 0.8rem;
  text-align: center;
}

.footer-eo {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  opacity: 0.85;
}

.card {
  background: var(--wtc-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.card h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--wtc-red);
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.alert-error {
  background: #fde8ec;
  border-left: 4px solid var(--wtc-red);
  color: var(--wtc-red-dark);
}

.alert-success {
  background: #eef6ea;
  border-left: 4px solid #8f993e;
  color: #3d4a20;
}

.alert-warning {
  background: #fff8e6;
  border-left: 4px solid #f2a900;
  color: #5c4a00;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.3;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--wtc-red);
  color: var(--wtc-white);
}

.btn-primary:hover {
  background: var(--wtc-red-dark);
  color: var(--wtc-white);
}

.btn-secondary {
  background: var(--wtc-black);
  color: var(--wtc-white);
}

.btn-secondary:hover {
  background: var(--wtc-gray-85);
  color: var(--wtc-white);
}

.btn-ghost {
  background: transparent;
  color: var(--wtc-white);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--wtc-white);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

label .required {
  color: var(--wtc-red);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--wtc-gray-30);
  border-radius: var(--radius);
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--wtc-red);
  outline-offset: 1px;
  border-color: var(--wtc-red);
}

input[readonly] {
  background: var(--wtc-gray-10);
}

.hint {
  font-size: 0.85rem;
  color: var(--wtc-gray-55);
  margin-top: 0.25rem;
}

.table-wrap {
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.data-table th,
table.data-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--wtc-gray-10);
}

table.data-table th {
  font-family: var(--font-head);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--wtc-black);
  color: var(--wtc-white);
}

table.data-table tr:hover td {
  background: #fafafa;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.badge-active {
  background: #e8f4e8;
  color: #2d5a2d;
}

.badge-returned {
  background: var(--wtc-gray-10);
  color: var(--wtc-gray-55);
}

.badge-warning {
  background: #fff3cd;
  color: #856404;
}

.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--wtc-gray-30);
  border-radius: var(--radius);
  max-height: 240px;
  overflow-y: auto;
}

.search-results li button {
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border: none;
  background: var(--wtc-white);
  cursor: pointer;
  font: inherit;
  border-bottom: 1px solid var(--wtc-gray-10);
}

.search-results li button:hover {
  background: #fde8ec;
}

.search-results li:last-child button {
  border-bottom: none;
}

.hero {
  text-align: center;
  padding: 2rem 1rem;
}

.hero h1 {
  font-size: 1.75rem;
  color: var(--wtc-red);
}

.stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.stat-box {
  background: var(--wtc-white);
  border-top: 4px solid var(--wtc-red);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.dashboard-section {
  margin-top: 1.25rem;
}

.agreement-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stat-box .num {
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--wtc-red);
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.admin-tabs a {
  padding: 0.5rem 1rem;
  background: var(--wtc-white);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}

.admin-tabs a.active {
  background: var(--wtc-red);
  color: var(--wtc-white);
}

.locker-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 0.35rem 0.75rem;
  max-height: 280px;
  overflow-y: auto;
  padding: 0.75rem;
  border: 1px solid var(--wtc-gray-30);
  border-radius: var(--radius);
  background: #fafafa;
}

.locker-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
}

.locker-check .hint {
  font-size: 0.75rem;
}

.report-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.report-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--wtc-gray-10);
}

.report-list li:last-child {
  border-bottom: none;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.report-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--wtc-gray-10);
}

.report-section h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.report-section-summary {
  margin-bottom: 0.75rem;
}

.report-summary {
  margin: 0.5rem 0 0;
  font-weight: 600;
}

.assignment-summary {
  background: var(--wtc-gray-10);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.assignment-summary p {
  margin: 0.25rem 0;
}

.terms-scroll {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--wtc-gray-30);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.25rem;
  background: #fafafa;
}

/* Sign agreement pages — show full terms without inner scrolling */
.terms-scroll-full {
  max-height: none;
  overflow: visible;
}

.terms-body ol,
.richtext-terms ol {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.terms-body ul,
.richtext-terms ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.terms-body li,
.richtext-terms li {
  margin-bottom: 0.5rem;
}

.richtext-terms h2,
.richtext-terms h3,
.richtext-terms h4 {
  font-family: var(--font-heading, 'Oswald', sans-serif);
  margin: 1rem 0 0.5rem;
  line-height: 1.3;
}

.richtext-terms h2 { font-size: 1.15rem; }
.richtext-terms h3 { font-size: 1.05rem; }
.richtext-terms p { margin: 0.5rem 0; }

/* Admin agreement terms — Quill rich text editors */
.terms-admin-card {
  overflow: visible;
}

.terms-admin-form {
  display: block;
}

.terms-admin-form .richtext-field {
  display: block;
  margin: 0 0 2.5rem;
  padding: 0;
  clear: both;
  position: relative;
}

.terms-admin-form .richtext-label {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  margin: 0 0 0.75rem;
  padding: 0;
  border: none;
  color: var(--wtc-black);
}

.terms-admin-form .quill-editor-wrap {
  display: block;
  width: 100%;
  background: var(--wtc-white);
}

.terms-admin-form .quill-mount {
  display: block;
  min-height: 0;
}

.terms-admin-form .ql-toolbar.ql-snow {
  position: static;
  display: block;
  width: 100%;
  border: 1px solid var(--wtc-gray-30);
  border-radius: var(--radius) var(--radius) 0 0;
  background: #fafafa;
  box-sizing: border-box;
  font-family: var(--font-body);
}

.terms-admin-form .ql-container.ql-snow {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--wtc-gray-30);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  box-sizing: border-box;
}

.terms-admin-form .ql-editor {
  min-height: 200px;
  max-height: 360px;
  overflow-y: auto;
  line-height: 1.5;
}

.terms-admin-form .ql-editor h2,
.terms-admin-form .ql-editor h3 {
  font-family: var(--font-head);
  text-transform: none;
  letter-spacing: normal;
}

.terms-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--wtc-gray-10);
  clear: both;
  position: relative;
  z-index: 2;
  background: var(--wtc-white);
}

.signature-pad-wrap {
  border: 2px solid var(--wtc-gray-30);
  border-radius: var(--radius);
  background: var(--wtc-white);
  touch-action: none;
}

.signature-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.signature-canvas {
  display: block;
  width: 100%;
  height: 180px;
  cursor: crosshair;
}

.signature-label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.agree-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

.agree-label input {
  width: auto;
  margin-top: 0.2rem;
}

.signature-on-file {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--wtc-gray-30);
  border-radius: var(--radius);
  background: #fafafa;
}

.terms-agreed-details {
  margin: 1rem 0;
}

.terms-agreed-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand, #BA0C2F);
}

.terms-scroll-compact {
  max-height: 220px;
  margin-top: 0.75rem;
}

.signature-on-file img {
  max-width: 320px;
  height: auto;
  border: 1px solid var(--wtc-gray-10);
  background: var(--wtc-white);
}

@media print {
  .site-header,
  .site-footer,
  .no-print,
  .alert {
    display: none !important;
  }

  .site-main {
    max-width: none;
    padding: 0;
  }

  .report-card {
    box-shadow: none;
    padding: 0;
  }

  .report-section {
    break-inside: avoid;
  }

  .data-table th {
    background: #333 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.table-actions {
  white-space: nowrap;
  vertical-align: middle;
}

.table-actions .btn {
  margin: 0.15rem 0.2rem 0.15rem 0;
}

@media (min-width: 640px) {
  .table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    white-space: normal;
  }

  .table-actions .btn {
    margin: 0;
  }
}

.checkin-confirm-form {
  margin-top: 1.25rem;
}
