:root {
    --bg-canvas: #f3f7fc;
    --bg-gradient: linear-gradient(180deg, #eaf2fc 0%, #f6f9fd 100%);
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --surface-glass: rgba(248, 251, 255, 0.86);
    --card: #ffffff;
    --card-soft: #f8fbff;
    --navy: #0e2f5c;
    --navy-deep: #0c2548;
    --primary: #0f3b77;
    --primary-strong: #164d8d;
    --primary-soft: #eaf3ff;
    --accent: #d9b15d;
    --accent-strong: #f2d390;
    --accent-soft: #fff7e6;
    --text: #13233f;
    --muted: #5d6b82;
    --border: #dfe7f3;
    --border-strong: #cbd9ec;
    --success: #1e8e5a;
    --success-soft: #e7f7ef;
    --warning: #d97706;
    --warning-soft: #fff7e6;
    --danger: #dc2626;
    --danger-soft: #fff1f2;
    --shadow-sm: 0 4px 20px -2px rgba(15, 40, 75, 0.06);
    --shadow: 0 18px 48px rgba(15, 59, 119, 0.12);
    --shadow-lg: 0 24px 70px rgba(12, 35, 70, 0.24);
    --grad-navy: linear-gradient(145deg, #0c315f, #164d8d);
    --grad-gold: linear-gradient(135deg, #d9b15d, #f2d390);
    --grad-primary: linear-gradient(135deg, #0f3b77, #164d8d);
    --step-card-bg: #f8fafc;
    --dot-skip-bg: #e7eef7;
}

[data-theme="dark"] {
    --bg-canvas: #0b1423;
    --bg-gradient: linear-gradient(180deg, #0e1b30 0%, #0b1423 100%);
    --navbar-bg: rgba(11, 20, 35, 0.85);
    --surface-glass: rgba(10, 17, 29, 0.85);
    --card: #152034;
    --card-soft: #1b2940;
    --navy: #0e1e3a;
    --navy-deep: #0a1526;
    --primary: #6ca6f0;
    --primary-strong: #4d91cb;
    --primary-soft: rgba(108, 166, 240, 0.16);
    --accent: #e0bb76;
    --accent-strong: #f2d390;
    --accent-soft: rgba(224, 187, 118, 0.16);
    --text: #e6eef8;
    --muted: #93a5bf;
    --border: #273649;
    --border-strong: #33465e;
    --success: #4ade80;
    --success-soft: rgba(74, 222, 128, 0.15);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.14);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.15);
    --shadow-sm: 0 4px 20px -2px rgba(0, 0, 0, 0.35);
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.5);
    --grad-navy: linear-gradient(145deg, #0c315f, #164d8d);
    --grad-gold: linear-gradient(135deg, #d9b15d, #f2d390);
    --grad-primary: linear-gradient(135deg, #0f3b77, #164d8d);
    --step-card-bg: #101a2b;
    --dot-skip-bg: #1b2940;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[hidden] {
    display: none !important;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    overflow-x: clip;
}

body {
    background-color: var(--bg-canvas);
    background: var(--bg-gradient);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--primary);
}

button {
    cursor: pointer;
}

button, input, select, textarea {
    font: inherit;
}

.hidden {
    display: none !important;
}

app-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: block;
}

main {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: calc(var(--navbar-height, 0px) + 40px) 20px 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.exam-page main {
    max-width: 1200px;
}

body.result-page main {
    max-width: 860px;
}

.content-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
}

.card {
    background-color: var(--card);
    border-radius: 16px;
    padding: 36px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.icon-circle {
    width: 72px;
    height: 72px;
    background-color: var(--primary-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

.card:hover .icon-circle {
    background-color: rgba(15, 59, 119, 0.2);
}

.card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.card p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

.module-header {
    background-color: var(--card);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.module-badge {
    display: inline-block;
    background-color: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.module-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    word-break: break-word;
}

.module-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}

.section-box {
    background-color: var(--card);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    border-bottom: 2px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.theory-item {
    margin-bottom: 20px;
}

.theory-item:last-child {
    margin-bottom: 0;
}

.theory-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.theory-item p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}

.theory-item ul {
    margin: 8px 0 0 20px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.step-card {
    background-color: var(--step-card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    color: var(--text);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.step-card:last-child {
    margin-bottom: 0;
}

.step-header {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.step-list {
    padding-left: 20px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.sub-step-list {
    margin: 6px 0 6px 18px;
    list-style-type: disc;
}

.ui-path, .value-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    font-weight: 600;
    word-break: break-all;
}

.ui-path {
    background-color: var(--card-soft);
    border: 1px solid var(--border-strong);
    color: var(--text);
}

.value-badge {
    background-color: var(--success-soft);
    border: 1px solid rgba(30, 142, 90, 0.35);
    color: var(--success);
}

.note-callout {
    background-color: var(--primary-soft);
    border-left: 4px solid var(--primary);
    color: var(--primary);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.note-callout ul {
    margin: 6px 0 0 18px;
    padding: 0;
}

.success-callout {
    background-color: var(--success-soft);
    border-left: 4px solid var(--success);
    color: var(--success);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    margin-top: 16px;
    line-height: 1.5;
}

.primary-btn, .secondary-btn, .danger-btn, .reset-btn, .ghost-btn {
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.primary-btn {
    background: var(--grad-gold);
    color: #102a4b;
    box-shadow: 0 14px 28px rgba(217, 177, 93, 0.33);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(217, 177, 93, 0.42);
}

.primary-btn:active {
    transform: translateY(0) scale(0.99);
}

.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.danger-btn {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    color: #ffffff;
}

.reset-btn {
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid var(--border);
}

.ghost-btn {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--primary);
}

.secondary-btn:hover, .danger-btn:hover, .reset-btn:hover, .ghost-btn:hover {
    transform: translateY(-1px);
}

.primary, .outline, .danger {
    border-radius: 9px;
    padding: 11px 15px;
    border: 1px solid transparent;
    font-weight: 700;
    font-size: 13px;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.primary {
    background: var(--grad-primary);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 8px 22px rgba(23, 105, 170, 0.28);
}

.primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.outline {
    background: var(--card);
    border-color: var(--border-strong);
    color: var(--primary);
}

.outline:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    transform: translateY(-1px);
}

.danger {
    background: var(--danger-soft);
    border-color: rgba(220, 38, 38, 0.3);
    color: var(--danger);
}

.danger:hover {
    transform: translateY(-1px);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: none;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--card);
    color: var(--primary);
    cursor: pointer;
    transition: 0.15s ease;
}

.icon-btn:hover {
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.icon-btn svg {
    width: 16px;
    height: 16px;
}

.icon-btn.icon-danger {
    color: var(--danger);
}

.icon-btn.icon-danger:hover {
    background: var(--danger-soft);
    border-color: rgba(220, 38, 38, 0.3);
}

.button-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

td .button-row {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 5px;
}

.upload-box {
    margin-top: 2px;
}

.file-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 9px;
    border: 1px solid var(--border-strong);
    background: var(--card);
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.file-btn:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    transform: translateY(-1px);
}

.file-btn svg {
    width: 16px;
    height: 16px;
    flex: none;
}

.file-name {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-btn {
    flex: 1 1 220px;
    max-width: 260px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    font-size: 14px;
}

.nav-btn svg {
    width: 20px;
    height: 20px;
    flex: none;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-text {
    white-space: nowrap;
}

.light-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.light-btn:hover {
    transform: translateY(-1px);
}

.entry-btn, .admin-entry-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.92);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 6px 18px rgba(12, 35, 70, 0.25);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.entry-btn svg, .admin-entry-btn svg {
    width: 15px;
    height: 15px;
    color: var(--accent-strong);
    transition: transform 0.25s ease;
}

.admin-entry-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(242, 211, 144, 0.16);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.entry-btn:hover, .admin-entry-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(242, 211, 144, 0.55);
    color: #ffffff;
    box-shadow: 0 10px 26px rgba(12, 35, 70, 0.35);
}

.admin-entry-btn:hover::after {
    opacity: 1;
}

.entry-btn:hover svg, .admin-entry-btn:hover svg {
    transform: translateY(-1px);
}

.entry-btn:active, .admin-entry-btn:active {
    transform: translateY(0);
}

.admin-entry-btn:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 2px;
}

.entry-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.input-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.input-wrap label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

.input-wrap input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrap input:focus {
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 3px rgba(242, 211, 144, 0.18);
}

.input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.field {
    display: grid;
    gap: 7px;
}

.field label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.field input {
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    padding: 11px 12px;
    color: var(--text);
    background: var(--card);
    outline: 0;
}

.field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 59, 119, 0.12);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.search-box {
    position: relative;
    margin-bottom: 18px;
    max-width: 380px;
}

.search-box .search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--muted);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    padding: 11px 12px 11px 40px;
    color: var(--text);
    background: var(--card);
    outline: 0;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 59, 119, 0.12);
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.filter-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.filter-select {
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    padding: 11px 12px;
    color: var(--text);
    background: var(--card);
    outline: 0;
}

.filter-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 59, 119, 0.12);
}

.filter-select-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.key-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 9px;
}

.key-item {
    background: var(--primary-soft);
    border-radius: 8px;
    padding: 10px;
    color: var(--primary);
    font-size: 13px;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.login-shell {
    max-width: 560px;
    margin: 0 auto;
}

.login-panel, .admin-panel, .exam-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    overflow: hidden;
    color: var(--text);
}

.login-panel {
    padding: clamp(28px, 6vw, 52px);
    background: var(--grad-navy);
    color: #ffffff;
    position: relative;
}

.login-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(217, 177, 93, 0.25), transparent 34%);
    pointer-events: none;
}

.login-panel > * {
    position: relative;
    z-index: 1;
}

.login-panel h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 42px);
    line-height: 1.1;
    color: #ffffff;
}

