:root {
    --bg: #eef3fb;
    --primary: #2056a8;
    --primary-dark: #174a92;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #637083;
    --border: #d8e1f0;
    --danger: #c7362f;
    --danger-dark: #a21f1a;
}

[hidden] {
    display: none !important;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: radial-gradient(
        circle at top,
        #d7e6ff 0%,
        var(--bg) 45%,
        #edf2ff 100%
    );
    color: var(--text);
}

body:not(.page-home) {
    --fixed-topbar-h: 58px;
    --fixed-footer-h: 38px;
    min-height: 100vh;
    padding-top: var(--fixed-topbar-h);
    padding-bottom: var(--fixed-footer-h);
}

body:not(.page-home) .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
}

body:not(.page-home) .landing-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    margin-top: 0;
    border-radius: 0;
}

.topbar {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.35);
}

.brand span {
    letter-spacing: 0.2px;
    font-weight: 800;
    text-transform: lowercase;
}

.topbar h1 {
    margin: 0;
    font-size: 20px;
}

.topnav {
    display: flex;
    gap: 12px;
    align-items: center;
}
.topnav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.nav-user {
    color: #d8e7ff;
    font-size: 13px;
}

.btn-nav {
    padding: 6px 10px;
    border-radius: 8px;
    background: #ffffff;
    color: #1f3f76;
    font-size: 13px;
}

.container {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 16px;
}

.card {
    background: var(--card);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(32, 86, 168, 0.12);
}

.page-hero {
    margin: 0 0 9px;
    padding: 20px 24px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #eff6ff;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.25);
}

.page-hero h2 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
}

.page-hero p {
    margin: 0;
    color: rgba(239, 246, 255, 0.85);
    font-size: 14px;
}

.narrow {
    max-width: 720px;
    margin: 0 auto;
}

body[data-page="login_content"] {
    background:
        radial-gradient(
            circle at top left,
            rgba(255, 255, 255, 0.78) 0%,
            rgba(255, 255, 255, 0) 32%
        ),
        linear-gradient(180deg, #d7dbe2 0%, #d2d8e1 100%);
    padding-top: 0;
    padding-bottom: 0;
}

body[data-page="login_content"] .topbar {
    display: none;
}

body[data-page="login_content"] .container {
    max-width: 470px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 14px 10px 24px;
    display: flex;
    align-items: flex-start;
}

body[data-page="login_content"] .landing-footer {
    display: none;
}

body[data-page="login_content"] .landing-footer small {
    color: #7a8db2;
}

.login-shell {
    width: 100%;
    padding-top: 14px;
    animation: login-fade-in 0.45s ease-out;
}

@keyframes login-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-brand-head {
    padding: 38px 40px 16px;
}

.login-brand-badge {
    width: 58px;
    height: 58px;
    margin-bottom: 24px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #4f46e5, #4338ca);
    box-shadow: 0 12px 24px rgba(67, 56, 202, 0.28);
}

.login-brand-badge img {
    width: 34px;
    height: 34px;
}

.login-brand-head h2 {
    margin: 0;
    font-size: 27px;
    line-height: 1.15;
    color: #1a2138;
}

.login-brand-head p {
    margin: 10px 0 0;
    color: #7281a0;
    font-size: 15px;
}

.login-modern-card {
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 26px 48px rgba(74, 85, 104, 0.15);
    overflow: hidden;
}

.login-modern-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 1px solid #e2e8f0;
}

.login-method-tabs {
    display: none;
}

.login-main-tabs {
    display: none;
}

.login-modern-tab {
    border: 0;
    background: transparent;
    color: #64748b;
    padding: 14px 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.login-tab-icon {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
}

.login-tab-icon svg {
    width: 16px;
    height: 16px;
}

.login-modern-tab.is-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.login-modern-panel {
    padding: 8px 40px 40px;
}

.login-modern-form {
    display: grid;
    gap: 20px;
}

.login-otp-step {
    display: grid;
    gap: 14px;
}

.login-input-group {
    display: grid;
    gap: 12px;
}

.login-modern-form label {
    color: #4d5b7a;
    font-size: 14px;
    font-weight: 600;
}

.login-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.login-help-link {
    color: #4338ca;
    font-size: 13px;
    text-decoration: none;
}

.login-help-link:hover {
    text-decoration: underline;
}

.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 8px 0 0;
    color: #a0abc0;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-divider,
.login-signup-foot {
    user-select: none;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.login-divider::before {
    margin-right: 12px;
}

.login-divider::after {
    margin-left: 12px;
}

.login-modern-form input {
    width: 100%;
    border-radius: 14px;
    border: 1px solid #d2d9e6;
    background: #edf1f6;
    color: #1f2937;
    min-height: 50px;
    padding: 14px 16px;
}

.login-modern-form input::placeholder {
    color: #98a3b7;
}

.login-modern-form input:focus {
    background: #ffffff;
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: 0;
}

.login-input-wrap {
    position: relative;
}

.login-input-wrap-plain input {
    padding-left: 13px;
}

.login-suggest {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 20;
    background: #ffffff;
    border: 1px solid #d2d9e6;
    border-radius: 12px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
    max-height: 260px;
    overflow: auto;
}

.login-suggest-list {
    display: grid;
    gap: 6px;
    padding: 10px;
}

.login-suggest-item {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: #f8fafc;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.login-suggest-item:hover,
.login-suggest-item:focus {
    background: #eef2ff;
    border-color: #c7d2fe;
    outline: none;
}

.login-suggest-title {
    font-size: 14px;
    font-weight: 600;
}

.login-suggest-meta {
    font-size: 12px;
    color: #64748b;
}

.login-suggest-empty {
    padding: 12px 14px 14px;
    font-size: 13px;
    color: #64748b;
}

.login-suggest-status {
    padding: 12px 14px 14px;
    font-size: 13px;
    color: #475569;
}

.login-input-icon {
    position: absolute;
    inset: 0 auto 0 13px;
    display: inline-flex;
    align-items: center;
    color: #94a3b8;
    pointer-events: none;
}

#login-form .login-input-icon {
    display: none;
}

.login-input-icon svg {
    width: 18px;
    height: 18px;
}

.login-password-wrap {
    position: relative;
}

.login-password-wrap input {
    padding-left: 16px;
    padding-right: 44px;
}

.login-toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    padding: 6px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.login-toggle-password:hover {
    color: #4338ca;
    background: rgba(67, 56, 202, 0.1);
}

.login-toggle-password svg {
    width: 18px;
    height: 18px;
}

.login-primary-btn,
.login-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 13px;
    min-height: 50px;
    padding: 14px 16px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.login-primary-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: #fff;
    box-shadow: none;
}

.login-secondary-btn {
    background: rgba(255, 255, 255, 0.55);
    color: #3d4a66;
    border: 1px solid #d2d9e6;
}

.login-secondary-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: #bec8da;
}

.login-google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    background: #8fd7df;
    color: #0b3a4a;
    border: 1px solid #7ac8d1;
}

.login-google-btn:hover {
    background: #7ccdd6;
    border-color: #66bcc6;
}

#login-show-signup-btn {
    background: #facc15;
    color: #3a2f00;
    border: 1px solid #eab308;
}

#login-show-signup-btn:hover {
    background: #fbbf24;
    border-color: #d99a07;
}

.login-secondary-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-hint {
    margin: -2px 0 2px;
    color: #64748b;
    font-size: 12px;
}

.login-hint-center {
    text-align: center;
}

.login-otp-note {
    margin: 0 0 2px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1d4ed8;
    font-size: 13px;
}

.login-inline-help {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #dbe4f0;
    background: #f8fbff;
}

.login-inline-help strong {
    display: block;
    margin-bottom: 4px;
    color: #0f172a;
    font-size: 13px;
}

.login-inline-help p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

.login-state-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
}

#login-form > .login-input-group:first-child .login-input-wrap input {
    padding-left: 16px;
}

.login-state-card strong {
    display: block;
    margin-bottom: 4px;
    color: #0f172a;
    font-size: 14px;
}

.login-state-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

.login-state-card-muted {
    background: #f8fbff;
}

.login-state-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #dbeafe;
    color: #2563eb;
}

.login-state-icon svg {
    width: 20px;
    height: 20px;
}

.login-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 0;
    margin: 0 0 2px;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.login-back-link:hover {
    color: #2563eb;
}

.login-back-link svg {
    width: 16px;
    height: 16px;
}

.login-link-btn {
    display: block;
    border: 0;
    background: transparent;
    color: #5f6d86;
    font-size: 13px;
    margin-top: -2px;
    padding: 0;
    justify-self: center;
    cursor: pointer;
}

.login-link-btn:hover {
    color: #4338ca;
}

.login-otp-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.login-otp-boxes {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.login-otp-digit {
    width: 100%;
    text-align: center;
    padding: 10px 0 !important;
    border-radius: 10px !important;
    border: 2px solid #e2e8f0 !important;
    background: #f8fafc !important;
    color: #0f172a;
    font-size: 20px;
    font-weight: 700;
}

.login-otp-digit:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1) !important;
    outline: 0;
}

.login-message {
    min-height: 20px;
    margin: 18px 0 0;
    text-align: center;
    color: #475569;
    font-size: 13px;
}

