:root {
    --brand-900: #0b2a5b;
    --brand-800: #103a78;
    --brand-700: #0f4c9c;
    --brand-600: #1461bf;
    --brand-500: #1f74d8;
    --brand-100: #e7f0fd;
    --brand-50: #f4f8ff;
    --ink-900: #12203a;
    --ink-600: #56617a;
    --ink-400: #8590a6;
    --line: #e3e9f2;
    --surface: #ffffff;
    --bg: #f4f7fc;
    --radius: 14px;
    --shadow-sm: 0 1px 2px rgba(16, 42, 84, .06), 0 1px 3px rgba(16, 42, 84, .04);
    --shadow-md: 0 10px 30px rgba(16, 42, 84, .08);
    --sidebar-width: 264px;
}

* { box-sizing: border-box; }

body.app-body {
    margin: 0;
    background: var(--bg);
    color: var(--ink-900);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: .9375rem;
}

/* Scrollbar — branded to match the app palette */
:root {
    --scrollbar-thumb: #c3d2e6;
    --scrollbar-thumb-hover: var(--brand-500);
    --scrollbar-track: #eef2f8;
    --scrollbar-size: 10px;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

::-webkit-scrollbar {
    width: var(--scrollbar-size);
    height: var(--scrollbar-size);
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 999px;
    border: 2px solid var(--scrollbar-track);
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
    background-clip: padding-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

.app-sidebar,
.app-sidebar * {
    scrollbar-color: rgba(120, 170, 240, .45) rgba(255, 255, 255, .06);
}

.app-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, .06);
    border-radius: 999px;
}

.app-sidebar::-webkit-scrollbar-thumb {
    background: rgba(120, 170, 240, .45);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.app-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(140, 185, 245, .7);
    background-clip: padding-box;
}

.app-sidebar::-webkit-scrollbar-corner {
    background: transparent;
}

a { color: var(--brand-600); }
a:hover { color: var(--brand-800); }

.app-shell { display: flex; min-height: 100vh; }

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    background: linear-gradient(180deg, var(--brand-900) 0%, var(--brand-800) 55%, #0d2f63 100%);
    color: #dce8fb;
    display: flex;
    flex-direction: column;
    padding: 20px 14px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1040;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 20px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b8bf0, #1f5fc4);
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    color: #fff;
    box-shadow: 0 6px 16px rgba(31, 95, 196, .45);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.05rem; letter-spacing: .08em; color: #fff; }
.brand-text small { font-size: .7rem; letter-spacing: .12em; color: #93b4e4; text-transform: uppercase; }

.sidebar-section-label {
    font-size: .66rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #7fa2d4;
    padding: 10px 12px 8px;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 3px; }

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #c8d9f2;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: .895rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.sidebar-nav .nav-link i { font-size: 1.05rem; opacity: .9; width: 20px; text-align: center; flex: 0 0 20px; }
.sidebar-nav .nav-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar-nav .nav-link.active { background: #fff; color: var(--brand-800); font-weight: 600; box-shadow: var(--shadow-sm); }
.sidebar-nav .nav-link.active i { color: var(--brand-600); opacity: 1; }

.sidebar-nav .nav-link:focus-visible,
.nav-group-title:focus-visible,
.nav-group-toggle:focus-visible {
    outline: 2px solid #7fb2ff;
    outline-offset: 2px;
}

/* Grouped menu with a clickable parent + collapsible submenu */
.nav-group { margin-top: 4px; }

.nav-group-row {
    display: flex;
    align-items: center;
    gap: 2px;
    border-radius: 10px;
    transition: background .15s ease;
}

.nav-group-row:hover { background: rgba(255, 255, 255, .08); }

.nav-group-title {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    font-size: .895rem;
    font-weight: 500;
    color: #c8d9f2;
    text-decoration: none;
    border-radius: 10px;
    transition: color .15s ease;
}

.nav-group-title:hover { color: #fff; }
.nav-group-title i { font-size: 1.05rem; width: 20px; text-align: center; flex: 0 0 20px; }
.nav-group-title.is-active { color: #fff; font-weight: 600; }
.nav-group-title.is-active i { color: #8fc0ff; }

.nav-group-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-group-toggle {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    margin-right: 6px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #9dbce6;
    font-size: .78rem;
    transition: background .15s ease, color .15s ease, transform .2s ease;
}

.nav-group-toggle:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.nav-group-toggle i { transition: transform .2s ease; }
.nav-group-toggle.is-open i { transform: rotate(180deg); }

.nav-submenu {
    display: none;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0 4px 13px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, .14);
}

.nav-submenu.is-open { display: flex; }

.nav-link-child {
    position: relative;
    padding-left: 12px !important;
    font-size: .855rem !important;
}

.nav-link-child::before {
    content: "";
    position: absolute;
    left: -13px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .28);
    transform: translateY(-50%);
    transition: background .15s ease, transform .15s ease;
}

.nav-link-child:hover::before { background: rgba(255, 255, 255, .6); }
.nav-link-child.active::before { background: var(--brand-500); transform: translateY(-50%) scale(1.25); }

.sidebar-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.sidebar-user .min-w-0 { min-width: 0; }

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(9, 24, 48, .5);
    z-index: 1035;
}

/* Main */
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.app-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 26px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 1.18rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.topbar-title p { margin: 1px 0 0; font-size: .8rem; color: var(--ink-400); }

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

.btn-icon {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-600);
    font-size: 1.05rem;
}
.btn-icon:hover { background: var(--brand-50); color: var(--brand-700); }

.notif-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: #dc3545;
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    display: grid;
    place-items: center;
    line-height: 1;
    box-shadow: 0 0 0 2px #fff;
}

.notif-dot.is-hidden { display: none; }
.notif-dot.is-pulse { animation: notif-pulse .55s ease-out; }

@keyframes notif-pulse {
    0% { transform: scale(1); }
    45% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

.notif-menu {
    width: 372px;
    max-width: calc(100vw - 24px);
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

.notif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--brand-50);
}

.notif-head strong { display: block; font-size: .88rem; color: var(--ink-900); }
.notif-head-count { display: block; font-size: .74rem; color: var(--ink-400); }
.notif-head-all { flex: 0 0 auto; }

.notif-list {
    max-height: 380px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.notif-item {
    display: flex;
    gap: 10px;
    white-space: normal;
    padding: 11px 14px;
    border-bottom: 1px solid #f0f3f8;
    text-decoration: none;
    color: var(--ink-900);
    transition: background .15s ease;
}

.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--brand-50); color: var(--ink-900); }
.notif-item.is-unread { background: #fbfdff; }
.notif-item.is-unread .notif-title { color: var(--brand-700); }

.notif-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #eef3fa;
    color: var(--ink-400);
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    font-size: .82rem;
}