.login-panel p {
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

.brand-tag {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.login-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    color: #b9d5f4;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-kicker::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--accent);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 420px;
}

.login-form .primary-btn {
    position: relative;
    overflow: hidden;
}

.login-form .primary-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.26);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.login-form .primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(217, 177, 93, 0.42);
}

.login-form .primary-btn:hover::after {
    opacity: 1;
}

.login-form .primary-btn:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 8px 20px rgba(217, 177, 93, 0.3);
}

.login-note {
    color: var(--muted);
    font-size: 12px;
    margin-top: 15px;
}

.toast {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #322f35;
    color: #f4eff4;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(12, 35, 70, 0.3);
}

.toast.show {
    display: inline-flex;
    animation: toast-in 0.28s ease;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.toast svg {
    width: 14px;
    height: 14px;
    flex: none;
    color: var(--accent-strong);
}

.toast-text {
    text-align: left;
}

.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: auto 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    width: 260px;
    height: 100vh;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--navy-deep), var(--navy));
    color: #ffffff;
    padding: 25px 18px;
    display: flex;
    flex-direction: column;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 6px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.brand-icon {
    width: 42px;
    height: 42px;
    flex: none;
    padding: 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, #d9b15d, #f2d390);
    color: #0c2548;
    box-shadow: 0 6px 16px rgba(217, 177, 93, 0.32);
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar .brand small {
    color: #a9c3e0;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
}

.sidebar .brand h1 {
    font-size: 20px;
    line-height: 1.2;
    margin: 3px 0 0;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav {
    display: grid;
    gap: 7px;
    margin-top: 28px;
    align-content: start;
}

.nav-button {
    border: 0;
    background: transparent;
    color: #b9cbe0;
    padding: 13px 14px;
    border-radius: 10px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.nav-button .nav-icon {
    width: 19px;
    height: 19px;
    flex: none;
}

.nav-button .nav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-button:hover, .nav-button.active {
    background: rgba(255, 255, 255, 0.11);
    color: #ffffff;
}

.main-area {
    display: block;
    flex: none;
    width: auto;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0 clamp(20px, 4vw, 56px) 60px;
}

.sidebar-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sidebar-collapse-btn {
    display: none;
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #dbe7f4;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sidebar-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.sidebar-collapse-btn svg {
    width: 20px;
    height: 20px;
}

.sidebar-expand-btn {
    display: none;
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #dbe7f4;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-expand-btn:hover {
    background: var(--grad-gold);
    color: #0c2548;
}

.sidebar-expand-btn svg {
    width: 21px;
    height: 21px;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: var(--card);
    color: var(--primary);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.15s ease;
}

.menu-toggle:hover {
    background: var(--primary-soft);
    border-color: rgba(23, 105, 170, 0.35);
}

.menu-toggle svg {
    width: 21px;
    height: 21px;
}

.menu-close-btn {
    display: none;
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #dbe7f4;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.menu-close-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.menu-close-btn svg {
    width: 20px;
    height: 20px;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(10, 28, 50, 0.52);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.sidebar-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(12px, 3vw, 24px);
    margin: 0 calc(clamp(20px, 4vw, 56px) * -1) 0;
    padding: clamp(8px, 1.4vw, 12px) clamp(20px, 4vw, 56px);
    background: var(--surface-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 6px 18px rgba(15, 40, 75, 0.05);
}

.eyebrow {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-card .eyebrow {
    text-align: center;
}

.login-card h1 {
    text-align: center;
    color: var(--text);
}

.login-card p {
    text-align: center;
    margin: 0 0 14px;
}

.topbar .eyebrow {
    font-size: clamp(13px, 1.6vw, 15px);
    letter-spacing: 0.05em;
    margin: 0;
}

.page-heading {
    padding: clamp(14px, 2vw, 22px) 0 6px;
}

.page-heading h2 {
    font-size: clamp(22px, 2.6vw, 30px);
    line-height: 1.25;
    color: var(--text);
    font-weight: 800;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.admin-menu {
    position: relative;
}

.admin-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    padding: 6px 10px;
    border-radius: 12px;
    cursor: pointer;
    color: var(--muted);
    font: inherit;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-menu-btn:hover {
    background: var(--primary-soft);
    color: var(--text);
}

.admin-menu-btn .avatar-label {
    font-size: 13px;
    font-weight: 700;
}

.admin-menu-btn .chevron {
    width: 16px;
    height: 16px;
    color: var(--muted);
    transition: transform 0.2s ease;
}

.admin-menu-btn[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 800;
}

.admin-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 8px;
    z-index: 30;
}

.admin-dropdown[hidden] {
    display: none;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 11px 12px;
    border-radius: 9px;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-item:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.dropdown-item svg {
    width: 17px;
    height: 17px;
    flex: none;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 4px;
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-item.danger:hover {
    background: var(--danger-soft);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 18px;
    align-items: start;
}

.rank-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    padding: 20px;
    display: grid;
    gap: 16px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.rank-card.top-scores {
    --rank-accent: var(--accent);
    --rank-accent-strong: var(--accent-strong);
    --rank-accent-soft: var(--accent-soft);
}

.rank-card.need-remedial {
    --rank-accent: var(--danger);
    --rank-accent-strong: #f87171;
    --rank-accent-soft: var(--danger-soft);
}

.rank-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}

.rank-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.rank-card-head div {
    display: grid;
    gap: 2px;
}

.rank-card-head h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.rank-card-head p {
    font-size: 12.5px;
    color: var(--muted);
}

.rank-card-icon {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--rank-accent-soft);
    color: var(--rank-accent);
}

.rank-card-icon svg {
    width: 22px;
    height: 22px;
}

.remedial-count {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 26px 16px;
    border-radius: 14px;
    background: var(--rank-accent-soft);
    border: 1px dashed color-mix(in srgb, var(--rank-accent) 45%, var(--border));
    text-align: center;
}

.remedial-count strong {
    font-size: 44px;
    font-weight: 800;
    line-height: 1;
    color: var(--rank-accent);
}

.remedial-count span {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
}

.rank-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.rank-strip .list-empty {
    grid-column: 1 / -1;
}

.podium-item {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 4px;
    padding: 16px 10px 14px;
    border-radius: 14px;
    background: var(--card-soft);
    border: 1px solid var(--border);
    text-align: center;
    min-width: 0;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.podium-item:hover {
    transform: translateY(-2px);
    border-color: var(--rank-accent);
    background: var(--card);
}

.podium-item:first-child {
    border-color: color-mix(in srgb, var(--rank-accent) 45%, var(--border));
    background: linear-gradient(180deg, color-mix(in srgb, var(--rank-accent-soft) 70%, var(--card)), var(--card-soft));
}

.podium-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 4px;
}

.podium-sub {
    font-size: 11.5px;
    color: var(--muted);
}

.podium-score {
    font-size: 21px;
    font-weight: 800;
    line-height: 1;
    color: var(--rank-accent);
    margin: 3px 0 5px;
}

.podium-score small {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    margin-left: 1px;
}

.podium-item .rank-bar {
    width: 100%;
}

.rank-medal {
    width: 32px;
    height: 32px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 800;
    font-size: 14px;
}

.rank-medal.gold {
    background: linear-gradient(135deg, var(--rank-accent-strong), var(--rank-accent));
    color: #13233f;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--rank-accent) 40%, transparent);
}

.rank-medal.silver {
    background: linear-gradient(135deg, #c9d4e2, #93a7bd);
    color: #24344d;
    box-shadow: 0 2px 8px rgba(147, 167, 189, 0.35);
}

.rank-medal.bronze {
    background: linear-gradient(135deg, #e2a878, #b97b40);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(185, 123, 64, 0.35);
}

.rank-bar {
    display: block;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
}

.rank-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width 0.6s ease;
}

.rank-bar-fill.fill-gold {
    background: linear-gradient(90deg, var(--rank-accent), var(--rank-accent-strong));
}

.rank-bar-fill.fill-silver {
    background: linear-gradient(90deg, #93a7bd, #c9d4e2);
}

.rank-bar-fill.fill-bronze {
    background: linear-gradient(90deg, #b97b40, #e2a878);
}

.list-empty {
    color: var(--muted);
    font-size: 13px;
    padding: 14px 4px;
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
    text-align: center;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(23, 105, 170, 0.3);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.blue {
    background: var(--primary-soft);
    color: var(--primary);
}

.stat-card:hover .stat-icon.blue {
    background: var(--primary);
    color: #ffffff;
}

.stat-icon.amber {
    background: var(--warning-soft);
    color: var(--warning);
}

.stat-card:hover .stat-icon.amber {
    background: #a96b00;
    color: #ffffff;
}

.stat-icon.green {
    background: var(--success-soft);
    color: var(--success);
}

.stat-card:hover .stat-icon.green {
    background: var(--success);
    color: #ffffff;
}

.stat-icon.red {
    background: var(--danger-soft);
    color: var(--danger);
}

.stat-card:hover .stat-icon.red {
    background: var(--danger);
    color: #ffffff;
}

.stat-icon.gray {
    background: var(--card-soft);
    color: var(--muted);
}

.stat-card:hover .stat-icon.gray {
    background: var(--muted);
    color: #ffffff;
}

.stat-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
}

.stat-value small {
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
}

.content-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 24px;
    color: var(--text);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.section-heading h3 {
    margin: 0;
    font-size: 19px;
    color: var(--text);
}

.section-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.recap-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.recap-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.recap-chip strong {
    font-size: 15px;
}

.recap-chip.remedial {
    background: var(--danger-soft);
    color: var(--danger);
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin: 24px 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-soft);
}

.table-toolbar .search-box {
    margin-bottom: 0;
    flex: 1 1 260px;
    max-width: 400px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.pagination-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.pagination .outline {
    padding: 9px 13px;
    font-size: 12px;
}

.pagination .outline:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
}

.page-size {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    overflow: hidden;
    background: var(--card);
}

.size-btn {
    border: 0;
    border-right: 1px solid var(--border-strong);
    background: var(--card);
    color: var(--primary);
    padding: 9px 13px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.size-btn:last-child {
    border-right: 0;
}

.size-btn.active {
    background: var(--primary);
    color: #ffffff;
}

.size-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
}

.table-wrap td[data-label="Nama"] {
    overflow-wrap: break-word;
    word-break: normal;
    min-width: 0;
}

table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    color: var(--text);
}

th, td {
    padding: 14px 15px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 13px;
}

th {
    background: var(--card-soft);
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 11px;
}

tr:last-child td {
    border-bottom: 0;
}

.status, .status-pill {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 700;
}

.status.pending, .status.waiting {
    background: var(--card-soft);
    color: var(--muted);
}

.status.progress {
    background: var(--primary-soft);
    color: var(--primary);
}

.status.done {
    background: var(--success-soft);
    color: var(--success);
}

.status.blocked {
    background: var(--danger-soft);
    color: var(--danger);
}

.status-pill.done {
    background: var(--success-soft);
    color: var(--success);
}

.status-pill.waiting {
    background: var(--warning-soft);
    color: var(--warning);
}

.score {
    color: var(--primary);
    font-weight: 800;
}

.score-value {
    color: var(--primary);
    font-weight: 800;
}

.violation-col {
    white-space: nowrap;
}

.viol-none {
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}

.viol-count,
.viol-fs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
}

.viol-count {
    background: var(--danger-soft);
    color: var(--danger);
}

.viol-fs {
    background: var(--accent-soft);
    color: var(--accent);
    margin-left: 6px;
}

.violation-list {
    display: grid;
    gap: 10px;
}

.violation-item {
    padding: 14px;
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-left: 4px solid var(--danger);
    border-radius: 10px;
    background: var(--danger-soft);
}

.violation-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
}

.violation-item span {
    color: var(--muted);
    font-size: 12px;
}

.waktu-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    line-height: 1.5;
    white-space: nowrap;
}

.waktu-cell .waktu-muted {
    color: var(--muted);
}

.waktu-timer {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.waktu-timer.warning {
    color: var(--danger);
}

#loginView {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: var(--bg-gradient);
    z-index: 5;
}

#loginView.hidden {
    display: none;
}

.login-card {
    width: min(420px, calc(100% - 32px));
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow);
    color: var(--text);
}

.admin-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
}