.login-signup-foot {
    margin: 32px 0 0;
    text-align: center;
    color: #6e7f9d;
    font-size: 14px;
    line-height: 1.45;
}

.login-signup-foot a {
    color: #4338ca;
    font-weight: 700;
    text-decoration: none;
}

.login-signup-foot a:hover {
    text-decoration: underline;
}

.form-grid {
    display: grid;
    gap: 14px;
}

.password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.inline-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.inline-checkbox-label input[type="checkbox"] {
    margin: 0;
}

input,
select,
button {
    font: inherit;
}

input,
select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

textarea {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    background: #fff;
    font: inherit;
}

.btn {
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #d5e1f5;
    color: #173f7a;
}

.btn-inline {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
}

.btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-with-icon svg {
    width: 16px;
    height: 16px;
}

.btn-danger {
    background: var(--danger);
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.page-home {
    background: #030712;
    color: #dbeafe;
}

.landing-root {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-rows: 1fr auto;
}

.landing-main {
    min-height: 82vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px 48px;
    position: relative;
    z-index: 2;
}

.landing-choice-card {
    width: min(100%, 620px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 10px 20px 20px;
}

.landing-brand-logo {
    width: min(172px, 42vw);
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 22px 64px rgba(59, 130, 246, 0.28));
}

.landing-title {
    margin: 0;
    font-size: clamp(54px, 10vw, 104px);
    font-weight: 800;
    line-height: 0.95;
    color: #f8fafc;
    letter-spacing: -2px;
    text-shadow:
        0 2px 0 rgba(255, 255, 255, 0.08),
        0 10px 32px rgba(14, 165, 233, 0.12);
}

.landing-title span {
    color: #38bdf8;
}

.landing-subtitle {
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: clamp(20px, 2.8vw, 30px);
    text-shadow: 0 3px 14px rgba(15, 23, 42, 0.8);
}

.landing-choice-stack {
    width: min(100%, 500px);
    margin-top: 46px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.landing-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #203b8f 0%, #1f255f 100%);
    color: #f8fbff;
    text-decoration: none;
    font-weight: 700;
    font-size: clamp(18px, 3vw, 24px);
    border-radius: 24px;
    padding: 22px 28px;
    width: 100%;
    min-height: 88px;
    border: 1px solid rgba(72, 126, 255, 0.6);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 0 1px rgba(82, 130, 255, 0.12),
        0 18px 42px rgba(19, 41, 117, 0.34);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.landing-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 0 0 1px rgba(92, 151, 255, 0.16),
        0 22px 46px rgba(19, 41, 117, 0.42);
    border-color: rgba(97, 156, 255, 0.8);
}

.landing-btn-secondary-path {
    margin-top: 18px;
    background: linear-gradient(180deg, #465579 0%, #42506f 100%);
    color: #efc57a;
    border-color: rgba(232, 190, 110, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 1px rgba(232, 190, 110, 0.12),
        0 16px 38px rgba(232, 190, 110, 0.2);
}

.landing-btn-secondary-path:hover {
    border-color: rgba(244, 204, 124, 0.9);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 0 1px rgba(244, 204, 124, 0.16),
        0 20px 44px rgba(232, 190, 110, 0.24);
}

.landing-choice-note {
    margin: 0 0 12px;
    max-width: 460px;
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(16px, 2.8vw, 22px);
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.landing-sparkle {
    position: absolute;
    right: max(24px, 10vw);
    bottom: 110px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 64px;
    line-height: 1;
    text-shadow: 0 0 22px rgba(255, 255, 255, 0.45);
    z-index: 2;
}

.landing-footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 10px 16px 14px;
    color: #dbeafe;
    border-top: 1px solid rgba(56, 189, 248, 0.24);
    background: #0a1f4a;
}

.landing-footer p {
    margin: 0;
}

.landing-footer small {
    display: block;
    margin-top: 4px;
    color: #7dd3fc;
}

.landing-radial {
    position: absolute;
    border-radius: 999px;
    filter: blur(70px);
    opacity: 0.42;
    z-index: 0;
    pointer-events: none;
}

.landing-radial-a {
    width: 45vw;
    height: 45vw;
    top: -14vw;
    right: -12vw;
    background: #1d4ed8;
}

.landing-radial-b {
    width: 44vw;
    height: 44vw;
    left: -12vw;
    bottom: -16vw;
    background: #0891b2;
}

.landing-radial-c {
    width: 34vw;
    height: 34vw;
    top: 18vh;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(59, 130, 246, 0.28);
    opacity: 0.5;
}

.landing-noise {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.2;
    z-index: 1;
    background-image: radial-gradient(
        rgba(186, 230, 253, 0.3) 0.6px,
        transparent 0.6px
    );
    background-size: 4px 4px;
}

.home-ai-fab {
    position: fixed;
    right: 22px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    border: 0;
    background: linear-gradient(140deg, #2563eb, #0284c7);
    color: #e0f2fe;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.38);
    z-index: 11;
}

.home-ai-modal {
    position: fixed;
    right: 22px;
    bottom: 92px;
    width: min(380px, calc(100vw - 26px));
    max-height: 70vh;
    background: rgba(2, 6, 23, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 16px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    z-index: 12;
}

.home-ai-modal.is-open {
    display: flex;
}

.home-ai-head {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    color: #e0f2fe;
}

.home-ai-head button {
    background: transparent;
    border: 0;
    color: #bae6fd;
    font-size: 16px;
    cursor: pointer;
}

.home-ai-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    overflow-y: auto;
}

.home-ai-msg {
    max-width: 88%;
    padding: 9px 11px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.home-ai-msg-user {
    margin-left: auto;
    background: #1d4ed8;
    color: #eff6ff;
}

.home-ai-msg-bot {
    background: rgba(14, 116, 144, 0.35);
    color: #e0f2fe;
    border: 1px solid rgba(56, 189, 248, 0.24);
}

.home-ai-input-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px 12px 12px;
    border-top: 1px solid rgba(56, 189, 248, 0.2);
}

.home-ai-input-wrap input {
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: rgba(15, 23, 42, 0.9);
    color: #e0f2fe;
}

.home-ai-input-wrap button {
    border: 0;
    border-radius: 10px;
    background: #0284c7;
    color: #f0f9ff;
    font-weight: 700;
    padding: 10px 12px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .landing-main {
        min-height: 72vh;
    }

    .landing-choice-card {
        padding-inline: 10px;
    }

    .landing-brand-logo {
        width: min(132px, 42vw);
    }

    .landing-btn-primary {
        width: 100%;
        min-height: 78px;
        border-radius: 20px;
    }

    .landing-choice-note {
        font-size: 15px;
        max-width: 320px;
    }

    .landing-sparkle {
        right: 22px;
        bottom: 120px;
        font-size: 44px;
    }
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #7fb3ff;
    outline-offset: 2px;
}

.actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
    width: 100%;
}

.actions.with-submit {
    grid-template-columns: 1fr 1fr 1fr auto;
}

.action-prev {
    justify-self: start;
    width: max-content;
}

.action-doubt {
    justify-self: center;
    width: max-content;
}

.action-next {
    justify-self: end;
    width: max-content;
}

.action-submit {
    justify-self: end;
    width: max-content;
}

.muted {
    color: var(--muted);
}

.event-legend {
    border: 1px solid #e3e6eb;
    border-radius: 10px;
    padding: 10px 14px;
    background: #fbfcfe;
}

.event-legend summary {
    cursor: pointer;
    font-weight: 600;
}

.event-legend-body {
    margin-top: 10px;
}

.event-legend-list {
    margin: 8px 0 0 18px;
    padding: 0;
}

.event-legend-list li {
    margin: 6px 0;
}

.attempt-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.attempt-subhead {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #dbe3ef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.attempt-font-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 18px;
    flex: 1 1 auto;
    min-width: 0;
}

.attempt-font-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.attempt-font-label {
    color: #475569;
    font-weight: 600;
}

.attempt-question-progress {
    color: #1e3a5f;
    font-weight: 700;
    white-space: nowrap;
}

.font-size-btn {
    border: 1px solid #b8c5d9;
    border-radius: 4px;
    background: #fff;
    color: #0f172a;
    width: 32px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    font-weight: 700;
}

#font-small-btn {
    font-size: 14px;
}

#font-medium-btn {
    font-size: 18px;
}

#font-large-btn {
    font-size: 22px;
}

.font-size-btn.active {
    background: #e8f0ff;
    border-color: #2f64dc;
    color: #1746b7;
}

#attempt-root[data-font-size="small"] #stimulus-box,
#attempt-root[data-font-size="small"] #stem-box,
#attempt-root[data-font-size="small"] #options-box {
    font-size: 14px;
}

#attempt-root[data-font-size="medium"] #stimulus-box,
#attempt-root[data-font-size="medium"] #stem-box,
#attempt-root[data-font-size="medium"] #options-box {
    font-size: 16px;
}

#attempt-root[data-font-size="large"] #stimulus-box,
#attempt-root[data-font-size="large"] #stem-box,
#attempt-root[data-font-size="large"] #options-box {
    font-size: 19px;
}

.question-list-panel {
    margin-top: 0;
    margin-left: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 10px;
    max-width: 320px;
    width: 280px;
    align-self: start;
    position: sticky;
    top: 12px;
    height: fit-content;
}