.notif-icon.unread { background: var(--brand-100); color: var(--brand-600); }

.notif-body { display: block; min-width: 0; flex: 1 1 auto; }
.notif-title { display: block; font-size: .83rem; font-weight: 600; line-height: 1.35; }
.notif-message { display: block; font-size: .78rem; color: var(--ink-600); line-height: 1.45; margin-top: 1px; }
.notif-time { display: flex; align-items: center; gap: 6px; font-size: .72rem; color: var(--ink-400); margin-top: 4px; }

.notif-new {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 20px;
    background: var(--brand-100);
    color: var(--brand-700);
    font-size: .64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.notif-empty { padding: 30px 18px; text-align: center; }
.notif-empty-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--brand-50);
    color: var(--brand-500);
    display: inline-grid;
    place-items: center;
    font-size: 1.15rem;
    margin-bottom: 10px;
}
.notif-empty-title { font-size: .86rem; font-weight: 600; }
.notif-empty-text { font-size: .78rem; color: var(--ink-400); margin-top: 2px; }

.notif-foot { padding: 10px 14px; border-top: 1px solid var(--line); background: #fff; }

/* Notification list page */
.notif-page-item {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #edf1f7;
    text-decoration: none;
    color: var(--ink-900);
    transition: background .15s ease;
}

.notif-page-item:last-child { border-bottom: 0; }
.notif-page-item:hover { background: var(--brand-50); color: var(--ink-900); }
.notif-page-item.is-unread { background: #fbfdff; }
.notif-page-item.is-unread .notif-page-title { color: var(--brand-700); }
.notif-page-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #eef3fa;
    color: var(--ink-400);
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    font-size: .95rem;
}
.notif-page-icon.unread { background: var(--brand-100); color: var(--brand-600); }
.notif-page-title { font-size: .875rem; font-weight: 600; line-height: 1.4; }
.notif-page-message { font-size: .8rem; color: var(--ink-600); line-height: 1.5; }
.notif-page-meta { font-size: .74rem; color: var(--ink-400); }

.notif-filter {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.notif-filter .btn { border: 0; background: transparent; color: var(--ink-600); }
.notif-filter .btn:hover { background: var(--brand-50); color: var(--brand-700); }
.notif-filter .btn.active { background: var(--brand-600); color: #fff; }

.profile-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 5px 10px 5px 6px;
}
.profile-btn:hover { background: var(--brand-50); }

.avatar {
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #2f7fe0, #1755a8);
    color: #fff;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .02em;
    flex: 0 0 auto;
}
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 44px; height: 44px; font-size: 1rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.35rem; }

.app-content { padding: 24px 26px 34px; flex: 1; }
.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 26px;
    border-top: 1px solid var(--line);
    font-size: .76rem;
    color: var(--ink-400);
    background: #fff;
}