.admin-logo-icon {
    width: 56px;
    height: 56px;
    padding: 12px;
    border-radius: 16px;
    background: var(--grad-primary);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(23, 105, 170, 0.38);
    animation: logo-float 3.2s ease-in-out infinite;
}

@keyframes logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.login-card form {
    display: grid;
    gap: 14px;
    margin-top: 6px;
}

.login-card form .primary {
    width: 100%;
    box-sizing: border-box;
}

.login-card form a.outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    justify-self: start;
    border-radius: 999px;
    padding: 10px 18px;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.login-card form a.outline svg {
    width: 16px;
    height: 16px;
    flex: none;
}

.pw-field {
    position: relative;
    display: block;
    width: 100%;
}

.pw-field input {
    width: 100%;
    box-sizing: border-box;
    height: 54px;
    padding: 16px 16px 16px 46px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    color: var(--text);
    background: var(--card);
    outline: 0;
}

.pw-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.12);
}

.pw-field .pw-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    display: grid;
    place-items: center;
    color: var(--muted);
    pointer-events: none;
    transition: color 0.2s ease;
}

.pw-field .pw-icon svg {
    width: 18px;
    height: 18px;
}

.pw-field label {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--muted);
    pointer-events: none;
    background: var(--card);
    padding: 0 4px;
    transition: top 0.2s ease, transform 0.2s ease, font-size 0.2s ease, color 0.2s ease;
}