.question-list-head {
    font-weight: 700;
    margin-bottom: 8px;
}

.question-list-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: 12px;
    color: #475569;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
}

.legend-current {
    background: #2f64dc;
    border-color: #2f64dc;
}

.legend-answered {
    background: #22a06b;
    border-color: #22a06b;
}

.legend-doubt {
    background: #f59e0b;
    border-color: #f59e0b;
}

.question-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: 8px;
}

.qno-btn {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fbff;
    color: #1e293b;
    min-height: 38px;
    font-weight: 700;
    cursor: pointer;
}

.qno-btn.current {
    background: #2f64dc;
    border-color: #2f64dc;
    color: #fff;
}

.qno-btn.answered {
    border-color: #22a06b;
    box-shadow: inset 0 0 0 1px #22a06b;
}

.qno-btn.doubt {
    border-color: #f59e0b;
    box-shadow: inset 0 0 0 1px #f59e0b;
}

.chip {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
}

.chip-primary {
    background: #2f64dc;
    color: #fff;
}

.chip-timer {
    background: #f1f4f8;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.chip-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.chip-muted {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.chip-timer #remaining-label {
    font-variant-numeric: tabular-nums;
}

.attempt-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    margin-top: 14px;
    align-items: start;
}

.attempt-question-flow {
    min-width: 0;
}

.panel {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fafcff;
    padding: 12px;
    min-width: 0;
}

.box {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    min-height: 64px;
}

#attempt-root #stimulus-box,
#attempt-root #stimulus-box * {
    color: #111827;
}

#attempt-root #stimulus-box,
#attempt-root #stem-box,
#attempt-root #options-box {
    border: 0;
    background: transparent;
    border-radius: 0;
    padding: 0;
    min-height: 0;
}

#attempt-root #stimulus-box {
    margin-bottom: 18px;
}

#attempt-root #stimulus-box[hidden] {
    display: none !important;
}

#attempt-root #question-items-box {
    display: grid;
    gap: 18px;
}

#attempt-root .attempt-question-card {
    padding: 16px;
    background: #fff;
}

#attempt-root .attempt-question-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

#attempt-root .attempt-question-card .doubt-pill {
    width: fit-content;
}

#attempt-root #stem-box {
    margin-bottom: 18px;
}

.code-box {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    max-height: 280px;
    overflow: auto;
}

.info-box {
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #0c4a6e;
}

.info-box strong {
    color: #075985;
}

.attempt-info-dialog {
    width: min(680px, 87vw);
}

.attempt-info-dialog h3 {
    margin: 0;
    color: #1f3f76;
}

.attempt-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.attempt-info-item {
    border: 1px solid #d6e0ef;
    border-radius: 10px;
    background: #f8fbff;
    padding: 10px;
}

.attempt-info-k {
    font-size: 12px;
    color: #5b6b82;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.attempt-info-v {
    font-size: 15px;
    color: #10253f;
    font-weight: 700;
}

.attempt-info-note {
    margin-top: 10px;
    border-left: 3px solid #2f64dc;
    background: #eef4ff;
    padding: 8px 10px;
    border-radius: 6px;
    color: #12345f;
}

.author-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 14px;
}

.admin-layout {
    display: grid;
    grid-template-columns: minmax(220px, 240px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.admin-overview {
    background: #ffffff;
    width: 100%;
    max-width: 100%;
    display: block;
}

.admin-overview h2 {
    margin: 0;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.proktor-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.admin-stat-card {
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--border);
}

.stat-label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}

.stat-value {
    margin-top: 6px;
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
}

.stat-sub-strong {
    color: #0f172a;
}

.stat-admin {
    background: linear-gradient(135deg, #e8f1ff 0%, #f6f9ff 100%);
    border-color: #c5dafd;
}

.stat-proktor {
    background: linear-gradient(135deg, #e9f8f5 0%, #f5fcfa 100%);
    border-color: #bde8dd;
}

.stat-guru {
    background: linear-gradient(135deg, #fff4e8 0%, #fffaf4 100%);
    border-color: #f5dcc1;
}

.stat-siswa {
    background: linear-gradient(135deg, #f3efff 0%, #faf8ff 100%);
    border-color: #ddd2ff;
}

.stat-sekolah {
    background: linear-gradient(135deg, #ffeef2 0%, #fff7f9 100%);
    border-color: #f6d0db;
}

.admin-sidebar {
    position: sticky;
    top: 16px;
    width: 100%;
}

.admin-menu-list {
    display: grid;
    gap: 10px;
}

.admin-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.admin-menu-btn.active {
    background: var(--primary);
    color: #fff;
}

.admin-menu-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #5a6782;
    line-height: 1;
}

.admin-menu-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-menu-btn.active .admin-menu-icon {
    color: #fff;
}

.portal-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 !important;
    overflow: hidden !important;
}

.portal-brand {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    padding: 18px 16px 14px;
    border-bottom: 1px solid #e7edf7;
}

.portal-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #3f46de 0%, #3237c7 100%);
    box-shadow: 0 10px 20px rgba(50, 55, 199, 0.28);
}

.portal-brand-mark svg {
    width: 21px;
    height: 21px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portal-brand h3 {
    margin: 0;
    font-size: 31px;
    line-height: 1;
    letter-spacing: -0.25px;
    color: #0f294f;
}

.portal-brand p {
    margin: 5px 0 0;
    color: #8ea0bf;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.portal-sidebar-scroll {
    flex: 1;
    overflow: auto;
    padding: 12px 10px 10px;
}

.portal-sidebar-group + .portal-sidebar-group {
    margin-top: 16px;
}

.portal-sidebar-group h4 {
    margin: 0 0 10px;
    padding: 0 12px;
    color: #99a8c3;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.portal-sidebar .admin-menu-list {
    gap: 4px;
}

.portal-sidebar .admin-menu-btn {
    border: 0;
    border-radius: 12px;
    padding: 11px 12px;
    background: transparent;
    color: #304669;
    font-size: 14px;
    font-weight: 600;
    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.portal-sidebar .admin-menu-btn:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #2a4eb7;
    transform: translateX(3px);
}

.portal-sidebar .admin-menu-btn.active {
    color: #fff;
    background: linear-gradient(135deg, #3f46de 0%, #3237c7 100%);
    box-shadow: 0 8px 18px rgba(50, 55, 199, 0.3);
}

.portal-sidebar .admin-menu-icon {
    color: #687a9b;
}

.portal-sidebar .admin-menu-btn:hover .admin-menu-icon {
    color: #2a4eb7;
}

.portal-user-card {
    margin: 10px;
    border-radius: 14px;
    border: 1px solid #e8eef8;
    background: #f8fbff;
    padding: 12px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
}

.portal-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #dfe8ff;
    color: #3557c8;
    font-size: 14px;
    font-weight: 800;
}

.portal-user-meta {
    display: grid;
    min-width: 0;
}

.portal-user-meta strong {
    color: #193864;
    font-size: 14px;
    line-height: 1.2;
}

.portal-user-meta span {
    margin-top: 2px;
    color: #7587a8;
    font-size: 11px;
}

.portal-user-logout {
    width: 22px;
    height: 22px;
    color: #8ca0c2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.portal-user-logout svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-content {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.admin-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-section-head h4 {
    margin: 0;
}

.admin-inline-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
}

.admin-card + .admin-card {
    margin-top: 16px;
}

.admin-card h4 {
    margin: 0 0 10px;
    color: #1f3f76;
}

.admin-card-title-lg {
    font-size: 175%;
}

.admin-master-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

#admin-master-message {
    min-height: 0;
    padding: 12px;
}

#admin-master-panel section {
    margin-top: 16px;
}

.admin-users-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.icon-wrap {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-wrap svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.action-icons {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.master-action-sep {
    color: #8a94a8;
    margin: 0 2px;
}

.icon-only-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: #2d3c56;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-only-btn:hover {
    background: #eef4ff;
}

.icon-only-btn.danger {
    color: #b02a24;
    border-color: #e3b9b6;
}

.icon-only-btn.danger:hover {
    background: #fff2f1;
}

.icon-only-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.table-wrap {
    overflow-x: auto;
}

.panel h4 {
    margin: 4px 0;
}

.mt {
    margin-top: 12px;
}

.option-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}

.option-row:hover,
.option-row:focus-within {
    background: #eaf4ff;
    border-color: #b5d9ff;
}

.option-row.is-selected {
    background: #d6ecff;
    border-color: #9fcaff;
}

.option-row input[type="radio"],
.option-row input[type="checkbox"] {
    margin: 0;
    transform: scale(1.75);
    transform-origin: left center;
}

.bs-choice input[type="radio"],
.bs-choice input[type="checkbox"] {
    transform: scale(1.75);
    transform-origin: center;
}

.option-row > div p {
    margin: 0;
}

.option-row > div {
    padding-left: 4px;
}

.option-row.option-row-comparison {
    align-items: start;
}

.option-comparison-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.option-comparison-content {
    width: 100%;
}

.option-comparison-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid #cfe0f5;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.option-comparison-head {
    padding: 8px 10px;
    background: #eef5ff;
    border-bottom: 1px solid #cfe0f5;
    font-weight: 700;
    color: #0f172a;
}

