    :root {
      --accent: #609078;
      --accent-dark: #4a7060;
      --accent-light: #e8f0eb;
      --dark: #1a1a2e;
      --card: #ffffff;
      --bg: #e6e1ef;
      --border: #e0d9eb;
      --text: #2d2d3a;
      --muted: #7a7a8a;
      --green: #2e7d32;
      --green-bg: #e8f5e9;
      --red: #c62828;
      --red-bg: #fde8e8;
      --yellow-bg: #fff8e1;
      --yellow: #f57f17;
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
    header {
      background: var(--dark); color: white;
      padding: 14px 20px;
      display: flex; align-items: center; justify-content: space-between;
      box-shadow: 0 2px 10px rgba(0,0,0,0.3);
      gap: 12px;
    }
    .header-left { display: flex; align-items: center; gap: 12px; }
    header h1 { font-family: 'DM Serif Display', serif; font-size: 18px; font-weight: 400; }
    .badge { background: #0b8043; color: white; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 12px; letter-spacing: 0.05em; text-transform: uppercase; }
    .badge-full { display: inline; }
    .badge-short { display: none; }
    @media (max-width: 480px) { .badge-full { display: none; } .badge-short { display: inline; } }
    .clock { font-size: 13px; color: rgba(255,255,255,0.7); white-space: nowrap; text-align: right; line-height: 1.4; }
    .clock strong { color: white; font-size: 15px; display: block; }
    .clock-date-short { display: none; }
    @media (max-width: 600px) {
      header { padding: 10px 12px; align-items: flex-start; gap: 6px; }
      #header-inner { align-items: flex-start; gap: 6px; }
      .header-left { gap: 4px; flex-direction: column; align-items: flex-start; }
      .header-left-badges { display: flex; align-items: center; gap: 6px; }
      header h1 { font-size: 15px; }
      .clock { font-size: 11px; line-height: 1.3; max-width: 80px; overflow: hidden; }
      .clock strong { font-size: 12px; }
      .clock-date-full { display: none; }
      .clock-date-short { display: inline; }
      .badge { font-size: 10px; padding: 2px 6px; }
      #dash-version { font-size: 10px; color: rgba(255,255,255,0.45); }
      #worker-version { display: none !important; }
      .badge-full { display: none; }
      .badge-short { display: inline; }
      .search-bar { flex-wrap: wrap; padding: 8px 12px; }
      .search-bar input { width: 100%; flex: none; order: 1; }
      .search-bar select { flex: 1; order: 3; font-size: 11px; padding: 5px 4px; }
      .search-bar button { order: 2; }
      .search-bar .search-clear { order: 4; }
    }

    /* ── HEADER PILLS ───────────────────────────────────────────────── */
    .header-pills {
      display: flex; gap: 10px;
      overflow-x: auto; scrollbar-width: none; padding: 6px 0 2px;
      flex-shrink: 1; min-width: 0;
    }
    .header-pills::-webkit-scrollbar { display: none; }
    .header-pills.scroll-paused { overflow-x: auto; }
    .header-pill {
      display: inline-flex; align-items: center; white-space: nowrap;
      padding: 3px 11px; border-radius: 12px;
      font-size: 11px; font-weight: 700; color: white;
      text-shadow: 0 1px 2px rgba(0,0,0,0.5);
      flex-shrink: 0; letter-spacing: 0.03em;
    }

    main { max-width: 740px; margin: 0 auto; padding: 24px 16px 60px; }

    /* ── TOKEN ───────────────────────────────────────────────────────── */
    .token-card { background: var(--card); border-radius: 12px; border: 1px solid var(--border); padding: 18px 20px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
    .token-card h2 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 10px; }
    .token-row { display: flex; gap: 10px; align-items: center; }
    .token-row input { flex: 1; border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--text); background: #faf9fc; outline: none; }
    .token-row input:focus { border-color: var(--accent); }
    .btn-sm { background: var(--dark); color: white; border: none; border-radius: 8px; padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
    .btn-sm:hover { background: #2d2d4e; }
    .token-status { font-size: 12px; margin-top: 6px; min-height: 16px; }
    .token-status.ok { color: var(--green); }
    .token-status.err { color: var(--red); }
    .col-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; margin-top: 4px; display: flex; align-items: center; gap: 8px; }
    .section-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; margin-top: 4px; }

    /* ── WORKFLOW CARDS ──────────────────────────────────────────────── */
    .wf-card { background: var(--card); border-radius: 12px; border: 1px solid var(--border); padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
    .wf-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
    .wf-title { font-family: 'DM Serif Display', serif; font-size: 17px; font-weight: 400; }
    .wf-subtitle { font-size: 13px; color: var(--muted); margin-top: 2px; }
    .toggle-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex-shrink: 0; }
    .toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; cursor: pointer; }
    .toggle-switch input { opacity: 0; width: 0; height: 0; }
    .toggle-slider { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #ef5350; border-radius: 20px; transition: 0.2s; }
    .toggle-slider:before { position: absolute; content: ''; height: 14px; width: 14px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.2s; }
    .toggle-switch input:checked + .toggle-slider { background: #43a047; }
    .toggle-switch input:checked + .toggle-slider:before { transform: translateX(16px); }
    .wf-meta { font-size: 12px; color: var(--muted); background: #f9f7fc; border-radius: 6px; padding: 7px 12px; margin-bottom: 12px; border: 1px solid var(--border); }
    .wf-meta span { margin-right: 14px; }
    .options-row { display: flex; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
    .check-label { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
    .check-label input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }
    .btn-trigger { width: 100%; padding: 12px; background: var(--accent); color: white; border: none; border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s; }
    .btn-trigger:hover { background: var(--accent-dark); }
    .btn-trigger:disabled { background: #ccc; cursor: not-allowed; }
    .btn-sync { background: var(--dark); }
    .btn-sync:hover { background: #2d2d4e; }
    .status-area { margin-top: 10px; min-height: 18px; }
    .status-msg { padding: 9px 13px; border-radius: 7px; font-size: 13px; display: none; }
    .status-msg.loading { background: var(--yellow-bg); color: var(--yellow); border: 1px solid #f9a825; display: block; }
    .status-msg.success { background: var(--green-bg); color: var(--green); border: 1px solid #a5d6a7; display: block; }
    .incident-alert { background: #fff3e0; border: 1px solid #ffb74d; border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; }
    .incident-alert-text { color: #e65100; font-weight: 600; flex: 1; }
    .incident-alert-sub { font-weight: 400; color: #bf360c; font-size: 11px; margin-top: 2px; }
    .incident-filed-btn { background: var(--green); color: white; border: none; border-radius: 6px; padding: 5px 10px; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; }
    .incident-filed-btn:hover { background: var(--accent-dark); }
    .checkin-window-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; letter-spacing: 0.04em; }
    .checkin-window-badge.active { background: var(--green-bg); color: var(--green); border: 1px solid #a5d6a7; }
    .checkin-window-badge.inactive { background: #f5f3f9; color: var(--muted); border: 1px solid var(--border); }
    .status-msg.error   { background: var(--red-bg); color: var(--red); border: 1px solid #ef9a9a; display: block; }

    /* ── CANDIDATE PANEL ─────────────────────────────────────────────── */
    .candidate-panel { margin-top: 14px; display: none; }
    .candidate-panel.visible { display: block; }
    .candidate-panel h4 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 8px; }
    .candidate-table { width: 100%; border-collapse: collapse; font-size: 13px; }
    .candidate-table th { text-align: left; padding: 6px 10px; background: #f5f3f9; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
    .candidate-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; word-break: break-word; max-width: 160px; }
    .candidate-table tr:last-child td { border-bottom: none; }
    .candidate-table tr:hover td { background: #faf9fc; }
    .no-candidates { font-size: 13px; color: var(--muted); padding: 8px 0; }

    /* ── PAST EXAMS ──────────────────────────────────────────────────── */
    .past-exam-table { width: 100%; border-collapse: collapse; font-size: 13px; }
    .past-exam-table th { text-align: left; padding: 6px 10px; background: #f5f3f9; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
    .past-exam-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; word-break: break-word; }
    .past-exam-table tr:last-child td { border-bottom: none; }
    .past-exam-table tr:hover td { background: #faf9fc; }
    .past-exam-table .col-time    { width: 110px; white-space: nowrap; }
    .past-exam-table .col-name    { min-width: 160px; }
    .past-exam-table .col-locker  { width: 44px; text-align: center; white-space: nowrap; }
    .past-exam-table .col-station { width: 44px; text-align: center; white-space: nowrap; }
    .past-exam-table .col-key     { width: 36px; text-align: center; }

    /* ── HISTORY ─────────────────────────────────────────────────────── */
    .history-card { background: var(--card); border-radius: 12px; border: 1px solid var(--border); padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
    .history-card h2 { font-family: 'DM Serif Display', serif; font-size: 17px; font-weight: 400; margin-bottom: 12px; }
    .run-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
    .run-row:last-child { border-bottom: none; }
    .run-info { flex: 1; }
    .run-name { font-weight: 500; }
    .run-meta { color: var(--muted); font-size: 12px; }
    .run-conclusion { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
    .run-conclusion.success { background: var(--green-bg); color: var(--green); }
    .run-conclusion.failure { background: var(--red-bg); color: var(--red); }
    .run-conclusion.in_progress, .run-conclusion.queued { background: var(--yellow-bg); color: var(--yellow); }
    .history-placeholder { color: var(--muted); font-size: 13px; }
    .refresh-btn { width: 100%; margin-top: 12px; }
    .last-run { font-size: 12px; color: var(--muted); margin-top: 6px; min-height: 16px; }
    .last-run .ok  { color: var(--green); font-weight: 600; }
    .last-run .err { color: var(--red);   font-weight: 600; }
    .cc-row { margin-bottom: 10px; }
    .cc-row label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.05em; }
    .cc-row input[type=text] { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--text); background: #faf9fc; outline: none; }
    .cc-row input[type=text]:focus { border-color: var(--accent); }

    /* ── ADDRESS BOOK ────────────────────────────────────────────────── */
    .ab-card { background: var(--card); border-radius: 12px; border: 1px solid var(--border); padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
    .ab-card h2 { font-family: 'DM Serif Display', serif; font-size: 17px; font-weight: 400; margin-bottom: 14px; }
    .ab-contacts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
    .ab-contact { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: #faf9fc; font-size: 13px; }
    .ab-contact input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; }
    .ab-contact .ab-info { flex: 1; }
    .ab-contact .ab-name { font-weight: 600; }
    .ab-contact .ab-email { color: var(--muted); font-size: 12px; }
    .ab-contact .ab-sponsor { font-size: 11px; color: var(--accent); background: var(--accent-light); border-radius: 8px; padding: 1px 6px; }
    .ab-contact .ab-delete { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; padding: 0 4px; line-height: 1; }
    .ab-contact .ab-delete:hover { color: var(--red); }
    .ab-add { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; align-items: end; }
    @media (max-width: 540px) { .ab-add { grid-template-columns: 1fr 1fr; } }
    .ab-add input, .ab-add select { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--text); background: #faf9fc; outline: none; width: 100%; }
    .ab-add input:focus, .ab-add select:focus { border-color: var(--accent); }
    .ab-add-btn { background: var(--accent); color: white; border: none; border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; height: 36px; }
    .ab-add-btn:hover { background: var(--accent-dark); }

    /* ── PREVIEW ─────────────────────────────────────────────────────── */
    .preview-card { background: var(--card); border-radius: 12px; border: 1px solid var(--border); padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
    .preview-card h2 { font-family: 'DM Serif Display', serif; font-size: 17px; font-weight: 400; margin-bottom: 6px; }
    .preview-card p { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
    .sync-card { }

    /* ── AT A GLANCE ─────────────────────────────────────────────────── */
    .glance-card { background: var(--card); border-radius: 12px; border: 1px solid var(--border); padding: 18px 20px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
    .glance-header { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 6px; }
    .glance-date { font-family: 'DM Serif Display', serif; font-size: 17px; margin-bottom: 12px; }
    .glance-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
    .glance-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; color: white; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
    .glance-pill.pearson { background: #0b8043; }
    .glance-pill.ntn { background: #616161; }
    .glance-pill.none { background: #9e9e9e; }
    .glance-pill.clep { background: #6a1b9a; }
    .glance-pill.independent { background: #1565c0; }
    .glance-pill.ml { background: #c62828; }
    .glance-pill.kryterion { background: #f57f17; }
    .glance-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 16px; }
    .glance-table th { text-align: left; padding: 6px 10px; background: #f5f3f9; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
    .glance-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; word-break: break-word; max-width: 120px; }
    .glance-table td:first-child { width: 86px; white-space: nowrap; }
    .glance-table tr:last-child td { border-bottom: none; }
    .glance-table tr:hover td { background: #faf9fc; }
    .glance-source-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 10px 0 6px; }
    .glance-upcoming { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
    .glance-upcoming-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 8px; cursor: pointer; }
    .glance-upcoming-rows { display: none; }
    .glance-upcoming-rows.visible { display: block; }
    .glance-upcoming-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
    .glance-upcoming-row:last-child { border-bottom: none; }
    .glance-upcoming-date { color: var(--text); font-weight: 500; }
    .glance-upcoming-pills { display: flex; gap: 6px; }

    .token-saved { background: var(--green-bg); border: 1px solid #a5d6a7; border-radius: 12px; padding: 10px 16px; margin-bottom: 20px; display: none; align-items: center; justify-content: space-between; font-size: 13px; color: var(--green); }
    .token-saved.visible { display: flex; }
    .token-change { font-size: 12px; color: var(--muted); background: none; border: none; cursor: pointer; text-decoration: underline; }
    .token-change:hover { color: var(--text); }

    /* ── CHECK-IN MODAL ──────────────────────────────────────────────── */
    .modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 16px; }
    .modal-overlay.visible { display: flex; }
    .modal { background: var(--card); border-radius: 14px; padding: 24px; max-width: 480px; width: 100%; box-shadow: 0 8px 32px rgba(0,0,0,0.2); max-height: 90vh; overflow-y: auto; }
    .modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
    .modal-title { font-family: 'DM Serif Display', serif; font-size: 18px; }
    .modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted); padding: 0 4px; }
    .modal-close:hover { color: var(--text); }
    .modal-section { margin-bottom: 10px; }
    .modal-section-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 5px; }
    .status-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .status-btn { padding: 8px 14px; border-radius: 8px; border: 2px solid transparent; font-size: 13px; font-weight: 600; cursor: pointer; background: #f5f3f9; color: var(--text); }
    .status-btn.active.expected { background: #f5f3f9; border-color: var(--muted); color: var(--muted); }
    .status-btn.active.checked_in { background: var(--green-bg); border-color: var(--green); color: var(--green); }
    .status-btn.active.departed { background: var(--ntn-bg); border-color: var(--ntn); color: var(--ntn); }
    .status-btn.active.no_show { background: var(--red-bg); border-color: var(--red); color: var(--red); }
    .status-btn.active.turned_away { background: #fff3e0; border-color: #ef6c00; color: #e65100; }
    .status-btn.active.cancelled { background: #f0f0f0; border-color: #9e9e9e; color: #616161; }
    .status-btn.active.rescheduled { background: #e8eaf6; border-color: #5c6bc0; color: #3949ab; }
    .modal-select { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--text); background: #faf9fc; outline: none; margin-bottom: 8px; }
    .modal-select:focus { border-color: var(--accent); }
    .modal-input { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--text); background: #faf9fc; outline: none; resize: vertical; }
    .modal-input:focus { border-color: var(--accent); }
    .modal-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; }
    
    .modal-toggle-label { font-size: 13px; }
    .modal-toggle-label.warn { color: var(--red); font-weight: 600; }
    .modal-save { width: 100%; padding: 12px; background: var(--accent); color: white; border: none; border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 16px; }
    .modal-save:hover { background: var(--accent-dark); }
    .ntn-reminder { background: var(--yellow-bg); border: 1px solid #f9a825; border-radius: 8px; padding: 10px 14px; margin-top: 12px; display: none; }
    .ntn-reminder.visible { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .ntn-reminder-text { font-size: 13px; color: var(--yellow); font-weight: 600; }
    .ntn-done-btn { background: var(--green); color: white; border: none; border-radius: 6px; padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
    .ntn-done-btn:hover { background: var(--green-dark, #1b5e20); }
    .key-alert { background: var(--red-bg); border: 1px solid #ef9a9a; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--red); font-weight: 600; margin-bottom: 12px; display: none; }
    .key-alert.visible { display: block; }
    .repeat-badge { font-size: 10px; background: var(--yellow-bg); color: var(--yellow); border: 1px solid #f9a825; border-radius: 4px; padding: 0px 4px; margin-left: 2px; vertical-align: super; line-height: 1; display: inline-block; transform: scale(0.75); transform-origin: left center; }
    .visit-badge { font-size: 10px; border-radius: 4px; padding: 0px 4px; margin-left: 2px; font-weight: 600; cursor: default; vertical-align: super; line-height: 1; display: inline-block; transform: scale(0.75); transform-origin: left center; }
    .visit-badge.new-tester { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
    .visit-badge.pearson  { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
    .visit-badge.ntn      { background: #f3e5f5; color: #6a1b9a; border: 1px solid #ce93d8; }
    .visit-badge.ml       { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
    .visit-badge.kryterion { background: #fce4ec; color: #880e4f; border: 1px solid #f48fb1; }
    .visit-badge.clep     { background: #e0f7fa; color: #006064; border: 1px solid #80deea; }
    .visit-badge.other    { background: #f5f5f5; color: #424242; border: 1px solid #bdbdbd; }
    .glance-table tr.clickable { cursor: pointer; }
    .glance-table tr.clickable:hover td { background: #f0f7ff; }
    .cand-badges { margin-top:4px;display:flex;flex-wrap:nowrap;align-items:center;gap:2px;overflow:visible; }
    .cand-badge { font-size:10px;border-radius:4px;padding:1px 4px;white-space:nowrap;display:inline-flex;align-items:center;gap:2px; }
    @media (max-width:600px) { .cand-badges { flex-wrap:wrap; } }
    .status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
    .status-dot.cancelled { background: var(--muted); }
    .candidate-cancelled { opacity: 0.45; text-decoration: line-through; }
    .cancelled-toggle { font-size:11px; color:var(--muted); cursor:pointer; user-select:none; margin-left:8px; }
    .status-dot.checked_in { background: var(--green); }
    .status-dot.departed { background: #b0b0b0; }
    .status-dot.completed { background: #b0b0b0; }
    .status-dot.no_show { background: var(--red); }
    .status-dot.rescheduled { background: #5c6bc0; }
    .status-dot.turned_away { background: #ef6c00; }
    @keyframes pulse-dot { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:0.4; transform:scale(0.75); } }
    .status-dot.checked_in { animation: pulse-dot 1.6s ease-in-out infinite; }
    .name-completed { color: var(--muted); }

    /* ── COLLAPSIBLE ─────────────────────────────────────────────────── */
    .wf-card-body { transition: max-height 0.2s ease, opacity 0.2s ease; overflow: hidden; }
    .wf-card-body.collapsed { max-height: 0 !important; opacity: 0; pointer-events: none; }
    .collapse-btn { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 16px; padding: 0 4px; line-height: 1; transition: transform 0.2s; }
    .collapse-btn.collapsed { transform: rotate(90deg); }

    footer { text-align: center; padding: 20px; font-size: 12px; color: var(--muted); }


    /* ── HEADER LAYOUT ──────────────────────────────────────────────── */
    .header-left-badges { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; }
    .worker-ver-desktop { display: inline; }
    @media (max-width: 600px) {
      .worker-ver-desktop { display: none; }
    }
        /* ── MOBILE GLANCE ───────────────────────────────────────────────── */
    .mobile-icon { display: none; }
    @media (max-width: 600px) {
      .mobile-icon { display: inline; font-size: 11px; margin-left: 4px; opacity: 0.7; }
      /* Scrollbar */
      ::-webkit-scrollbar { width: 3px; height: 3px; }
      ::-webkit-scrollbar-track { background: transparent; }
      ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; }
      * { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.2) transparent; }
      /* Time column wraps */
      .glance-table td:first-child { white-space: normal; width: 70px; font-size: 11px; }
      .glance-table th:first-child { width: 70px; }
      /* Hide status column header and cells */
      .glance-col-status { display: none; }
      /* Pill abbreviations */
      .pill-label-full { display: none !important; }
      .pill-label-short { display: inline !important; }
    }
    @media (min-width: 601px) {
      .pill-label-full { display: inline !important; }
      .pill-label-short { display: none !important; }
      .mobile-icon { display: none; }
    }
    /* ── NOTIFICATION TOGGLE BUTTONS ─────────────────────────────────── */
    .notif-btn {
      background: none; border: 1px solid rgba(255,255,255,0.25); border-radius: 6px;
      color: rgba(255,255,255,0.4); font-size: 14px; padding: 3px 8px;
      cursor: pointer; flex-shrink: 0; white-space: nowrap; transition: all 0.15s;
    }
    .notif-btn:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); }
    .notif-btn.active {
      background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.6);
      color: white;
    }

    /* ── TOAST SYSTEM ────────────────────────────────────────────────── */
    #toast-container {
      position: fixed; bottom: 20px; right: 20px;
      display: flex; flex-direction: column-reverse; gap: 8px;
      z-index: 2000; pointer-events: none; max-width: 320px;
    }
    @media (max-width: 600px) {
      #toast-container {
        right: 50%; transform: translateX(50%); bottom: 16px;
        width: calc(100vw - 32px); max-width: none;
      }
    }
    .toast {
      display: flex; align-items: flex-start; gap: 10px;
      padding: 11px 14px; border-radius: 10px; font-size: 13px; line-height: 1.4;
      box-shadow: 0 4px 16px rgba(0,0,0,0.18); pointer-events: all;
      animation: toast-in 0.2s ease; border-left: 4px solid transparent;
    }
    @keyframes toast-in {
      from { opacity: 0; transform: translateY(10px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .toast.fade-out { animation: toast-out 0.3s ease forwards; }
    @keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }
    .toast.success { background: var(--green-bg); border-color: var(--green); color: var(--green); }
    .toast.error   { background: var(--red-bg);   border-color: var(--red);   color: var(--red); }
    .toast.loading { background: var(--yellow-bg); border-color: var(--yellow); color: var(--yellow); }
    .toast.info    { background: var(--accent-light); border-color: var(--accent); color: var(--accent-dark); }
    .toast-body { flex: 1; }
    .toast-title { font-weight: 600; margin-bottom: 2px; }
    .toast-msg { font-size: 12px; opacity: 0.85; }
    .toast-close {
      background: none; border: none; cursor: pointer; font-size: 15px;
      opacity: 0.5; padding: 0; line-height: 1; flex-shrink: 0; color: inherit;
    }
    .toast-close:hover { opacity: 1; }
    footer a { color: var(--accent); text-decoration: none; }

    /* ── LAYOUT TOGGLE BUTTON ────────────────────────────────────────── */
    .layout-btn { background: none; border: 1px solid rgba(255,255,255,0.25); border-radius: 6px; color: rgba(255,255,255,0.7); font-size: 14px; padding: 3px 8px; cursor: pointer; flex-shrink: 0; white-space: nowrap; }
    .layout-btn:hover { background: rgba(255,255,255,0.1); }

    /* ── STATS STUB ──────────────────────────────────────────────────── */
    .stats-stub { background: var(--card); border-radius: 12px; border: 1px solid var(--border); padding: 18px 20px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }

    /* ════════════════════════════════════════════════════════════════════
       LAYOUT 1 — Single column (default, always on mobile)
       ════════════════════════════════════════════════════════════════════ */
    /* layout-1 is the default — main already has max-width:740px centered */

    /* ════════════════════════════════════════════════════════════════════
       LAYOUT 2 — Two columns, independent scroll, sticky col headers
       ════════════════════════════════════════════════════════════════════ */
    @media (min-width: 900px) {
      body.layout-2 main {
        max-width: 100% !important;
        padding: 0 !important;
      }
      body.layout-2 .dashboard-cols {
        display: flex;
        height: calc(100vh - 60px); /* 60px = header height */
      }
      body.layout-2 .col-left,
      body.layout-2 .col-right {
        overflow-y: auto;
        padding: 0 0 40px;
        flex: 1;
      }
      body.layout-2 .col-left  { border-right: 1px solid var(--border); }

      /* Sticky column header labels */
      body.layout-2 .col-label {
        display: flex;
        align-items: center;
        gap: 8px;
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 10px 20px 9px;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--muted);
        margin-bottom: 16px;
      }
      body.layout-2 .col-label .col-label-dot {
        width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
      }
      /* Inner padding for cards */
      body.layout-2 .col-left  > *:not(.col-label) { margin-left: 16px; margin-right: 16px; }
      body.layout-2 .col-right > *:not(.col-label) { margin-left: 16px; margin-right: 16px; }
    }

    /* ════════════════════════════════════════════════════════════════════
       LAYOUT 3 — CSS Grid, cards side by side, minimal scroll
       ════════════════════════════════════════════════════════════════════ */
    @media (min-width: 900px) {
      body.layout-3 main {
        max-width: 100% !important;
        padding: 20px 20px 60px !important;
      }
      body.layout-3 .dashboard-cols {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        align-items: start;
      }
      /* All direct children of dashboard-cols are grid items */
      body.layout-3 .dashboard-cols > * {
        margin-bottom: 0; /* gap handles spacing */
      }
      /* Full-width items */
      body.layout-3 .grid-full { grid-column: 1 / -1; }
      /* Half-width items (default) — no extra class needed */

      /* Remove per-card bottom margins in grid — gap handles it */
      body.layout-3 .wf-card,
      body.layout-3 .glance-card,
      body.layout-3 .ab-card,
      body.layout-3 .preview-card,
      body.layout-3 .stats-stub,
      body.layout-3 .history-card,
      body.layout-3 .token-card,
      body.layout-3 .token-saved {
        margin-bottom: 0;
      }
      /* Section labels in grid go full width */
      body.layout-3 .section-label { grid-column: 1 / -1; margin-top: 8px; }
    }

    /* ── MOBILE: always single column ────────────────────────────────── */
    @media (max-width: 899px) {
      .layout-btn { display: none; }
      .dashboard-cols { display: block; }
      .col-left, .col-right { padding: 0; }
      .col-label { display: none !important; }
    }
      .export-btn { background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.7); font-size: 18px; padding: 0 4px; line-height: 1; position: relative; }
    .export-btn:hover { color: white; }
    .export-dropdown { position: absolute; top: 100%; right: 0; margin-top: 6px; background: #2d2d4e; border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; overflow: hidden; z-index: 200; min-width: 170px; box-shadow: 0 4px 16px rgba(0,0,0,0.3); display: none; }
    .export-dropdown.open { display: block; }
    .export-option { display: block; width: 100%; text-align: left; background: none; border: none; color: rgba(255,255,255,0.8); font-family: 'DM Sans', sans-serif; font-size: 13px; padding: 9px 14px; cursor: pointer; }
    .export-option:hover { background: rgba(255,255,255,0.08); color: white; }
    .export-option.active { color: var(--accent); font-weight: 600; }
    .export-option.disabled { color: rgba(255,255,255,0.3); cursor: default; font-style: italic; }
    .export-option.disabled:hover { background: none; }
    .col-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; padding: 4px 0; }
    .col-check input { cursor: pointer; }
    .obf-btn { background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.7); font-size: 18px; padding: 0 4px; line-height: 1; position: relative; }
    .obf-btn:hover { color: white; }
    .obf-dropdown { position: absolute; top: 100%; right: 0; margin-top: 6px; background: #2d2d4e; border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; overflow: hidden; z-index: 200; min-width: 150px; box-shadow: 0 4px 16px rgba(0,0,0,0.3); display: none; }
    .obf-dropdown.open { display: block; }
    .obf-option { display: block; width: 100%; text-align: left; background: none; border: none; color: rgba(255,255,255,0.8); font-family: 'DM Sans', sans-serif; font-size: 13px; padding: 9px 14px; cursor: pointer; }
    .obf-option:hover { background: rgba(255,255,255,0.08); color: white; }
    .obf-option.active { color: var(--accent); font-weight: 600; }
    .obf-blur { filter: blur(5px); user-select: none; }

    /* ── CANDIDATE SEARCH BAR ───────────────────────────────────────── */
    .search-bar {
      background: var(--dark); border-bottom: 1px solid rgba(255,255,255,0.1);
      padding: 8px 20px;
      display: flex; align-items: center; gap: 8px;
    }
    .search-bar input {
      flex: 1; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
      border-radius: 8px; color: white; font-family: 'DM Sans', sans-serif;
      font-size: 13px; padding: 6px 12px; outline: none; min-width: 0;
    }
    .search-bar input::placeholder { color: rgba(255,255,255,0.4); }
    .search-bar input:focus { border-color: var(--accent); background: rgba(255,255,255,0.15); }
    .search-bar select {
      background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
      border-radius: 8px; color: white; font-family: 'DM Sans', sans-serif;
      font-size: 12px; padding: 6px 8px; cursor: pointer; outline: none;
    }
    .search-bar select option { background: #1a1a2e; color: white; }
    .search-bar button {
      background: var(--accent); border: none; border-radius: 8px; color: white;
      font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 600;
      padding: 6px 14px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
    }
    .search-bar button:hover { background: var(--accent-dark); }
    .search-bar .search-clear {
      background: none; border: none; color: rgba(255,255,255,0.5);
      font-size: 16px; cursor: pointer; padding: 0 2px; line-height: 1;
      flex-shrink: 0;
    }
    .search-bar .search-clear:hover { color: white; }

    /* ── SEARCH DRAWER ──────────────────────────────────────────────── */
    .search-drawer {
      position: fixed; top: 0; right: -100%; width: min(620px, 100vw);
      height: 100vh; background: white; box-shadow: -4px 0 24px rgba(0,0,0,0.18);
      z-index: 500; transition: right 0.3s ease; display: flex; flex-direction: column;
    }
    .search-drawer.open { right: 0; }
    .search-drawer-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.4);
      z-index: 499; display: none;
    }
    .search-drawer-overlay.open { display: block; }
    .search-drawer-header {
      background: var(--dark); color: white; padding: 14px 20px;
      display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
    }
    .search-drawer-header h2 { font-family: 'DM Serif Display', serif; font-size: 17px; font-weight: 400; }
    .search-drawer-header .drawer-actions { display: flex; align-items: center; gap: 8px; }
    .drawer-export-btn {
      background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
      border-radius: 6px; color: white; font-size: 12px; padding: 4px 10px;
      cursor: pointer; font-family: 'DM Sans', sans-serif;
    }
    .drawer-export-btn:hover { background: rgba(255,255,255,0.2); }
    .drawer-close {
      background: none; border: none; color: rgba(255,255,255,0.7);
      font-size: 20px; cursor: pointer; line-height: 1; padding: 0 4px;
    }
    .drawer-close:hover { color: white; }
    .search-drawer-meta {
      padding: 8px 20px; background: var(--bg); border-bottom: 1px solid var(--border);
      font-size: 12px; color: var(--muted); flex-shrink: 0;
      display: flex; align-items: center; justify-content: space-between;
    }
    .search-drawer-body { flex: 1; overflow-y: auto; padding: 0; }
    .search-result-table { width: 100%; border-collapse: collapse; font-size: 13px; }
    .search-result-table th {
      background: var(--bg); color: var(--muted); font-size: 11px; font-weight: 600;
      text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 12px;
      text-align: left; border-bottom: 1px solid var(--border); position: sticky; top: 0;
    }
    .search-result-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
    .search-result-table tr:hover td { background: var(--accent-light); }
    .search-result-table .col-date { white-space: nowrap; color: var(--muted); font-size: 12px; }
    .search-result-table .col-name { font-weight: 500; }
    .search-result-table .col-reg { font-size: 11px; color: var(--muted); font-family: monospace; }
    .search-result-cards { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
    .search-result-toggle {
      display: flex; gap: 0; border: 1px solid var(--border); border-radius: 6px;
      overflow: hidden; flex-shrink: 0;
    }
    .search-result-toggle button {
      background: none; border: none; padding: 4px 10px; font-size: 12px;
      cursor: pointer; color: var(--muted); font-family: 'DM Sans', sans-serif;
    }
    .search-result-toggle button.active { background: var(--dark); color: white; }
    .search-pagination {
      padding: 12px 20px; border-top: 1px solid var(--border);
      display: flex; align-items: center; justify-content: space-between;
      font-size: 12px; color: var(--muted); flex-shrink: 0; background: white;
    }
    .search-pagination button {
      background: var(--dark); border: none; border-radius: 6px; color: white;
      font-size: 12px; padding: 5px 12px; cursor: pointer;
    }
    .search-pagination button:disabled { background: var(--border); color: var(--muted); cursor: default; }
    .search-no-results { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px; }
    .search-loading { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px; }
    /* Machine Tracker */
    .machine-group-header { font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.07em;color:var(--muted);padding:8px 0 4px;border-bottom:1px solid var(--border);margin-bottom:8px;margin-top:12px; }
    .machine-row { display:flex;align-items:flex-start;gap:10px;padding:8px 0;border-bottom:1px solid var(--border); }
    .machine-row:last-child { border-bottom:none; }
    .machine-name { font-weight:600;font-size:13px;min-width:120px; }
    .machine-specs { font-size:11px;color:var(--muted);margin-top:2px; }
    .machine-software-pills { display:flex;flex-wrap:wrap;gap:4px;margin-top:6px; }
    .sw-pill { font-size:10px;padding:2px 7px;border-radius:10px;font-weight:600;white-space:nowrap; }
    .sw-pill.ok { background:var(--green-bg);color:var(--green); }
    .sw-pill.update_needed { background:var(--red-bg);color:var(--red); }
    .sw-pill.unknown { background:var(--yellow-bg);color:var(--yellow); }
    .sw-pill.missing { background:#f5f5f5;color:var(--muted); }
    .machine-last-seen { font-size:10px;color:var(--muted);margin-top:3px; }
    .machine-actions { display:flex;gap:4px;flex-shrink:0; }
    .machine-action-btn { background:none;border:1px solid var(--border);border-radius:6px;padding:3px 8px;font-size:11px;cursor:pointer;color:var(--muted);font-family:'DM Sans',sans-serif; }
    .machine-action-btn:hover { background:var(--bg);color:var(--text); }




    /* Square section */
    .square-section-label { display:flex; align-items:center; gap:8px; font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:0.08em; color:var(--muted); margin-bottom:10px; margin-top:4px; }
    .square-logo { width:18px; height:18px; border-radius:4px; background:#00a670; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
    .square-logo svg { width:11px; height:11px; }
    /* Candidate cleanup card */
    .crc-card { background:var(--card); border:1px solid var(--border); border-radius:12px; padding:16px; margin-bottom:16px; }
    .crc-search-row { display:flex; gap:8px; margin-bottom:14px; }
    .crc-input { flex:1; padding:8px 12px; border:1px solid var(--border); border-radius:8px; font-size:13px; background:var(--bg); color:var(--text); font-family:inherit; }
    .crc-input:focus { outline:none; border-color:var(--accent); }
    .crc-search-btn { padding:8px 16px; background:var(--accent); color:#fff; border:none; border-radius:8px; font-size:13px; font-weight:600; cursor:pointer; font-family:inherit; white-space:nowrap; }
    .crc-results { display:flex; flex-direction:column; gap:6px; }
    .crc-record { background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:10px 12px; display:flex; align-items:center; gap:10px; }
    .crc-record-info { flex:1; min-width:0; }
    .crc-record-name { font-weight:700; font-size:13px; color:var(--text); }
    .crc-record-meta { font-size:11px; color:var(--muted); margin-top:2px; line-height:1.5; }
    .crc-record-status { font-size:11px; font-weight:600; padding:2px 7px; border-radius:5px; background:var(--border); color:var(--muted); white-space:nowrap; }
    .crc-delete-btn { background:none; border:1px solid var(--red,#e53935); color:var(--red,#e53935); border-radius:7px; padding:5px 11px; font-size:12px; font-weight:600; cursor:pointer; font-family:inherit; white-space:nowrap; flex-shrink:0; }
    .crc-delete-btn:hover { background:var(--red,#e53935); color:#fff; }
    .crc-no-results { font-size:13px; color:var(--muted); padding:16px 0; text-align:center; }
    .crc-undo-toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); background:#323232; color:#fff; border-radius:10px; padding:12px 20px; font-size:13px; display:flex; align-items:center; gap:14px; z-index:9999; box-shadow:0 4px 20px rgba(0,0,0,0.25); min-width:280px; }
    .crc-undo-btn { background:var(--accent); border:none; color:#fff; border-radius:6px; padding:5px 12px; font-size:12px; font-weight:700; cursor:pointer; font-family:inherit; }
    .crc-undo-bar { height:3px; background:rgba(255,255,255,0.3); border-radius:2px; flex:1; overflow:hidden; }
    .crc-undo-bar-fill { height:100%; background:#fff; border-radius:2px; transition:width linear; }

    /* Evening-before time guard */
    .eb-btn-wrap { position:relative; display:inline-block; width:100%; }
    .eb-info-badge { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:50%; background:var(--border); color:var(--muted); font-size:11px; font-weight:700; cursor:pointer; margin-left:8px; vertical-align:middle; user-select:none; flex-shrink:0; border:none; font-family:inherit; transition:background 0.15s; }
    .eb-info-badge:hover { background:var(--accent); color:#fff; }
    .eb-popover { display:none; position:absolute; left:0; top:calc(100% + 6px); z-index:200; background:var(--card); border:1px solid var(--border); border-radius:10px; padding:12px 14px; font-size:12px; color:var(--text); box-shadow:0 4px 18px rgba(0,0,0,0.13); min-width:260px; max-width:320px; line-height:1.6; }
    .eb-popover.open { display:block; }
    .eb-popover-row { display:flex; justify-content:space-between; gap:8px; margin-bottom:4px; }
    .eb-popover-label { color:var(--muted); font-size:11px; }
    .eb-popover-val { font-weight:600; font-size:12px; }
    .eb-popover-note { font-size:11px; color:var(--muted); margin-top:7px; padding-top:7px; border-top:1px solid var(--border); line-height:1.5; }
    .eb-warn-early { background:#e67e22 !important; }
    .eb-warn-mid { border:2px solid #e67e22 !important; }
    .btn-trigger.eb-warn-early { background:#e67e22 !important; }

    /* Workstation Usage */
    .ws-view-toggle { display:flex; gap:6px; margin-bottom:14px; margin-top:12px; }
    .ws-toggle-btn { background:none; border:1px solid var(--border); border-radius:8px; padding:5px 14px; font-size:12px; font-family:inherit; color:var(--muted); cursor:pointer; font-weight:600; transition:background 0.15s,color 0.15s; }
    .ws-toggle-btn.active { background:var(--accent); color:#fff; border-color:var(--accent); }
    .ws-table { width:100%; border-collapse:collapse; font-size:12px; }
    .ws-table th { text-align:left; padding:6px 10px; border-bottom:2px solid var(--border); color:var(--muted); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:0.04em; white-space:nowrap; }
    .ws-table td { padding:7px 10px; border-bottom:1px solid var(--border); vertical-align:middle; }
    .ws-table tr:last-child td { border-bottom:none; }
    .ws-table tr:nth-child(even) td { background:var(--bg); }
    .ws-table td.ws-station { font-weight:700; font-size:13px; color:var(--text); }
    .ws-table td.ws-num { font-variant-numeric:tabular-nums; text-align:right; padding-right:16px; }
    .ws-table th.ws-num { text-align:right; padding-right:16px; }
    .ws-rank-1 { color:var(--accent); }
    .ws-rank-2 { color:var(--green); }
    .ws-bar-list { display:flex; flex-direction:column; gap:7px; margin-top:4px; }
    .ws-bar-row { display:flex; align-items:center; gap:8px; }
    .ws-bar-label { font-size:12px; font-weight:700; color:var(--text); min-width:26px; text-align:right; }
    .ws-bar-track { flex:1; background:var(--border); border-radius:4px; height:14px; overflow:hidden; }
    .ws-bar-fill { height:100%; border-radius:4px; background:var(--accent); transition:width 0.4s ease; }
    .ws-bar-count { font-size:11px; color:var(--muted); min-width:28px; text-align:left; font-variant-numeric:tabular-nums; }
    .ws-bar-period { display:flex; gap:6px; margin-bottom:10px; margin-top:12px; flex-wrap:wrap; }
    .ws-period-btn { background:none; border:1px solid var(--border); border-radius:6px; padding:4px 11px; font-size:11px; font-family:inherit; color:var(--muted); cursor:pointer; font-weight:600; }
    .ws-period-btn.active { background:var(--dark); color:#fff; border-color:var(--dark); }
    .ws-no-data { font-size:13px; color:var(--muted); padding:20px 0; text-align:center; }

    /* ── Form Submissions card ───────────────────────────────────────── */
    #form-submissions-card { margin-bottom:16px; }
    .fsub-toolbar { display:flex; align-items:center; gap:8px; margin-bottom:12px; flex-wrap:wrap; }
    .fsub-search { flex:1; min-width:120px; padding:5px 10px; border:1px solid var(--border); border-radius:6px; background:var(--bg); color:var(--text); font-size:12px; font-family:inherit; }
    .fsub-select { padding:5px 8px; border:1px solid var(--border); border-radius:6px; background:var(--bg); color:var(--text); font-size:12px; font-family:inherit; cursor:pointer; }
    .fsub-refresh { background:none; border:1px solid var(--border); border-radius:6px; padding:5px 10px; font-size:12px; color:var(--muted); cursor:pointer; font-family:inherit; }
    .fsub-refresh:hover { color:var(--text); }
    .fsub-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
    .fsub-table { width:100%; border-collapse:collapse; font-size:12px; min-width:640px; }
    .fsub-table th { text-align:left; padding:6px 10px; border-bottom:2px solid var(--border); color:var(--muted); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:0.04em; white-space:nowrap; }
    .fsub-table td { padding:7px 10px; border-bottom:1px solid var(--border); vertical-align:middle; }
    .fsub-table td.fsub-td-exam { max-width:140px; }
    .fsub-table td.fsub-td-date { white-space:nowrap; }
    .fsub-table td.fsub-td-actions { white-space:nowrap; }
    .fsub-table tr:last-child td { border-bottom:none; }
    .fsub-table tr:nth-child(even) td { background:var(--bg); }
    .fsub-table tr:hover td { background:rgba(127,90,240,0.06); cursor:pointer; }
    .fsub-name-link { font-weight:600; color:var(--text); border-bottom:1px dashed var(--border); cursor:pointer; }
    .fsub-name-link:hover { color:var(--accent); border-bottom-color:var(--accent); }
    .fsub-exam-text { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:140px; }
    .fsub-badge { display:inline-block; border-radius:4px; padding:2px 7px; font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:0.04em; }
    .fsub-badge-pending { background:#fff3e0; color:#e65100; }
    .fsub-badge-expected { background:#e8f5e9; color:#2e7d32; }
    .fsub-badge-rejected { background:#ffebee; color:#c62828; }
    .fsub-badge-departed, .fsub-badge-completed { background:#e3f2fd; color:#1565c0; }
    .fsub-badge-booked { background:#f3e5f5; color:#6a1b9a; }
    .fsub-badge-default { background:var(--bg); color:var(--muted); }
    .fsub-square { font-size:11px; color:var(--muted); }
    .fsub-square-booked { color:#2e7d32; font-weight:600; }
    .fsub-approve-inline { background:#2e7d32; color:#fff; border:none; border-radius:4px; padding:3px 10px; font-size:11px; font-weight:600; cursor:pointer; white-space:nowrap; margin-right:4px; }
    .fsub-approve-inline:hover { background:#1b5e20; }
    .fsub-approve-inline:disabled { background:#a5d6a7; cursor:default; }
    .fsub-reject-inline { background:#b71c1c; }
    .fsub-reject-inline:hover { background:#7f0000; }
    .fsub-empty { text-align:center; color:var(--muted); padding:20px; font-size:13px; }
    /* ── CANDIDATE POPUP ─────────────────────────────────────────────────── */
    #cand-popup-overlay { position:fixed;inset:0;background:rgba(0,0,0,0.55);z-index:3000;display:none;align-items:center;justify-content:center;padding:16px; }
    #cand-popup-overlay.visible { display:flex; }
    #cand-popup { background:var(--card);border-radius:12px;max-width:420px;width:100%;max-height:88vh;overflow-y:auto;box-shadow:0 8px 32px rgba(0,0,0,0.3); }
    .cand-popup-header { background:#2c3e50;color:#fff;padding:14px 16px;border-radius:12px 12px 0 0;display:flex;align-items:flex-start;justify-content:space-between;gap:8px; }
    .cand-popup-header h3 { font-size:15px;font-weight:700;margin:0; }
    .cand-popup-header .sub { font-size:11px;color:#bdc3c7;margin-top:2px; }
    .cand-popup-close { background:none;border:none;color:#bdc3c7;font-size:20px;cursor:pointer;padding:0;line-height:1;flex-shrink:0; }
    .cand-popup-close:hover { color:#fff; }
    .cand-popup-body { padding:14px 16px; }
    .cand-popup-card { background:var(--bg);border-radius:8px;padding:12px 14px;margin-bottom:10px;border-left:4px solid #3498db; }
    .cand-popup-card.exam { border-left-color:#9b59b6; }
    .cand-popup-card.schedule { border-left-color:#27ae60; }
    .cand-popup-card.notes { border-left-color:#e67e22; }
    .cand-popup-card-title { font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.08em;color:var(--muted);margin-bottom:8px; }
    .cand-popup-fields { display:grid;grid-template-columns:100px 1fr;gap:5px 10px; }
    .cand-popup-label { font-weight:700;color:var(--muted);font-size:12px; }
    .cand-popup-value { font-size:12px;color:var(--text);word-break:break-word; }
    .cand-popup-value.hl { font-weight:700;color:var(--accent);font-size:13px; }
    .cand-popup-actions { display:flex;flex-direction:column;gap:8px;padding:0 16px 16px; }
    .cand-popup-btn { display:block;width:100%;padding:10px;border:none;border-radius:7px;font-size:13px;font-weight:700;cursor:pointer;text-align:center;text-decoration:none;font-family:inherit; }
    .cand-popup-btn-approve { background:#27ae60;color:#fff; }
    .cand-popup-btn-square { background:#00897b;color:#fff; }
    .cand-popup-btn-copy { background:#2980b9;color:#fff; }
    .cand-popup-btn-checkin { background:var(--accent);color:#fff; }
    .cand-popup-btn:hover { opacity:0.88; }
    .cand-popup-divider { border:none;border-top:1px solid var(--border);margin:4px 0; }

    #fsub-modal-overlay { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.55); z-index:2000; display:none; align-items:center; justify-content:center; padding:16px; }
    #fsub-modal-overlay.visible { display:flex; }
    #fsub-modal { background:var(--card); border-radius:14px; padding:0; max-width:520px; width:100%; box-shadow:0 8px 32px rgba(0,0,0,0.25); max-height:90vh; overflow-y:auto; }
    .fsub-modal-header { display:flex; align-items:center; justify-content:space-between; padding:18px 20px 14px; border-bottom:1px solid var(--border); }
    .fsub-modal-title { font-family:'DM Serif Display',serif; font-size:17px; color:var(--text); }
    .fsub-modal-close { background:none; border:none; font-size:22px; cursor:pointer; color:var(--muted); padding:0 4px; line-height:1; }
    .fsub-modal-close:hover { color:var(--text); }
    .fsub-modal-body { padding:16px 20px; }
    .fsub-modal-section { margin-bottom:10px; }
    .fsub-modal-label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.07em; color:var(--muted); margin-bottom:3px; }
    .fsub-modal-row { display:flex; align-items:center; gap:8px; background:var(--bg); border-radius:7px; padding:7px 10px; }
    .fsub-modal-value { flex:1; font-size:13px; color:var(--text); word-break:break-word; }
    .fsub-modal-copy { background:none; border:1px solid var(--border); border-radius:5px; padding:2px 8px; font-size:11px; color:var(--muted); cursor:pointer; flex-shrink:0; }
    .fsub-modal-copy:hover { color:var(--text); border-color:var(--accent); }
    .fsub-modal-copy.copied { color:#2e7d32; border-color:#2e7d32; }
    .fsub-modal-actions { display:flex; gap:8px; flex-wrap:wrap; padding:14px 20px; border-top:1px solid var(--border); }
    .fsub-modal-btn { flex:1; min-width:100px; padding:9px 12px; border:none; border-radius:8px; font-size:12px; font-weight:600; cursor:pointer; font-family:inherit; text-align:center; }
    .fsub-modal-btn:disabled { opacity:0.5; cursor:default; }
    .fsub-modal-btn-approve { background:#2e7d32; color:#fff; }
    .fsub-modal-btn-approve:hover:not(:disabled) { background:#1b5e20; }
    .fsub-modal-btn-booked { background:#6a1b9a; color:#fff; }
    .fsub-modal-btn-booked:hover:not(:disabled) { background:#4a148c; }
    .fsub-modal-btn-pending { background:#e65100; color:#fff; }
    .fsub-modal-btn-pending:hover:not(:disabled) { background:#bf360c; }
    .fsub-modal-btn-reject { background:none; color:#c62828; border:1px solid #c62828; }
    .fsub-modal-btn-reject:hover:not(:disabled) { background:#ffebee; }
    .fsub-modal-sheet-link { display:block; text-align:center; font-size:12px; color:var(--accent); text-decoration:none; padding:8px 20px 14px; }
    .fsub-modal-sheet-link:hover { text-decoration:underline; }

    /* ── Pending Review section ─────────────────────────────────────── */
    #pending-review-section { margin-bottom:16px; }
    .pending-card { background:var(--card); border:1px solid #ffe082; border-left:4px solid #f9a825; border-radius:8px; padding:12px 14px; margin-bottom:10px; display:flex; align-items:flex-start; gap:14px; }
    .pending-card-info { flex:1; min-width:0; }
    .pending-card-name { font-weight:600; font-size:14px; color:var(--text); margin-bottom:2px; }
    .pending-card-meta { font-size:12px; color:var(--muted); margin-bottom:4px; }
    .pending-card-sub { font-size:12px; color:var(--muted); }
    .pending-card-actions { display:flex; flex-direction:column; gap:6px; flex-shrink:0; }
    .btn-approve { background:#2e7d32; color:#fff; border:none; border-radius:5px; padding:6px 14px; font-size:12px; font-weight:600; cursor:pointer; white-space:nowrap; }
    .btn-approve:hover { background:#1b5e20; }
    .btn-approve:disabled { background:#a5d6a7; cursor:default; }
    .btn-reject-pending { background:var(--card); color:#c62828; border:1px solid #c62828; border-radius:5px; padding:5px 14px; font-size:12px; font-weight:600; cursor:pointer; white-space:nowrap; }
    .btn-reject-pending:hover { background:#ffebee; }
    .pending-card-approved { font-size:12px; color:#2e7d32; font-weight:600; padding:6px 0; }
    .pending-card-rejected { font-size:12px; color:#c62828; font-weight:600; padding:6px 0; }