.pw-field input:focus ~ .pw-icon,
.pw-field input:not(:placeholder-shown) ~ .pw-icon {
    color: var(--primary);
}

.pw-field input:focus ~ label,
.pw-field input:not(:placeholder-shown) ~ label {
    top: 0;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--primary);
}

.admin-panel {
    background: var(--card);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    color: var(--text);
}

.admin-panel.hidden,
.inline-hidden {
    display: none !important;
}

.admin-panel .input-wrap label {
    color: var(--text);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panel-header h2 {
    margin: 0;
    font-size: 26px;
    color: var(--text);
}

.panel-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.admin-auth {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card-soft);
}

.admin-auth form,
.admin-add form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-auth input,
.admin-add input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    color: var(--text);
    background: var(--card);
}

.admin-auth input:focus,
.admin-add input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 59, 119, 0.12);
}

.small-note {
    color: var(--muted);
    font-size: 12px;
    margin-top: 6px;
}

.participant-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.participant-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-soft);
    color: var(--text);
}

.participant-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.participant-meta strong {
    font-size: 15px;
    color: var(--text);
}

.participant-meta span {
    color: var(--muted);
    font-size: 12px;
}

.participant-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.admin-controls {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.exam-app {
    width: 100%;
}

.exam-panel {
    max-width: 820px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 38px);
    background: var(--card);
    color: var(--text);
}