.option-comparison-head + .option-comparison-head {
    border-left: 1px solid #cfe0f5;
}

.option-comparison-cell {
    min-height: 52px;
    padding: 10px;
    color: #0f172a;
}

.option-comparison-cell + .option-comparison-cell {
    border-left: 1px solid #e2e8f0;
}

.option-comparison-cell p:first-child {
    margin-top: 0;
}

.option-comparison-cell p:last-child {
    margin-bottom: 0;
}

.option-preview-list {
    display: grid;
    gap: 8px;
}

@media (max-width: 720px) {
    .option-comparison-editor-grid,
    .option-comparison-table {
        grid-template-columns: minmax(0, 1fr);
    }

    .option-comparison-head + .option-comparison-head,
    .option-comparison-cell + .option-comparison-cell {
        border-left: 0;
    }

    .option-comparison-cell {
        border-top: 1px solid #e2e8f0;
    }
}

.matching-row {
    border: 1px solid #d8e7f8;
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfdff 0%, #f2f8ff 100%);
}

.matching-prompt {
    padding: 6px 2px;
}

.matching-prompt p:last-child {
    margin-bottom: 0;
}

.matching-answer-label {
    margin-top: 10px;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.matching-dropzone {
    width: 100%;
    min-height: 70px;
    border-radius: 10px;
    border: 1px solid #a9c7e8;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.matching-dropzone.is-active {
    border-color: #3357d4;
    box-shadow: 0 0 0 3px rgba(51, 87, 212, 0.12);
}

.matching-dropzone.is-filled {
    border-style: solid;
}

.matching-dropzone.is-empty {
    border-style: dashed;
}

.matching-slot-placeholder {
    display: block;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.matching-slot-chip {
    display: block;
}

.matching-row-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.matching-bank {
    display: grid;
    gap: 10px;
}

.matching-choice-chip {
    width: 100%;
    border: 1px solid #b7d8b8;
    border-radius: 12px;
    background: linear-gradient(180deg, #f3fff1 0%, #e2f7dc 100%);
    padding: 10px 12px;
    text-align: left;
    cursor: grab;
    display: grid;
    gap: 6px;
}

.matching-choice-chip.is-used {
    background: linear-gradient(180deg, #fff7cc 0%, #ffe38a 100%);
}

.matching-choice-chip.is-assigned {
    border-color: #d1a72c;
}

.matching-choice-chip:active {
    cursor: grabbing;
}

.matching-choice-html p:last-child {
    margin-bottom: 0;
}

.matching-choice-state {
    font-size: 12px;
    color: #64748b;
}

#guru-manuscript-match-prompts textarea,
#guru-manuscript-match-choices textarea,
#guru-manuscript-match-note-html {
    width: 100%;
    min-height: 88px;
    resize: vertical;
}

#guru-manuscript-match-pairs label {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

#guru-manuscript-match-pairs select {
    width: 100%;
}

.result-pair-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.result-pair-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef6ff;
    border: 1px solid #c8dbef;
    font-size: 12px;
    line-height: 1.3;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: #f8fbff;
    padding: 8px;
}

.editor-toolbar .btn-inline {
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 7px;
}

.editor-select {
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 5px 8px;
    background: #fff;
    min-height: 30px;
}

.rich-editor {
    min-height: 160px;
    outline: none;
    overflow: auto;
    border-radius: 0 0 8px 8px;
}

.rich-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.stimulus-editor-wrap.source-mode .rich-editor {
    display: none;
}

.quill-editor-shell .ql-toolbar.ql-snow {
    border: 1px solid var(--border);
    border-radius: 8px 8px 0 0;
    background: #f8fbff;
}

.quill-editor-shell .ql-container.ql-snow {
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: #fff;
    height: auto !important;
    min-height: 240px;
}

.quill-editor-shell {
    margin-bottom: 0;
}

.quill-editor-shell .ql-editor {
    height: auto;
    min-height: 200px;
    max-height: 360px;
    overflow-x: hidden;
    overflow-y: auto;
}

.quill-editor-shell .ql-editor img {
    max-width: 100% !important;
    height: auto !important;
}

#guru-manuscripts-panel .quill-editor-shell .ql-editor {
    font-size: 12pt;
}

#guru-manuscript-form label {
    min-width: 0;
}

#guru-manuscript-form select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
    height: auto;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
}

#guru-manuscript-form select option {
    white-space: normal;
    word-break: break-word;
}

#guru-manuscript-form [data-statement-text] {
    font-weight: 400;
}

.field-error {
    border-color: #ef9a9a;
    color: #8b1d1d;
    background: #fff5f5;
    min-height: 0;
}

#guru-manuscripts-panel .stimulus-editor-wrap {
    position: relative;
    z-index: 1;
}

#guru-manuscripts-panel .admin-section-head {
    position: relative;
    z-index: 5;
}

#guru-manuscript-options-panel {
    margin-top: 16px;
    position: relative;
    z-index: 6;
}

#guru-manuscript-options-panel .quill-editor-shell .ql-container.ql-snow {
    min-height: 140px;
}

#guru-manuscript-options-panel .quill-editor-shell .ql-editor {
    min-height: 110px;
    max-height: 220px;
}

#guru-manuscript-stimulus-tabs [data-stimulus-tab-row].is-dragging {
    opacity: 0.75;
    border-style: dashed;
}

#guru-manuscript-stimulus-tabs [data-stimulus-tab-row].is-drop-target {
    border-color: #0f766e;
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}

#guru-manuscript-stimulus-tabs [data-stimulus-tab-drag-handle] {
    cursor: grab;
    font-weight: 700;
}

#guru-manuscript-stimulus-tabs [data-stimulus-tab-drag-handle]:active {
    cursor: grabbing;
}

#guru-manuscript-form-message {
    position: sticky;
    top: 78px;
    z-index: 30;
    margin-left: auto;
    max-width: 420px;
    border-radius: 14px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
    animation: manuscript-toast-in 0.18s ease-out;
}

#guru-manuscript-form-message.is-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #6ee7b7;
    color: #065f46;
}

#guru-manuscript-form-message.is-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fca5a5;
    color: #991b1b;
}

#guru-manuscript-form-message.is-warning {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fdba74;
    color: #9a3412;
}

#guru-manuscript-form-message.is-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    color: #1d4ed8;
}

@keyframes manuscript-toast-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 720px) {
    #guru-manuscript-form-message {
        top: 66px;
        max-width: 100%;
    }
}

.manuscript-submit-row {
    position: relative;
    z-index: 8;
    clear: both;
}

.manuscript-submit-row .btn {
    width: 100%;
}

.doubt-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.doubt-pill {
    border-radius: 999px;
    background: #f7c500;
    color: #fff;
    padding: 6px 14px;
    min-height: 32px;
    font-size: 13px;
}

.doubt-pill input {
    margin: 0;
}

.btn-nav-round {
    border-radius: 999px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-size: 13px;
}

.nav-icon-circle {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #1e40af;
    font-weight: 900;
    line-height: 1;
    font-size: 12px;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
}

.result-table th,
.result-table td {
    border-bottom: 1px solid var(--border);
    text-align: left;
    padding: 8px;
    vertical-align: top;
}

.result-scoreonly {
    margin-top: 16px;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 40px rgba(30, 64, 175, 0.12);
}

.result-scoreonly-head {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #fff;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.result-scoreonly-head h3 {
    margin: 0;
}

.result-scoreonly-head p {
    margin: 4px 0 0;
    color: #dbeafe;
    font-size: 13px;
}

.result-scoreonly-head-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 10px 11px;
    min-width: 40px;
    text-align: center;
}

.result-scoreonly-body {
    padding: 16px;
}

.result-scoreonly .bs-table th {
    width: 34%;
}

.result-scoreonly-score {
    margin-top: 16px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #eff6ff;
    text-align: center;
    padding: 18px 12px 16px;
}

.result-scoreonly-score span {
    display: block;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 11px;
    font-weight: 800;
}

.result-scoreonly-score strong {
    display: block;
    margin-top: 4px;
    color: #1e3a8a;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
}

.result-scoreonly-score-bar {
    margin: 12px auto 0;
    width: 92px;
    height: 10px;
    border-radius: 999px;
    background: #22c55e;
}

.result-scoreonly-actions {
    border-top: 1px solid var(--border);
    background: #f8fafc;
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@media (max-width: 720px) {
    .result-scoreonly-head {
        padding: 14px 14px;
    }

    .result-scoreonly-body {
        padding: 12px;
    }

    .result-scoreonly-actions {
        justify-content: stretch;
        flex-direction: column;
    }

    .result-scoreonly-actions .btn {
        width: 100%;
    }
}

.result-item-stimulus,
.result-item-stem,
.result-item-explanation {
    margin-bottom: 8px;
}

.result-item-options {
    margin: 6px 0 8px 18px;
    padding: 0;
}

.result-item-options li {
    margin-bottom: 4px;
}

.event-note {
    min-height: 18px;
}

.review-list {
    display: grid;
    gap: 8px;
}

.review-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}

.bs-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.bs-table th,
.bs-table td {
    border: 1px solid var(--border);
    padding: 7px 9px;
    vertical-align: top;
}

