  :root {
    --navy: #001598;
    --navy-dark: #000b5e;
    --sky: #afcee9;
    --sky-light: #eaf3fb;
    --gold: #afcee9;
    --bg: #f4f7fb;
    --card: #ffffff;
    --border: #dfe7f3;
    --text: #101a3d;
    --muted: #555f7a;
    --green: #1c8a54;
    --red: #c0392b;
    --amber: #b9832e;
    --radius: 10px;
  }
  * { box-sizing: border-box; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

  /* ---------- Dark mode: applies to the login screen and the logged-in app
     only — the public homepage and its standalone pages (Admissions,
     Prospectus, Careers, Laboratory, About BACOMM, posts) are intentionally
     excluded and never receive this class; see toggleDarkMode() in script.js. ---------- */
  body.dark-mode {
    --bg: #0d1326;
    --card: #161d38;
    --border: #2a3358;
    --text: #e7ebf7;
    --muted: #99a3c4;
    --navy: #7c9eff;
    --navy-dark: #5b7de0;
    --sky: #8ec4f0;
    --sky-light: #1c2947;
  }
  body.dark-mode input[type=text], body.dark-mode input[type=password], body.dark-mode input[type=date],
  body.dark-mode input[type=month], body.dark-mode input[type=week], body.dark-mode input[type=time], body.dark-mode input[type=number],
  body.dark-mode select, body.dark-mode textarea {
    background: var(--card); color: var(--text);
  }
  body.dark-mode input[readonly] { background: #1a2140; color: var(--muted); }
  .dark-toggle-icon-moon { display: none; }
  body.dark-mode .dark-toggle-icon-sun { display: none; }
  body.dark-mode .dark-toggle-icon-moon { display: inline-flex; }
  .dark-toggle-row { justify-content: space-between; cursor: default; }
  .dark-toggle-row:hover { background: transparent; color: rgba(255,255,255,.85); transform: none; }
  .dark-toggle-switch {
    position: relative; width: 42px; height: 23px; border-radius: 999px; flex-shrink: 0;
    background: rgba(255,255,255,.18); border: none; cursor: pointer; padding: 0;
    transition: background .25s ease;
  }
  .dark-toggle-knob {
    position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%;
    background: #fff; color: var(--navy); display: flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .25s ease;
  }
  body.dark-mode .dark-toggle-switch { background: linear-gradient(135deg, var(--navy), var(--sky)); }
  body.dark-mode .dark-toggle-knob { transform: translateX(19px); box-shadow: 0 0 8px rgba(142,196,240,.8); }
  body {
    margin: 0;
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
  }
  .hidden { display: none !important; }
  .icon-state { display: none; }
  #globalLoaderIcon.state-loading .icon-loading,
  #globalLoaderIcon.state-success .icon-success,
  #globalLoaderIcon.state-error .icon-error { display: inline-flex; }
  .loader-bubbles { position: relative; width: 48px; height: 48px; flex-shrink: 0; animation: loader-bubbles-spin 0.9s linear infinite; }
  .loader-bubbles i { position: absolute; top: 50%; left: 50%; border-radius: 50%; background: var(--navy); }
  .loader-bubbles i:nth-child(1) { width: 13px; height: 13px; margin: -6.5px; opacity: 1; transform: rotate(0deg) translate(17.5px); }
  .loader-bubbles i:nth-child(2) { width: 11.7px; height: 11.7px; margin: -5.85px; opacity: .85; transform: rotate(45deg) translate(17.5px); }
  .loader-bubbles i:nth-child(3) { width: 10.4px; height: 10.4px; margin: -5.2px; opacity: .7; transform: rotate(90deg) translate(17.5px); }
  .loader-bubbles i:nth-child(4) { width: 9.1px; height: 9.1px; margin: -4.55px; opacity: .55; transform: rotate(135deg) translate(17.5px); }
  .loader-bubbles i:nth-child(5) { width: 7.8px; height: 7.8px; margin: -3.9px; opacity: .4; transform: rotate(180deg) translate(17.5px); }
  .loader-bubbles i:nth-child(6) { width: 6.5px; height: 6.5px; margin: -3.25px; opacity: .3; transform: rotate(225deg) translate(17.5px); }
  .loader-bubbles i:nth-child(7) { width: 5.2px; height: 5.2px; margin: -2.6px; opacity: .2; transform: rotate(270deg) translate(17.5px); }
  .loader-bubbles i:nth-child(8) { width: 3.9px; height: 3.9px; margin: -1.95px; opacity: .12; transform: rotate(315deg) translate(17.5px); }
  @keyframes loader-bubbles-spin { to { transform: rotate(360deg); } }
  .global-status-toast {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 99999;
    background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 10px 22px;
    display: flex; align-items: center; gap: 10px; box-shadow: 0 12px 34px rgba(16,26,61,0.28);
    font-size: 13.5px; color: var(--navy); font-weight: 700;
  }
  .global-status-toast.success { color: var(--green); }
  .global-status-toast.error { color: var(--red); }
  .global-status-toast.bare { background: transparent; border: none; box-shadow: none; padding: 0; }
  .global-status-toast .pop-in { animation: globalStatusPop .45s ease; }
  @keyframes globalStatusPop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

  /* ---------- Full-page loading splash (shown until the page finishes loading) ---------- */
  .page-splash {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at center, var(--navy) 0%, var(--navy-dark) 65%, #00042b 100%);
    transition: opacity .5s ease;
  }
  .page-splash.hide { opacity: 0; pointer-events: none; }
  .page-splash-glow {
    position: absolute; width: 420px; height: 420px; border-radius: 50%;
    background: radial-gradient(circle, rgba(175,206,233,.28) 0%, rgba(175,206,233,.12) 35%, rgba(175,206,233,0) 72%);
    animation: pageSplashPulse 1.8s ease-in-out infinite;
  }
  .page-splash-seal { position: relative; width: 100px; height: 100px; object-fit: contain; }
  .page-splash-spinner {
    position: absolute; width: 156px; height: 156px; border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0%, rgba(175,206,233,.25) 55%, var(--sky) 85%, #ffffff 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
    filter: drop-shadow(0 0 6px rgba(175,206,233,.65));
    opacity: 0; transition: opacity .3s ease;
    animation: pageSplashSpin 1.3s linear infinite;
  }
  .page-splash-spinner.show { opacity: 1; }
  @keyframes pageSplashSpin { to { transform: rotate(360deg); } }
  @keyframes pageSplashPulse {
    0%, 100% { opacity: .55; }
    50% { opacity: 1; }
  }
  @media (prefers-reduced-motion: reduce) {
    .page-splash-glow, .page-splash-seal, .page-splash-spinner { animation: none; }
  }

  /* ---------- Motion (subtle, professional) ---------- */
  @keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  main.animate-in { animation: fadeSlideIn 0.25s ease-out; }
  main .card { animation: fadeSlideIn 0.3s ease-out backwards; }
  .announcement-card { animation: fadeSlideIn 0.3s ease-out backwards; }
  .pill { transition: background-color 0.25s ease, color 0.25s ease; }
  .chip { transition: transform 0.12s ease; }
  .chip:hover { transform: translateY(-1px); }
  .pc-card { transition: transform 0.15s ease, box-shadow 0.15s ease; }
  .pc-card:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,0.08); }
  .card table tbody tr { transition: background-color 0.12s ease; }