.exam-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 26px;
}

.exam-badge {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.exam-header h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 38px);
    color: var(--text);
}

.exam-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.exam-meta-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.timer-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 118px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--accent-soft);
    border: 1px solid rgba(217, 177, 93, 0.5);
    color: var(--warning);
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.timer-box.warning {
    background: var(--danger-soft);
    border-color: rgba(220, 38, 38, 0.4);
    color: var(--danger);
}

.fullscreen-notice {
    margin: -8px 0 22px;
    padding: 11px 14px;
    border: 1px solid rgba(217, 177, 93, 0.5);
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--warning);
    font-size: 13px;
    line-height: 1.5;
}

.participant-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.participant-table th,
.participant-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
    font-size: 13px;
}

.participant-table th {
    background: var(--card-soft);
    color: var(--primary);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.participant-table tr:last-child td {
    border-bottom: none;
}

.question-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.question-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 20px;
    color: var(--text);
}

.exam-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.progress-track {
    height: 7px;
    flex: 1;
    overflow: hidden;
    border-radius: 999px;
    background: var(--card-soft);
}

.progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--primary-strong));
    transition: width 0.25s ease;
}

.question-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.question-no {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 800;
    flex: none;
}

.question-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 17px;
    line-height: 1.6;
}

.options {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card-soft);
    color: var(--text);
}