.bs-table th {
    background: #f2f6ff;
    text-align: left;
    white-space: nowrap;
}

.token-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.token-actions .btn-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

body[data-page="attempt_content"] .bs-table tbody tr {
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}

body[data-page="attempt_content"] .bs-table tbody tr:hover,
body[data-page="attempt_content"] .bs-table tbody tr:focus-within {
    background: #eaf4ff;
}

.exam-pick-table th.cell-weight,
.exam-pick-table td.cell-weight {
    width: 40px;
}

.exam-pick-table th.cell-actions,
.exam-pick-table td.cell-actions {
    width: auto;
}

.exam-pick-table td.cell-weight .input-inline {
    max-width: 40px;
}

.exam-pick-table {
    table-layout: auto;
}

.exam-pick-table th:nth-child(1),
.exam-pick-table td:nth-child(1),
.exam-pick-table th:nth-child(2),
.exam-pick-table td:nth-child(2),
.exam-pick-table th:nth-child(4),
.exam-pick-table td:nth-child(4),
.exam-pick-table th:nth-child(5),
.exam-pick-table td:nth-child(5),
.exam-pick-table th:nth-child(6),
.exam-pick-table td:nth-child(6) {
    white-space: nowrap;
    width: 1%;
}

.exam-pick-table td.cell-weight .input-inline {
    width: 100%;
    min-width: 48px;
}

#admin-master-panel .bs-table tbody tr:nth-child(even) {
    background: #fbfdff;
}

#admin-master-panel .bs-table td {
    line-height: 1.35;
}

#admin-master-panel .icon-only-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.bs-choice {
    width: 84px;
    text-align: center;
}

#guru-results-matrix-table th,
#proktor-results-matrix-table th {
    text-align: center;
    font-weight: 700;
}

#guru-results-matrix-table td,
#proktor-results-matrix-table td {
    text-align: center;
}

#guru-results-matrix-table td:first-child,
#proktor-results-matrix-table td:first-child {
    text-align: left;
}

#guru-results-matrix-table td.result-cell-correct,
#proktor-results-matrix-table td.result-cell-correct {
    background: #dff4e4;
    color: #1f5f2f;
    font-weight: 600;
}

#guru-results-matrix-table td.result-cell-wrong,
#proktor-results-matrix-table td.result-cell-wrong {
    background: #ffe3ea;
    color: #a12a4a;
    font-weight: 600;
}

#guru-results-panel .table-wrap,
#proktor-results-panel .table-wrap {
    max-height: 62vh;
    overflow-x: scroll;
    overflow-y: auto;
    padding-right: 20pt;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 10px;
    scrollbar-gutter: stable both-edges;
}

#guru-results-matrix-table,
#proktor-results-matrix-table {
    width: max-content;
    min-width: max(1400px, 100%);
}

#guru-results-matrix-table th,
#proktor-results-matrix-table th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.guru-results-chart-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
}

.guru-results-chart-svg {
    width: 100%;
    min-width: 700px;
    height: 360px;
    display: block;
}

.analysis-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.analysis-filter {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.analysis-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.analysis-identity {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: #ffffff;
}

.analysis-identity-title {
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.analysis-identity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px 24px;
}

.analysis-identity-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    margin: 0;
}

.analysis-identity-table td {
    padding: 4px 0;
    vertical-align: top;
}

.analysis-identity-table td:first-child {
    width: 180px;
    color: #52627b;
    font-weight: 600;
}

.analysis-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.analysis-stat-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    background: #f8fbff;
}

.analysis-stat-card.accepted {
    background: #ecfdf3;
    border-color: #cceedd;
}

.analysis-stat-card.revision {
    background: #fff7e5;
    border-color: #f8e0b0;
}

.analysis-stat-card.discarded {
    background: #fff1f2;
    border-color: #f5c2cd;
}

.analysis-stat-title {
    font-size: 0.85rem;
    color: #52627b;
}

.analysis-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 4px;
    color: #1f2a44;
}

.analysis-table-wrap {
    max-height: 48vh;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.analysis-table th,
.analysis-table td {
    vertical-align: top;
}

.analysis-table td.analysis-question {
    text-align: left;
    min-width: 240px;
}

.analysis-filter-row th {
    background: #f8fbff;
    padding: 6px;
}

.analysis-filter-row input,
.analysis-filter-row select {
    width: 100%;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font: inherit;
}

.analysis-row-active {
    background: #eef4ff;
}

.analysis-row-valid {
    background: #effcf3;
}

.analysis-row-invalid {
    background: #fff8db;
}

.analysis-row-valid.analysis-row-active,
.analysis-row-invalid.analysis-row-active {
    background: #dbeafe;
}

.analysis-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.analysis-status-accepted {
    background: #dcfce7;
    color: #166534;
}

.analysis-status-revision {
    background: #fef3c7;
    color: #92400e;
}

.analysis-status-discarded {
    background: #fee2e2;
    color: #991b1b;
}

.analysis-detail-header h4 {
    margin: 0 0 6px;
}

.analysis-detail-text {
    color: #374151;
}

.analysis-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    margin: 10px 0 16px;
    color: #38475f;
}

.analysis-distractors {
    display: grid;
    gap: 10px;
}

.analysis-distractor {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    background: #f9fbff;
}

.analysis-distractor-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    font-weight: 600;
}

.analysis-distractor-correct {
    background: #dcfce7;
    color: #166534;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
}

.analysis-distractor-bar {
    width: 100%;
    height: 8px;
    background: #e5edf8;
    border-radius: 999px;
    margin-top: 8px;
    overflow: hidden;
}

.analysis-distractor-bar span {
    display: block;
    height: 100%;
    background: #3f53db;
}

.proktor-cards-pages {
    display: grid;
    gap: 18px;
}

.proktor-cards-page {
    width: 210mm;
    min-height: 297mm;
    max-width: 100%;
    margin: 0 auto;
    padding: 10mm 7mm;
    background: #fff;
    border: 1px solid #d8e1f0;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(5, 54mm);
    gap: 4mm;
    box-sizing: border-box;
}

.proktor-card {
    width: 86mm;
    height: 54mm;
    border: 1px solid #111827;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.proktor-card-head {
    background: #1a5f7a;
    color: #fff;
    padding: 6px;
    text-align: center;
}

.proktor-card-head h4 {
    margin: 0;
    font-size: 10pt;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.proktor-card-head p {
    margin: 2px 0 0;
    font-size: 7pt;
    opacity: 0.92;
}

.proktor-card-head-class {
    display: inline-block;
    margin-top: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 7pt;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.proktor-card-body {
    padding: 8px;
    display: flex;
    gap: 10px;
    flex: 1 1 auto;
}

.proktor-card-photo {
    width: 18mm;
    height: 24mm;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 6pt;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.proktor-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.proktor-card-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8pt;
}

.proktor-card-table td {
    padding: 1px 0;
    vertical-align: top;
}

.proktor-card-table td:first-child {
    width: 56px;
    color: #64748b;
    font-size: 7pt;
}

.proktor-card-table td:last-child {
    font-weight: 700;
    color: #0f172a;
    word-break: break-word;
}

.proktor-card-photo-actions {
    display: flex;
    gap: 4px;
    padding: 0 8px 4px;
    align-items: center;
}

.proktor-card-photo-btn {
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 10px;
}

.proktor-card-foot {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 4px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 6.5pt;
    color: #64748b;
}

.proktor-card-badge {
    background: #22a06b;
    color: #fff;
    border-radius: 999px;
    padding: 1px 6px;
    text-transform: uppercase;
    font-size: 6pt;
}

.proktor-card.is-empty {
    border-style: dashed;
    opacity: 0.35;
}

.proktor-card-empty {
    display: grid;
    place-items: center;
    height: 100%;
    color: #64748b;
    font-size: 10pt;
}

.attendance-pages {
    display: grid;
    gap: 18px;
}

.attendance-sheet-page {
    width: 210mm;
    min-height: 297mm;
    max-width: 100%;
    margin: 0 auto;
    padding: 10mm 12mm;
    background: #fff;
    border: 1px solid #d8e1f0;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    box-sizing: border-box;
    color: #0f172a;
    position: relative;
}

.attendance-title {
    text-align: center;
    margin-bottom: 10px;
}

.attendance-title h2 {
    margin: 0;
    font-size: 19px;
    letter-spacing: 0.02em;
    font-weight: 800;
}

.attendance-title h3 {
    margin: 2px 0 0;
    font-size: 18px;
    letter-spacing: 0.02em;
    font-weight: 800;
}

.attendance-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    font-size: 13px;
}

.attendance-info-table td {
    padding: 1px 0;
    vertical-align: top;
    font-size: 12px;
    line-height: 1.2;
}

.attendance-info-table td:nth-child(1),
.attendance-info-table td:nth-child(4) {
    width: 110px;
}

.attendance-info-table td:nth-child(2),
.attendance-info-table td:nth-child(5) {
    width: 10px;
    text-align: center;
}

.attendance-list-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #111827;
    font-size: 12px;
}

.attendance-list-table th,
.attendance-list-table td {
    border: 1px solid #111827;
    padding: 3px 6px;
}

.attendance-list-table th {
    text-align: center;
    font-weight: 700;
}

