/* Adapted from im/index.html; common visual language retained. */

    :root {
      --ink: #1f2e50;
      --muted: #62708a;
      --paper: #f5f7fb;
      --white: #ffffff;
      --forest: #293d7a;
      --forest-2: #284064;
      --mint: #b2dced;
      --lime: #f7b833;
      --amber: #f7b833;
      --red: #e3413a;
      --line: #d7dfec;
      --shadow: 0 18px 50px rgba(41, 61, 122, .13);
      --radius: 20px;
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      color: var(--ink);
      background:
        radial-gradient(circle at 88% 8%, rgba(247, 184, 51, .18), transparent 26rem),
        radial-gradient(circle at 8% 18%, rgba(178, 220, 237, .45), transparent 24rem),
        linear-gradient(180deg, #eef4fa 0, var(--paper) 28rem);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      line-height: 1.55;
      min-height: 100vh;
    }

    button, input, select { font: inherit; }
    button { cursor: pointer; }
    button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
      outline: 3px solid rgba(41, 61, 122, .26);
      outline-offset: 3px;
    }

    .shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
    .topbar {
      position: sticky;
      top: 0;
      z-index: 50;
      border-bottom: 1px solid rgba(41, 61, 122, .12);
      background: rgba(255, 255, 255, .90);
      backdrop-filter: blur(16px);
    }
    .topbar-inner {
      min-height: 70px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
    }
    .topbar-left {
      display: flex;
      align-items: center;
      gap: 18px;
      min-width: 0;
    }
    .brand { display: flex; align-items: center; gap: 12px; }
    .brand-mark {
      width: 42px;
      height: 42px;
      display: grid;
      place-items: center;
      border-radius: 13px;
      color: white;
      background: var(--forest);
      font-weight: 850;
      letter-spacing: -.04em;
      box-shadow: 0 8px 18px rgba(41, 61, 122, .20);
    }
    .brand-copy strong, .brand-copy span { display: block; }
    .brand-copy strong { font-size: .92rem; letter-spacing: .03em; }
    .brand-copy span { color: var(--muted); font-size: .76rem; }
    .btn.top-admin-btn {
      min-height: 40px;
      flex: 0 0 auto;
      padding: 8px 15px;
      border-color: #d49b1f;
      color: #253764;
      background: var(--lime);
      box-shadow: none;
    }

    .hero {
      position: relative;
      overflow: hidden;
      margin-top: 28px;
      padding: clamp(28px, 6vw, 62px);
      border-radius: 30px;
      color: white;
      background: var(--forest);
      box-shadow: var(--shadow);
    }
    .hero::after {
      content: "";
      position: absolute;
      width: 290px;
      height: 290px;
      right: -85px;
      top: -100px;
      border-radius: 50%;
      border: 52px solid rgba(247, 184, 51, .20);
    }
    .eyebrow {
      margin: 0 0 14px;
      color: var(--lime);
      font-size: .77rem;
      font-weight: 800;
      letter-spacing: .16em;
      text-transform: uppercase;
    }
    .hero h1 {
      max-width: 790px;
      margin: 0;
      font-family: Georgia, "Times New Roman", serif;
      font-size: clamp(2.15rem, 6vw, 4.65rem);
      font-weight: 500;
      letter-spacing: -.045em;
      line-height: .98;
    }
    .hero p {
      max-width: 700px;
      margin: 22px 0 0;
      color: #e7eefb;
      font-size: clamp(.98rem, 2vw, 1.14rem);
    }
    .hero-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 28px;
    }
    .hero-meta span {
      padding: 8px 11px;
      border: 1px solid rgba(255, 255, 255, .18);
      border-radius: 999px;
      background: rgba(255, 255, 255, .07);
      color: #f3f6fc;
      font-size: .78rem;
    }
    .database-status { font-weight: 800; }
    .database-status.online { background: rgba(53, 190, 125, .2); border-color: rgba(133, 233, 185, .55); }
    .database-status.local { background: rgba(255, 184, 35, .2); border-color: rgba(255, 210, 111, .55); }

    .steps {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 10px;
      margin: 22px 0;
    }
    .step {
      display: flex;
      align-items: center;
      gap: 11px;
      min-height: 60px;
      padding: 11px 13px;
      border: 1px solid var(--line);
      border-radius: 16px;
      color: var(--muted);
      background: rgba(255, 255, 255, .74);
      text-align: left;
      transition: .2s ease;
    }
    .step:hover { transform: translateY(-2px); border-color: #aebdd7; }
    .step.active { color: var(--forest); border-color: #8fa7d0; background: var(--white); box-shadow: 0 8px 22px rgba(41,61,122,.09); }
    .step.done .step-no { background: var(--mint); color: var(--forest); }
    .step-no {
      flex: 0 0 auto;
      width: 31px;
      height: 31px;
      display: grid;
      place-items: center;
      border-radius: 10px;
      color: white;
      background: #8290ad;
      font-weight: 850;
      font-size: .82rem;
    }
    .step.active .step-no { background: var(--forest); }
    .step-label strong, .step-label small { display: block; }
    .step-label strong { font-size: .83rem; }
    .step-label small { font-size: .69rem; font-weight: 500; color: var(--muted); }

    main { padding-bottom: 70px; }
    .view { display: none; animation: fade .25s ease; }
    .view.active { display: block; }
    @keyframes fade { from { opacity: .45; transform: translateY(4px); } }

    .grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 20px; }
    .card {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      box-shadow: 0 12px 36px rgba(41, 61, 122, .07);
    }
    .card-pad { padding: clamp(20px, 4vw, 30px); }
    .card h2, .card h3 { margin-top: 0; }
    .card h2 { margin-bottom: 8px; font-size: clamp(1.3rem, 3vw, 1.75rem); letter-spacing: -.025em; }
    .card h3 { margin-bottom: 8px; font-size: 1.05rem; }
    .subtle { color: var(--muted); font-size: .9rem; }
    .small { font-size: .78rem; }
    .divider { height: 1px; margin: 22px 0; background: var(--line); }

    .dropzone {
      display: block;
      padding: 28px 20px;
      border: 1.5px dashed #89a7cf;
      border-radius: 18px;
      background: #f1f7fb;
      text-align: center;
      transition: .2s ease;
    }
    .dropzone.drag { transform: scale(1.01); border-color: var(--forest); background: #e4f3f9; }
    .drop-icon {
      width: 54px;
      height: 54px;
      display: grid;
      place-items: center;
      margin: 0 auto 13px;
      border-radius: 17px;
      color: white;
      background: var(--forest);
      font-size: 1.45rem;
      font-weight: 900;
    }
    .dropzone strong { display: block; color: var(--forest); }
    .dropzone input { position: absolute; opacity: 0; pointer-events: none; }
    .file-status {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-top: 14px;
      padding: 12px 14px;
      border-radius: 14px;
      background: #f6f8fc;
      font-size: .82rem;
    }
    .status-dot { width: 9px; height: 9px; display: inline-block; margin-right: 7px; border-radius: 50%; background: #9aaba6; }
    .status-dot.ready { background: #3da36c; }

    .notice {
      display: flex;
      gap: 12px;
      padding: 15px;
      border-radius: 15px;
      color: #314467;
      background: #eaf4f8;
      font-size: .82rem;
    }
    .notice.warn { background: #fff3d9; color: #694915; }
    .notice strong { display: block; margin-bottom: 3px; }
    .notice-icon { font-size: 1.1rem; line-height: 1.2; }

    .field { margin-bottom: 17px; }
    .field label, .field-label {
      display: block;
      margin-bottom: 7px;
      color: #344563;
      font-size: .79rem;
      font-weight: 800;
    }
    .required { color: var(--red); }
    input[type="text"], input[type="search"], input[type="email"], input[type="tel"], input[type="password"], select {
      width: 100%;
      min-height: 48px;
      padding: 11px 13px;
      border: 1px solid #c8d2e2;
      border-radius: 13px;
      color: var(--ink);
      background: white;
      transition: .2s ease;
    }
    input:focus, select:focus { border-color: var(--forest); box-shadow: 0 0 0 4px rgba(41, 61, 122, .10); }
    input[readonly] { color: #586783; background: #f3f5f9; }
    .uppercase-input { text-transform: uppercase; }
    .helper { display: block; margin-top: 6px; color: var(--muted); font-size: .72rem; }
    .error-text { color: var(--red); }

    .search-wrap { position: relative; }
    .search-wrap input { padding-left: 43px; }
    .search-symbol { position: absolute; left: 15px; top: 13px; color: var(--muted); }
    .results { display: grid; gap: 8px; margin-top: 13px; max-height: 390px; overflow: auto; }
    .result {
      width: 100%;
      display: grid;
      grid-template-columns: 42px 1fr auto;
      gap: 12px;
      align-items: center;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: white;
      color: inherit;
      text-align: left;
    }
    .result:hover { border-color: #8fa7d0; background: #f3f7fc; }
    .avatar {
      width: 42px;
      height: 42px;
      display: grid;
      place-items: center;
      border-radius: 13px;
      color: var(--forest);
      background: var(--mint);
      font-weight: 850;
      font-size: .82rem;
    }
    .result strong, .result small { display: block; }
    .result strong { font-size: .86rem; }
    .result small { margin-top: 2px; color: var(--muted); font-size: .72rem; }
    .arrow { color: var(--forest); font-size: 1.15rem; }

    .btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
    .btn {
      min-height: 45px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 10px 16px;
      border: 1px solid transparent;
      border-radius: 13px;
      font-weight: 800;
      font-size: .82rem;
      text-decoration: none;
      transition: .2s ease;
    }
    .btn:hover { transform: translateY(-1px); }
    .btn-primary { color: white; background: var(--forest); box-shadow: 0 8px 18px rgba(41, 61, 122, .20); }
    .btn-secondary { color: var(--forest); border-color: #aebdd7; background: white; }
    .btn-soft { color: var(--forest); background: var(--mint); }
    .btn-danger { color: #a52d28; border-color: #edb5b1; background: #fff4f3; }
    .btn:disabled { cursor: not-allowed; transform: none; opacity: .48; box-shadow: none; }
    .wide { width: 100%; }

    .profile-banner {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 24px;
      padding: 18px;
      border-radius: 17px;
      color: white;
      background: var(--forest);
    }
    .profile-banner .avatar { width: 54px; height: 54px; color: var(--forest); background: var(--lime); }
    .profile-banner strong, .profile-banner small { display: block; }
    .profile-banner small { color: #dbe5f7; }
    .details-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .data-tile { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #f7f9fc; }
    .data-tile span, .data-tile strong { display: block; }
    .data-tile span { color: var(--muted); font-size: .69rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
    .data-tile strong { margin-top: 5px; font-size: .87rem; word-break: break-word; }
    .dynamic-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; }

    .agreement-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
    .agreement-paper { padding: clamp(22px, 5vw, 42px); }
    .agreement-kicker { color: var(--forest-2); font-size: .76rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
    .agreement-paper h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 4vw, 2.65rem); font-weight: 500; line-height: 1.08; }
    .agreement-intro { padding: 16px 18px; border-left: 4px solid var(--lime); background: #f3f7fb; }
    .commitments { counter-reset: commitment; display: grid; gap: 12px; margin: 24px 0; padding: 0; list-style: none; }
    .commitments li {
      counter-increment: commitment;
      display: grid;
      grid-template-columns: 35px 1fr;
      gap: 12px;
      align-items: start;
      padding-bottom: 12px;
      border-bottom: 1px solid #e2e7f0;
      font-size: .9rem;
    }
    .commitments li::before {
      content: counter(commitment);
      width: 32px;
      height: 32px;
      display: grid;
      place-items: center;
      border-radius: 10px;
      color: var(--forest);
      background: var(--mint);
      font-weight: 850;
      font-size: .78rem;
    }
    .signature-card { position: sticky; top: 92px; padding: 22px; }
    .student-chip { margin: 15px 0; padding: 13px; border-radius: 14px; background: #eef4fa; }
    .student-chip span, .student-chip strong { display: block; }
    .student-chip span { color: var(--muted); font-size: .7rem; }
    .student-chip strong { margin-top: 3px; font-size: .84rem; }
    .choice { display: block; margin-top: 10px; }
    .choice input { position: absolute; opacity: 0; }
    .choice-box {
      display: flex;
      gap: 10px;
      align-items: flex-start;
      padding: 13px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: white;
      font-size: .82rem;
      transition: .2s ease;
    }
    .choice input:checked + .choice-box { border-color: var(--forest); background: #edf3fb; box-shadow: 0 0 0 3px rgba(41,61,122,.08); }
    .choice.no input:checked + .choice-box { border-color: var(--red); background: #fff3f1; }
    .radio-dot {
      width: 19px;
      height: 19px;
      flex: 0 0 auto;
      border: 2px solid #9baba6;
      border-radius: 50%;
      box-shadow: inset 0 0 0 4px white;
    }
    .choice input:checked + .choice-box .radio-dot { border-color: var(--forest); background: var(--forest); }
    .choice.no input:checked + .choice-box .radio-dot { border-color: var(--red); background: var(--red); }
    .timestamp { margin-top: 13px; padding: 10px; border-radius: 12px; color: var(--forest); background: var(--mint); font-size: .73rem; }

    .summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
    .metric { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #f6f8fc; }
    .metric strong, .metric span { display: block; }
    .metric strong { color: var(--forest); font-size: 1.65rem; line-height: 1; }
    .metric span { margin-top: 7px; color: var(--muted); font-size: .72rem; }
    .tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .tool {
      padding: 18px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: white;
    }
    .tool h3 { margin-bottom: 5px; }

    .admin-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 20px;
    }
    .admin-header h2 { margin-bottom: 5px; }
    .admin-controls {
      display: grid;
      grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(150px, .7fr));
      gap: 10px;
      margin: 20px 0 14px;
    }
    .admin-controls .field { margin: 0; }
    .admin-table-wrap {
      overflow-x: auto;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: white;
    }
    .admin-table {
      width: 100%;
      min-width: 1580px;
      border-collapse: collapse;
      font-size: .76rem;
    }
    .admin-table th, .admin-table td {
      padding: 12px 13px;
      border-bottom: 1px solid var(--line);
      text-align: left;
      vertical-align: top;
    }
    .admin-table th {
      position: sticky;
      top: 0;
      z-index: 1;
      color: var(--forest);
      background: #eef3fb;
      font-size: .68rem;
      text-transform: uppercase;
      letter-spacing: .055em;
      white-space: nowrap;
    }
    .admin-table tbody tr:hover { background: #f8faff; }
    .admin-table tbody tr:last-child td { border-bottom: 0; }
    .admin-name { min-width: 225px; font-weight: 800; }
    .admin-contact { min-width: 180px; word-break: break-word; }
    .admin-photo-thumb {
      width: 48px;
      height: 48px;
      display: block;
      border-radius: 10px;
      object-fit: cover;
      background: #e8edf5;
    }
    .admin-photo-link {
      display: inline-grid;
      justify-items: center;
      gap: 4px;
      color: var(--forest);
      font-size: .67rem;
      font-weight: 800;
      text-decoration: none;
    }
    .admin-photo-link:hover span { text-decoration: underline; }
    .status-badge {
      display: inline-flex;
      align-items: center;
      padding: 5px 9px;
      border-radius: 999px;
      background: #edf1f7;
      color: var(--muted);
      font-weight: 800;
      white-space: nowrap;
    }
    .status-badge.agreed { color: #17613f; background: #dcf4e7; }
    .status-badge.not-agreed { color: #9b302a; background: #ffebe8; }
    .status-badge.complete { color: var(--forest); background: #e1ecfb; }
    .admin-empty { padding: 38px 18px; color: var(--muted); text-align: center; }
    .admin-result-count { margin: 0 0 10px; color: var(--muted); font-size: .78rem; }
    .logout-btn { color: #8d2828 !important; background: #fff0ed !important; border-color: #e6aaa3 !important; }
    .btn-reset {
      min-height: 32px;
      padding: 6px 10px;
      border: 1px solid #e4aaa4;
      border-radius: 9px;
      color: #8d2828;
      background: #fff3f1;
      font-size: .69rem;
      font-weight: 850;
      white-space: nowrap;
    }
    .btn-reset:hover { color: white; background: #a83831; border-color: #a83831; }
    .student-reset-panel {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-top: 20px;
      padding: 14px 15px;
      border: 1px solid #edd2ce;
      border-radius: 14px;
      background: #fff8f6;
    }
    .student-reset-panel strong, .student-reset-panel span { display: block; }
    .student-reset-panel strong { color: #7e302b; font-size: .82rem; }
    .student-reset-panel span { margin-top: 3px; color: var(--muted); font-size: .72rem; }
    .btn-student-reset {
      flex: 0 0 auto;
      color: #8d2828;
      background: white;
      border-color: #dda6a0;
    }
    .btn-student-reset:not(:disabled):hover { color: white; background: #a83831; border-color: #a83831; }
    .photo-upload-box {
      display: grid;
      grid-template-columns: 92px 1fr;
      align-items: center;
      gap: 14px;
      padding: 14px;
      border: 1px dashed #aab9d1;
      border-radius: 15px;
      background: #f7f9fc;
    }
    .photo-preview {
      width: 92px;
      height: 92px;
      display: grid;
      place-items: center;
      overflow: hidden;
      border-radius: 14px;
      color: var(--muted);
      background: #e8edf5;
      font-size: .68rem;
      text-align: center;
    }
    .photo-preview img { width: 100%; height: 100%; object-fit: cover; }
    .photo-upload-copy strong, .photo-upload-copy span { display: block; }
    .photo-upload-copy span { margin: 5px 0 10px; color: var(--muted); font-size: .72rem; }
    .photo-upload-copy input { width: 100%; font-size: .72rem; }

    dialog {
      width: min(520px, calc(100% - 28px));
      border: 0;
      border-radius: 22px;
      padding: 0;
      color: var(--ink);
      background: var(--white);
      box-shadow: 0 30px 90px rgba(8, 30, 28, .28);
    }
    dialog::backdrop { background: rgba(8, 30, 28, .55); backdrop-filter: blur(5px); }
    .dialog-body { padding: 26px; }
    .dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

    .toast {
      position: fixed;
      left: 50%;
      bottom: 24px;
      z-index: 100;
      max-width: calc(100% - 32px);
      padding: 12px 17px;
      border-radius: 13px;
      color: white;
      background: #293d7a;
      box-shadow: 0 14px 40px rgba(8,30,28,.25);
      font-size: .82rem;
      transform: translate(-50%, 130%);
      opacity: 0;
      transition: .3s ease;
    }
    .toast.show { transform: translate(-50%, 0); opacity: 1; }
    .hidden { display: none !important; }
    footer { padding: 28px 0 45px; color: var(--muted); text-align: center; font-size: .75rem; }

    #printArea { display: none; }
    .print-agreement { margin: 18px 0 0; padding: 0; }
    .print-agreement li { margin-bottom: 8px; }

    @media (max-width: 900px) {
      .grid, .agreement-layout { grid-template-columns: 1fr; }
      .signature-card { position: static; }
      .steps { grid-template-columns: repeat(2, 1fr); }
      .summary-grid { grid-template-columns: repeat(2, 1fr); }
      .admin-controls { grid-template-columns: 1fr 1fr; }
      .admin-controls .field:first-child { grid-column: 1 / -1; }
    }
    @media (max-width: 620px) {
      .shell { width: min(100% - 20px, 1180px); }
      .topbar-inner { min-height: 62px; padding: 8px 0; }
      .topbar-left { width: auto; gap: 8px; }
      .top-admin-btn { min-height: 36px; padding: 7px 9px; font-size: .68rem; }
      .brand-copy strong { max-width: 125px; font-size: .70rem; line-height: 1.2; }
      .brand-copy span { display: none; }
      .hero { margin-top: 14px; border-radius: 22px; padding: 28px 22px; }
      .steps { display: flex; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
      .step { min-width: 142px; }
      .step-label small { display: none; }
      .details-grid, .dynamic-fields, .tool-grid { grid-template-columns: 1fr; }
      .summary-grid { grid-template-columns: repeat(2, 1fr); }
      .card-pad, .agreement-paper { padding: 20px; }
      .result { grid-template-columns: 42px 1fr; }
      .result .arrow { display: none; }
      .btn-row .btn { flex: 1 1 145px; }
      .admin-header { display: block; }
      .admin-header .btn-row { margin-top: 14px; }
      .admin-controls { grid-template-columns: 1fr; }
      .admin-controls .field:first-child { grid-column: auto; }
      .student-reset-panel { display: block; }
      .student-reset-panel .btn { width: 100%; margin-top: 12px; }
      .photo-upload-box { grid-template-columns: 76px 1fr; }
      .photo-preview { width: 76px; height: 76px; }
    }

    @media print {
      @page { size: A4; margin: 14mm; }
      body { background: white !important; color: #111; font-family: Arial, sans-serif; font-size: 10pt; }
      body > *:not(#printArea) { display: none !important; }
      #printArea { display: block !important; }
      .print-header { padding-bottom: 12px; border-bottom: 3px solid #293d7a; }
      .print-header h1 { margin: 0 0 4px; color: #293d7a; font-family: Georgia, serif; font-size: 22pt; }
      .print-header p { margin: 0; color: #555; }
      .print-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px 18px; margin: 15px 0; }
      .print-item { padding: 6px 0; border-bottom: 1px solid #ddd; }
      .print-item span, .print-item strong { display: block; }
      .print-item span { color: #666; font-size: 8pt; text-transform: uppercase; }
      .print-item strong { margin-top: 2px; }
      .print-status { padding: 10px 12px; border: 1px solid #293d7a; background: #eef4fa; }
      .print-agreement { font-size: 9pt; line-height: 1.35; }
      .print-footer { margin-top: 18px; padding-top: 8px; border-top: 1px solid #bbb; color: #666; font-size: 8pt; }
    }
  /* Five-course portal components */
.dark { color: var(--forest); }
.course-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; margin-top:24px; }
.course-card { width:100%; min-height:170px; padding:20px; border:1px solid var(--line); border-radius:18px; text-align:left; background:#f8faff; color:var(--ink); cursor:pointer; transition:.2s; }
.course-card:hover,.course-card:focus-visible { border-color:var(--forest); transform:translateY(-3px); box-shadow:var(--shadow); }
.course-card strong,.course-card span,.course-card small { display:block; }
.course-card strong { font-size:1.05rem; margin:8px 0; }
.course-code { color:var(--forest); font-weight:800; letter-spacing:.08em; font-size:.75rem; }
.course-card small { color:var(--muted); }
.field { display:block; margin:14px 0; font-size:.84rem; font-weight:700; }
.field input,.field select,.field textarea { display:block; width:100%; margin-top:7px; padding:12px 13px; border:1px solid var(--line); border-radius:12px; background:white; color:var(--ink); font:inherit; font-weight:400; }
.field textarea { resize:vertical; line-height:1.55; }
.field input:focus,.field textarea:focus,.field select:focus { border-color:var(--forest); outline:3px solid #d7e2fb; }
.required,.error-text { color:var(--red); }
.btn-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
.summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:10px; margin:20px 0; }
.summary-item { padding:12px; border:1px solid var(--line); border-radius:12px; background:#f8faff; overflow-wrap:anywhere; }
.summary-item span,.summary-item strong { display:block; }
.summary-item span { font-size:.72rem; color:var(--muted); }
.summary-item strong { margin-top:4px; font-size:.9rem; }
.agreement-content { white-space:pre-wrap; line-height:1.8; margin-top:25px; }
.choice { display:flex; align-items:flex-start; gap:9px; margin:12px 0; font-size:.88rem; }
.choice input { margin-top:4px; }
fieldset { border:0; padding:0; margin:20px 0; }
legend { font-weight:800; }
.review-check { padding:12px; border-radius:12px; background:#f4f7fc; }
.admin-panels { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-top:28px; }
.metric-strip { display:flex; flex-wrap:wrap; gap:12px; margin-top:18px; }
.metric { flex:1; min-width:110px; padding:16px; border:1px solid var(--line); border-radius:14px; background:#f8faff; }
.metric strong,.metric span { display:block; }
.metric strong { font-size:1.6rem; color:var(--forest); }
.metric span { font-size:.76rem; color:var(--muted); }
.admin-table-wrap { overflow:auto; }
.admin-table { width:100%; border-collapse:collapse; }
.admin-table th,.admin-table td { padding:10px; border-bottom:1px solid var(--line); vertical-align:top; text-align:left; white-space:nowrap; }
.admin-table td:first-child { white-space:normal; min-width:180px; }
.admin-table small { display:block; color:var(--muted); }
.footer { padding:28px 0 38px; color:var(--muted); font-size:.78rem; }
.toast { position:fixed; z-index:100; bottom:20px; right:20px; max-width:min(430px,calc(100vw - 40px)); padding:14px 18px; border-radius:13px; background:var(--forest); color:white; box-shadow:var(--shadow); }
dialog { border:0; border-radius:20px; width:min(440px,calc(100% - 32px)); padding:30px; box-shadow:var(--shadow); }
dialog::backdrop { background:rgba(20,32,60,.55); }
@media(max-width:760px) { .steps { display:flex; overflow:auto; } .step { min-width:145px; } .admin-panels { grid-template-columns:1fr; } .hero { padding:28px; } .hero h1 { font-size:clamp(2rem,8vw,3rem); } .brand-copy strong { max-width:220px; } }
@media print { #printContent { line-height:1.5; } #printContent .summary { grid-template-columns:1fr 1fr; } #printContent .agreement-content { font-size:9pt; } }

.settings-panels { padding:22px 0; border-bottom:1px solid var(--line); }
.result-avatar,.profile-avatar {display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:var(--mint);color:var(--forest);font-weight:850;font-size:.8rem;}
.profile-avatar {width:54px;height:54px;background:#ffca49;flex:0 0 auto;}
#ackForm .choice input,#agreementAdminForm .choice input {position:static;opacity:1;accent-color:var(--forest);}
#ackForm .choice {padding:12px;border:1px solid var(--line);border-radius:12px;cursor:pointer;}
#ackForm .choice:has(input:checked) {border-color:var(--forest);background:#edf3fb;}
.dropzone input {display:block;margin:12px auto 0;max-width:100%;}
.agreement-content:has(.commitments) {white-space:normal;}
.agreement-disclaimer {margin:28px 0 0;padding-top:18px;border-top:1px solid var(--line);line-height:1.65;}
.agreement-version {margin-top:15px;color:var(--muted);font-size:.72rem;}
.agreement-review {grid-template-columns:1fr;margin:10px 0;}
.agreement-review .summary-item {padding:9px 11px;}
.signature-card h3 {margin:0 0 14px;}
.agreement-choice {display:block;margin:9px 0;cursor:pointer;}
.agreement-choice input {position:absolute;opacity:0;}
.agreement-choice input:checked+.choice-box {border-color:var(--forest);background:#edf3fb;box-shadow:0 0 0 3px rgba(41,61,122,.08);}
.agreement-choice input:focus-visible+.choice-box {outline:3px solid #a8bee9;outline-offset:2px;}
.agreement-choice input:checked+.choice-box .radio-dot {border-color:var(--forest);background:var(--forest);}
.agreement-choice .choice-box strong,.agreement-choice .choice-box small {display:block;}
.agreement-choice .choice-box small {margin-top:3px;color:var(--muted);line-height:1.4;}
.agreement-choice .choice-box {align-items:center;}
.agreement-choice .radio-dot {margin-top:2px;}
.signature-card #continueReceipt {margin-top:10px;}
.visually-hidden {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.manual-records {padding:4px 0;}
.manual-record-form {display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:12px;align-items:end;margin:12px 0 18px;}
.manual-record-form .field {margin:0;}
.manual-record-form .btn {grid-column:1/-1;justify-self:start;}
.admin-actions {display:flex;flex-wrap:wrap;gap:6px;min-width:235px;}
.admin-actions .btn {min-height:32px;padding:6px 10px;font-size:.69rem;white-space:nowrap;}
@media(max-width:760px){.manual-record-form {grid-template-columns:1fr 1fr;}}
@media(max-width:500px){.manual-record-form {grid-template-columns:1fr;}}
#newCodeNotice { margin-top:20px; font-weight:700; overflow-wrap:anywhere; }