.option input {
    accent-color: var(--primary);
    margin-top: 3px;
}

.option label {
    cursor: pointer;
    color: var(--text);
    line-height: 1.5;
    font-size: 14px;
}

.exam-footer {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.exam-footer .nav-btn {
    flex: 1 1 220px;
    max-width: 260px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    font-size: 14px;
}

.exam-footer .nav-btn svg {
    width: 20px;
    height: 20px;
    flex: none;
}

.exam-footer .nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.result-card {
    margin-top: 26px;
    border-radius: 18px;
    padding: 20px 22px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, var(--card-soft), var(--card));
    color: var(--text);
}

.result-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
    color: var(--text);
}

.result-card p {
    margin: 6px 0;
    color: var(--muted);
    line-height: 1.7;
}

.confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(12, 35, 70, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.confirm-backdrop[hidden] {
    display: none;
}

.confirm-modal {
    width: min(400px, 100%);
    border-radius: 22px;
    padding: 28px 24px;
    background: var(--card);
    color: var(--text);
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modal-pop 0.25s ease;
}

@keyframes modal-pop {
    from { transform: scale(0.94) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.confirm-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 16px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
}

.confirm-icon svg {
    width: 30px;
    height: 30px;
}

.confirm-modal h3 {
    margin: 0 0 8px;
    font-size: 21px;
    color: var(--text);
}

.confirm-modal p {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}

.confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.confirm-actions .primary-btn,
.confirm-actions .ghost-btn {
    padding: 13px 16px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(12, 35, 70, 0.54);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-backdrop[hidden] {
    display: none;
}

.edit-modal {
    width: min(460px, 100%);
    padding: 27px;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.modal-header h3 {
    margin: 0;
    font-size: 21px;
    color: var(--text);
}

.modal-header p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: var(--card-soft);
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.modal-close:hover {
    background: var(--danger-soft);
    color: var(--danger);
}

.modal-form {
    display: grid;
    gap: 16px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 5px;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    background: rgba(12, 35, 70, 0.32);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.loading-overlay[hidden] {
    display: none;
}

.loading-card {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 220px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    box-shadow: var(--shadow);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.loading-spinner {
    width: 22px;
    height: 22px;
    flex: none;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    height: 56px;
    border: none;
    border-radius: 28px;
    background: var(--grad-primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(15, 59, 119, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    will-change: transform;
}

.fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15, 59, 119, 0.42);
}

.fab .fab-icon {
    position: relative;
    display: inline-flex;
}

.fab .fab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 13px;
    background: var(--accent);
    color: #102a4b;
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.fab-label {
    display: inline-block;
}

.fab-overlay {
    position: fixed;
    inset: 0;
    z-index: 68;
    background: rgba(12, 35, 70, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.fab-overlay.show {
    opacity: 1;
    visibility: visible;
}

.fab-panel {
    position: fixed;
    right: 24px;
    bottom: 92px;
    z-index: 70;
    width: min(340px, calc(100vw - 40px));
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 18px;
    opacity: 0;
    transform: translateY(14px) scale(0.97);
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.fab-panel.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

.fab-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.fab-panel-header h3 {
    margin: 0;
    font-size: 15px;
    color: var(--text);
}

.fab-panel-close {
    border: none;
    background: var(--primary-soft);
    color: var(--primary);
    width: 28px;
    height: 28px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.fab-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
}

.fab-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.fab-legend i {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    display: inline-block;
}

.fab-legend .dot-done {
    background: var(--success);
}

.fab-legend .dot-skip {
    background: var(--dot-skip-bg);
    border: 1px solid var(--border);
}

.fab-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.fab-cell {
    aspect-ratio: 1 / 1;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-soft);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.fab-cell:hover {
    transform: translateY(-2px);
}

.fab-cell.answered {
    background: var(--success);
    border-color: var(--success);
    color: #ffffff;
}

.fab-cell.current {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.fab-panel-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-align: center;
}

.result-shell {
    display: grid;
    gap: 22px;
}

.result-hero {
    background: var(--grad-navy);
    color: #ffffff;
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: clamp(24px, 5vw, 40px);
    position: relative;
    overflow: hidden;
}

.result-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(217, 177, 93, 0.25), transparent 40%);
    pointer-events: none;
}

.result-hero > * {
    position: relative;
    z-index: 1;
}

.result-id {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.result-name {
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 800;
    margin: 4px 0 2px;
    color: #ffffff;
}

.result-nis {
    color: #b9d5f4;
    font-size: 13px;
    font-weight: 600;
}

.result-badge {
    display: inline-flex;
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.result-badge.remidial {
    background: rgba(220, 38, 38, 0.35);
    border-color: rgba(255, 120, 120, 0.55);
}

.result-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 26px;
    align-items: center;
}

.score-ring {
    flex: none;
    width: 118px;
    height: 118px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(217, 177, 93, 0.6);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.06);
}

.score-ring strong {
    font-size: 30px;
    font-weight: 800;
    color: var(--accent-strong);
}

.score-ring span {
    display: block;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #b9d5f4;
    text-align: center;
}

.result-detail {
    display: grid;
    gap: 10px;
    flex: 1 1 240px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 13px;
}

.detail-row span:first-child {
    color: #b9d5f4;
}

.detail-row span:last-child {
    font-weight: 700;
    color: #ffffff;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.cry-area {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(220, 38, 38, 0.16);
    border: 1px solid rgba(220, 38, 38, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cry-emoji {
    position: relative;
    flex: none;
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    font-size: 62px;
    line-height: 1;
    animation: cry-wobble 1.3s ease-in-out infinite;
    transform-origin: 50% 100%;
}

.cry-emoji .tear {
    position: absolute;
    width: 9px;
    height: 13px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(143, 208, 255, 0.95), rgba(34, 134, 224, 0.95));
    box-shadow: 0 0 6px rgba(143, 208, 255, 0.5);
    opacity: 0;
    animation: tear-fall 1.6s ease-in infinite;
}

.cry-emoji .tear.left {
    left: 17px;
    top: 15px;
}

.cry-emoji .tear.right {
    right: 17px;
    top: 15px;
    animation-delay: 0.4s;
}

@keyframes tear-fall {
    0% { transform: translateY(0) scaleY(0.6); opacity: 0; }
    15% { opacity: 1; }
    70% { transform: translateY(28px) scaleY(1); opacity: 1; }
    100% { transform: translateY(42px) scaleY(1.15); opacity: 0; }
}

@keyframes cry-wobble {
    0%, 100% { transform: rotate(0) translateY(0); }
    20% { transform: rotate(-6deg) translateY(-3px); }
    40% { transform: rotate(5deg) translateY(0); }
    60% { transform: rotate(-4deg) translateY(-2px); }
    80% { transform: rotate(3deg) translateY(0); }
}

.cry-copy {
    min-width: 0;
}

.cry-title {
    font-size: 15px;
    font-weight: 800;
    color: #ffd9d9;
    margin: 0 0 4px;
}

.cry-msg {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
    line-height: 1.6;
}

footer {
    text-align: center;
    padding: 20px 16px;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
    background-color: var(--card);
    margin-top: auto;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

footer span.heart {
    color: #ef4444;
}

@media (min-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (min-width: 901px) {
    .sidebar-collapse-btn {
        display: inline-flex;
    }

    .sidebar.mini {
        width: 74px;
        padding: 25px 10px;
    }

    .sidebar.mini .sidebar-topbar {
        justify-content: center;
    }

    .sidebar.mini .brand {
        display: none;
    }

    .sidebar.mini .sidebar-expand-btn {
        display: inline-flex;
    }

    .sidebar.mini .sidebar-collapse-btn {
        display: none;
    }

    .sidebar.mini .sidebar-nav {
        margin-top: 24px;
    }

    .sidebar.mini .nav-button {
        justify-content: center;
        padding: 13px 0;
    }

    .sidebar.mini .nav-label {
        display: none;
    }
}

@media (max-width: 900px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100dvh;
        width: min(290px, 84vw);
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        z-index: 60;
        box-shadow: 0 0 60px rgba(10, 28, 50, 0.35);
        overflow-y: auto;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .menu-close-btn {
        display: inline-flex;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .admin-menu-btn .avatar-label {
        display: none;
    }

    .admin-controls {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    main {
        padding: calc(var(--navbar-height, 0px) + 24px) 16px 40px 16px;
        justify-content: flex-start;
    }

    .grid-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card {
        padding: 24px 18px;
    }

    .icon-circle {
        width: 60px;
        height: 60px;
        margin-bottom: 14px;
    }

    .icon-circle svg {
        width: 28px;
        height: 28px;
    }

    .module-header, .section-box {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .module-title {
        font-size: 22px;
    }

    .section-title {
        font-size: 18px;
    }

    .step-card {
        padding: 16px 12px;
    }

    .step-list {
        padding-left: 16px;
    }

    .content-container {
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .login-panel,
    .admin-panel,
    .exam-panel {
        padding-left: 16px;
        padding-right: 16px;
    }

    .participant-item,
    .exam-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .participant-actions,
    .exam-meta {
        width: 100%;
        text-align: left;
    }

    .exam-header {
        gap: 12px;
    }

    .exam-meta {
        align-items: flex-start;
    }

    .exam-progress {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .progress-track {
        width: 100%;
        flex: none;
    }

    .exam-footer {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .exam-footer .nav-btn {
        flex: 1 1 0;
        max-width: none;
        min-height: 50px;
        padding: 12px 14px;
        font-size: 14px;
    }

    .result-id {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .result-metrics {
        align-items: flex-start;
    }

    .fab {
        position: static;
        height: 56px;
        width: 56px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .fab-label {
        display: none;
    }

    .fab .fab-count {
        position: absolute;
        top: -6px;
        right: -6px;
        min-width: 22px;
        height: 22px;
        padding: 0 6px;
        border-radius: 11px;
        font-size: 11px;
        border: 2px solid #ffffff;
    }

    .exam-meta-row {
        width: 100%;
        justify-content: space-between;
    }

    .fab-panel {
        right: 16px;
        left: 16px;
        width: auto;
        bottom: 92px;
        max-height: calc(100vh - 128px);
        overflow-y: auto;
    }

    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .table-toolbar .search-box {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
    }

    .filter-select-wrap {
        justify-content: space-between;
    }

    .upload-box {
        flex-direction: column;
        align-items: stretch;
    }

    .upload-box .file-btn,
    .upload-box .primary,
    .upload-box .outline {
        justify-content: center;
    }

    .table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .table-wrap table {
        min-width: 0;
        display: block;
    }

    .table-wrap thead {
        display: none;
    }

    .table-wrap tbody {
        display: block;
    }

    .table-wrap tbody tr {
        display: block;
        padding: 8px 16px 12px;
        margin-bottom: 10px;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 12px;
        box-shadow: var(--shadow-sm);
    }

    .table-wrap tbody tr:last-child {
        margin-bottom: 0;
    }

    .table-wrap td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 9px 0;
        border-bottom: 1px solid var(--border);
    }

    .table-wrap td::before {
        content: attr(data-label);
        flex: none;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--muted);
    }

    .table-wrap td:last-child {
        border-bottom: 0;
    }

    .table-wrap tbody tr {
        padding-bottom: 12px;
    }
}

@media (max-width: 520px) {
    .main-area {
        padding: 0 15px 40px;
    }

    .topbar {
        margin: 0 -15px 0;
        padding: clamp(10px, 2.5vw, 14px) 15px;
    }

    .page-heading {
        padding: 14px 0 4px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .content-card {
        padding: 17px;
    }
}

@media (max-width: 480px) {
    main {
        padding: calc(var(--navbar-height, 0px) + 16px) 12px 32px 12px;
    }

    .card h3 {
        font-size: 16px;
    }

    .card p {
        font-size: 12px;
    }
}