.attendance-list-table td {
    height: 20px;
}

.attendance-list-table .col-no {
    width: 40px;
    text-align: center;
}

.attendance-list-table .col-name {
    width: 40%;
}

.attendance-list-table .col-participant {
    width: 20%;
    text-align: center;
}

.attendance-list-table .col-sign {
    width: 24%;
    vertical-align: top;
}

.attendance-list-table .col-note {
    width: 16%;
}

.attendance-signatures {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 12px;
}

.attendance-signatures td {
    text-align: center;
    padding: 2px 6px;
}

.attendance-signatures .sign-space {
    height: 56px;
}

.attendance-footnote {
    margin: 12px 0 0;
    font-size: 9px;
    font-style: italic;
    color: #94a3b8;
    position: absolute;
    left: 12mm;
    bottom: 8mm;
}

.attendance-page-no {
    position: absolute;
    right: 12mm;
    bottom: 8mm;
    font-size: 11px;
    color: #475569;
}

.attendance-dotted {
    display: inline-block;
    min-width: 88%;
    border-bottom: 1px dotted #111827;
    line-height: 1.1;
}

.attendance-sheet-page-compact .attendance-title {
    margin-bottom: 6px;
}

.attendance-sheet-page-compact .attendance-title h2 {
    font-size: 17px;
}

.attendance-sheet-page-compact .attendance-title h3 {
    font-size: 16px;
}

.attendance-sheet-page-compact .attendance-info-table {
    margin-bottom: 6px;
}

.attendance-sheet-page-compact .attendance-info-table td {
    font-size: 11px;
    padding: 0;
}

.attendance-sheet-page-compact .attendance-list-table {
    font-size: 11px;
}

.attendance-sheet-page-compact .attendance-list-table th,
.attendance-sheet-page-compact .attendance-list-table td {
    padding: 2px 4px;
}

.attendance-sheet-page-compact .attendance-list-table td {
    height: 15px;
}

.attendance-sheet-page-compact .attendance-signatures {
    margin-top: 8px;
    font-size: 11px;
}

.attendance-sheet-page-compact .attendance-signatures .sign-space {
    height: 38px;
}

.admin-dialog {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    width: min(480px, 92vw);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
}

.admin-dialog.admin-dialog-wide {
    width: min(1960px, 98vw);
}

.exam-config-dialog {
    border-color: #dbe5f6;
    background: #ffffff;
}

.exam-config-form {
    padding: 0;
}

.exam-config-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #e6edf8;
    gap: 12px;
}

.exam-config-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.exam-config-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1d4ed8;
}

.exam-config-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #eef2ff;
    color: #3b5bfd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.exam-config-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.exam-config-link {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9aa7c2;
    font-weight: 600;
}

.exam-config-body {
    padding: 18px 22px 20px;
    display: grid;
    gap: 18px;
}

.exam-config-grid {
    display: grid;
    gap: 14px;
}

.exam-config-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.exam-config-form label {
    font-size: 13px;
    font-weight: 600;
    color: #1f2a44;
    display: grid;
    gap: 8px;
}

.exam-config-form input,
.exam-config-form select {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #c7d2ea;
    padding: 10px 12px;
    font-size: 13px;
}

.exam-config-hint {
    font-size: 11px;
    font-weight: 500;
    color: #8a97b6;
    margin-left: 6px;
}

.exam-config-label-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.exam-config-section {
    display: grid;
    gap: 12px;
}

.exam-config-section-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #7c8db5;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.exam-config-section-icon {
    width: 18px;
    height: 18px;
    color: #7c8db5;
}

.exam-config-section-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.exam-config-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #375dfb;
    font-size: 11px;
    font-weight: 600;
    margin-left: 0;
    width: fit-content;
}

.exam-config-checks {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #e7effa;
    background: #f8fbff;
}

.exam-config-checks .inline-checkbox-label {
    font-weight: 600;
    color: #1f2a44;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.exam-config-checks .inline-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #3b5bfd;
}

.exam-config-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid #eef2f8;
}

.exam-config-footer .btn {
    min-width: 140px;
}

@media (max-width: 980px) {
    .exam-config-grid-2 {
        grid-template-columns: 1fr;
    }

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

    .exam-config-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

.preview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}

@media (max-width: 980px) {
    .preview-grid {
        grid-template-columns: 1fr;
    }
}

.admin-dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
}

.admin-dialog form {
    padding: 18px;
}

#exam-instruction-dialog {
    width: min(900px, 96vw);
    border: 0;
    background: transparent;
    box-shadow: none;
}

#exam-instruction-dialog form {
    padding: 0;
}

#exam-instruction-dialog .exam-instruction-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 24px 30px -12px rgba(15, 23, 42, 0.2),
        0 10px 16px -10px rgba(15, 23, 42, 0.2);
}

#exam-instruction-dialog .exam-instruction-header {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    text-align: center;
    padding: 20px 18px;
}

#exam-instruction-dialog .exam-instruction-header h3 {
    margin: 0;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#exam-instruction-dialog .exam-instruction-brand {
    margin-top: 8px;
    font-size: 1.15rem;
    font-weight: 800;
}

#exam-instruction-dialog .exam-instruction-header p {
    margin: 4px 0 0;
    color: #dbeafe;
    font-size: 0.86rem;
}

#exam-instruction-dialog .exam-instruction-body {
    padding: 18px;
    display: grid;
    gap: 12px;
}

#exam-instruction-dialog .exam-instruction-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    border-radius: 12px;
    border-left: 4px solid;
    padding: 10px 12px;
}

#exam-instruction-dialog .exam-instruction-item h4 {
    margin: 0 0 2px;
    font-size: 0.98rem;
}

#exam-instruction-dialog .exam-instruction-item p {
    margin: 0;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.45;
}

#exam-instruction-dialog .exam-instruction-no {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
}

#exam-instruction-dialog .exam-instruction-item.is-blue {
    background: #eff6ff;
    border-left-color: #3b82f6;
}

#exam-instruction-dialog .exam-instruction-item.is-blue .exam-instruction-no {
    background: #3b82f6;
}

#exam-instruction-dialog .exam-instruction-item.is-green {
    background: #ecfdf5;
    border-left-color: #22c55e;
}

#exam-instruction-dialog .exam-instruction-item.is-green .exam-instruction-no {
    background: #22c55e;
}

#exam-instruction-dialog .exam-instruction-item.is-purple {
    background: #f5f3ff;
    border-left-color: #8b5cf6;
}

#exam-instruction-dialog .exam-instruction-item.is-purple .exam-instruction-no {
    background: #8b5cf6;
}

#exam-instruction-dialog .exam-instruction-item.is-orange {
    background: #fff7ed;
    border-left-color: #f97316;
}

#exam-instruction-dialog .exam-instruction-item.is-orange .exam-instruction-no {
    background: #f97316;
}

#exam-instruction-dialog .exam-instruction-warning {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.86rem;
}

#exam-instruction-dialog .exam-instruction-warning svg {
    width: 20px;
    height: 20px;
    margin-top: 1px;
}

#exam-instruction-dialog .exam-instruction-confirm {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    font-size: 0.92rem;
}

#exam-instruction-dialog .exam-instruction-confirm input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

#exam-instruction-dialog .exam-instruction-footer {
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
    padding: 10px 12px;
}

@media (max-width: 680px) {
    #exam-instruction-dialog .exam-instruction-body {
        padding: 14px;
    }
    body[data-page="login_content"] .container {
        padding: 10px 10px 24px;
    }
    .login-modern-panel {
        padding: 6px 22px 28px;
    }
    .login-brand-head {
        padding: 30px 22px 12px;
    }
    .login-brand-head h2 {
        font-size: 26px;
    }
}

body[data-page="admin_content"] .container,
body[data-page="proktor_content"] .container,
body[data-page="guru_content"] .container {
    max-width: none;
    margin: 0;
    padding: 20px 22px 28px;
}