/* Section-grouped question managers (Survey, Activity Evaluation) render each
   section as a SEPARATE <table> — with the browser's default table-layout,
   each one independently auto-sizes its Status/action columns based only on
   that section's own content, so the buttons land at a different horizontal
   position per section. Fixed layout + explicit widths on every column but
   Question keeps them aligned across every section card. */
.card table.wrap-table { table-layout: fixed; }
  @media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  }

  /* ---------- Login ---------- */
  #forcePasswordScreen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
    padding: 24px;
  }
  #kioskScreen {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  }
  #loginScreen {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  }
  .login-shell {
    display: flex;
    width: 100%;
    min-height: 100vh;
  }
  .login-panel-left {
    flex: 1;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 36px;
    background: #fff;
    position: relative;
  }
  .login-panel-left::after {
    content: '';
    position: absolute; top: 0; bottom: 0; right: 0; width: 5px;
    background: linear-gradient(180deg, var(--gold) 0%, var(--navy) 55%, var(--gold) 100%);
  }
  .login-panel-right {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: var(--navy-dark, #000f33);
  }
  .login-carousel-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease;
  }
  .login-carousel-slide.active { opacity: 1; }
  .login-carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
  }
  .login-carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    transition: background 0.3s ease;
  }
  .login-carousel-dots .dot.active { background: #fff; }
  .login-card {
    background: var(--card);
    border-radius: 14px;
    padding: 36px 32px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  }
  .login-panel-left .login-card { box-shadow: none; padding: 0; max-width: 360px; }
  .login-title {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.55;
    letter-spacing: .15px;
    margin: 0 0 6px;
  }
  .login-logo { display: block; height: 64px; width: auto; max-width: 140px; object-fit: contain; }
  .login-logo-row { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 0 auto 16px; }
  .login-title, .login-sub { text-align: center; }
  @media (max-width: 480px) {
    .login-title { font-size: 12.5px; white-space: nowrap; }
  }
  @media (max-width: 360px) {
    .login-title { font-size: 11px; }
  }
  .login-nexus-logo { display: block; height: 22px; width: auto; margin: 0 auto 26px; }
  .login-sub {
    font-size: 12.5px;
    letter-spacing: .6px;
    color: var(--muted);
    margin: 0 0 26px;
  }
  .tab-switch {
    display: flex;
    background: #eef1f6;
    border-radius: 999px;
    padding: 4px;
    margin-bottom: 22px;
  }
  body.dark-mode .tab-switch { background: var(--sky-light); }
  .tab-switch button {
    flex: 1;
    border: none;
    background: transparent;
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--muted);
    border-radius: 999px;
    cursor: pointer;
    transition: all .15s;
  }
  @media (max-width: 640px) {
    .tab-switch button { font-size: 11.5px; padding: 9px 6px; }
  }
  .eq-item-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; background: #fafbfe; }
  .eq-item-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
  .eq-item-num { font-size: 11px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .5px; }
  .eq-item-remove { background: transparent; border: none; color: var(--red); font-size: 11.5px; font-weight: 600; cursor: pointer; padding: 2px 4px; }
  .eq-item-remove:hover { text-decoration: underline; }
  .tab-switch button.active {
    background: var(--navy);
    color: #fff;
  }
  .year-tab { border: 1px solid var(--border); background: #fff; color: var(--navy); border-radius: 999px; padding: 8px 16px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
  .year-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }
  .semester-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  @media (max-width: 700px) { .semester-grid { grid-template-columns: 1fr; } }
  .semester-card { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: #fafbfe; }
  .semester-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .semester-name { font-weight: 700; color: var(--navy); font-size: 14px; }
  .semester-units { font-size: 11.5px; color: var(--muted, #667); background: #eef1f6; padding: 3px 9px; border-radius: 999px; }
  .course-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  .course-table th { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--border); color: var(--muted, #667); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
  .course-table td { padding: 8px 4px; border-bottom: 1px solid var(--border); vertical-align: top; }
  .course-code { font-weight: 600; color: var(--navy); white-space: nowrap; }
  .course-units { text-align: center; font-weight: 600; }
  .major-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
  .major-lab { background: var(--navy); color: #fff; }
  .major-no-lab { background: var(--sky-light, #dceaf9); color: var(--navy); }
  .elective-badge { background: #fdeecb; color: #9a6b0c; }
  .prereq-tag { display: block; font-size: 10.5px; color: var(--muted, #667); margin-top: 2px; }
  label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .3px;
    color: var(--muted);
    margin: 16px 0 7px;
  }
  input[type=text], input[type=password], input[type=date], input[type=month], input[type=week], input[type=time], input[type=number], select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }
  textarea { resize: vertical; line-height: 1.5; }
  input:focus, select:focus, textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0,21,152,0.10); }
  .rich-editable {
    width: 100%; min-height: 120px; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px; font-family: inherit; line-height: 1.6; background: #fff;
    outline: none; box-sizing: border-box; overflow-y: auto;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }
  .rich-editable:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0,21,152,0.10); }
  .rich-editable ul { margin: 0 0 10px; padding-left: 22px; }
  .rich-editable p, .rich-editable div { margin: 0 0 10px; }
  .rich-editable:empty:before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
  input[readonly] { background: #f0f2f6; color: var(--muted); cursor: not-allowed; }
  .pw-wrap { position: relative; }
  .pw-wrap input[type="password"], .pw-wrap input[type="text"] { padding-right: 40px; }
  .pw-toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: transparent; border: none; cursor: pointer; padding: 4px;
    display: flex; align-items: center; justify-content: center; color: var(--muted);
  }
  .pw-toggle:hover { color: var(--navy); }
  .btn {
    width: 100%;
    margin-top: 22px;
    padding: 11px 0;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  }
  .btn:hover:not(:disabled) { background: var(--navy-dark); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,21,152,0.18); }
  .btn:active:not(:disabled) { transform: translateY(0) scale(0.97); box-shadow: none; }
  .btn:disabled { cursor: not-allowed; opacity: 0.6; }
  .btn.small { width: auto; margin-top: 0; padding: 7px 14px; font-size: 12.5px; }
  .btn.outline { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
  .btn.outline:hover:not(:disabled) { background: var(--sky-light); box-shadow: none; }
  .error-msg { color: var(--red); font-size: 12.5px; margin-top: 10px; min-height: 16px; }

  /* ---------- App shell ---------- */
  #appScreen { display: flex; min-height: 100vh; }
  .sidebar {
    width: 220px;
    background: linear-gradient(160deg, #001598 0%, #000b5e 100%);
    border-right: 1px solid rgba(255,255,255,.08);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
  }
  .nav-icon { flex-shrink: 0; }
  @media (min-width: 861px) {
    .sidebar {
      width: 64px;
      padding: 20px 10px;
      position: fixed;
      left: 0;
      overflow-x: hidden;
      z-index: 50;
      transition: width 0.18s ease, box-shadow 0.18s ease;
      white-space: nowrap;
    }
    .sidebar:hover {
      width: 250px;
      box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    }
    #appScreen main { margin-left: 64px; }
    .nav-label {
      opacity: 1;
      transition: opacity 0.12s ease;
    }
    .sidebar:not(:hover) .nav-label,
    .sidebar:not(:hover) .nav-group-chevron,
    .sidebar:not(:hover) .sidebar-footer {
      opacity: 0;
      pointer-events: none;
    }
    .sidebar:not(:hover) .brand-nexus {
      opacity: 0;
      pointer-events: none;
      width: 0;
      margin: 0;
    }
    .sidebar:not(:hover) .dark-toggle-switch {
      opacity: 0;
      pointer-events: none;
      width: 0;
      margin: 0;
    }
    .sidebar:not(:hover) .dark-toggle-row {
      justify-content: flex-start;
    }
    .sidebar:not(:hover) .brand {
      justify-content: center;
      padding: 8px;
      gap: 0;
    }
    .sidebar:not(:hover) .nav-group-items {
      display: none !important;
    }
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    font-weight: 700;
    color: #001598;
    line-height: 1.4;
    padding: 8px 10px;
    background: rgba(255,255,255,.95);
    border-radius: 12px;
    border-bottom: none;
    margin: 2px 2px 18px;
  }
  .brand-seal { width: 34px; height: 34px; flex-shrink: 0; }
  .brand-nexus { height: 16px; width: auto; }
  .nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255,255,255,.85);
    cursor: pointer;
    margin-bottom: 3px;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  }
  .nav-btn.active, .nav-btn:hover { background: #eaf3fb; color: #001598; }
  .nav-btn:hover { transform: translateX(3px); }
  .nav-btn.nav-sub { padding-left: 26px; font-size: 13px; }
  .nav-group { margin-bottom: 3px; }
  .nav-group-header {
    display: flex; align-items: center; gap: 10px; width: 100%;
    text-align: left; background: transparent; border: none; padding: 10px 12px;
    border-radius: 8px; font-weight: 700; color: rgba(255,255,255,.55);
    cursor: pointer; text-transform: uppercase; letter-spacing: 0.4px; font-size: 11.5px;
    transition: background-color 0.15s ease, color 0.15s ease;
  }
  .nav-group-header:hover { background: #eaf3fb; color: #001598; }
  .nav-group-chevron { transition: transform 0.2s ease; font-size: 10px; margin-left: auto; }
  .nav-group.open > .nav-group-header .nav-group-chevron { transform: rotate(180deg); }
  .nav-group.open > .nav-group-header { color: #fff; }
  .nav-group-items {
    max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
  }
  .nav-group.open > .nav-group-items { max-height: 700px; }
  .sidebar-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.15); }
  .sidebar .btn.outline { color: #fff; border-color: rgba(255,255,255,.65); }
  .sidebar .btn.outline:hover:not(:disabled) { background: rgba(255,255,255,.12); }
  .sidebar .who { color: rgba(255,255,255,.65); }
  .sidebar .site-copyright { color: rgba(255,255,255,.45); }
  .who { font-size: 12px; color: var(--muted); padding: 0 6px 8px; }
  .site-copyright { font-size: 10px; line-height: 1.4; color: var(--muted); margin: 10px 0 0; text-align: center; }
  .login-utility-divider { width: 1px; height: 14px; background: var(--border); }
  .login-copyright { margin-top: 10px; opacity: 0.8; }
  .dev-credit {
    position: fixed; right: 14px; bottom: 10px; z-index: 40; pointer-events: none;
    display: flex; align-items: center; gap: 6px;
    font-size: 10.5px; font-weight: 600; color: var(--muted);
    background: rgba(255,255,255,0.9); padding: 4px 10px;
    border-radius: 999px; border: 1px solid var(--border);
    backdrop-filter: blur(3px);
  }
  .dev-credit-logo { height: 12px; width: auto; display: block; }
  @media (max-width: 640px) {
    .dev-credit { right: 8px; bottom: 8px; font-size: 9.5px; padding: 3px 8px; }
    .dev-credit-logo { height: 10px; }
  }

  main { flex: 1; min-width: 0; padding: 28px 34px; max-width: 100%; width: 100%; box-sizing: border-box; }
  .card table { width: 100%; }
  h1 { font-size: 23px; font-weight: 800; letter-spacing: -0.3px; margin: 0 0 5px; color: var(--navy); }
  .page-sub { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 24px; }
  .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(16,26,61,0.04), 0 4px 14px rgba(16,26,61,0.06);
  }
  .card h2 { font-size: 16px; font-weight: 700; margin: 0 0 16px; color: var(--navy); letter-spacing: -0.1px; }
  .collapsible-header { display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; }
  .collapsible-header h2 { margin: 0; }
  .collapsible-header .collapse-arrow { transition: transform .2s ease; color: var(--muted); font-size: 13px; flex-shrink: 0; margin-left: 10px; }
  .collapsible-header .collapse-arrow.closed { transform: rotate(-90deg); }
  .cro-item-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--border); }
  .cro-item-row:last-child { border-bottom: none; }
  .cro-item-label { font-size: 12.5px; color: var(--text); flex: 1; }
  .cro-scale-inline { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
  .cro-scale-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 700; color: var(--muted); cursor: pointer; }
  .cro-scale-opt input { cursor: pointer; width: 16px; height: 16px; accent-color: var(--navy); }
  .cro-scale-opt input:checked + span { color: var(--navy); }
  .cro-mean-badge { font-size: 11.5px; font-weight: 600; color: var(--navy); background: var(--sky-light); border-radius: 999px; padding: 3px 10px; margin-left: 10px; }
  .stat-box { background: var(--sky-light); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; min-width: 128px; text-align: center; }
  .stat-num { font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1.1; }
  .stat-label { font-size: 11px; color: var(--muted); margin-top: 4px; }
  .dashboard-grid { display: grid; grid-template-columns: 3fr 1fr; gap: 20px; align-items: start; }
  .dashboard-side .card { position: sticky; top: 20px; }
  .quick-link {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px;
    text-decoration: none; color: var(--text); font-weight: 600; font-size: 13.5px;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  }
  .quick-link:last-child { margin-bottom: 0; }
  .quick-link:hover { background: var(--sky-light); border-color: var(--sky); transform: translateX(2px); }
  .quick-link-arrow { color: var(--navy); font-size: 15px; }
  .proc-layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
  .proc-nav { position: sticky; top: 20px; padding: 10px; }
  .proc-nav-item {
    display: block; width: 100%; text-align: left; background: transparent; border: none;
    border-radius: 8px; padding: 11px 12px; margin-bottom: 3px; font-size: 13px; font-weight: 600;
    line-height: 1.35; color: var(--text); cursor: pointer; transition: background-color .15s ease, color .15s ease;
  }
  .proc-nav-item:last-child { margin-bottom: 0; }
  .proc-nav-item:hover { background: var(--sky-light); }
  .proc-nav-item.active { background: var(--navy); color: #fff; }
  .proc-content h2 { font-size: 18px; }
  @media (max-width: 860px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-side .card { position: static; }
    .proc-layout { grid-template-columns: 1fr; }
    .proc-nav { position: static; }
  }
  .target-picker-box { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--sky-light); margin-top: 4px; }
  .target-picker-box > label { display: block; font-size: 12px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
  .chip-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
  .chip {
    display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--sky);
    border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 12px; font-weight: 600; color: var(--navy);
  }
  .chip button {
    border: none; background: var(--sky-light); color: var(--navy); border-radius: 50%; width: 18px; height: 18px;
    font-size: 13px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  }
  .chip button:hover { background: var(--red); color: #fff; }
  .target-picker-list {
    max-height: 240px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px;
    padding: 6px 12px; background: #fff;
  }
  .pc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .pc-card {
    border: 1px solid var(--border); border-radius: 10px; padding: 14px; text-align: center;
  }
  .pc-card.available { background: #e5f6ec; border-color: #bfe3cc; }
  .pc-card.occupied { background: #fdeeee; border-color: #f0c6c6; }
  .pc-name { font-weight: 700; color: var(--navy); font-size: 13.5px; margin-bottom: 6px; }
  .pc-status { font-weight: 600; font-size: 13px; }
  .pc-card.available .pc-status { color: var(--green); }
  .pc-card.occupied .pc-status { color: var(--red); }
  .pc-meta { font-size: 10.5px; color: var(--muted); margin: 2px 0 8px; }
  .pc-card .btn { width: 100%; margin-top: 8px; }
  @media (max-width: 640px) {
    .pc-grid { grid-template-columns: repeat(2, 1fr); }
  }
  .announcement-card {
    border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; background: var(--card);
  }
  .announcement-card.pinned { border-color: #e8b93a; background: #fffaf0; animation: announcement-pulse 1.6s ease-out 1; }
  body.dark-mode .announcement-card.pinned { background: #2e2712; }
  @keyframes announcement-pulse {
    0% { box-shadow: 0 0 0 0 rgba(232,185,58,.55); }
    70% { box-shadow: 0 0 0 12px rgba(232,185,58,0); }
    100% { box-shadow: 0 0 0 0 rgba(232,185,58,0); }
  }
  .announcement-card:last-child { margin-bottom: 0; }
  .announcement-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .announcement-title { font-weight: 700; color: var(--navy); font-size: 14px; }
  .announcement-meta { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
  .announcement-body { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; position: relative; }
  .announcement-body.truncated { max-height: 96px; overflow: hidden; }
  .announcement-body.truncated::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 32px; background: linear-gradient(to bottom, rgba(255,255,255,0), var(--card)); }
  .announcement-card.pinned .announcement-body.truncated::after { background: linear-gradient(to bottom, rgba(255,250,240,0), #fffaf0); }
  body.dark-mode .announcement-card.pinned .announcement-body.truncated::after { background: linear-gradient(to bottom, rgba(46,39,18,0), #2e2712); }
  .announcement-readmore { display: inline-block; margin-top: 6px; background: none; border: none; padding: 0; color: var(--navy); font-size: 12.5px; font-weight: 700; cursor: pointer; }
  .announcement-readmore:hover { text-decoration: underline; }
  table { width: 100%; border-collapse: collapse; font-size: 14px; }
  th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--border); }
  th { color: var(--muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.4px; }
  .pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
  .pill.paid, .pill.cleared { background: #e5f6ec; color: var(--green); }
  .pill.unpaid, .pill.not-cleared { background: #fbe9e7; color: var(--red); }
  .pill.partial { background: #fbf1e0; color: var(--amber); }
  .pay-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
  .pay-stat { flex: 1 1 130px; background: var(--sky-light); border-radius: 10px; padding: 12px 16px; }
  .pay-stat .num { font-size: 20px; font-weight: 700; color: var(--navy); line-height: 1.2; }
  .pay-stat .lbl { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; margin-top: 2px; }
  .pay-table tbody tr { transition: background .15s ease; }
  .pay-table tbody tr:hover { background: var(--sky-light); }
  .pay-row-paid td:first-child { box-shadow: inset 3px 0 0 var(--green); }
  .pay-row-unpaid td:first-child { box-shadow: inset 3px 0 0 var(--red); }
  .method-select { width: auto; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 16px; background: #fff; }
  .survey-wrap { max-width: 720px; margin: 0 auto; }
  .sq-drag-handle { cursor: grab; color: var(--muted); text-align: center; font-size: 16px; user-select: none; }
  .sq-drag-handle:active { cursor: grabbing; }
  tr[draggable="true"] { transition: background .15s ease; }
  tr[draggable="true"]:hover { background: var(--sky-light); }
  .survey-card { animation: surveyCardIn .35s ease both; }
  .survey-card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .survey-section-title { font-size: 16px; font-weight: 700; color: var(--navy); margin: 0 0 18px; padding-bottom: 10px; border-bottom: 2px solid var(--sky-light); }
  .survey-progress-wrap { position: relative; }
  .survey-dots { display: flex; justify-content: space-between; margin-top: 6px; padding: 0 1px; }
  .survey-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--border); transition: all .25s ease; }
  .survey-dot.done { background: var(--green); }
  .survey-dot.active { background: var(--navy); transform: scale(1.5); }
  .survey-question { padding: 16px 0; border-bottom: 1px solid var(--border); animation: surveyQIn .3s ease both; }
  .survey-question:last-child { border-bottom: none; }
  .survey-question-text { font-size: 13.5px; font-weight: 600; margin: 0 0 12px; line-height: 1.4; }
  .survey-scale { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .survey-scale-label { font-size: 10.5px; color: var(--muted); max-width: 92px; line-height: 1.3; }
  .survey-scale-opt {
    display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px;
    flex: 1 1 130px; padding: 11px 16px; border: 1.5px solid var(--border); border-radius: 999px;
    font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
  }
  .survey-scale-opt:hover { border-color: var(--sky); background: var(--sky-light); transform: translateY(-2px); }
  .survey-scale-opt input { cursor: pointer; width: 16px; height: 16px; accent-color: var(--navy); margin: 0; flex-shrink: 0; }
  .survey-scale-opt:has(input:checked) {
    background: var(--navy); border-color: var(--navy); color: #fff;
    transform: scale(1.05); box-shadow: 0 6px 16px rgba(0,21,152,.32);
  }
  .survey-scale-opt:has(input:checked):hover { transform: scale(1.05) translateY(-2px); }
  .survey-page-body { animation: surveyPageIn .3s ease both; }
  @keyframes surveyPageIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
  @keyframes surveyQIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes surveyCardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
  .survey-intro-text { font-size: 13px; line-height: 1.6; color: var(--text); margin: 0 0 12px; }
  .survey-legend { background: var(--sky-light); border-radius: 10px; padding: 14px 16px; margin: 8px 0 20px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text); }
  .survey-privacy { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 4px; }
  .survey-consent { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text); }
  .survey-consent input { width: 17px; height: 17px; margin-top: 1px; cursor: pointer; accent-color: var(--navy); flex-shrink: 0; }
  .inline-form { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; align-items: flex-end; margin-bottom: 16px; padding-bottom: 4px; }
  .inline-form .field { display: flex; flex-direction: column; flex: 1 1 180px; min-width: 150px; }
  .inline-form label { margin: 0 0 4px; white-space: nowrap; }
  .inline-form input, .inline-form select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 16px; width: 100%; box-sizing: border-box; }
  .inline-form button { flex: 0 0 auto; white-space: nowrap; }

