.exam-workspace {
    container-type: inline-size;
}

.exam-intro,
.exam-section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-bottom: 14px;
}

.exam-intro {
    margin-block: .5rem 1.5rem;
}

.exam-intro > div,
.exam-section-heading > div {
    min-width: 0;
}

.exam-intro h1 { margin-block: .35rem .5rem; }
.exam-intro p { max-width: 64ch; color: var(--ui-supporting, #526078); }
.exam-intro-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.exam-intro-actions a { flex: 1 1 auto; }
.exam-section-heading h2 { margin: 0; }
.exam-section-heading p { margin-block-start: .35rem; color: var(--ui-supporting, #526078); font-size: .8125rem; }

.exam-availability {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    padding: 1.25rem;
    border: 1px solid #c8d6f1;
    border-radius: var(--ui-radius, 12px);
    background: #f0f5ff;
    margin-block-end: 1.5rem;
}

.exam-availability > .icon { color: var(--ui-action, #3445d0); margin-block-start: .2rem; }
.exam-availability > div { flex: 1 1 14rem; min-width: 0; }
.exam-availability h2 { margin: 0 0 .35rem; font-size: 1rem; }
.exam-availability p { color: var(--ui-supporting, #526078); font-size: .8125rem; }
.exam-status { padding: .35rem .65rem; border: 1px solid #c8d6f1; border-radius: .5rem; background: #fff; font-size: .75rem; font-weight: 600; }
.exam-caption { color: var(--ui-supporting, #526078); font-size: .75rem; }
.exam-workflow { margin-block: 1.5rem; }

.exam-workflow-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.exam-feature {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.25rem;
    border: 1px solid var(--ui-border, #dce2ec);
    border-radius: var(--ui-radius, 12px);
    background: var(--white, #fff);
}

.exam-feature-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block-end: 1rem; }
.exam-feature-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .65rem; color: var(--ui-action, #3445d0); background: var(--soft, #eaf2ff); }
.exam-step-number { font-size: .75rem; color: var(--ui-supporting, #526078); font-variant-numeric: tabular-nums; }
.exam-feature h3 { margin: 0 0 .5rem; font-size: .9375rem; font-weight: 600; }
.exam-feature > p { margin: 0 0 .5rem; font-size: .8125rem; color: var(--ui-supporting, #526078); }
.exam-feature-actions { display: grid; gap: .35rem; margin-block-start: auto; padding-block-start: .75rem; }
.exam-feature-actions a { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 44px; padding-block: .5rem; font-size: .8125rem; font-weight: 600; color: var(--ui-action, #3445d0); }
.exam-feature-actions a:hover { text-decoration: underline; text-underline-offset: .2rem; }
.exam-feature-actions .icon { width: 1rem; height: 1rem; }
.exam-empty { display: grid; justify-items: center; gap: .5rem; padding: 1.75rem 1rem; text-align: center; white-space: normal; }
.exam-empty > .icon { width: 2rem; height: 2rem; color: var(--ui-supporting, #526078); }
.exam-empty > span { max-width: 48ch; color: var(--ui-supporting, #526078); }
.exam-workspace [id] { scroll-margin-block-start: 6rem; }

@container (min-width: 40rem) {
    .exam-workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container (min-width: 60rem) {
    .exam-workflow-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.exam-workspace label.table-select-all-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
    font-weight: inherit;
    white-space: nowrap;
}

.exam-workspace .table-scroll {
    max-width: 100%;
    overflow-x: auto;
}

.exam-workspace .table-scroll table {
    width: 100%;
    border-collapse: collapse;
    min-width: 0;
}

.exam-workspace .table-scroll th,
.exam-workspace .table-scroll td {
    padding: 12px 16px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--line, #e2eaf6);
    font-size: 13px;
    line-height: 1.5;
}

.exam-workspace .table-scroll th {
    font-size: 12px;
    white-space: nowrap;
}

.exam-workspace .table-scroll td input[type="checkbox"],
.exam-workspace .table-scroll th input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    vertical-align: middle;
    cursor: pointer;
}

.exam-workspace .table-scroll .table-sort-control {
    width: auto;
    min-height: 32px;
    padding: 4px 0;
    white-space: nowrap;
}

/* Student exam portal & card warning polish */
.exam-workspace .exam-card-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    margin: 0 0 20px;
    border-radius: 14px;
    border: 1px solid #c7dafc;
    background: linear-gradient(180deg, #f4f8ff 0%, #edf4ff 100%);
    color: #1e3a8a;
}

.exam-workspace .exam-card-notice > .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--primary, #2563eb);
}

.exam-workspace .exam-card-notice-body {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: 6px;
}

.exam-workspace .exam-card-notice-body strong {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #172554;
}

.exam-workspace .exam-card-notice-body p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.65;
    color: #1e3a8a;
}

.exam-workspace .exam-student-card,
.incoming-workspace.exam-workspace .exam-student-card,
.exam-workspace section.exam-student-card,
.incoming-workspace.exam-workspace section.exam-student-card,
.exam-workspace .exam-student-card-vertical {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 20px;
    overflow: visible !important;
}

.exam-workspace .exam-student-empty-panel,
.exam-workspace .exam-history-panel {
    margin-bottom: 20px;
}

.exam-workspace .exam-student-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line, #e2eaf6);
}

.exam-workspace .exam-student-card-head > div {
    min-width: 0;
}

.exam-workspace .exam-student-card-head h2 {
    margin: 4px 0 0;
    font-size: 18px;
    line-height: 1.4;
    word-break: break-word;
}

.exam-workspace .exam-student-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.exam-workspace .exam-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    border: 1px solid transparent;
}

.exam-workspace .exam-badge-published {
    background: #ecfdf3;
    border-color: #abefc6;
    color: #067647;
}

.exam-workspace .exam-badge-quota {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.exam-workspace .exam-badge-pending {
    background: #fffaeb;
    border-color: #fedf89;
    color: #b54708;
}

.exam-workspace .exam-badge-warning {
    background: #fef3f2;
    border-color: #fecdca;
    color: #b42318;
}

.exam-workspace .exam-badge-muted {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
}

.exam-workspace .exam-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 15px;
    margin: 0 0 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
}

.exam-workspace .exam-alert > .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.exam-workspace .exam-alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.exam-workspace .exam-alert-neutral {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.exam-workspace .exam-issue-list p {
    margin: 0;
}

.exam-workspace .exam-issue-list p + p {
    margin-top: 4px;
}

.exam-workspace .exam-card-hint {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ui-supporting, #526078);
    clear: both;
}

.exam-workspace .exam-student-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-top: 14px;
}

.exam-workspace .exam-student-actions form {
    margin: 0;
}

.exam-workspace .exam-student-actions .primary-button,
.exam-workspace .exam-student-actions .secondary-button,
.exam-workspace .exam-intro-actions .primary-button,
.exam-workspace .exam-intro-actions .secondary-button {
    width: auto;
    margin-top: 0;
    min-height: 42px;
    padding: 10px 16px;
    font-size: 13px;
    text-decoration: none;
}

.exam-workspace .exam-student-empty-panel .exam-empty {
    margin-top: 14px;
    padding: 28px 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
}

.exam-workspace .exam-history-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.exam-workspace .exam-history-item {
    margin: 0;
}

.exam-workspace .exam-history-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 12px 16px;
    border: 1px solid var(--line, #e2eaf6);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--ink, #0f172a);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease;
}

.exam-workspace .exam-history-link:hover {
    border-color: var(--primary, #2563eb);
    background: #eff6ff;
}

.exam-workspace .exam-history-time {
    font-variant-numeric: tabular-nums;
}

.exam-workspace .exam-history-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: var(--ui-supporting, #526078);
    font-size: 13px;
}

.exam-workspace .exam-history-empty > .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--ui-supporting, #526078);
}

html[data-theme="dark"] .exam-workspace .exam-card-notice {
    background: rgba(30, 58, 138, 0.22);
    border-color: rgba(96, 165, 250, 0.35);
    color: #dbeafe;
}

html[data-theme="dark"] .exam-workspace .exam-card-notice-body strong {
    color: #eff6ff;
}

html[data-theme="dark"] .exam-workspace .exam-card-notice-body p {
    color: #bfdbfe;
}

html[data-theme="dark"] .exam-workspace .exam-student-empty-panel .exam-empty,
html[data-theme="dark"] .exam-workspace .exam-history-empty,
html[data-theme="dark"] .exam-workspace .exam-history-link {
    background: rgba(15, 23, 42, 0.45);
    border-color: rgba(148, 163, 184, 0.25);
}

/* Self-service exam card print kiosk (QR Code + 6-digit code + fallback) */
.exam-workspace .exam-alert-published {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #065f46;
}

.exam-workspace .exam-kiosk-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.exam-workspace .exam-kiosk-topbar h1 {
    margin: 4px 0 6px;
}

.exam-workspace .exam-kiosk-topbar p {
    margin: 0;
    color: var(--ui-supporting, #526078);
    font-size: 13px;
}

.exam-workspace .exam-kiosk-top-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.exam-workspace .exam-kiosk-top-actions .secondary-button,
.exam-workspace .exam-kiosk-top-actions .primary-button {
    width: auto;
    margin-top: 0;
    min-height: 40px;
    padding: 9px 14px;
    font-size: 13px;
}

.exam-workspace .exam-kiosk-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

@container (min-width: 56rem) {
    .exam-workspace .exam-kiosk-grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    }
}

.exam-workspace .exam-kiosk-side-column {
    display: grid;
    gap: 20px;
}

.exam-workspace .exam-kiosk-qr-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #c7dafc;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    margin-bottom: 20px;
}

.exam-workspace .exam-kiosk-qr-svg {
    display: grid;
    place-items: center;
    padding: 14px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #dbe7ff;
    box-shadow: 0 12px 30px -16px rgba(37, 99, 235, 0.25);
}

.exam-workspace .exam-kiosk-qr-svg svg {
    display: block;
    width: 210px;
    height: 210px;
    max-width: 100%;
}

.exam-workspace .exam-kiosk-pin-box {
    flex: 1 1 220px;
    min-width: 0;
    display: grid;
    gap: 8px;
    text-align: center;
}

.exam-workspace .exam-kiosk-pin-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #1e40af;
}

.exam-workspace .exam-kiosk-pin-value {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 12px;
    background: #ffffff;
    border: 2px solid #93c5fd;
    color: #0f172a;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 0.1em;
    font-variant-numeric: tabular-nums;
}

.exam-workspace .exam-kiosk-progress-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #dbeafe;
    overflow: hidden;
    margin-top: 4px;
}

.exam-workspace .exam-kiosk-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: var(--primary, #2563eb);
    transition: width 0.35s linear;
}

.exam-workspace .exam-kiosk-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.exam-workspace .exam-kiosk-steps li {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--line, #e2eaf6);
    background: #f8fafc;
    font-size: 13px;
}

.exam-workspace .exam-kiosk-steps li span {
    color: var(--ui-supporting, #526078);
    font-size: 12.5px;
    line-height: 1.5;
}

.exam-workspace .exam-kiosk-printing-box {
    padding: 22px;
    border-radius: 16px;
    border: 2px solid #86efac;
    background: #f0fdf4;
}

.exam-workspace .exam-kiosk-printing-header h3 {
    margin: 10px 0 4px;
    font-size: 22px;
    color: #064e3b;
}

.exam-workspace .exam-kiosk-printing-header p {
    margin: 0 0 16px;
    font-size: 13.5px;
    color: #065f46;
}

.exam-workspace .exam-kiosk-printing-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.exam-workspace .exam-kiosk-printing-details > div {
    padding: 12px 14px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #bbf7d0;
    display: grid;
    gap: 4px;
}

.exam-workspace .exam-kiosk-printing-details span {
    font-size: 11.5px;
    color: #047857;
    font-weight: 600;
}

.exam-workspace .exam-kiosk-printing-details strong {
    font-size: 15px;
    color: #064e3b;
}

.exam-workspace .exam-kiosk-printing-note {
    margin: 0 0 14px;
    font-size: 13px;
    color: #065f46;
    font-weight: 600;
}

.exam-workspace .exam-kiosk-direct-form {
    display: grid;
    gap: 12px;
}

.exam-workspace .exam-kiosk-direct-form label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 6px;
}

.exam-workspace .exam-kiosk-direct-form input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13.5px;
}

.exam-workspace .exam-kiosk-direct-form .primary-button {
    margin-top: 4px;
}

.exam-workspace .exam-kiosk-setup-guide summary {
    cursor: pointer;
    font-size: 13.5px;
    color: var(--ink, #0f172a);
}

.exam-workspace .exam-kiosk-setup-body {
    margin-top: 12px;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--ui-supporting, #526078);
}

.exam-workspace .exam-kiosk-setup-body pre {
    overflow-x: auto;
    padding: 10px 12px;
    border-radius: 8px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 12px;
    margin: 6px 0;
}

.exam-workspace .exam-kiosk-print-frame {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 1px;
    height: 1px;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

/* Student phone /my-exams kiosk box */
.exam-workspace .exam-student-kiosk-box {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 18px 20px;
    margin: 0 0 16px;
    border-radius: 14px;
    border: 1px solid #bfdbfe;
    background: #f8fbff;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.05);
    clear: both;
}

.exam-workspace .exam-student-kiosk-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.exam-workspace .exam-student-kiosk-head strong {
    display: block;
    font-size: 14px;
    color: #1e3a8a;
    margin-bottom: 3px;
}

.exam-workspace .exam-student-kiosk-head p {
    margin: 0;
    font-size: 12.5px;
    color: var(--ui-supporting, #526078);
}

.exam-workspace .exam-student-kiosk-head .secondary-button {
    width: auto;
    margin-top: 0;
    min-height: 38px;
    padding: 8px 14px;
    font-size: 12.5px;
}

.exam-workspace .exam-student-kiosk-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.exam-workspace .exam-student-kiosk-input-group {
    flex: 1 1 200px;
    min-width: 0;
}

.exam-workspace .exam-student-kiosk-input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1e3a8a;
}

.exam-workspace .exam-student-kiosk-input-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #93c5fd;
    background: #ffffff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.12em;
    font-variant-numeric: tabular-nums;
}

.exam-workspace .exam-student-kiosk-form .primary-button {
    width: auto;
    margin-top: 0;
    min-height: 44px;
    padding: 10px 18px;
    font-size: 13px;
}

.exam-workspace .exam-qr-scanner-wrap {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 12px;
    background: #0f172a;
    color: #e2e8f0;
    text-align: center;
}

.exam-workspace .exam-qr-video {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    background: #000000;
}

html[data-theme="dark"] .exam-workspace .exam-kiosk-qr-box,
html[data-theme="dark"] .exam-workspace .exam-student-kiosk-box {
    background: rgba(30, 58, 138, 0.18);
    border-color: rgba(96, 165, 250, 0.35);
}

html[data-theme="dark"] .exam-workspace .exam-kiosk-steps li {
    background: rgba(15, 23, 42, 0.45);
}

@media (max-width: 640px) {
    .exam-workspace .exam-student-card-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .exam-workspace .exam-student-badges {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .exam-workspace .exam-student-badges .exam-badge {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }

    .exam-workspace .exam-student-kiosk-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .exam-workspace .exam-student-kiosk-head .secondary-button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .exam-workspace .exam-student-kiosk-form {
        flex-direction: column;
        align-items: stretch;
    }

    .exam-workspace .exam-student-kiosk-input-group {
        width: 100%;
    }

    .exam-workspace .exam-student-kiosk-form .primary-button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .exam-workspace .exam-student-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .exam-workspace .exam-student-actions form,
    .exam-workspace .exam-student-actions .primary-button,
    .exam-workspace .exam-student-actions .secondary-button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Standalone Kiosk Layout (/anjungan-ujian) matching Tap Dashboard */
.exam-standalone-kiosk-wrap .exam-kiosk-operator-links {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
}

.exam-kiosk-op-btn,
.operator-actions .exam-kiosk-op-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--line, #dce6f5);
    border-radius: 12px;
    background: #ffffff;
    padding: 8px 12px;
    min-height: 38px;
    color: var(--ink, #0f172a);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.exam-standalone-kiosk .exam-kiosk-stage-body {
    padding: 24px 32px;
    background: #f6f9fe;
}

.exam-standalone-kiosk .panel {
    background: #ffffff;
    border: 1px solid var(--line, #dce6f5);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: 0 8px 24px -16px rgba(37, 99, 235, 0.14);
}

.exam-standalone-kiosk .overline {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #2563eb;
    text-transform: uppercase;
}

.exam-standalone-kiosk .primary-button,
.exam-standalone-kiosk .secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.exam-standalone-kiosk .primary-button {
    border: 1px solid #1d4ed8;
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.24);
}

.exam-standalone-kiosk .secondary-button {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
}

.exam-standalone-kiosk .exam-kiosk-direct-form label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.exam-standalone-kiosk .exam-kiosk-direct-form input {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 14px;
}

.exam-standalone-kiosk .exam-kiosk-direct-form input:focus {
    background: #ffffff;
    border-color: #2563eb;
    outline: 3px solid rgba(37, 99, 235, 0.15);
}

.exam-standalone-kiosk .exam-kiosk-event-pill {
    border: 0;
    background: transparent;
    border-radius: 10px;
    padding: 9px 16px;
    font-size: 12px;
    font-weight: 700;
    color: #667f90;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
}

.exam-standalone-kiosk .exam-kiosk-event-pill.is-active {
    color: #ffffff;
    background: var(--green, #009b75);
    box-shadow: 0 3px 8px rgba(0, 155, 117, 0.18);
}

.exam-standalone-kiosk .exam-kiosk-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 32px;
    font-size: 13px;
    border-bottom: 1px solid var(--line, #dce6f5);
}

.exam-standalone-kiosk .exam-kiosk-banner-success {
    background: #ecfdf5;
    color: #065f46;
}

.exam-standalone-kiosk .exam-kiosk-banner-error {
    background: #fef2f2;
    color: #991b1b;
}

@media (max-width: 760px) {
    .exam-standalone-kiosk .exam-kiosk-stage-body {
        padding: 16px;
    }
}

/* Workflow readiness progress badges (Paket 2B) */
.exam-feature-meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .45rem;
}

.exam-step-progress {
    display: inline-flex;
    align-items: center;
    padding: .22rem .55rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.3;
    border: 1px solid transparent;
}

.exam-step-progress.is-ok {
    background: #ecfdf3;
    color: #065f46;
    border-color: #abefc6;
}

.exam-step-progress.is-warn {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.exam-step-progress.is-info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.exam-step-progress.is-muted,
.exam-step-progress.is-neutral {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

html[data-theme="dark"] .exam-step-progress.is-ok {
    background: rgba(22, 163, 74, 0.22);
    color: #86efac;
    border-color: #15803d;
}

html[data-theme="dark"] .exam-step-progress.is-warn {
    background: rgba(217, 119, 6, 0.22);
    color: #fde68a;
    border-color: #d97706;
}

html[data-theme="dark"] .exam-step-progress.is-info {
    background: rgba(37, 99, 235, 0.25);
    color: #93c5fd;
    border-color: #2563eb;
}

html[data-theme="dark"] .exam-step-progress.is-muted,
html[data-theme="dark"] .exam-step-progress.is-neutral {
    background: #1e293b;
    color: #94a3b8;
    border-color: #334155;
}

/* Live draft document sample preview panel (Paket 2A) */
.exam-sample-panel {
    display: grid;
    gap: 1rem;
}

.exam-sample-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.exam-sample-header h2 {
    margin: 0 0 .3rem;
}

.exam-sample-header p {
    margin: 0;
    max-width: 66ch;
    color: var(--ui-supporting, #526078);
    font-size: .85rem;
    line-height: 1.55;
}

.exam-sample-picker {
    display: grid;
    gap: .35rem;
    min-width: 240px;
}

.exam-sample-picker label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--ui-supporting, #526078);
}

.exam-sample-picker-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.exam-sample-picker-row select {
    flex: 1 1 220px;
    min-height: 40px;
    padding: .45rem .7rem;
    border: 1px solid var(--ui-border, #dce2ec);
    border-radius: 10px;
    background: var(--white, #fff);
    color: inherit;
    font: inherit;
    font-size: .85rem;
}

.exam-sample-picker-row .secondary-button {
    width: auto;
    margin: 0;
    min-height: 40px;
    padding: .45rem .9rem;
}

.exam-sample-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--ui-border, #dce2ec);
}

.exam-sample-tab {
    appearance: none;
    border: 1px solid var(--ui-border, #dce2ec);
    background: #f8fafc;
    color: var(--ink, #0f172a);
    border-radius: 999px;
    padding: .5rem .95rem;
    font: inherit;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.exam-sample-tab:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.exam-sample-tab.is-active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.exam-sample-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

@container (min-width: 56rem) {
    .exam-sample-layout {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
    }
}

.exam-sample-stage {
    padding: 1.25rem;
    border-radius: 14px;
    border: 1px solid var(--ui-border, #dce2ec);
    background: #f1f5f9;
    overflow-x: auto;
}

/* Printable paper mockups stay true white ink-on-paper even in dark mode */
.exam-paper-card {
    width: min(100%, 380px);
    margin: 0 auto;
    padding: 14px 16px;
    border: 1.5px dashed #475569;
    border-radius: 4px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 8px 24px -16px rgba(15, 23, 42, 0.35);
    font-size: 12px;
    line-height: 1.35;
}

.exam-paper-draft-status {
    text-align: center;
    font-size: 10.5px;
    font-weight: 700;
    color: #b91c1c;
    letter-spacing: .03em;
    margin-bottom: 6px;
}

.exam-paper-draft-status.is-published {
    color: #047857;
}

.exam-paper-school {
    margin: 0;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.exam-paper-address {
    margin: 2px 0 6px;
    text-align: center;
    font-size: 11px;
    color: #374151;
}

.exam-paper-title {
    margin: 4px 0 2px;
    text-align: center;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .04em;
    color: #111827;
}

.exam-paper-event {
    margin: 0 0 8px;
    text-align: center;
    font-size: 11.5px;
    color: #1f2937;
}

.exam-paper-identity {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
    font-size: 11.5px;
}

.exam-paper-identity td {
    padding: 1.5px 0;
    vertical-align: top;
    color: #111827;
}

.exam-paper-identity .label {
    width: 30%;
    white-space: nowrap;
}

.exam-paper-identity .colon {
    width: 4%;
    text-align: center;
}

.exam-paper-placement {
    padding: 5px 8px;
    margin-bottom: 8px;
    border: 1px solid #374151;
    text-align: center;
    font-weight: 700;
    font-size: 11.5px;
    background: #f8fafc;
    color: #111827;
}

.exam-paper-timetable {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.exam-paper-timetable th,
.exam-paper-timetable td {
    border: 1px solid #4b5563;
    padding: 4px 5px;
    color: #111827;
    vertical-align: middle;
}

.exam-paper-timetable th {
    background: #e5e7eb;
    text-align: center;
    font-weight: 700;
}

.exam-paper-timetable .is-placeholder-row td {
    color: #6b7280;
    font-style: italic;
}

.exam-paper-time {
    white-space: nowrap;
    text-align: center;
}

.exam-paper-signature {
    margin-top: 10px;
    text-align: right;
    font-size: 11px;
    color: #111827;
}

.exam-paper-signature p {
    margin: 0;
}

.exam-paper-sign-space {
    height: 28px;
}

.exam-paper-sign-name {
    font-weight: 700;
    text-decoration: underline;
}

.exam-paper-label-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.exam-paper-label {
    padding: 10px 12px;
    border: 1.5px dashed #475569;
    border-radius: 4px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 6px 18px -14px rgba(15, 23, 42, 0.3);
}

.exam-paper-label-school {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.exam-paper-label-event {
    margin: 2px 0 8px;
    font-size: 10.5px;
    text-align: center;
    color: #4b5563;
}

.exam-paper-label-body {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.exam-paper-label-box {
    display: grid;
    place-items: center;
    padding: 6px;
    border: 1.5px solid #111827;
    text-align: center;
    line-height: 1.15;
}

.exam-paper-label-box .caption {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #374151;
}

.exam-paper-label-box .room-code {
    font-size: 13px;
    margin-bottom: 4px;
}

.exam-paper-label-box .seat {
    font-size: 18px;
}

.exam-paper-label-identity {
    min-width: 0;
    font-size: 11.5px;
    line-height: 1.4;
}

.exam-paper-label-identity .participant-number {
    font-weight: 700;
    font-size: 12px;
}

.exam-paper-label-identity .student-name {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.exam-paper-attendance {
    padding: 16px 18px;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 8px 24px -16px rgba(15, 23, 42, 0.35);
    font-size: 12px;
}

.exam-paper-attendance-context {
    margin: 8px 0 10px;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font-size: 11.5px;
}

.exam-paper-attendance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
}

.exam-paper-attendance-table th,
.exam-paper-attendance-table td {
    border: 1px solid #4b5563;
    padding: 6px 7px;
    color: #111827;
    text-align: left;
}

.exam-paper-attendance-table th {
    background: #e5e7eb;
    font-weight: 700;
}

.exam-paper-sign-col {
    min-width: 72px;
}

.exam-paper-attendance-footer {
    margin: 10px 0 0;
    font-size: 10.5px;
    color: #4b5563;
}

.exam-sample-sidebar {
    display: grid;
    gap: .9rem;
}

.exam-sample-checklist {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #fde68a;
    background: #fffbeb;
}

.exam-sample-checklist h3 {
    margin: 0 0 .35rem;
    font-size: .9rem;
    color: #92400e;
}

.exam-sample-checklist ul {
    list-style: none;
    margin: .65rem 0 0;
    padding: 0;
    display: grid;
    gap: .5rem;
}

.exam-sample-checklist li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
    padding-top: .45rem;
    border-top: 1px solid rgba(180, 83, 9, 0.16);
    font-size: .8rem;
    color: #78350f;
}

.exam-sample-checklist li a {
    font-weight: 700;
    color: #1d4ed8;
    white-space: nowrap;
}

.exam-sample-ready {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #abefc6;
    background: #ecfdf3;
    color: #065f46;
    font-size: .83rem;
    line-height: 1.5;
}

.exam-sample-ready p {
    margin: .35rem 0 0;
}

.exam-sample-quick-actions {
    display: grid;
    gap: .5rem;
}

.exam-sample-quick-actions a {
    text-align: center;
}

html[data-theme="dark"] .exam-sample-tab {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

html[data-theme="dark"] .exam-sample-tab:hover {
    background: #1e293b;
    border-color: #3b82f6;
}

html[data-theme="dark"] .exam-sample-tab.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

html[data-theme="dark"] .exam-sample-stage {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .exam-sample-picker-row select {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

html[data-theme="dark"] .exam-sample-checklist {
    background: rgba(217, 119, 6, 0.14);
    border-color: #b45309;
}

html[data-theme="dark"] .exam-sample-checklist h3 {
    color: #fde68a;
}

html[data-theme="dark"] .exam-sample-checklist li {
    color: #fef3c7;
    border-top-color: rgba(251, 191, 36, 0.2);
}

html[data-theme="dark"] .exam-sample-checklist li a {
    color: #93c5fd;
}

html[data-theme="dark"] .exam-sample-ready {
    background: rgba(22, 163, 74, 0.18);
    border-color: #15803d;
    color: #86efac;
}

/* ============================================================================
   Proctor Scheduling & Per-Session Room Attendance
   ============================================================================ */
.exam-date-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.exam-date-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid var(--line, #d5e0f0);
    background: var(--surface, #ffffff);
    color: var(--text, #0f172a);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.exam-date-pill:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.exam-date-pill.is-active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.exam-date-pill.is-active .badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-color: transparent;
}

.exam-inline-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.exam-inline-bar select {
    min-width: 220px;
    max-width: 100%;
}

.exam-proctor-card {
    border: 1px solid var(--line, #dbe5f3);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: var(--surface, #ffffff);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exam-proctor-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.exam-proctor-head h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.exam-proctor-slot-pill {
    display: inline-block;
    margin-right: 10px;
    font-size: 13px;
}

.exam-proctor-details summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #1d4ed8;
}

.exam-per-session-form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.exam-per-session-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    width: 100%;
}

.exam-per-session-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.exam-att-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.exam-att-stat {
    border: 1px solid var(--line, #dbe5f3);
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--surface-alt, #f8fafc);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.exam-att-stat span {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted, #475569);
}

.exam-att-stat strong {
    font-size: 15.5px;
    line-height: 1.35;
    color: var(--ink, #0f172a);
}

.exam-att-stat.is-alert {
    background: #fef3f2;
    border-color: #fecdca;
    color: #b42318;
}

.exam-att-room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 14px;
}

.exam-att-room-card {
    border: 1px solid var(--line, #dbe5f3);
    border-radius: 12px;
    padding: 14px 16px;
    background: var(--surface, #ffffff);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exam-att-room-card[hidden],
.exam-sheet-row[hidden] {
    display: none !important;
}

.exam-att-room-card.is-submitted {
    border-left: 4px solid #16a34a;
}

.exam-att-room-card.is-draft {
    border-left: 4px solid #2563eb;
}

.exam-att-room-card.is-not_started {
    border-left: 4px solid #d97706;
}

.exam-att-room-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.exam-att-room-top h3 {
    margin: 6px 0 0;
    font-size: 15px;
}

.exam-att-room-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.exam-att-warning {
    margin: 2px 0;
    padding: 6px 10px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 12.5px;
    font-weight: 600;
}

.exam-att-row-mismatch {
    background: #fef3f2;
}

.exam-badge-ok {
    background: #ecfdf3;
    border-color: #abefc6;
    color: #067647;
}

.exam-badge-warn {
    background: #fffaeb;
    border-color: #fedf89;
    color: #b54708;
}

.exam-sheet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

html[data-theme="dark"] .exam-date-pill {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

html[data-theme="dark"] .exam-date-pill:hover {
    background: #1e293b;
    border-color: #3b82f6;
}

html[data-theme="dark"] .exam-date-pill.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

html[data-theme="dark"] .exam-proctor-card,
html[data-theme="dark"] .exam-att-room-card {
    background: #0f172a;
    border-color: #334155;
}

html[data-theme="dark"] .exam-att-stat {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .exam-att-stat.is-alert {
    background: rgba(220, 38, 38, 0.16);
    border-color: #991b1b;
    color: #fecaca;
}

html[data-theme="dark"] .exam-att-row-mismatch {
    background: rgba(220, 38, 38, 0.14);
}

html[data-theme="dark"] .exam-att-warning {
    background: rgba(217, 119, 6, 0.16);
    border-color: #b45309;
    color: #fde68a;
}

html[data-theme="dark"] .exam-proctor-details summary {
    color: #93c5fd;
}

html[data-theme="dark"] .exam-badge-ok {
    background: rgba(22, 163, 74, 0.18);
    border-color: #15803d;
    color: #86efac;
}

html[data-theme="dark"] .exam-badge-warn {
    background: rgba(217, 119, 6, 0.18);
    border-color: #b45309;
    color: #fde68a;
}

/* ============================================================================
   Exam & Moodle Settings Page (/exam-events/settings)
   ============================================================================ */
.exam-settings-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.exam-settings-kpi {
    background: #ffffff;
    border: 1px solid var(--line, #dce6f5);
    border-radius: 14px;
    padding: 15px 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.exam-settings-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.exam-settings-kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted, #475569);
    line-height: 1.35;
}

.exam-settings-kpi-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    flex-shrink: 0;
    background: #94a3b8;
}

.exam-settings-kpi-dot.is-ok {
    background: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
}

.exam-settings-kpi-dot.is-info {
    background: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.exam-settings-kpi-dot.is-warn {
    background: #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.16);
}

.exam-settings-kpi-value {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--ink, #0f172a);
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.exam-settings-kpi-sub {
    font-size: 12px;
    color: var(--muted, #64748b);
    line-height: 1.45;
    margin: 0 !important;
}

.exam-settings-section {
    padding: 22px 24px !important;
    margin-bottom: 22px !important;
}

.exam-settings-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line, #e2eaf6);
}

.exam-settings-head h2 {
    margin: 4px 0 4px !important;
    font-size: 18px !important;
    font-weight: 700;
    color: var(--ink, #0f172a);
}

.exam-settings-head p {
    margin: 0 !important;
    font-size: 13px;
    color: var(--muted, #526078);
}

.exam-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.exam-settings-card {
    background: #f8fafc;
    border: 1px solid var(--line, #dce6f5);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.exam-settings-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 2px !important;
    font-size: 15px !important;
    font-weight: 700;
    color: var(--ink, #0f172a);
}

.exam-settings-step-badge {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12.5px;
    font-weight: 800;
    flex-shrink: 0;
}

.exam-settings-subhead {
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
    margin: 4px 0 0 !important;
    padding-top: 10px;
    border-top: 1px dashed #cbd5e1;
}

.exam-check-card {
    display: flex !important;
    align-items: flex-start;
    gap: 11px;
    padding: 12px 14px;
    margin: 0 !important;
    border-radius: 11px;
    border: 1px solid #dbe5f3;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.exam-check-card:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.exam-check-card:has(input:checked) {
    border-color: #60a5fa;
    background: #f4f8ff;
}

.exam-check-card input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    margin: 2px 0 0 !important;
    accent-color: var(--primary, #2563eb);
    flex-shrink: 0;
    cursor: pointer;
}

.exam-check-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.exam-check-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink, #0f172a);
    line-height: 1.4;
}

.exam-check-desc {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted, #526078);
    line-height: 1.5;
}

.exam-num-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.exam-num-field {
    background: #ffffff;
    border: 1px solid #dbe5f3;
    border-radius: 11px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
}

.exam-num-field label {
    margin: 0 !important;
    font-size: 12px !important;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
}

.exam-num-field input[type="number"] {
    min-height: 38px !important;
    padding: 7px 10px !important;
    font-size: 14px !important;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
}

.exam-num-field input[type="number"]:focus {
    background: #ffffff !important;
    border-color: #2563eb !important;
}

.exam-num-hint {
    font-size: 11px;
    color: #64748b;
    line-height: 1.3;
}

.exam-field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.exam-field-group label {
    margin: 0 !important;
    font-size: 12.5px !important;
    font-weight: 600;
    color: #1e293b;
}

.exam-field-group input[type="url"],
.exam-field-group input[type="password"],
.exam-field-group input[type="text"] {
    min-height: 42px !important;
    padding: 9px 12px !important;
    font-size: 13.5px !important;
    border-radius: 10px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
}

.exam-field-hint {
    font-size: 11.5px;
    color: var(--muted, #526078);
    line-height: 1.45;
    margin: 0 !important;
    overflow-wrap: anywhere;
}

.exam-secret-input-wrap {
    display: flex;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
}

.exam-secret-input-wrap input {
    flex: 1 1 auto;
    min-width: 0;
}

.exam-secret-toggle {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 12px !important;
    margin: 0 !important;
    white-space: nowrap;
}

.exam-token-mask {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11.5px;
    padding: 1px 6px;
    border-radius: 6px;
    background: #eef2ff;
    color: #1e3a8a;
    border: 1px solid #c7d2fe;
    white-space: nowrap;
}

@media (min-width: 641px) and (max-width: 768px) {
    .exam-secret-input-wrap input {
        min-height: 44px !important;
        font-size: 16px !important;
    }

    .exam-secret-toggle {
        min-height: 44px;
    }
}
@media (max-width: 640px) {
    .exam-secret-input-wrap input {
        min-height: 44px !important;
        font-size: 16px !important;
    }

    .exam-secret-toggle {
        min-height: 44px;
    }
}

html[data-theme="dark"] .exam-token-mask {
    background: rgba(37, 99, 235, 0.2);
    color: #bfdbfe;
    border-color: rgba(96, 165, 250, 0.4);
}

.exam-settings-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line, #e2eaf6);
}

.exam-settings-footer .primary-button {
    margin: 0 !important;
    min-height: 42px;
    padding: 10px 20px;
    font-size: 13.5px;
}

@media (max-width: 1080px) {
    .exam-settings-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .exam-settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .exam-settings-summary,
    .exam-num-grid {
        grid-template-columns: 1fr;
    }
}

html[data-theme="dark"] .exam-settings-kpi,
html[data-theme="dark"] .exam-settings-card {
    background: #0f172a;
    border-color: #334155;
}

html[data-theme="dark"] .exam-settings-kpi-value,
html[data-theme="dark"] .exam-settings-head h2,
html[data-theme="dark"] .exam-settings-card-title,
html[data-theme="dark"] .exam-check-title,
html[data-theme="dark"] .exam-num-field label,
html[data-theme="dark"] .exam-field-group label {
    color: #f1f5f9;
}

html[data-theme="dark"] .exam-settings-step-badge {
    background: rgba(37, 99, 235, 0.25);
    color: #93c5fd;
}

html[data-theme="dark"] .exam-check-card,
html[data-theme="dark"] .exam-num-field {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .exam-check-card:hover,
html[data-theme="dark"] .exam-check-card:has(input:checked) {
    background: rgba(37, 99, 235, 0.16);
    border-color: #3b82f6;
}

html[data-theme="dark"] .exam-num-field input[type="number"],
html[data-theme="dark"] .exam-field-group input[type="url"],
html[data-theme="dark"] .exam-field-group input[type="password"],
html[data-theme="dark"] .exam-field-group input[type="text"],
html[data-theme="dark"] .exam-field-group select {
    background: #0f172a !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}

/* ============================================================================
   Shared Ujian Module Polish (prevent double <br><small> gaps, 3-column grade
   cards, collapsible drawers, and publication subject fieldsets)
   ============================================================================ */
.exam-workspace br:has(+ small) {
    display: none;
}

.exam-workspace small {
    margin-block: 2px 0;
    line-height: 1.4;
}

.exam-settings-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.exam-field-group select,
.exam-field-group input[type="number"] {
    min-height: 42px !important;
    padding: 9px 12px !important;
    font-size: 13.5px !important;
    border-radius: 10px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
}

.exam-course-block {
    background: #f8fafc;
    border: 1px solid var(--line, #dce6f5);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 16px;
}

.exam-topic-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 14px;
    margin: 14px 0 8px;
    background: #ffffff;
    border: 1px solid var(--line, #dbe5f3);
    border-radius: 10px;
}

.exam-collapsible-panel > summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    color: var(--ink, #0f172a);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    list-style: none;
}

.exam-collapsible-panel > summary::-webkit-details-marker {
    display: none;
}

.exam-collapsible-panel > summary::after {
    content: "▾";
    font-size: 14px;
    color: var(--primary, #2563eb);
    transition: transform 0.15s ease;
}

.exam-collapsible-panel[open] > summary {
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line, #e2eaf6);
}

.exam-collapsible-panel[open] > summary::after {
    transform: rotate(180deg);
}

.exam-subject-class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.exam-subject-fieldset {
    margin: 0 !important;
    padding: 14px 16px !important;
    border: 1px solid var(--line, #dce6f5) !important;
    border-radius: 12px !important;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exam-subject-fieldset legend {
    font-size: 13.5px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
}

.exam-subject-checks {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 210px;
    overflow-y: auto;
    padding-right: 4px;
}

.exam-subject-checks label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid #e2eaf6;
    background: #ffffff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.exam-subject-checks label:has(input:checked) {
    border-color: #60a5fa;
    background: #eff6ff;
    font-weight: 600;
}

.exam-subject-checks input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    accent-color: var(--primary, #2563eb);
    flex-shrink: 0;
}

@media (max-width: 1080px) {
    .exam-settings-grid-3 {
        grid-template-columns: 1fr;
    }
}

html[data-theme="dark"] .exam-course-block,
html[data-theme="dark"] .exam-subject-fieldset {
    background: #0f172a;
    border-color: #334155 !important;
}

html[data-theme="dark"] .exam-topic-bar,
html[data-theme="dark"] .exam-subject-checks label {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

html[data-theme="dark"] .exam-subject-checks label:has(input:checked) {
    background: rgba(37, 99, 235, 0.2);
    border-color: #3b82f6;
}

html[data-theme="dark"] .exam-collapsible-panel > summary {
    color: #f1f5f9;
}

/* ============================================================================
   Exam Audit Stage 1 Upgrade: Curriculum Helper, Proctor Matrix, Quick Status
   Pills & 3-Mode Responsive Standard (Desktop >=1280, Tablet 768-1024, Mobile <=640)
   ============================================================================ */
.exam-helper-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.exam-proctor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.exam-proctor-quick-row {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface-alt, #f8fafc);
    border: 1px dashed var(--line, #cbd5e1);
}

.exam-per-session-item select.is-conflict {
    border-color: #dc2626 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.16);
}

.exam-proctor-conflict-note {
    color: #b91c1c;
    font-weight: 600;
    font-size: 12px;
}

.exam-proctor-advisory {
    color: #b45309;
    font-weight: 600;
    font-size: 12px;
}

.exam-sticky-savebar {
    position: sticky;
    bottom: 12px;
    z-index: 15;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid #bfdbfe;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 30px -12px rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(8px);
}

.exam-quick-status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.exam-status-pill-btn {
    appearance: none;
    min-width: 36px;
    min-height: 36px;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.exam-status-pill-btn.is-selected.is-hadir {
    background: #16a34a;
    border-color: #15803d;
    color: #ffffff;
}

.exam-status-pill-btn.is-selected.is-terlambat {
    background: #2563eb;
    border-color: #1d4ed8;
    color: #ffffff;
}

.exam-status-pill-btn.is-selected.is-sakit {
    background: #d97706;
    border-color: #b45309;
    color: #ffffff;
}

.exam-status-pill-btn.is-selected.is-izin {
    background: #7c3aed;
    border-color: #6d28d9;
    color: #ffffff;
}

.exam-status-pill-btn.is-selected.is-alpa {
    background: #dc2626;
    border-color: #b91c1c;
    color: #ffffff;
}

html[data-theme="dark"] .exam-proctor-quick-row {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .exam-per-session-item select.is-conflict {
    border-color: #ef4444 !important;
    background-color: rgba(220, 38, 38, 0.2) !important;
}

html[data-theme="dark"] .exam-proctor-conflict-note {
    color: #fca5a5;
}

html[data-theme="dark"] .exam-proctor-advisory {
    color: #fde68a;
}

html[data-theme="dark"] .exam-sticky-savebar {
    background: rgba(15, 23, 42, 0.96);
    border-color: #334155;
}

html[data-theme="dark"] .exam-status-pill-btn {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

/* Tablet (768px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
    .exam-helper-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .exam-helper-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile-First & Card-Row Attendance Sheet (<= 768px) */
@media (min-width: 641px) and (max-width: 768px) {
    .exam-workspace,
    .exam-workspace .panel,
    .exam-workspace .exam-proctor-card {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .exam-workspace input[type="text"],
    .exam-workspace input[type="search"],
    .exam-workspace input[type="number"],
    .exam-workspace input[type="date"],
    .exam-workspace input[type="time"],
    .exam-workspace input[type="url"],
    .exam-workspace input[type="password"],
    .exam-workspace select,
    .exam-workspace textarea {
        min-height: 44px !important;
        font-size: 16px !important;
    }

    .exam-workspace .primary-button,
    .exam-workspace .secondary-button,
    .exam-workspace .exam-date-pill,
    .exam-workspace .exam-sample-tab {
        min-height: 44px;
    }

    .exam-status-pill-btn {
        flex: 1 1 0;
        min-width: 44px;
        min-height: 44px;
        font-size: 14px;
    }

    /* Card-row transformation for Proctor Room Attendance Sheet on Handphone */
    .exam-sheet-responsive-wrap {
        overflow-x: visible !important;
    }

    .exam-sheet-responsive-wrap table.exam-sheet-table {
        min-width: 0 !important;
        width: 100% !important;
        display: block;
    }

    .exam-sheet-responsive-wrap table.exam-sheet-table thead {
        display: none;
    }

    .exam-sheet-responsive-wrap table.exam-sheet-table tbody {
        display: grid;
        gap: 12px;
    }

    .exam-sheet-responsive-wrap table.exam-sheet-table tr.exam-sheet-row {
        display: grid;
        gap: 8px;
        padding: 14px;
        border: 1px solid var(--line, #dbe5f3);
        border-radius: 12px;
        background: var(--surface, #ffffff);
    }

    .exam-sheet-responsive-wrap table.exam-sheet-table tr.exam-sheet-row.exam-att-row-mismatch {
        border-color: #fca5a5;
        background: #fef2f2;
    }

    .exam-sheet-responsive-wrap table.exam-sheet-table td {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 0 !important;
        border: 0 !important;
    }

    .exam-sheet-responsive-wrap table.exam-sheet-table td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--muted, #64748b);
    }

    .exam-sheet-responsive-wrap table.exam-sheet-table td select,
    .exam-sheet-responsive-wrap table.exam-sheet-table td input {
        width: 100%;
        box-sizing: border-box;
    }

    html[data-theme="dark"] .exam-sheet-responsive-wrap table.exam-sheet-table tr.exam-sheet-row {
        background: #0f172a;
        border-color: #334155;
    }

    html[data-theme="dark"] .exam-sheet-responsive-wrap table.exam-sheet-table tr.exam-sheet-row.exam-att-row-mismatch {
        background: rgba(220, 38, 38, 0.16);
        border-color: #991b1b;
    }
}
@media (max-width: 640px) {
    .exam-workspace,
    .exam-workspace .panel,
    .exam-workspace .exam-proctor-card {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .exam-workspace input[type="text"],
    .exam-workspace input[type="search"],
    .exam-workspace input[type="number"],
    .exam-workspace input[type="date"],
    .exam-workspace input[type="time"],
    .exam-workspace input[type="url"],
    .exam-workspace input[type="password"],
    .exam-workspace select,
    .exam-workspace textarea {
        min-height: 44px !important;
        font-size: 16px !important;
    }

    .exam-workspace .primary-button,
    .exam-workspace .secondary-button,
    .exam-workspace .exam-date-pill,
    .exam-workspace .exam-sample-tab {
        min-height: 44px;
    }

    .exam-status-pill-btn {
        flex: 1 1 0;
        min-width: 44px;
        min-height: 44px;
        font-size: 14px;
    }

    /* Card-row transformation for Proctor Room Attendance Sheet on Handphone */
    .exam-sheet-responsive-wrap {
        overflow-x: visible !important;
    }

    .exam-sheet-responsive-wrap table.exam-sheet-table {
        min-width: 0 !important;
        width: 100% !important;
        display: block;
    }

    .exam-sheet-responsive-wrap table.exam-sheet-table thead {
        display: none;
    }

    .exam-sheet-responsive-wrap table.exam-sheet-table tbody {
        display: grid;
        gap: 12px;
    }

    .exam-sheet-responsive-wrap table.exam-sheet-table tr.exam-sheet-row {
        display: grid;
        gap: 8px;
        padding: 14px;
        border: 1px solid var(--line, #dbe5f3);
        border-radius: 12px;
        background: var(--surface, #ffffff);
    }

    .exam-sheet-responsive-wrap table.exam-sheet-table tr.exam-sheet-row.exam-att-row-mismatch {
        border-color: #fca5a5;
        background: #fef2f2;
    }

    .exam-sheet-responsive-wrap table.exam-sheet-table td {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 0 !important;
        border: 0 !important;
    }

    .exam-sheet-responsive-wrap table.exam-sheet-table td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--muted, #64748b);
    }

    .exam-sheet-responsive-wrap table.exam-sheet-table td select,
    .exam-sheet-responsive-wrap table.exam-sheet-table td input {
        width: 100%;
        box-sizing: border-box;
    }

    html[data-theme="dark"] .exam-sheet-responsive-wrap table.exam-sheet-table tr.exam-sheet-row {
        background: #0f172a;
        border-color: #334155;
    }

    html[data-theme="dark"] .exam-sheet-responsive-wrap table.exam-sheet-table tr.exam-sheet-row.exam-att-row-mismatch {
        background: rgba(220, 38, 38, 0.16);
        border-color: #991b1b;
    }
}

/* Handphone (<= 640px): Compact 2x2 KPIs & balanced hero actions */
@media (max-width: 640px) {
    .exam-settings-summary,
    .exam-att-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px;
    }

    .exam-settings-kpi,
    .exam-att-stat {
        padding: 12px;
    }

    .exam-intro-actions,
    .exam-sheet-actions,
    .exam-sticky-savebar {
        flex-direction: column;
        align-items: stretch;
    }

    .exam-intro-actions > *,
    .exam-intro-actions form button,
    .exam-sheet-actions > *,
    .exam-sticky-savebar button {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .exam-inline-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .exam-inline-bar select,
    .exam-inline-bar button {
        width: 100%;
        min-width: 0;
    }
}

/* ============================================================================
   Crisp Compact Data Table, Buttons & Inline Row Actions (All Exam Views)
   ============================================================================ */

/* Prevent school.css's global 100% width / margin-top:25px on .primary-button
   and incoming-transfers.css's margin-block:.35rem from creating misaligned buttons. */
.exam-workspace .primary-button,
.exam-workspace .secondary-button {
    margin-block: 0;
}

.exam-workspace .primary-button {
    width: auto;
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 16px;
    font-size: 13px;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
}

.exam-workspace .exam-kiosk-direct-form .primary-button {
    width: 100%;
}

.exam-workspace .exam-section-heading form {
    margin: 0;
}

.exam-table-toolbar-actions,
.exam-table-footer-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.exam-table-footer-actions {
    margin-top: 14px;
}

.exam-table-toolbar-actions form,
.exam-table-footer-actions form {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.exam-table-toolbar-actions .primary-button,
.exam-table-toolbar-actions .secondary-button,
.exam-table-footer-actions .primary-button,
.exam-table-footer-actions .secondary-button {
    width: auto !important;
    margin: 0 !important;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
}

.exam-table-footer-actions select {
    width: auto;
    min-width: 220px;
    min-height: 40px;
    margin: 0;
    padding: 8px 12px;
}

.exam-filter-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.exam-filter-strip input[type="text"],
.exam-filter-strip input[type="date"] {
    flex: 1 1 200px;
    min-width: 0;
    margin: 0 !important;
    min-height: 40px;
    padding: 8px 12px;
}

.exam-filter-strip select {
    flex: 0 1 210px;
    min-width: 150px;
    margin: 0 !important;
    min-height: 40px;
    padding: 8px 12px;
}

.exam-filter-strip .secondary-button,
.exam-filter-strip .primary-button {
    width: auto !important;
    margin: 0 !important;
    min-height: 40px;
    padding: 8px 14px;
}

.exam-workspace .exam-data-table-wrap {
    margin-top: 8px;
    border: 1px solid var(--line, #dbe5f3);
    border-radius: 12px;
    background: var(--surface, #ffffff);
}

.exam-workspace table.exam-data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 0;
}

.exam-workspace table.exam-data-table.exam-data-table-sm {
    min-width: 560px;
}

.exam-workspace table.exam-data-table:has(> tbody > tr:only-child > td[colspan]) {
    min-width: 0 !important;
}

.exam-workspace table.exam-data-table thead th {
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    padding: 10px 12px !important;
    border-bottom: 1px solid #cbd5e1 !important;
    border-right: 1px solid #e2e8f0;
    white-space: nowrap;
}

.exam-workspace table.exam-data-table thead th:last-child,
.exam-workspace table.exam-data-table tbody td:last-child {
    border-right: 0;
}

.exam-workspace table.exam-data-table tbody td {
    padding: 8px 12px !important;
    font-size: 13px;
    line-height: 1.4;
    border-bottom: 1px solid #e2e8f0 !important;
    border-right: 1px solid #f1f5f9;
    vertical-align: middle;
}

.exam-workspace table.exam-data-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.exam-workspace table.exam-data-table tbody tr:hover {
    background: #eff6ff;
}

.exam-workspace table.exam-data-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

.exam-cell-nowrap {
    white-space: nowrap;
}

.exam-cell-mono {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #475569;
}

.exam-cell-num {
    font-variant-numeric: tabular-nums;
    text-align: center;
    white-space: nowrap;
}

.exam-cell-sub {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    line-height: 1.35;
    color: var(--muted, #64748b);
}

.exam-code-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.exam-inline-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
}

.exam-inline-actions-wrap {
    flex-wrap: wrap;
}

.exam-inline-actions form {
    margin: 0;
    display: inline-flex;
}

.exam-inline-cell-form {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.exam-inline-cell-form select {
    width: auto !important;
    min-width: 118px;
    min-height: 32px !important;
    padding: 4px 10px !important;
    margin: 0 !important;
    font-size: 12.5px !important;
    border-radius: 8px;
}

.exam-workspace .exam-btn-compact {
    width: auto !important;
    margin: 0 !important;
    min-height: 32px !important;
    padding: 5px 10px !important;
    font-size: 12px !important;
    line-height: 1.25;
    white-space: nowrap;
    border-radius: 8px;
    box-shadow: none;
}

/* Desktop crisp grid for Proctor Room Attendance Sheet (keeps mobile card-row <=768px intact) */
@media (min-width: 769px) {
    .exam-workspace .exam-sheet-responsive-wrap {
        border: 1px solid var(--line, #dbe5f3);
        border-radius: 12px;
        background: var(--surface, #ffffff);
    }

    .exam-workspace table.exam-sheet-table {
        width: 100%;
        border-collapse: collapse;
    }

    .exam-workspace table.exam-sheet-table thead th {
        background: #f1f5f9;
        color: #334155;
        font-size: 12px;
        font-weight: 700;
        padding: 10px 12px !important;
        border-bottom: 1px solid #cbd5e1 !important;
        border-right: 1px solid #e2e8f0;
        white-space: nowrap;
    }

    .exam-workspace table.exam-sheet-table thead th:last-child,
    .exam-workspace table.exam-sheet-table tbody td:last-child {
        border-right: 0;
    }

    .exam-workspace table.exam-sheet-table tbody td {
        padding: 8px 12px !important;
        font-size: 13px;
        border-bottom: 1px solid #e2e8f0 !important;
        border-right: 1px solid #f1f5f9;
        vertical-align: middle;
    }

    .exam-workspace table.exam-sheet-table tbody tr:nth-child(even):not(.exam-att-row-mismatch) {
        background: #f8fafc;
    }

    .exam-workspace table.exam-sheet-table tbody tr:hover:not(.exam-att-row-mismatch) {
        background: #eff6ff;
    }

    .exam-workspace table.exam-sheet-table tbody tr:last-child td {
        border-bottom: 0 !important;
    }

    html[data-theme="dark"] .exam-workspace .exam-sheet-responsive-wrap {
        background: #0f172a;
        border-color: #334155;
    }

    html[data-theme="dark"] .exam-workspace table.exam-sheet-table thead th {
        background: #1e293b;
        color: #e2e8f0;
        border-bottom-color: #334155 !important;
        border-right-color: #334155;
    }

    html[data-theme="dark"] .exam-workspace table.exam-sheet-table tbody td {
        border-bottom-color: #1e293b !important;
        border-right-color: #1e293b;
    }

    html[data-theme="dark"] .exam-workspace table.exam-sheet-table tbody tr:nth-child(even):not(.exam-att-row-mismatch) {
        background: rgba(30, 41, 59, 0.45);
    }

    html[data-theme="dark"] .exam-workspace table.exam-sheet-table tbody tr:hover:not(.exam-att-row-mismatch) {
        background: rgba(37, 99, 235, 0.16);
    }
}

html[data-theme="dark"] .exam-workspace .exam-data-table-wrap {
    background: #0f172a;
    border-color: #334155;
}

html[data-theme="dark"] .exam-workspace table.exam-data-table thead th {
    background: #1e293b;
    color: #e2e8f0;
    border-bottom-color: #334155 !important;
    border-right-color: #334155;
}

html[data-theme="dark"] .exam-workspace table.exam-data-table tbody td {
    border-bottom-color: #1e293b !important;
    border-right-color: #1e293b;
}

html[data-theme="dark"] .exam-workspace table.exam-data-table tbody tr:nth-child(even) {
    background: rgba(30, 41, 59, 0.45);
}

html[data-theme="dark"] .exam-workspace table.exam-data-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.16);
}

html[data-theme="dark"] .exam-cell-mono {
    color: #cbd5e1;
}

html[data-theme="dark"] .exam-code-pill {
    background: rgba(37, 99, 235, 0.22);
    border-color: #2563eb;
    color: #93c5fd;
}

@media (min-width: 641px) and (max-width: 768px) {
    .exam-table-toolbar-actions,
    .exam-table-footer-actions,
    .exam-filter-strip {
        width: 100%;
    }

    .exam-table-toolbar-actions > *,
    .exam-table-toolbar-actions form,
    .exam-table-toolbar-actions button,
    .exam-table-toolbar-actions a,
    .exam-table-footer-actions > *,
    .exam-table-footer-actions form,
    .exam-table-footer-actions select,
    .exam-table-footer-actions button,
    .exam-table-footer-actions a,
    .exam-filter-strip input,
    .exam-filter-strip select,
    .exam-filter-strip button,
    .exam-filter-strip a {
        width: 100% !important;
        min-height: 44px !important;
        justify-content: center;
        text-align: center;
    }

    .exam-filter-strip input,
    .exam-filter-strip select,
    .exam-table-footer-actions select,
    .exam-inline-cell-form select {
        font-size: 16px !important;
        text-align: left;
    }

    .exam-inline-cell-form {
        flex-wrap: wrap;
    }

    .exam-inline-cell-form select {
        min-height: 44px !important;
        padding: 8px 10px !important;
    }

    .exam-workspace .exam-btn-compact {
        min-height: 44px !important;
        padding: 8px 12px !important;
        font-size: 13px !important;
    }

    .exam-settings-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .exam-settings-footer .primary-button,
    .exam-settings-footer .secondary-button,
    .exam-workspace .incoming-wide .primary-button,
    .exam-workspace .incoming-wide .secondary-button {
        width: 100% !important;
        min-height: 44px !important;
        justify-content: center;
    }
}
@media (max-width: 640px) {
    .exam-table-toolbar-actions,
    .exam-table-footer-actions,
    .exam-filter-strip {
        width: 100%;
    }

    .exam-table-toolbar-actions > *,
    .exam-table-toolbar-actions form,
    .exam-table-toolbar-actions button,
    .exam-table-toolbar-actions a,
    .exam-table-footer-actions > *,
    .exam-table-footer-actions form,
    .exam-table-footer-actions select,
    .exam-table-footer-actions button,
    .exam-table-footer-actions a,
    .exam-filter-strip input,
    .exam-filter-strip select,
    .exam-filter-strip button,
    .exam-filter-strip a {
        width: 100% !important;
        min-height: 44px !important;
        justify-content: center;
        text-align: center;
    }

    .exam-filter-strip input,
    .exam-filter-strip select,
    .exam-table-footer-actions select,
    .exam-inline-cell-form select {
        font-size: 16px !important;
        text-align: left;
    }

    .exam-inline-cell-form {
        flex-wrap: wrap;
    }

    .exam-inline-cell-form select {
        min-height: 44px !important;
        padding: 8px 10px !important;
    }

    .exam-workspace .exam-btn-compact {
        min-height: 44px !important;
        padding: 8px 12px !important;
        font-size: 13px !important;
    }

    .exam-settings-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .exam-settings-footer .primary-button,
    .exam-settings-footer .secondary-button,
    .exam-workspace .incoming-wide .primary-button,
    .exam-workspace .incoming-wide .secondary-button {
        width: 100% !important;
        min-height: 44px !important;
        justify-content: center;
    }
}

/* ============================================================================
   KU-UX-02 / KU-UX-02A / KU-UX-02B:
   Six-Tab Event Navigation, Global Utilities, Mobile Step Selector & Event List
   ============================================================================ */
.exam-intro-compact {
    margin-block: 0.25rem 1rem;
}

.exam-readiness-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.exam-event-shell {
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line, #dbe5f3);
    border-radius: 14px;
    background: var(--surface, #ffffff);
}

.exam-event-shell-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 12px;
}

.exam-event-shell-meta {
    min-width: 0;
    flex: 1 1 260px;
}

.exam-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary, #2563eb);
    text-decoration: none;
    margin-bottom: 4px;
}

.exam-back-link:hover {
    text-decoration: underline;
}

.exam-event-shell-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--ink, #0f172a);
}

.exam-event-shell-title strong {
    overflow-wrap: anywhere;
}

.exam-event-shell-sub {
    margin: 3px 0 0;
    font-size: 12.5px;
    color: var(--muted, #64748b);
    overflow-wrap: anywhere;
}

.exam-nav-utilities {
    position: relative;
    flex-shrink: 0;
}

.exam-nav-utilities summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 7px 13px;
    border: 1px solid var(--line, #cbd5e1);
    border-radius: 10px;
    background: var(--bg, #f8fafc);
    color: var(--ink, #0f172a);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.exam-nav-utilities summary::-webkit-details-marker {
    display: none;
}

.exam-nav-utilities summary::after {
    content: '▾';
    font-size: 11px;
    color: var(--muted, #64748b);
}

.exam-nav-utilities[open] summary::after {
    content: '▴';
}

.exam-nav-utility-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    min-width: 248px;
    max-width: calc(100vw - 32px);
    padding: 8px;
    border: 1px solid var(--line, #cbd5e1);
    border-radius: 12px;
    background: var(--surface, #ffffff);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    display: grid;
    gap: 4px;
}

.exam-nav-utility-menu a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink, #0f172a);
    text-decoration: none;
}

.exam-nav-utility-menu a:hover,
.exam-nav-utility-menu a[aria-current="page"] {
    background: var(--soft, #eff6ff);
    color: var(--primary, #1d4ed8);
}

.exam-nav-utility-note {
    margin: 4px 0 0;
    padding: 6px 10px 2px;
    border-top: 1px solid var(--line, #e2e8f0);
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--muted, #64748b);
}

.exam-main-tabs {
    display: grid;
    grid-template-columns: 0.9fr 0.9fr 0.9fr 1fr 1.45fr 0.9fr;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--line, #e2e8f0);
}

.exam-main-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted, #475569);
    text-decoration: none;
    text-align: center;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.exam-main-tab:hover {
    background: var(--soft, #eff6ff);
    color: var(--primary, #1d4ed8);
}

.exam-main-tab.is-active,
.exam-main-tab[aria-current="page"] {
    background: var(--primary, #2563eb);
    color: #ffffff;
    border-color: var(--primary, #2563eb);
}

.exam-main-tab-num {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.exam-main-tab.is-active .exam-main-tab-num,
.exam-main-tab[aria-current="page"] .exam-main-tab-num {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.exam-mobile-step-nav {
    display: none;
    padding-top: 10px;
    border-top: 1px solid var(--line, #e2e8f0);
}

.exam-mobile-step-nav label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--muted, #475569);
    margin-bottom: 6px;
}

.exam-mobile-step-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.exam-mobile-step-row select {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    font-size: 16px;
    margin: 0;
}

.exam-mobile-step-row button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 8px 16px;
    margin: 0;
    width: auto !important;
}

.exam-subview-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--line, #cbd5e1);
}

.exam-subview-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--line, #dbe5f3);
    background: var(--bg, #f8fafc);
    color: var(--muted, #475569);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
}

.exam-subview-link:hover {
    background: var(--soft, #eff6ff);
    color: var(--primary, #1d4ed8);
}

.exam-subview-link.is-active,
.exam-subview-link[aria-current="page"] {
    background: var(--soft, #eff6ff);
    border-color: var(--primary, #2563eb);
    color: var(--primary, #1d4ed8);
}

/* Dark Mode for KU-UX-02 Navigation Shell */
html[data-theme="dark"] .exam-event-shell {
    background: #0f172a;
    border-color: #334155;
}

html[data-theme="dark"] .exam-event-shell-title {
    color: #f1f5f9;
}

html[data-theme="dark"] .exam-nav-utilities summary {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

html[data-theme="dark"] .exam-nav-utility-menu {
    background: #0f172a;
    border-color: #334155;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .exam-nav-utility-menu a {
    color: #e2e8f0;
}

html[data-theme="dark"] .exam-nav-utility-menu a:hover,
html[data-theme="dark"] .exam-nav-utility-menu a[aria-current="page"] {
    background: rgba(37, 99, 235, 0.22);
    color: #93c5fd;
}

html[data-theme="dark"] .exam-main-tabs,
html[data-theme="dark"] .exam-mobile-step-nav,
html[data-theme="dark"] .exam-subview-nav {
    border-top-color: #334155;
}

html[data-theme="dark"] .exam-main-tab {
    color: #cbd5e1;
}

html[data-theme="dark"] .exam-main-tab:hover {
    background: rgba(37, 99, 235, 0.18);
    color: #93c5fd;
}

html[data-theme="dark"] .exam-main-tab-num {
    background: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .exam-subview-link {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

html[data-theme="dark"] .exam-subview-link.is-active,
html[data-theme="dark"] .exam-subview-link[aria-current="page"] {
    background: rgba(37, 99, 235, 0.22);
    border-color: #3b82f6;
    color: #93c5fd;
}

/* Tablet (768px - 1024px): 3x2 grid for 6 tabs */
@media (min-width: 768px) and (max-width: 1024px) {
    .exam-main-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Handphone (<= 767px): Step selector + card-row event list (zero overflow) */
@media (max-width: 767px) {
    .exam-main-tabs {
        display: none;
    }

    .exam-mobile-step-nav {
        display: block;
    }

    .exam-nav-utilities {
        width: 100%;
    }

    .exam-nav-utilities summary {
        width: 100%;
        min-height: 44px;
        justify-content: space-between;
    }

    .exam-nav-utility-menu {
        position: static;
        margin-top: 6px;
        min-width: 0;
        width: 100%;
        box-shadow: none;
    }

    .exam-subview-link {
        min-height: 44px;
        flex: 1 1 auto;
        justify-content: center;
    }

    /* Responsive card-row for /exam-events index list on Handphone */
    .exam-workspace .exam-events-list-wrap {
        overflow-x: visible !important;
        border: 0;
        background: transparent;
    }

    .exam-workspace table.exam-events-list-table {
        min-width: 0 !important;
        width: 100% !important;
        display: block;
    }

    .exam-workspace table.exam-events-list-table thead {
        display: none;
    }

    .exam-workspace table.exam-events-list-table tbody {
        display: grid;
        gap: 12px;
    }

    .exam-workspace table.exam-events-list-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 12px;
        padding: 14px;
        border: 1px solid var(--line, #dbe5f3);
        border-radius: 12px;
        background: var(--surface, #ffffff) !important;
    }

    .exam-workspace table.exam-events-list-table tbody tr:has(> td[colspan]) {
        grid-template-columns: minmax(0, 1fr);
    }

    .exam-workspace table.exam-events-list-table tbody td {
        display: flex;
        flex-direction: column;
        gap: 3px;
        padding: 0 !important;
        border: 0 !important;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .exam-workspace table.exam-events-list-table tbody td[data-label]::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--muted, #64748b);
    }

    .exam-workspace table.exam-events-list-table tbody td.exam-card-primary,
    .exam-workspace table.exam-events-list-table tbody td.exam-card-action,
    .exam-workspace table.exam-events-list-table tbody td[data-label="Kesiapan"],
    .exam-workspace table.exam-events-list-table tbody td[data-label="Readiness"] {
        grid-column: 1 / -1;
    }

    .exam-workspace table.exam-events-list-table tbody td.exam-card-action::before {
        display: none;
    }

    .exam-workspace table.exam-events-list-table tbody td.exam-card-action .exam-inline-actions {
        width: 100% !important;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .exam-workspace table.exam-events-list-table tbody td.exam-card-action .exam-inline-actions > a,
    .exam-workspace table.exam-events-list-table tbody td.exam-card-action .exam-inline-actions > form {
        flex: 1 1 130px;
        min-height: 44px !important;
        justify-content: center;
    }

    .exam-workspace table.exam-events-list-table tbody td.exam-card-action .exam-inline-actions > form button {
        width: 100% !important;
        min-height: 44px !important;
        justify-content: center;
    }

    html[data-theme="dark"] .exam-workspace table.exam-events-list-table tbody tr {
        background: #0f172a !important;
        border-color: #334155;
    }
}

/* ============================================================================
   KU-UX-04 & Compact Page Heading (4 KPI Cards -> 2x2 Tablet/HP, Light & Dark)
   ============================================================================ */
.exam-workspace .exam-page-head-compact {
    margin-block: 0 12px;
    align-items: center;
}

.exam-workspace .exam-page-head-compact h1 {
    font-size: clamp(1.25rem, 2.2vw, 1.55rem);
    margin: 0;
}

.exam-workspace .exam-page-head-compact p {
    margin: 3px 0 0;
    font-size: 13px;
}

.exam-kpi-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.exam-kpi-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--line, #dbe5f3);
    border-radius: 12px;
    background: var(--surface, #ffffff);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.exam-kpi-link:hover {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.exam-kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted, #64748b);
}

.exam-kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    color: var(--ink, #0f172a);
}

.exam-kpi-text {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink, #0f172a);
    overflow-wrap: anywhere;
}

.exam-kpi-sub {
    margin-top: auto;
    padding-top: 2px;
}

html[data-theme="dark"] .exam-kpi-card {
    background: #0f172a;
    border-color: #334155;
}

html[data-theme="dark"] .exam-kpi-link:hover {
    border-color: #3b82f6;
}

html[data-theme="dark"] .exam-kpi-value,
html[data-theme="dark"] .exam-kpi-text {
    color: #f1f5f9;
}

@media (min-width: 641px) and (max-width: 1024px) {
    .exam-kpi-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}
@media (max-width: 640px) {
    .exam-kpi-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

@media (max-width: 640px) {
    .exam-kpi-card {
        padding: 12px;
    }

    .exam-kpi-value {
        font-size: 1.3rem;
    }

    .exam-kpi-text {
        font-size: 0.875rem;
    }
}

/* ============================================================================
   Compact Proctor Assignment Matrix Table (1 Hari = 1 Guru & Per Sesi Modes)
   ============================================================================ */
.exam-proctor-mode-toggle {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--line, #dbe5f3);
    background: var(--bg, #f8fafc);
}

.exam-mode-btn {
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted, #475569);
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 12px;
    min-height: 36px;
    cursor: pointer;
}

.exam-mode-btn.is-active {
    background: var(--primary, #2563eb);
    color: #ffffff;
}

.exam-proctor-controls {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.exam-proctor-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.exam-proctor-filter-row input[type="search"] {
    flex: 1 1 220px;
    min-width: 0;
    min-height: 40px;
    padding: 7px 12px;
    margin: 0 !important;
    font-size: 13px;
}

.exam-proctor-filter-pills {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

.exam-filter-pill {
    border: 1px solid var(--line, #cbd5e1);
    border-radius: 999px;
    background: var(--surface, #ffffff);
    color: var(--muted, #475569);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    min-height: 34px;
    cursor: pointer;
}

.exam-filter-pill.is-active {
    background: var(--soft, #eff6ff);
    border-color: var(--primary, #2563eb);
    color: var(--primary, #1d4ed8);
}

.exam-proctor-hide-taken {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    margin: 0 !important;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink, #1e293b);
    cursor: pointer;
}

.exam-proctor-hide-taken input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-height: 0 !important;
    margin: 0 !important;
}

/* Mode-based column visibility */
#exam-proctor-matrix-form[data-matrix-mode="uniform"] .exam-proctor-th-session,
#exam-proctor-matrix-form[data-matrix-mode="uniform"] .exam-proctor-row:not(.is-row-expanded) .exam-proctor-td-session {
    display: none;
}

#exam-proctor-matrix-form[data-matrix-mode="uniform"] .exam-proctor-row.is-row-expanded .exam-proctor-td-uniform {
    display: none;
}

#exam-proctor-matrix-form[data-matrix-mode="per_session"] .exam-proctor-th-uniform,
#exam-proctor-matrix-form[data-matrix-mode="per_session"] .exam-proctor-td-uniform {
    display: none;
}

#exam-proctor-matrix-form[data-matrix-mode="per_session"] [data-row-toggle-mode] {
    display: none;
}

/* When at least one row is expanded in uniform mode, reveal session headers cleanly */
#exam-proctor-matrix-form[data-matrix-mode="uniform"]:has(.exam-proctor-row.is-row-expanded) .exam-proctor-th-session {
    display: table-cell;
}

#exam-proctor-matrix-form[data-matrix-mode="uniform"]:has(.exam-proctor-row.is-row-expanded) .exam-proctor-row:not(.is-row-expanded) .exam-proctor-td-session {
    display: table-cell;
    opacity: 0.72;
}

.exam-proctor-room-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
}

.exam-proctor-row-badge {
    font-size: 11px;
    padding: 2px 7px;
}

.exam-proctor-select-group {
    display: flex;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.exam-proctor-select-group .exam-proctor-select {
    flex: 1 1 auto;
    min-width: 0 !important;
}

.exam-proctor-find-btn {
    flex: 0 0 auto;
    min-height: 36px !important;
    padding: 5px 10px !important;
    margin: 0 !important;
    font-size: 12px !important;
    white-space: nowrap;
}

.exam-picker-modal[hidden] {
    display: none !important;
}

.exam-picker-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(2px);
}

.exam-picker-dialog {
    width: 100%;
    max-width: 520px;
    max-height: min(82vh, 640px);
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    border: 1px solid var(--line, #dbe5f3);
    background: var(--surface, #ffffff);
    color: var(--ink, #0f172a);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    overflow: hidden;
}

.exam-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--line, #e2e8f0);
}

.exam-picker-header h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.3;
}

.exam-picker-subtitle {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--muted, #64748b);
}

.exam-picker-close {
    flex: 0 0 auto;
    min-width: 36px;
    min-height: 36px;
    padding: 4px 10px !important;
    margin: 0 !important;
}

.exam-picker-search-wrap {
    padding: 10px 16px;
    border-bottom: 1px solid var(--line, #e2e8f0);
    display: grid;
    gap: 8px;
    background: var(--bg, #f8fafc);
}

.exam-picker-search-wrap input[type="search"] {
    width: 100% !important;
    min-height: 40px;
    padding: 8px 12px;
    margin: 0 !important;
    font-size: 14px;
    border-radius: 8px;
}

.exam-picker-search-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--muted, #64748b);
}

.exam-picker-list {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px;
    display: grid;
    gap: 6px;
}

.exam-picker-item {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    min-height: 44px;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 10px;
    background: var(--surface, #ffffff);
    color: var(--ink, #0f172a);
    cursor: pointer;
    transition: border-color 0.12s ease, background-color 0.12s ease;
}

.exam-picker-item:hover,
.exam-picker-item:focus-visible {
    border-color: var(--primary, #2563eb);
    background: var(--soft, #eff6ff);
    outline: none;
}

.exam-picker-item.is-selected {
    border-color: var(--primary, #2563eb);
    background: var(--soft, #eff6ff);
}

.exam-picker-item.is-taken {
    opacity: 0.72;
}

.exam-picker-item-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.exam-picker-item-name {
    font-size: 13.5px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.exam-picker-item-sub {
    font-size: 11.5px;
    color: var(--muted, #64748b);
}

.exam-picker-item-badges {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
}

.exam-picker-empty {
    margin: 12px 8px;
    text-align: center;
    font-size: 13px;
    color: var(--muted, #64748b);
}

.exam-picker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid var(--line, #e2e8f0);
    background: var(--bg, #f8fafc);
}

html[data-theme="dark"] .exam-picker-dialog {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

html[data-theme="dark"] .exam-picker-header,
html[data-theme="dark"] .exam-picker-search-wrap,
html[data-theme="dark"] .exam-picker-footer {
    border-color: #334155;
}

html[data-theme="dark"] .exam-picker-search-wrap,
html[data-theme="dark"] .exam-picker-footer {
    background: #1e293b;
}

html[data-theme="dark"] .exam-picker-item {
    background: #111827;
    border-color: #334155;
    color: #f1f5f9;
}

html[data-theme="dark"] .exam-picker-item:hover,
html[data-theme="dark"] .exam-picker-item:focus-visible,
html[data-theme="dark"] .exam-picker-item.is-selected {
    background: rgba(37, 99, 235, 0.22);
    border-color: #3b82f6;
}

.exam-proctor-select {
    width: 100% !important;
    min-width: 165px;
    min-height: 36px !important;
    padding: 5px 10px !important;
    margin: 0 !important;
    font-size: 12.5px !important;
    border-radius: 8px;
}

.exam-proctor-select.is-conflict {
    border-color: #dc2626 !important;
    background: #fef2f2 !important;
}

.exam-proctor-row.is-complete td:first-child {
    box-shadow: inset 3px 0 0 #16a34a;
}

.exam-proctor-row.is-partial td:first-child {
    box-shadow: inset 3px 0 0 #d97706;
}

.exam-proctor-row.is-conflict-row td:first-child {
    box-shadow: inset 3px 0 0 #dc2626;
}

html[data-theme="dark"] .exam-proctor-mode-toggle {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .exam-mode-btn {
    color: #cbd5e1;
}

html[data-theme="dark"] .exam-filter-pill {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}

html[data-theme="dark"] .exam-filter-pill.is-active {
    background: rgba(37, 99, 235, 0.22);
    border-color: #3b82f6;
    color: #93c5fd;
}

html[data-theme="dark"] .exam-proctor-hide-taken {
    color: #e2e8f0;
}

html[data-theme="dark"] .exam-proctor-select.is-conflict {
    background: rgba(220, 38, 38, 0.18) !important;
    border-color: #f87171 !important;
}

@media (max-width: 767px) {
    .exam-proctor-mode-toggle {
        width: 100%;
    }

    .exam-mode-btn {
        flex: 1 1 0;
        min-height: 44px;
        text-align: center;
    }

    .exam-proctor-filter-row input[type="search"],
    .exam-proctor-select,
    .exam-picker-search-wrap input[type="search"] {
        font-size: 16px !important;
        min-height: 44px !important;
        min-width: 0 !important;
    }

    .exam-proctor-find-btn {
        min-height: 44px !important;
        padding: 8px 14px !important;
        font-size: 14px !important;
    }

    .exam-picker-modal {
        align-items: flex-end;
        padding: 0;
    }

    .exam-picker-dialog {
        max-width: 100%;
        max-height: 86vh;
        border-radius: 16px 16px 0 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
    }

    .exam-picker-close {
        min-width: 44px;
        min-height: 44px;
    }

    .exam-picker-footer button {
        min-height: 44px !important;
    }

    .exam-filter-pill {
        min-height: 44px;
        flex: 1 1 auto;
    }

    .exam-workspace .exam-proctor-table-wrap {
        overflow-x: visible !important;
        border: 0;
        background: transparent;
    }

    .exam-workspace table.exam-proctor-matrix-table {
        min-width: 0 !important;
        width: 100% !important;
        display: block;
    }

    .exam-workspace table.exam-proctor-matrix-table thead {
        display: none;
    }

    .exam-workspace table.exam-proctor-matrix-table tbody {
        display: grid;
        gap: 12px;
    }

    .exam-workspace table.exam-proctor-matrix-table tbody tr.exam-proctor-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding: 14px;
        border: 1px solid var(--line, #dbe5f3);
        border-radius: 12px;
        background: var(--surface, #ffffff) !important;
    }

    .exam-workspace table.exam-proctor-matrix-table tbody tr.exam-proctor-row[hidden] {
        display: none !important;
    }

    .exam-workspace table.exam-proctor-matrix-table tbody td {
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 0;
        max-width: 100%;
        padding: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .exam-workspace table.exam-proctor-matrix-table tbody td[data-label]::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--muted, #64748b);
    }

    .exam-workspace table.exam-proctor-matrix-table tbody td.exam-proctor-td-actions::before {
        display: none;
    }

    .exam-workspace table.exam-proctor-matrix-table tbody td.exam-proctor-td-actions .exam-inline-actions {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    .exam-workspace table.exam-proctor-matrix-table tbody td.exam-proctor-td-actions .exam-inline-actions button {
        flex: 1 1 0;
        min-height: 44px !important;
        justify-content: center;
    }

    html[data-theme="dark"] .exam-workspace table.exam-proctor-matrix-table tbody tr.exam-proctor-row {
        background: #0f172a !important;
        border-color: #334155;
    }
}

/* ============================================================================
   Quick Print Cards (4/A4) & Room Documents (12/A4 Labels & Attendance)
   ============================================================================ */
.exam-quick-print-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 10px;
}

.exam-quick-print-grid[hidden] {
    display: none !important;
}

.exam-quick-print-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line, #dbe5f3);
    background: var(--bg, #f8fafc);
    min-width: 0;
}

.exam-quick-print-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
}

.exam-quick-print-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.exam-quick-print-actions form {
    flex: 1 1 0;
    margin: 0;
}

.exam-quick-print-actions button {
    width: 100%;
    justify-content: center;
}

.exam-print-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 10px;
    align-items: end;
}

.exam-print-filter-grid label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--muted, #475569);
}

.exam-print-filter-grid input[type="search"],
.exam-print-filter-grid select {
    width: 100%;
    min-height: 40px;
    margin: 0 !important;
}

.exam-print-filter-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: flex-end;
}

html[data-theme="dark"] .exam-quick-print-card {
    background: #1e293b;
    border-color: #334155;
}

@media (min-width: 768px) and (max-width: 1024px) {
    .exam-print-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .exam-print-filter-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }
}

@media (max-width: 767px) {
    .exam-quick-print-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .exam-quick-print-card {
        padding: 10px;
    }

    .exam-quick-print-card button {
        min-height: 44px !important;
        white-space: normal !important;
        line-height: 1.25;
        text-align: center;
    }

    .exam-quick-print-actions {
        flex-direction: column;
    }

    .exam-print-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .exam-print-filter-grid input[type="search"],
    .exam-print-filter-grid select {
        font-size: 16px !important;
        min-height: 44px !important;
    }

    .exam-print-filter-actions .exam-inline-actions {
        width: 100%;
    }

    .exam-print-filter-actions .exam-inline-actions > * {
        flex: 1 1 0;
        min-height: 44px !important;
        justify-content: center;
    }

    .exam-att-room-actions > a,
    .exam-att-room-actions > button {
        flex: 1 1 140px;
        min-height: 44px !important;
        justify-content: center;
        text-align: center;
    }

    .exam-proctor-toolbar .exam-inline-bar {
        width: 100%;
    }

    .exam-proctor-toolbar .exam-inline-bar select,
    .exam-proctor-toolbar .exam-inline-bar button {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 420px) {
    .exam-quick-print-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Indonesian Date Input (dd/mm/yyyy) Progressive Enhancement */
.exam-id-date-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.exam-filter-strip .exam-id-date-wrap {
    flex: 1 1 200px;
    width: auto;
}

.exam-workspace .exam-id-date-wrap input.exam-id-date-text {
    width: 100%;
    padding-right: 44px !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.exam-id-date-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    min-height: 36px !important;
    padding: 0;
    margin: 0 !important;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--theme-muted, #475569);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.exam-id-date-btn:hover {
    background: var(--theme-accent-soft, rgba(37, 99, 235, 0.1));
    color: var(--theme-accent, #2563eb);
}

.exam-id-date-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.exam-workspace input.exam-id-date-native {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none;
    z-index: 1;
}

/* Top Sub-Tabs for Tab 2 (Sesi & Jadwal Ujian) & Tab 3 (Ruang & Bangku) */
.exam-schedule-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 14px;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--line, #dbe5f3);
    background: var(--theme-surface-subtle, #f6f9fe);
}

.exam-schedule-subtab {
    flex: 1 1 auto;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--theme-muted, #475569);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.exam-schedule-subtab:hover {
    background: var(--theme-surface, #ffffff);
    color: var(--theme-text, #0f172a);
    border-color: var(--line, #dbe5f3);
}

.exam-schedule-subtab.is-active {
    background: var(--theme-accent, #2563eb);
    color: #ffffff;
    border-color: var(--theme-accent, #2563eb);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.exam-schedule-subtab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    white-space: nowrap;
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: rgba(15, 23, 42, 0.08);
    color: inherit;
}

.exam-schedule-subtab-badge.is-ok {
    background: rgba(22, 163, 74, 0.14);
    color: #15803d;
}

.exam-schedule-subtab-badge.is-warn {
    background: rgba(217, 119, 6, 0.16);
    color: #b45309;
}

.exam-schedule-subtab.is-active .exam-schedule-subtab-badge {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

@media (max-width: 640px) {
    .exam-schedule-subtabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        padding: 6px;
    }

    .exam-schedule-subtab {
        flex: none;
        width: 100%;
        padding: 8px 10px;
        font-size: 0.85rem;
        text-align: center;
        white-space: normal;
        line-height: 1.25;
    }
}

/* Compact & Zero-Clip Participants Placement Table, Cards Table & Proctoring Table */
.exam-workspace table.exam-placements-participants-table,
.exam-workspace table.exam-cards-list-table,
.exam-workspace table.exam-proctoring-table {
    min-width: 0;
    width: 100%;
}

.exam-placement-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    font-size: 0.86rem;
}

.exam-seat-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--theme-surface-elevated, #eff5ff);
    color: var(--theme-text, #0f172a);
    border: 1px solid var(--line, #dbe5f3);
}

@media (min-width: 641px) and (max-width: 768px) {
    .exam-workspace table.exam-placements-participants-table thead,
    .exam-workspace table.exam-cards-list-table thead {
        display: none;
    }

    .exam-workspace table.exam-placements-participants-table tbody,
    .exam-workspace table.exam-placements-participants-table tr,
    .exam-workspace table.exam-placements-participants-table td,
    .exam-workspace table.exam-cards-list-table tbody,
    .exam-workspace table.exam-cards-list-table tr,
    .exam-workspace table.exam-cards-list-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .exam-workspace table.exam-placements-participants-table tr,
    .exam-workspace table.exam-cards-list-table tr {
        padding: 12px;
        border-bottom: 1px solid var(--line, #dbe5f3);
    }

    .exam-workspace table.exam-placements-participants-table td,
    .exam-workspace table.exam-cards-list-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 4px 0 !important;
        border: 0 !important;
        text-align: right;
    }

    .exam-workspace table.exam-placements-participants-table td::before,
    .exam-workspace table.exam-cards-list-table td::before {
        content: attr(data-label);
        font-size: 0.78rem;
        font-weight: 600;
        color: var(--theme-muted, #64748b);
        text-align: left;
        flex: 0 0 auto;
    }

    .exam-workspace table.exam-placements-participants-table td[data-label="Peserta"],
    .exam-workspace table.exam-placements-participants-table td[data-label="Participant"],
    .exam-workspace table.exam-placements-participants-table td[data-label="Participants"],
    .exam-workspace table.exam-cards-list-table td[data-label="Peserta"],
    .exam-workspace table.exam-cards-list-table td[data-label="Participant"],
    .exam-workspace table.exam-cards-list-table td[data-label="Participants"] {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding-bottom: 6px !important;
    }

    .exam-workspace table.exam-placements-participants-table td[data-label="Peserta"]::before,
    .exam-workspace table.exam-placements-participants-table td[data-label="Participant"]::before,
    .exam-workspace table.exam-placements-participants-table td[data-label="Participants"]::before,
    .exam-workspace table.exam-cards-list-table td[data-label="Peserta"]::before,
    .exam-workspace table.exam-cards-list-table td[data-label="Participant"]::before,
    .exam-workspace table.exam-cards-list-table td[data-label="Participants"]::before {
        display: none;
    }

    .exam-workspace table.exam-cards-list-table td[data-label="Kelayakan"],
    .exam-workspace table.exam-cards-list-table td[data-label="Eligibility"] {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }

    .exam-workspace table.exam-placements-participants-table td[data-label="Aksi"] .exam-inline-actions,
    .exam-workspace table.exam-placements-participants-table td[data-label="Aksi"] a,
    .exam-workspace table.exam-placements-participants-table td[data-label="Action"] .exam-inline-actions,
    .exam-workspace table.exam-placements-participants-table td[data-label="Action"] a,
    .exam-workspace table.exam-placements-participants-table td[data-label="Actions"] .exam-inline-actions,
    .exam-workspace table.exam-placements-participants-table td[data-label="Actions"] a {
        width: 100%;
        justify-content: center;
    }

    .exam-combo-option {
        min-height: 44px;
        display: flex;
        align-items: center;
        font-size: 16px;
    }
}
@media (max-width: 640px) {
    .exam-workspace table.exam-placements-participants-table thead,
    .exam-workspace table.exam-cards-list-table thead {
        display: none;
    }

    .exam-workspace table.exam-placements-participants-table tbody,
    .exam-workspace table.exam-placements-participants-table tr,
    .exam-workspace table.exam-placements-participants-table td,
    .exam-workspace table.exam-cards-list-table tbody,
    .exam-workspace table.exam-cards-list-table tr,
    .exam-workspace table.exam-cards-list-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .exam-workspace table.exam-placements-participants-table tr,
    .exam-workspace table.exam-cards-list-table tr {
        padding: 12px;
        border-bottom: 1px solid var(--line, #dbe5f3);
    }

    .exam-workspace table.exam-placements-participants-table td,
    .exam-workspace table.exam-cards-list-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 4px 0 !important;
        border: 0 !important;
        text-align: right;
    }

    .exam-workspace table.exam-placements-participants-table td::before,
    .exam-workspace table.exam-cards-list-table td::before {
        content: attr(data-label);
        font-size: 0.78rem;
        font-weight: 600;
        color: var(--theme-muted, #64748b);
        text-align: left;
        flex: 0 0 auto;
    }

    .exam-workspace table.exam-placements-participants-table td[data-label="Peserta"],
    .exam-workspace table.exam-placements-participants-table td[data-label="Participant"],
    .exam-workspace table.exam-placements-participants-table td[data-label="Participants"],
    .exam-workspace table.exam-cards-list-table td[data-label="Peserta"],
    .exam-workspace table.exam-cards-list-table td[data-label="Participant"],
    .exam-workspace table.exam-cards-list-table td[data-label="Participants"] {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding-bottom: 6px !important;
    }

    .exam-workspace table.exam-placements-participants-table td[data-label="Peserta"]::before,
    .exam-workspace table.exam-placements-participants-table td[data-label="Participant"]::before,
    .exam-workspace table.exam-placements-participants-table td[data-label="Participants"]::before,
    .exam-workspace table.exam-cards-list-table td[data-label="Peserta"]::before,
    .exam-workspace table.exam-cards-list-table td[data-label="Participant"]::before,
    .exam-workspace table.exam-cards-list-table td[data-label="Participants"]::before {
        display: none;
    }

    .exam-workspace table.exam-cards-list-table td[data-label="Kelayakan"],
    .exam-workspace table.exam-cards-list-table td[data-label="Eligibility"] {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }

    .exam-workspace table.exam-placements-participants-table td[data-label="Aksi"] .exam-inline-actions,
    .exam-workspace table.exam-placements-participants-table td[data-label="Aksi"] a,
    .exam-workspace table.exam-placements-participants-table td[data-label="Action"] .exam-inline-actions,
    .exam-workspace table.exam-placements-participants-table td[data-label="Action"] a,
    .exam-workspace table.exam-placements-participants-table td[data-label="Actions"] .exam-inline-actions,
    .exam-workspace table.exam-placements-participants-table td[data-label="Actions"] a {
        width: 100%;
        justify-content: center;
    }

    .exam-combo-option {
        min-height: 44px;
        display: flex;
        align-items: center;
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    .exam-filter-strip .exam-combo.exam-combo-in-strip,
    .exam-filter-strip .exam-id-date-wrap {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
    }
}

/* Quick Chips & Live Search Box above Selects (Tab 2 · Tambah Jadwal Cepat) */
.exam-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.exam-quick-chip {
    min-height: 34px;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid var(--line, #cbd7eb);
    background: var(--theme-surface-subtle, #f6f9fe);
    color: var(--theme-text, #0f172a);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.exam-quick-chip:hover {
    border-color: var(--theme-accent, #2563eb);
    color: var(--theme-accent, #2563eb);
}

.exam-quick-chip.is-active {
    background: var(--theme-accent, #2563eb);
    border-color: var(--theme-accent, #2563eb);
    color: #ffffff;
}

.exam-workspace input.exam-select-search {
    margin-bottom: 6px !important;
    background: var(--theme-surface-subtle, #f8fafc);
}

@media (min-width: 641px) and (max-width: 768px) {
    .exam-quick-chip {
        min-height: 44px;
        flex: 1 1 calc(50% - 6px);
        justify-content: center;
    }
}
@media (max-width: 640px) {
    .exam-quick-chip {
        min-height: 44px;
        flex: 1 1 calc(50% - 6px);
        justify-content: center;
    }
}

/* Custom Searchable Combobox (Anti-Flicker on Linux Mint / X11 Chrome) */
.exam-combo {
    position: relative;
    width: 100%;
    min-width: 0;
}

.exam-workspace .exam-combo input.exam-combo-input {
    width: 100%;
    padding-right: 40px !important;
    cursor: text;
}

.exam-combo-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    min-height: 36px !important;
    margin: 0 !important;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--theme-muted, #475569);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.exam-combo-toggle:hover {
    background: var(--theme-accent-soft, rgba(37, 99, 235, 0.1));
    color: var(--theme-accent, #2563eb);
}

.exam-combo-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 60;
    max-height: 270px;
    overflow-y: auto;
    margin: 0;
    padding: 4px;
    list-style: none;
    border: 1px solid var(--theme-border, #cbd7eb);
    border-radius: 10px;
    background: var(--theme-surface, #ffffff);
    box-shadow: var(--theme-shadow, 0 12px 28px rgba(15, 23, 42, 0.16));
}

.exam-combo-option {
    padding: 9px 11px;
    border-radius: 7px;
    font-size: 0.92rem;
    color: var(--theme-text, #0f172a);
    cursor: pointer;
    line-height: 1.3;
}

.exam-combo-option:hover,
.exam-combo-option.is-highlighted {
    background: var(--theme-accent-soft, #eaf2ff);
    color: var(--theme-accent, #2563eb);
}

.exam-combo-option.is-selected {
    background: var(--theme-accent, #2563eb);
    color: #ffffff;
    font-weight: 600;
}

.exam-combo-empty {
    padding: 10px 12px;
    font-size: 0.88rem;
    color: var(--theme-muted, #64748b);
}

.exam-workspace select.exam-combo-native-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none;
    overflow: hidden;
}

.exam-combo-portal-list {
    position: fixed;
    z-index: 1100;
    margin: 0;
}

.exam-combo-option.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.exam-workspace .exam-combo input.exam-combo-input.is-readonly-select {
    cursor: pointer;
}

.exam-filter-strip .exam-combo.exam-combo-in-strip {
    flex: 0 1 220px;
    min-width: 150px;
    width: auto;
}

.exam-inline-cell-form .exam-combo.exam-combo-in-cell,
.exam-proctor-select-group .exam-combo.exam-combo-in-proctor {
    flex: 1 1 auto;
    min-width: 120px;
}

/* Clean natural text flow for inline notice banners inside Exam Workspace */
.exam-workspace .notice:not(.exam-card-notice) {
    display: block;
    text-align:justify;text-align-last:left;
    line-height: 1.55;
}

.exam-workspace .notice:not(.exam-card-notice) strong {
    display: inline;
    margin-right: 4px;
}

.exam-workspace .notice:not(.exam-card-notice) a.table-link {
    display: inline-block;
    white-space: nowrap;
    font-weight: 600;
}

/* Dark Mode Support for Indonesian Date Input, Sub-Tabs, Chips & Searchable Combobox */
html[data-theme="dark"] .exam-schedule-subtabs {
    background: #0f172a;
    border-color: #24334b;
}

html[data-theme="dark"] .exam-schedule-subtab {
    color: #94a3b8;
}

html[data-theme="dark"] .exam-schedule-subtab:hover {
    background: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}

html[data-theme="dark"] .exam-schedule-subtab.is-active {
    background: #2563eb;
    color: #ffffff;
    border-color: #3b82f6;
}

html[data-theme="dark"] .exam-schedule-subtab-badge {
    background: rgba(148, 163, 184, 0.18);
    color: #e2e8f0;
}

html[data-theme="dark"] .exam-schedule-subtab-badge.is-ok {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

html[data-theme="dark"] .exam-schedule-subtab-badge.is-warn {
    background: rgba(245, 158, 11, 0.22);
    color: #fcd34d;
}

html[data-theme="dark"] .exam-quick-chip {
    background: #131f33;
    border-color: #2c3e5a;
    color: #e2e8f0;
}

html[data-theme="dark"] .exam-quick-chip:hover {
    border-color: #60a5fa;
    color: #93c5fd;
}

html[data-theme="dark"] .exam-quick-chip.is-active {
    background: #2563eb;
    border-color: #3b82f6;
    color: #ffffff;
}

html[data-theme="dark"] .exam-seat-chip {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

html[data-theme="dark"] .exam-id-date-btn,
html[data-theme="dark"] .exam-combo-toggle {
    color: #94a3b8;
}

html[data-theme="dark"] .exam-id-date-btn:hover,
html[data-theme="dark"] .exam-combo-toggle:hover {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
}

html[data-theme="dark"] .exam-combo-list {
    background: #0f172a;
    border-color: #334155;
    box-shadow: 0 14px 32px rgba(2, 6, 23, 0.65);
}

html[data-theme="dark"] .exam-combo-option {
    color: #e2e8f0;
}

html[data-theme="dark"] .exam-combo-option:hover,
html[data-theme="dark"] .exam-combo-option.is-highlighted {
    background: #1e293b;
    color: #93c5fd;
}

html[data-theme="dark"] .exam-combo-option.is-selected {
    background: #2563eb;
    color: #ffffff;
}

html[data-theme="dark"] .exam-combo-empty {
    color: #94a3b8;
}

/* Makeup Exams (Ujian Susulan) — 3-Mode Responsive + Light/Dark */
.exam-makeup-session-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.exam-makeup-session-actions form {
    margin: 0;
}
.exam-makeup-carry-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border, #d8e1ec);
}
.exam-makeup-carry-form select {
    flex: 1 1 200px;
    min-width: 0;
}
.exam-makeup-drawer {
    border: 1px solid var(--border, #d8e1ec);
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--surface-subtle, rgba(15, 23, 42, 0.02));
}
.exam-makeup-drawer summary {
    cursor: pointer;
    min-height: 36px;
    display: flex;
    align-items: center;
}
.exam-makeup-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}
.exam-makeup-form-submit {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}
.exam-makeup-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border, #d8e1ec);
    border-radius: 10px;
    background: var(--surface-subtle, rgba(15, 23, 42, 0.02));
}
.exam-makeup-bulk-bar select {
    flex: 1 1 220px;
    min-width: 0;
}
.exam-makeup-check-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    cursor: pointer;
    font-weight: 600;
}
.exam-makeup-map-form {
    display: flex;
    gap: 8px;
    align-items: center;
}
.exam-makeup-map-form select {
    flex: 1 1 200px;
    min-width: 0;
}
.exam-makeup-student-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.exam-makeup-student-item {
    border: 1px solid var(--border, #d8e1ec);
    border-radius: 10px;
    padding: 12px;
    background: var(--surface, #ffffff);
    min-width: 0;
    overflow-wrap: anywhere;
}
.exam-makeup-student-item.is-done {
    opacity: 0.85;
}
.exam-makeup-student-item-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}
html[data-theme="dark"] .exam-makeup-drawer,
html[data-theme="dark"] .exam-makeup-bulk-bar {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(148, 163, 184, 0.22);
}
html[data-theme="dark"] .exam-makeup-student-item {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(148, 163, 184, 0.22);
}
@media (min-width: 641px) and (max-width: 1024px) {
    .exam-makeup-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .exam-makeup-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .exam-makeup-form-grid,
    .exam-makeup-student-grid {
        grid-template-columns: 1fr;
    }
    .exam-makeup-session-actions > *,
    .exam-makeup-session-actions button,
    .exam-makeup-session-actions a,
    .exam-makeup-carry-form > *,
    .exam-makeup-bulk-bar > *,
    .exam-makeup-map-form {
        width: 100%;
        flex-wrap: wrap;
    }
    .exam-makeup-form-submit button {
        width: 100%;
    }
}

/* My Proctoring: Grouped Daily Cards (3-Mode + Light/Dark) */
.exam-proctor-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px dashed var(--border, #cbd5e1);
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    background: var(--surface-subtle, rgba(15, 23, 42, 0.02));
}
.exam-proctor-empty strong {
    display: block;
    margin: 0;
    text-align: center;
}
.exam-proctor-empty p {
    margin: 0 auto;
    text-align: center;
}
.exam-proctor-day-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.exam-proctor-day-card {
    border: 1px solid var(--border, #d8e1ec);
    border-radius: 14px;
    padding: 16px;
    background: var(--surface, #ffffff);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}
.exam-proctor-day-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.exam-proctor-day-date {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #1d4ed8;
    font-variant-numeric: tabular-nums;
}
.exam-proctor-session-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.exam-proctor-session-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border, #e2e8f0);
    background: var(--surface-subtle, #f8fafc);
}
.exam-proctor-session-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    font-size: 13px;
}
html[data-theme="dark"] .exam-proctor-empty {
    background: rgba(255, 255, 255, 0.02);
    border-color: #334155;
}
html[data-theme="dark"] .exam-proctor-day-card {
    background: #0f172a;
    border-color: #334155;
}
html[data-theme="dark"] .exam-proctor-day-head {
    border-bottom-color: #1e293b;
}
html[data-theme="dark"] .exam-proctor-day-date {
    color: #93c5fd;
}
html[data-theme="dark"] .exam-proctor-session-row {
    background: rgba(255, 255, 255, 0.04);
    border-color: #334155;
}
@media (min-width: 641px) and (max-width: 900px) {
    .exam-proctor-day-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .exam-proctor-day-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .exam-proctor-session-row {
        flex-direction: column;
        align-items: stretch;
    }
    .exam-proctor-session-row a {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }
}

/* Kartu Soal Ujian Aktif (/my-exams) — Responsif 3 Mode + Light & Dark Mode */
.exam-workspace .exam-active-course-card {
    margin: 0 0 14px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.exam-workspace .exam-active-course-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.exam-workspace .exam-active-course-meta {
    flex: 1 1 220px;
    min-width: 0;
}

.exam-workspace .exam-active-course-title {
    margin: 4px 0 0;
    font-size: 1.05rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.exam-workspace .exam-active-course-badge {
    flex: 0 0 auto;
    max-width: 100%;
    white-space: nowrap;
}

.exam-workspace .exam-active-page-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.exam-workspace .exam-active-page-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--ui-border, #dbe3f0);
    background: var(--ui-surface-soft, #f8fafc);
    min-width: 0;
}

.exam-workspace .exam-active-page-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 200px;
    min-width: 0;
}

.exam-workspace .exam-active-page-name {
    font-size: 0.96rem;
    line-height: 1.35;
    color: var(--ui-ink, #0f172a);
    overflow-wrap: anywhere;
}

.exam-workspace .exam-active-page-section {
    font-size: 0.82rem;
    color: var(--ui-supporting, #526078);
    overflow-wrap: anywhere;
}

.exam-workspace .exam-active-page-state {
    flex: 0 0 auto;
}

.exam-workspace .exam-active-course-empty {
    margin: 4px 0 0;
}

[data-theme="dark"] .exam-workspace .exam-active-page-item {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(148, 163, 184, 0.24);
}

[data-theme="dark"] .exam-workspace .exam-active-page-name {
    color: #f1f5f9;
}

[data-theme="dark"] .exam-workspace .exam-active-page-section {
    color: #94a3b8;
}

@media (max-width: 640px) {
    .exam-workspace .exam-active-course-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .exam-workspace .exam-active-page-item {
        padding: 10px 12px;
    }

    .exam-subview-nav,
    .exam-date-pills,
    .exam-sample-tabs,
    .exam-quick-status-pills {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    .exam-subview-nav > a,
    .exam-subview-nav > button,
    .exam-date-pills > a,
    .exam-date-pills > button,
    .exam-sample-tabs > a,
    .exam-sample-tabs > button,
    .exam-quick-status-pills > a,
    .exam-quick-status-pills > button {
        width: 100%;
        min-height: 44px;
        justify-content: center;
        text-align: center;
        box-sizing: border-box;
    }

    .exam-subview-nav > :last-child:nth-child(odd),
    .exam-date-pills > :last-child:nth-child(odd),
    .exam-sample-tabs > :last-child:nth-child(odd),
    .exam-quick-status-pills > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

/* Tablet (641px-1024px) edge-to-edge polish */
@media (min-width: 641px) and (max-width: 1024px) {
    .exam-schedule-subtabs,
    .exam-sample-tabs,
    .exam-date-pills,
    .exam-quick-status-pills,
    .exam-proctor-filter-pills,
    .exam-quick-chips,
    .exam-readiness-chips,
    .exam-intro-actions,
    .exam-quick-print-actions,
    .exam-student-actions,
    .exam-sheet-actions {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
    }
    .exam-schedule-subtabs > a,
    .exam-schedule-subtabs > button,
    .exam-sample-tabs > a,
    .exam-sample-tabs > button,
    .exam-intro-actions > a,
    .exam-intro-actions > button,
    .exam-quick-print-actions > a,
    .exam-quick-print-actions > button,
    .exam-student-actions > a,
    .exam-student-actions > button,
    .exam-sheet-actions > a,
    .exam-sheet-actions > button {
        flex: 1 1 170px;
        min-width: 0;
        min-height: 44px;
        justify-content: center;
        text-align: center;
        white-space: normal;
        box-sizing: border-box;
    }
    .exam-intro-actions > form,
    .exam-quick-print-actions > form,
    .exam-student-actions > form,
    .exam-sheet-actions > form {
        flex: 1 1 170px;
        display: flex;
        margin: 0;
    }
    .exam-intro-actions > form > button,
    .exam-quick-print-actions > form > button,
    .exam-student-actions > form > button,
    .exam-sheet-actions > form > button {
        width: 100%;
        min-height: 44px;
        justify-content: center;
        text-align: center;
        box-sizing: border-box;
    }
    .exam-date-pills > *,
    .exam-quick-status-pills > *,
    .exam-proctor-filter-pills > *,
    .exam-quick-chips > *,
    .exam-readiness-chips > * {
        flex: 1 1 155px;
        min-width: 0;
        min-height: 42px;
        justify-content: center;
        text-align: center;
        border-radius: 12px;
        white-space: normal;
        box-sizing: border-box;
    }
}

/* Mobile (<=640px) remaining pills & chips edge-to-edge */
@media (max-width: 640px) {
    .exam-intro-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        align-items: stretch;
        box-sizing: border-box;
    }
    .exam-intro-actions > a,
    .exam-intro-actions > button {
        width: 100% !important;
        min-height: 44px;
        justify-content: center;
        text-align: center;
        box-sizing: border-box;
        margin: 0;
    }
    .exam-intro-actions > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
    .exam-proctor-filter-pills,
    .exam-quick-chips,
    .exam-readiness-chips {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        align-items: stretch;
        box-sizing: border-box;
    }
    .exam-proctor-filter-pills > *,
    .exam-quick-chips > *,
    .exam-readiness-chips > * {
        width: 100%;
        min-height: 44px;
        justify-content: center;
        text-align: center;
        border-radius: 12px;
        white-space: normal;
        box-sizing: border-box;
    }
    .exam-proctor-filter-pills > :last-child:nth-child(odd),
    .exam-quick-chips > :last-child:nth-child(odd),
    .exam-readiness-chips > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

/* Course Moodle Ujian per Jenjang (X, XI, XII) — header 1 baris seragam & 3 zona breakpoint */
.exam-grade-sync-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.exam-grade-card-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line, #dce6f5);
}
.exam-grade-card-head .exam-settings-card-title {
    margin: 0 !important;
    line-height: 1.3;
    white-space: nowrap;
}
.exam-grade-card-head .badge {
    margin: 0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.exam-settings-grid-3 .exam-field-group select {
    width: 100%;
    max-width: 100%;
    text-overflow: ellipsis;
}
html[data-theme="dark"] .exam-grade-card-head {
    border-bottom-color: #334155;
}
@media (min-width: 1025px) {
    .exam-settings-grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 641px) and (max-width: 1024px) {
    .exam-settings-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .exam-settings-grid-3 > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}
@media (max-width: 640px) {
    .exam-settings-grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }
    .exam-grade-card-head .exam-settings-card-title {
        white-space: normal;
    }
    .exam-grade-sync-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        width: 100%;
    }
    .exam-grade-sync-actions form,
    .exam-grade-sync-actions button {
        width: 100%;
        min-height: 44px;
        justify-content: center;
        text-align: center;
        box-sizing: border-box;
    }
}

/* =========================================================================
   Kunci Layar & PIN Pengawas Moodle (/my-proctoring & /exam-events/moodle-pages)
   ========================================================================= */
.exam-lock-pin-panel {
    border-left: 4px solid #2563eb;
}
.exam-lock-pin-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.exam-lock-pin-head h2 {
    margin: 4px 0 6px;
}
.exam-lock-pin-head p {
    margin: 0;
}
.exam-lock-pin-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.exam-lock-pin-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid #dbeafe;
    background: #f8fafc;
}
.exam-lock-pin-display-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.exam-lock-pin-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #475569;
}
.exam-lock-pin-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.22em;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    line-height: 1.2;
}
.exam-lock-pin-countdown {
    font-size: 12.5px;
}
.exam-lock-pin-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.exam-lock-pin-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #cbd5e1;
    font-size: 12.5px;
    min-width: 0;
}
.exam-lock-pin-meta > * {
    min-width: 0;
    max-width: 100%;
}
.exam-lock-pin-meta .exam-cell-mono {
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1.45;
}
.exam-lock-course-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.exam-lock-manage-grid {
    display: grid;
    gap: 16px;
    margin-top: 14px;
}
.exam-lock-manage-card {
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    padding: 16px;
    background: #f8fafc;
    min-width: 0;
}
.exam-lock-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}
.exam-lock-card-head h3 {
    margin: 0;
    font-size: 15px;
}
.exam-lock-active-pin-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    margin-bottom: 14px;
}
.exam-lock-pin-inline-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 22px;
    letter-spacing: 0.18em;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
}
.exam-lock-form-grid {
    display: grid;
    gap: 12px;
}
.exam-lock-checks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0 14px;
}
.exam-lock-form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.exam-lock-api-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    font-size: 12.5px;
    overflow-wrap: anywhere;
}
.exam-lock-api-meta code {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.exam-lock-snippet-box {
    width: 100%;
    box-sizing: border-box;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.45;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #0f172a;
    color: #e2e8f0;
    resize: vertical;
}
html[data-theme="dark"] .exam-lock-pin-body,
html[data-theme="dark"] .exam-lock-manage-card {
    background: #0f172a;
    border-color: #334155;
}
html[data-theme="dark"] .exam-lock-pin-code,
html[data-theme="dark"] .exam-lock-pin-inline-code {
    color: #f8fafc;
}
html[data-theme="dark"] .exam-lock-pin-label {
    color: #94a3b8;
}
html[data-theme="dark"] .exam-lock-pin-meta,
html[data-theme="dark"] .exam-lock-card-head {
    border-color: #334155;
}
html[data-theme="dark"] .exam-lock-active-pin-banner,
html[data-theme="dark"] .exam-lock-api-meta {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}
@media (min-width: 1025px) {
    .exam-lock-manage-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .exam-lock-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .exam-lock-field-full {
        grid-column: 1 / -1;
    }
}
@media (min-width: 641px) and (max-width: 1024px) {
    .exam-lock-manage-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .exam-lock-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .exam-lock-field-full {
        grid-column: 1 / -1;
    }
}
@media (max-width: 640px) {
    .exam-lock-pin-body {
        flex-direction: column;
        align-items: stretch;
    }
    .exam-lock-pin-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }
    .exam-lock-pin-actions > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
    .exam-lock-pin-actions button,
    .exam-lock-pin-badges a,
    .exam-lock-form-actions button {
        width: 100%;
        min-height: 44px;
        justify-content: center;
        text-align: center;
        box-sizing: border-box;
    }
    .exam-lock-manage-grid,
    .exam-lock-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .exam-lock-form input[type="text"],
    .exam-lock-form input[type="number"],
    .exam-lock-form input[type="url"],
    .exam-lock-form select {
        font-size: 16px;
        min-height: 44px;
    }
}