body[data-page="admin_content"] .container > .card,
body[data-page="proktor_content"] .container > .card,
body[data-page="guru_content"] .container > .card {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

body[data-page="attempt_content"] .container {
    max-width: none;
    margin: 0;
    padding: 20px 22px 28px;
}

body[data-page="attempt_content"] .container > .card {
    width: 100%;
    min-height: calc(100vh - 116px);
}

body[data-page="admin_content"] .admin-layout,
body[data-page="proktor_content"] .admin-layout,
body[data-page="guru_content"] .admin-layout,
body[data-page="peserta_content"] .admin-layout {
    grid-template-columns: minmax(230px, 250px) minmax(0, 1fr);
    gap: 18px;
}

body[data-page="admin_content"] .admin-sidebar,
body[data-page="proktor_content"] .admin-sidebar,
body[data-page="guru_content"] .admin-sidebar,
body[data-page="peserta_content"] .admin-sidebar {
    position: sticky;
    top: 18px;
    align-self: start;
    max-height: calc(100vh - 36px);
    overflow: auto;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(31, 65, 122, 0.12);
    padding: 14px;
}

body[data-page="admin_content"] .admin-content > .panel,
body[data-page="proktor_content"] .admin-content > .panel,
body[data-page="guru_content"] .admin-content > .panel,
body[data-page="peserta_content"] .admin-content > .panel {
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(31, 65, 122, 0.08);
}

body[data-page="admin_content"] .admin-overview,
body[data-page="proktor_content"] .proktor-stats-grid,
body[data-page="guru_content"] .proktor-stats-grid {
    margin-bottom: 2px;
}

body[data-page="admin_content"] .admin-menu-btn,
body[data-page="proktor_content"] .admin-menu-btn,
body[data-page="guru_content"] .admin-menu-btn,
body[data-page="peserta_content"] .admin-menu-btn {
    width: 100%;
    justify-content: flex-start;
    border-radius: 12px;
}

body[data-page="admin_content"] .admin-menu-btn.active,
body[data-page="proktor_content"] .admin-menu-btn.active,
body[data-page="guru_content"] .admin-menu-btn.active,
body[data-page="peserta_content"] .admin-menu-btn.active {
    box-shadow: 0 6px 14px rgba(32, 86, 168, 0.24);
}

body[data-page="admin_content"] .admin-content > .dashboard-hero,
body[data-page="proktor_content"] .admin-content > .dashboard-hero,
body[data-page="guru_content"] .admin-content > .dashboard-hero,
body[data-page="peserta_content"] .admin-content > .dashboard-hero {
    border: 1px solid #756de6;
    background: linear-gradient(135deg, #3f43c4 0%, #6a48d8 52%, #8648d7 100%);
    color: #f7f7ff;
}

.dashboard-hero .muted {
    color: #d8dbff;
}

.dashboard-hero h2,
.dashboard-hero h3,
.dashboard-hero .stat-label,
.dashboard-hero .stat-value {
    color: #f7f7ff;
}

.dashboard-hero-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-hero-head h2 {
    margin: 0;
}

.dashboard-quick-actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-quick-btn {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.38);
    color: #ffffff;
}

.dashboard-quick-btn:hover {
    background: rgba(255, 255, 255, 0.27);
}

.dashboard-hero-message {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.42);
    color: #ffffff;
}

.dashboard-monitor {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(255, 255, 255, 0.9);
    color: #0f172a;
}

.dashboard-monitor h3,
.dashboard-monitor .muted,
.dashboard-monitor .bs-table th,
.dashboard-monitor .bs-table td {
    color: inherit;
}

.dashboard-monitor-actions {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-monitor-filter {
    display: grid;
    gap: 4px;
    min-width: 220px;
    color: #0f172a;
}

.dashboard-monitor-filter span {
    font-size: 12px;
    font-weight: 700;
}

.dashboard-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: lowercase;
}

.dashboard-status-badge.status-in-progress {
    background: #dcfce7;
    color: #166534;
}

.dashboard-status-badge.status-idle {
    background: #fef3c7;
    color: #92400e;
}

.dashboard-status-badge.status-no-event {
    background: #e2e8f0;
    color: #475569;
}

.dashboard-monitor-row-idle {
    background: rgba(254, 243, 199, 0.55);
}

body[data-page="admin_content"] .dashboard-hero .admin-stat-card,
body[data-page="proktor_content"] .dashboard-hero .admin-stat-card,
body[data-page="guru_content"] .dashboard-hero .admin-stat-card,
body[data-page="peserta_content"] .dashboard-hero .admin-stat-card {
    position: relative;
    overflow: hidden;
    border-width: 0;
    border-color: transparent;
    box-shadow: 0 14px 24px rgba(28, 17, 92, 0.22);
    isolation: isolate;
}

body[data-page="admin_content"] .dashboard-hero .admin-stat-card .stat-label,
body[data-page="admin_content"] .dashboard-hero .admin-stat-card .stat-value,
body[data-page="proktor_content"] .dashboard-hero .admin-stat-card .stat-label,
body[data-page="proktor_content"] .dashboard-hero .admin-stat-card .stat-value,
body[data-page="guru_content"] .dashboard-hero .admin-stat-card .stat-label,
body[data-page="guru_content"] .dashboard-hero .admin-stat-card .stat-value,
body[data-page="peserta_content"] .dashboard-hero .admin-stat-card .stat-label,
body[data-page="peserta_content"] .dashboard-hero .admin-stat-card .stat-value {
    position: relative;
    z-index: 1;
}

body[data-page="admin_content"] .dashboard-hero .admin-stat-card::before,
body[data-page="proktor_content"] .dashboard-hero .admin-stat-card::before,
body[data-page="guru_content"] .dashboard-hero .admin-stat-card::before {
    content: "";
    position: absolute;
    inset: auto -18px -24px auto;
    width: 108px;
    height: 108px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.14);
    transform: rotate(12deg);
    z-index: 0;
}

body[data-page="admin_content"] .dashboard-hero .admin-stat-card::after,
body[data-page="proktor_content"] .dashboard-hero .admin-stat-card::after,
body[data-page="guru_content"] .dashboard-hero .admin-stat-card::after {
    content: "";
    position: absolute;
    top: 14px;
    right: 18px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow:
        -28px 12px 0 rgba(255, 255, 255, 0.1),
        -10px 34px 0 rgba(255, 255, 255, 0.08);
    z-index: 0;
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon]::after {
    content: "◼";
    top: 12px;
    right: 16px;
    width: auto;
    height: auto;
    background: none;
    box-shadow: none;
    border-radius: 0;
    font-size: 44px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.14);
    text-shadow:
        -30px 16px 0 rgba(255, 255, 255, 0.07),
        -12px 38px 0 rgba(255, 255, 255, 0.05);
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="shield"]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="shield"]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="shield"]::after {
    content: "⬢";
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="monitor"]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="monitor"]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="monitor"]::after {
    content: "▣";
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="user"]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="user"]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="user"]::after {
    content: "◉";
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="users"]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="users"]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="users"]::after {
    content: "◎";
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="pulse"]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="pulse"]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="pulse"]::after {
    content: "≈";
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="school"]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="school"]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="school"]::after {
    content: "▦";
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="book"]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="book"]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="book"]::after {
    content: "▤";
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="layers"]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="layers"]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="layers"]::after {
    content: "◫";
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="target"]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="target"]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="target"]::after {
    content: "◌";
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="file"]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="file"]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="file"]::after {
    content: "▥";
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="clipboard"]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="clipboard"]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="clipboard"]::after {
    content: "☰";
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="timer"]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="timer"]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="timer"]::after {
    content: "◔";
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="check"]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="check"]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="check"]::after {
    content: "✓";
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="chart"]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="chart"]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="chart"]::after {
    content: "▧";
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="alert"]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="alert"]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="alert"]::after {
    content: "!";
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="school"]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="school"]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="school"]::after,
body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="timer"]::after,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="timer"]::after,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card[data-stat-icon="timer"]::after {
    color: rgba(74, 37, 0, 0.16);
    text-shadow:
        -30px 16px 0 rgba(74, 37, 0, 0.08),
        -12px 38px 0 rgba(74, 37, 0, 0.05);
}