.app-alert { border: 0; border-radius: 12px; box-shadow: var(--shadow-sm); }

/* Cards */
.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
}
.card-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 15px 18px;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}
.card-header h2, .card-header h3, .card-header .card-title { font-size: .98rem; font-weight: 700; margin: 0; }
.card-body { padding: 18px; }

.stat-card { transition: transform .15s ease, box-shadow .15s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-label { font-size: .78rem; color: var(--ink-400); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font-size: 1.85rem; font-weight: 700; line-height: 1.15; margin-top: 4px; color: var(--ink-900); }
.stat-hint { font-size: .76rem; color: var(--ink-400); margin-top: 3px; }
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    flex: 0 0 44px;
}
.stat-progress { height: 6px; margin-top: 14px; border-radius: 4px; background: #eef2f8; }
.tone-primary { background: #e7f0fd; color: #1461bf; }
.tone-success { background: #e3f6ec; color: #17864b; }
.tone-warning { background: #fff4e0; color: #b06d00; }
.tone-info { background: #e4f5fa; color: #0b7c96; }
.tone-danger { background: #fdeaea; color: #c22f2f; }
.tone-secondary { background: #eef1f6; color: #5b657a; }

/* Section heads */
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { font-size: 1.18rem; font-weight: 700; margin: 0; }
.section-head p { margin: 3px 0 0; color: var(--ink-400); font-size: .84rem; }
.section-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Tables */
.table-app { margin: 0; font-size: .875rem; }
.table-app > :not(caption) > * > * { padding: 12px 14px; border-bottom-color: #edf1f7; vertical-align: middle; }
.table-app thead th {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-400);
    font-weight: 700;
    background: #fafcff;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table-app tbody tr:hover { background: #fafcff; }
.table-app tbody tr:last-child td { border-bottom: 0; }
.table-responsive { border-radius: 0 0 var(--radius) var(--radius); }

/* Badges & chips */
.badge { font-weight: 600; padding: .38em .62em; border-radius: 7px; font-size: .72rem; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    background: var(--brand-50);
    color: var(--brand-700);
    font-size: .74rem;
    font-weight: 600;
    border: 1px solid #dbe8fb;
}

/* Buttons */
.btn { border-radius: 10px; font-weight: 600; font-size: .86rem; padding: .5rem .9rem; }
.btn-sm { border-radius: 8px; font-size: .79rem; padding: .34rem .68rem; }
.btn-primary { background: var(--brand-600); border-color: var(--brand-600); }
.btn-primary:hover, .btn-primary:focus { background: var(--brand-700); border-color: var(--brand-700); }
.btn-outline-primary { color: var(--brand-600); border-color: #b9d3f4; }
.btn-outline-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-light { background: #fff; border-color: var(--line); color: var(--ink-600); }

/* Forms */
.form-label { font-size: .8rem; font-weight: 600; color: var(--ink-600); margin-bottom: .35rem; }
.form-control, .form-select {
    border-radius: 10px;
    border-color: #dbe3ef;
    font-size: .875rem;
    padding: .52rem .75rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 .2rem rgba(31, 116, 216, .14);
}
.form-text { font-size: .74rem; color: var(--ink-400); }
/* Tanda wajib digambar oleh CSS sehingga hanya satu bintang muncul.
   Pemakaian yang disarankan: <label class="form-label required">Teks</label>
   (tanpa menulis "*" manual). Pola <span class="required">*</span> tetap
   aman karena bintang manual disembunyikan oleh font-size: 0. */
.required::after { content: " *"; color: #dc3545; }
span.required { font-size: 0; }
span.required::after { font-size: .8rem; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.filter-bar .form-control, .filter-bar .form-select { min-width: 150px; }

/* Empty state */
.empty-state { text-align: center; padding: 46px 20px; }
.empty-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: var(--brand-50);
    color: var(--brand-500);
    display: inline-grid;
    place-items: center;
    font-size: 1.55rem;
    margin-bottom: 14px;
}
.empty-state h3 { font-size: 1rem; font-weight: 700; margin: 0 0 4px; }
.empty-state p { color: var(--ink-400); font-size: .85rem; margin: 0 auto 16px; max-width: 380px; }

/* Auth */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: #fff;
}
.auth-hero {
    background: radial-gradient(1200px 600px at 10% 0%, #1b5cb0 0%, transparent 60%), linear-gradient(160deg, #0b2a5b, #103a78 60%, #0d2f63);
    color: #e8f1ff;
    padding: 54px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.auth-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -140px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(63, 140, 240, .18);
}
.auth-hero h1 { font-size: 2.15rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; max-width: 480px; }
.auth-hero p { color: #a9c6ee; max-width: 440px; line-height: 1.65; }
.auth-feature { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; }
.auth-feature i { color: #6fb0ff; font-size: 1.1rem; margin-top: 2px; }
.auth-feature strong { display: block; font-size: .9rem; color: #fff; }
.auth-feature span { font-size: .8rem; color: #a9c6ee; }
.auth-panel { display: grid; place-items: center; padding: 40px 28px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
.auth-card .lead { font-size: .88rem; color: var(--ink-400); margin-bottom: 26px; }
.demo-box { background: var(--brand-50); border: 1px dashed #c7dcf7; border-radius: 12px; padding: 12px 14px; font-size: .78rem; color: var(--ink-600); }

/* Detail lists */
.detail-list { display: grid; gap: 0; }
.detail-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed #e8eef7; font-size: .855rem; }
.detail-row:last-child { border-bottom: 0; }
.detail-row dt { color: var(--ink-400); font-weight: 500; margin: 0; }
.detail-row dd { margin: 0; font-weight: 600; text-align: right; }

/* TSTS stages */
.stage-list { display: grid; gap: 12px; }
.stage-item { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.stage-num {
    width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--brand-50); color: var(--brand-600);
    font-weight: 700; font-size: .85rem; flex: 0 0 34px;
}
.stage-item.done .stage-num { background: #e3f6ec; color: #17864b; }
.stage-item.active { border-color: #b9d3f4; box-shadow: 0 0 0 3px rgba(31, 116, 216, .08); }
.stage-item.active .stage-num { background: var(--brand-600); color: #fff; }
.stage-item h4 { font-size: .9rem; font-weight: 700; margin: 0 0 2px; }
.stage-item p { font-size: .8rem; color: var(--ink-400); margin: 0; }

.role-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
    height: 100%;
}
.role-card.role-stay { border-left: 4px solid var(--brand-600); }
.role-card.role-stray { border-left: 4px solid #f0a020; }
.role-card h4 { font-size: .92rem; font-weight: 700; margin-bottom: 4px; }

.member-list { display: grid; gap: 8px; }
.member-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.member-item .min-w-0 { min-width: 0; }

.timer-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 20px;
    background: #fff4e0;
    color: #8a5600;
    font-weight: 700;
    font-size: .85rem;
}
.timer-pill.danger { background: #fdeaea; color: #b02121; }

.question-card { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: #fff; }
.question-card + .question-card { margin-top: 14px; }
.question-number { font-size: .74rem; font-weight: 700; color: var(--brand-600); text-transform: uppercase; letter-spacing: .06em; }
.question-text { font-size: .95rem; font-weight: 600; line-height: 1.55; margin: 6px 0 14px; }
.option-label {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    transition: all .12s ease;
    font-size: .885rem;
}
.option-label:hover { border-color: #b9d3f4; background: #fafcff; }
.option-label input { margin-top: 2px; }
.option-label.selected { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 2px rgba(31, 116, 216, .1); }

.progress { border-radius: 20px; }
.progress-thin { height: 6px; }

/* Tabel penilaian keaktifan.
   Kolom nilai dibuat seragam dan cukup lebar agar angka (termasuk
   nilai desimal) tidak terpotong oleh kolom yang terlalu sempit. */
.table-score { table-layout: fixed; width: 100%; min-width: 720px; }
.table-score > :not(caption) > * > * { padding: 10px 8px; }
.table-score thead th { white-space: normal; }
/* Header tetap terlihat saat tabel panjang digulir ke bawah. */
.table-score thead th { position: sticky; top: 0; z-index: 2; }
.table-score .score-col { width: 74px; }
.table-score .score-col-head { width: 74px; }
.table-score .student-col { width: 190px; }
.table-score .summary-col { width: 92px; }
.table-score .individual-col { width: 96px; }
.table-score .feedback-col { width: 190px; }
.table-score .score-input {
    width: 100%;
    min-width: 58px;
    padding: .38rem .25rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.table-score .score-input::-webkit-outer-spin-button,
.table-score .score-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.table-score .score-input[type="number"] { -moz-appearance: textfield; }
.table-score td { vertical-align: middle; }
.table-score .indicator-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 22px;
    padding: 0 6px;
    border-radius: 7px;
    background: var(--brand-50);
    color: var(--brand-700);
    font-size: .7rem;
    font-weight: 700;
}
.table-score .indicator-name {
    display: block;
    margin-top: 3px;
    font-size: .68rem;
    font-weight: 400;
    color: var(--ink-400);
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
    overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
    .table-score .student-col,
    .table-score .feedback-col { width: auto; }
    .table-score .score-col,
    .table-score .score-col-head { width: 66px; }
}

.min-w-0 { min-width: 0; }
.text-muted-sm { font-size: .78rem; color: var(--ink-400); }

/* Tabel rekap per siklus.
   Kolom siklus diberi lebar tetap agar tabel tetap rapi walaupun
   banyak siklus ditambahkan. */
.table-cycle { table-layout: fixed; width: 100%; min-width: 560px; }
.table-cycle > :not(caption) > * > * { padding: 10px 8px; }
.table-cycle .cycle-col { width: 210px; }
.table-cycle .cycle-score-head { width: 92px; }
.table-cycle .cycle-score-col { width: 92px; font-variant-numeric: tabular-nums; }

@media (max-width: 991.98px) {
    .table-cycle .cycle-col { width: auto; }
    .table-cycle .cycle-score-head,
    .table-cycle .cycle-score-col { width: 78px; }
}
.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2px solid #fff; margin-left: -7px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

.chart-wrap { position: relative; height: 260px; }
.chart-wrap-sm { position: relative; height: 220px; }

.timeline { display: grid; gap: 0; }
.timeline-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #e8eef7; }
.timeline-item:last-child { border-bottom: 0; }
.timeline-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; flex: 0 0 30px; font-size: .8rem; }

.tabs-app { border-bottom: 1px solid var(--line); gap: 4px; }
.tabs-app .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--ink-400); font-weight: 600; font-size: .85rem; padding: 10px 14px; border-radius: 0; }
.tabs-app .nav-link.active { color: var(--brand-700); border-bottom-color: var(--brand-600); background: transparent; }

.pagination { --bs-pagination-border-radius: 9px; }
.page-link { font-size: .82rem; color: var(--ink-600); border-color: var(--line); }
.page-item.active .page-link { background: var(--brand-600); border-color: var(--brand-600); }

/* Pagination */
.pager-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
}
.pager-app .pagination { gap: .25rem; }
.pager-app .page-link {
    min-width: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .34rem .6rem;
    border-radius: 9px;
    color: var(--ink-600);
    font-weight: 600;
    line-height: 1.2;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.pager-app .page-link:hover { background: var(--brand-50); border-color: #b9d3f4; color: var(--brand-700); }
.pager-app .page-item.active .page-link { background: var(--brand-600); border-color: var(--brand-600); color: #fff; box-shadow: 0 3px 8px rgba(20, 97, 191, .28); }
.pager-app .page-item.disabled .page-link { background: #f7f9fc; color: var(--ink-400); opacity: 1; }
.pager-app .page-item:first-child .page-link { border-top-left-radius: 9px; border-bottom-left-radius: 9px; }
.pager-app .page-item:last-child .page-link { border-top-right-radius: 9px; border-bottom-right-radius: 9px; }
.pager-app-summary { font-size: .76rem; color: var(--ink-400); }

@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: var(--shadow-md);
    }
    body.sidebar-open .app-sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-backdrop { display: block; }
    .app-content { padding: 18px 16px 28px; }
    .app-topbar { padding: 12px 16px; }
    .auth-page { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    .auth-panel { min-height: 100vh; }
}

@media (max-width: 575.98px) {
    .stat-value { font-size: 1.55rem; }
    .card-body { padding: 15px; }
    .app-footer { justify-content: center; text-align: center; }
    .section-head h2 { font-size: 1.05rem; }
}