body[data-page="admin_content"] .dashboard-hero .admin-stat-card.stat-admin,
body[data-page="proktor_content"] .dashboard-hero .admin-stat-card.stat-admin,
body[data-page="guru_content"] .dashboard-hero .admin-stat-card.stat-admin {
    background: linear-gradient(135deg, #3758ff 0%, #6236ff 58%, #7b2fff 100%);
}

body[data-page="admin_content"] .dashboard-hero .admin-stat-card.stat-proktor,
body[data-page="proktor_content"] .dashboard-hero .admin-stat-card.stat-proktor,
body[data-page="guru_content"] .dashboard-hero .admin-stat-card.stat-proktor {
    background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 52%, #2563eb 100%);
}

body[data-page="admin_content"] .dashboard-hero .admin-stat-card.stat-guru,
body[data-page="proktor_content"] .dashboard-hero .admin-stat-card.stat-guru,
body[data-page="guru_content"] .dashboard-hero .admin-stat-card.stat-guru {
    background: linear-gradient(135deg, #10b981 0%, #22c55e 50%, #14b8a6 100%);
}

body[data-page="admin_content"] .dashboard-hero .admin-stat-card.stat-siswa,
body[data-page="proktor_content"] .dashboard-hero .admin-stat-card.stat-siswa,
body[data-page="guru_content"] .dashboard-hero .admin-stat-card.stat-siswa {
    background: linear-gradient(135deg, #ec4899 0%, #ff2d7a 52%, #c026d3 100%);
}

body[data-page="admin_content"] .dashboard-hero .admin-stat-card.stat-sekolah,
body[data-page="proktor_content"] .dashboard-hero .admin-stat-card.stat-sekolah,
body[data-page="guru_content"] .dashboard-hero .admin-stat-card.stat-sekolah {
    background: linear-gradient(135deg, #f59e0b 0%, #facc15 55%, #f97316 100%);
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-violet,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-violet,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-violet {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 58%, #8b5cf6 100%);
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-indigo,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-indigo,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-indigo {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #38bdf8 100%);
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-cyan,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-cyan,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-cyan {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 55%, #22d3ee 100%);
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-emerald,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-emerald,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-emerald {
    background: linear-gradient(135deg, #059669 0%, #10b981 55%, #34d399 100%);
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-emerald-dark,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-emerald-dark,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-emerald-dark {
    background: linear-gradient(135deg, #047857 0%, #059669 55%, #14b8a6 100%);
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-fuchsia,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-fuchsia,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-fuchsia {
    background: linear-gradient(135deg, #db2777 0%, #ec4899 55%, #f472b6 100%);
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-rose,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-rose,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-rose {
    background: linear-gradient(135deg, #e11d48 0%, #f43f5e 52%, #fb7185 100%);
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-amber,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-amber,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #facc15 55%, #fb923c 100%);
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-admin
    .stat-label,
body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-admin
    .stat-value,
body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-proktor
    .stat-label,
body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-proktor
    .stat-value,
body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-guru
    .stat-label,
body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-guru
    .stat-value,
body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-siswa
    .stat-label,
body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-siswa
    .stat-value,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-admin
    .stat-label,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-admin
    .stat-value,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-proktor
    .stat-label,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-proktor
    .stat-value,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-guru
    .stat-label,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-guru
    .stat-value,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-siswa
    .stat-label,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-siswa
    .stat-value,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-admin
    .stat-label,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-admin
    .stat-value,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-proktor
    .stat-label,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-proktor
    .stat-value,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-guru
    .stat-label,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-guru
    .stat-value,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-siswa
    .stat-label,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-siswa
    .stat-value {
    color: #f8fbff;
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-sekolah
    .stat-label,
body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-sekolah
    .stat-value,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-sekolah
    .stat-label,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-sekolah
    .stat-value,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-sekolah
    .stat-label,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-sekolah
    .stat-value {
    color: #4a2500;
}

body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-amber
    .stat-label,
body[data-page="admin_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-amber
    .stat-value,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-amber
    .stat-label,
body[data-page="proktor_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-amber
    .stat-value,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-amber
    .stat-label,
body[data-page="guru_content"]
    .dashboard-hero
    .admin-stat-card.stat-variant-amber
    .stat-value {
    color: #4a2500;
}

body[data-page="peserta_content"] #peserta-sidebar-toggle {
    display: none;
}

body[data-page="peserta_content"] .portal-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1000;
}

body[data-page="peserta_content"] .portal-sidebar-backdrop[hidden] {
    display: none;
}

body[data-page="peserta_content"] #peserta-exams-panel .bs-table th:last-child,
body[data-page="peserta_content"] #peserta-exams-panel .bs-table td:last-child {
    width: 1%;
    white-space: nowrap;
}

body[data-page="peserta_content"]
    #peserta-exams-panel
    .bs-table
    td:last-child
    .btn-inline {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .actions {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }
    .action-prev,
    .action-doubt,
    .action-next,
    .action-submit {
        justify-self: stretch;
    }
    .attempt-tools {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .attempt-font-row {
        justify-content: flex-start;
        width: 100%;
        flex-wrap: wrap;
    }
    .attempt-subhead {
        display: block;
    }
    .attempt-font-tools {
        width: 100%;
        flex-wrap: wrap;
    }
    .attempt-question-progress {
        white-space: normal;
    }
    .attempt-info-grid {
        grid-template-columns: 1fr;
    }
    .attempt-layout {
        grid-template-columns: 1fr;
    }
    .question-list-panel {
        max-width: 100%;
        width: 100%;
        position: static;
    }
    .author-grid {
        grid-template-columns: 1fr;
    }
    .admin-grid {
        grid-template-columns: 1fr;
    }
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .admin-sidebar {
        position: static;
    }
    body[data-page="admin_content"] .container,
    body[data-page="proktor_content"] .container,
    body[data-page="guru_content"] .container,
    body[data-page="attempt_content"] .container,
    body[data-page="peserta_content"] .container {
        padding: 14px 12px 18px;
    }
    body[data-page="admin_content"] .admin-layout,
    body[data-page="proktor_content"] .admin-layout,
    body[data-page="guru_content"] .admin-layout,
    body[data-page="peserta_content"] .admin-layout {
        grid-template-columns: 1fr;
    }
    body[data-page="admin_content"] .admin-sidebar,
    body[data-page="proktor_content"] .admin-sidebar,
    body[data-page="guru_content"] .admin-sidebar,
    body[data-page="peserta_content"] .admin-sidebar {
        position: static;
        max-height: none;
    }
    body[data-page="attempt_content"] .container > .card {
        min-height: 0;
    }
    .dashboard-quick-actions {
        width: 100%;
        justify-content: flex-start;
    }

    body[data-page="peserta_content"] #peserta-sidebar-toggle {
        display: inline-flex;
    }

    body[data-page="peserta_content"] .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: min(84vw, 320px);
        z-index: 1001;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.28);
    }

    body[data-page="peserta_content"].sidebar-open .admin-sidebar {
        transform: translateX(0);
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }
    body[data-page="proktor_content"] {
        background: #fff !important;
        padding: 0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    body[data-page="proktor_content"] .topbar,
    body[data-page="proktor_content"] .landing-footer,
    body[data-page="proktor_content"] .admin-sidebar,
    body[data-page="proktor_content"] .page-hero,
    body[data-page="proktor_content"] #proktor-message,
    body[data-page="proktor_content"] #proktor-cards-form,
    body[data-page="proktor_content"] #proktor-cards-meta,
    body[data-page="proktor_content"] #proktor-attendance-form,
    body[data-page="proktor_content"] #proktor-attendance-meta,
    body[data-page="proktor_content"] .proktor-card-photo-actions,
    body[data-page="proktor_content"] .admin-section-head {
        display: none !important;
    }
    body[data-page="proktor_content"] .container,
    body[data-page="proktor_content"] .card,
    body[data-page="proktor_content"] .admin-layout,
    body[data-page="proktor_content"] .admin-content,
    body[data-page="proktor_content"] #proktor-cards-panel,
    body[data-page="proktor_content"] #proktor-attendance-panel {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
        border: 0 !important;
    }
    body[data-page="proktor_content"] .admin-content > section[hidden] {
        display: none !important;
    }
    body[data-page="proktor_content"] .proktor-cards-pages {
        gap: 0 !important;
    }
    body[data-page="proktor_content"] .proktor-cards-page {
        width: 210mm;
        height: 297mm;
        min-height: 0;
        margin: 0;
        padding: 6mm 7mm;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        grid-template-rows: repeat(5, 50mm);
        gap: 3mm;
        box-sizing: border-box;
        overflow: hidden;
        page-break-after: always;
    }
    body[data-page="proktor_content"] .proktor-cards-page:last-child {
        page-break-after: auto;
    }
    body[data-page="proktor_content"] .attendance-pages {
        gap: 0 !important;
    }
    body[data-page="proktor_content"] .attendance-sheet-page {
        width: 210mm;
        min-height: 297mm;
        margin: 0;
        padding: 8mm 10mm;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        page-break-after: always;
    }
    body[data-page="proktor_content"] .attendance-sheet-page:last-child {
        page-break-after: auto;
    }
    body[data-page="proktor_content"] .proktor-cards-page,
    body[data-page="proktor_content"] .attendance-sheet-page {
        background: #fff !important;
        border: 1px solid #d8e1f0 !important;
        box-shadow: none !important;
    }
    body[data-page="proktor_content"] .proktor-card {
        border: 1px solid #111827 !important;
        background: #fff !important;
        height: 50mm;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
    }
    body[data-page="proktor_content"] .proktor-card-head {
        background: #1a5f7a !important;
        color: #fff !important;
        padding: 4px 6px;
    }
    body[data-page="proktor_content"] .proktor-card-head-class {
        background: rgba(255, 255, 255, 0.16) !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
        color: #fff !important;
        margin-top: 2px;
        font-size: 6pt;
        padding: 1px 6px;
    }
    body[data-page="proktor_content"] .proktor-card-head h4 {
        font-size: 9pt;
    }
    body[data-page="proktor_content"] .proktor-card-head p {
        font-size: 6pt;
        margin-top: 1px;
    }
    body[data-page="proktor_content"] .proktor-card-body {
        padding: 5px 6px;
        gap: 6px;
        min-height: 0;
        overflow: hidden;
    }
    body[data-page="proktor_content"] .proktor-card-photo {
        background: #f8fafc !important;
        border-color: #cbd5e1 !important;
        width: 16mm;
        height: 20mm;
        font-size: 5.5pt;
    }
    body[data-page="proktor_content"] .proktor-card-table {
        font-size: 7pt;
    }
    body[data-page="proktor_content"] .proktor-card-table td {
        padding: 0;
    }
    body[data-page="proktor_content"] .proktor-card-table td:first-child {
        width: 46px;
        font-size: 6pt;
    }
    body[data-page="proktor_content"] .proktor-card-foot {
        background: #f8fafc !important;
        border-top: 1px solid #e2e8f0 !important;
        color: #64748b !important;
        padding: 3px 6px;
        font-size: 5.5pt;
        min-height: 16px;
    }
    body[data-page="proktor_content"] .proktor-card-badge {
        background: #22a06b !important;
        color: #fff !important;
        font-size: 5.5pt;
        padding: 1px 5px;
        white-space: nowrap;
    }
    body[data-page="proktor_content"] .attendance-list-table,
    body[data-page="proktor_content"] .attendance-list-table th,
    body[data-page="proktor_content"] .attendance-list-table td {
        border: 1px solid #111827 !important;
    }
}
