/* ============================================================
   SATRIA - Dashboard UI (identitas "academic ledger")
   ============================================================ */

:root {
    color-scheme: light;
    --primary: #B4471F;
    --primary-light: #D2825F;
    --primary-dark: #8F3814;
    --secondary: #4E6E8E;
    --success: #31574A;
    --warning: #C99A3F;
    --danger: #9E4244;
    --dark: #1B1A16;
    --ink-deep: #141310;
    --paper: #F5F0E4;
    --surface: #FBF7EC;
    --line: #E2D9C5;
    --line-strong: #C9BCA0;
    --text: #221F19;
    --muted: #8A8168;
    --brass: #C99A3F;
    --ink-soft: #6B6353;
    --ink-soft-dark: #57503F;
    --sidebar-width: 260px;
    --gradient-primary: linear-gradient(135deg, #B4471F 0%, #8F3814 100%);
    --gradient-secondary: linear-gradient(135deg, #C99A3F 0%, #B4471F 100%);
    --shadow-sm: 0 1px 2px rgba(27,26,22,.06), 0 1px 3px rgba(27,26,22,.08);
    --shadow-md: 0 14px 34px -14px rgba(27,26,22,.18);
    --shadow-lg: 0 34px 70px -22px rgba(20,19,16,.40);
    --font-display: 'Fraunces', Georgia, serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
    --font-body: 'Inter', system-ui, sans-serif;
    --radius: 10px;
    --radius-sm: 8px;
    --radius-xs: 6px;
}

/* ------------------------------------------------------------
   Jembatan palet Bootstrap: warna kontekstual default (biru
   #0d6efd, cyan, kuning terang) diganti tone ledger sehingga
   utilitas .text-*, .bg-*, .border-*, tautan, dan dropdown ikut
   selaras dengan tombol. Nilai dipilih tetap lolos kontras 4.5:1
   di atas kertas #F5F0E4.
   ------------------------------------------------------------ */
:root {
    --bs-body-bg: #F5F0E4;
    --bs-body-color: #221F19;
    --bs-emphasis-color: #1B1A16;
    --bs-secondary-bg: #EADFCC;
    --bs-tertiary-bg: #F0E9D9;
    --bs-border-color: #E2D9C5;
    --bs-border-color-translucent: rgba(201,188,160,.35);
    --bs-primary: #B4471F;
    --bs-primary-rgb: 180,71,31;
    --bs-secondary: #4E6E8E;
    --bs-secondary-rgb: 107,99,83;
    --bs-success: #31574A;
    --bs-success-rgb: 49,87,74;
    --bs-info: #4E6E8E;
    --bs-info-rgb: 78,110,142;
    --bs-warning: #C99A3F;
    --bs-warning-rgb: 201,154,63;
    --bs-danger: #9E4244;
    --bs-danger-rgb: 158,66,68;
    --bs-light: #F5F0E4;
    --bs-light-rgb: 245,240,228;
    --bs-dark: #1B1A16;
    --bs-dark-rgb: 27,26,22;
    --bs-link-color: #8F3814;
    --bs-link-color-rgb: 143,56,20;
    --bs-link-hover-color: #B4471F;
    --bs-link-hover-color-rgb: 180,71,31;
}

/* .text-warning/.text-info terlalu terang sebagai teks — dipertajam */
.text-warning { color: #7A5514 !important; }
.text-info { color: #3B5670 !important; }
.text-primary { color: #8F3814 !important; }
.text-muted { color: var(--muted) !important; }
.text-secondary { color: #5F5849 !important; }

/* Komponen yang ditulis Bootstrap sebagai nilai literal (bukan var) masih biru */
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary-dark); }
.form-check-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(180,71,31,.20); }
.list-group-item.active { background-color: var(--primary); border-color: var(--primary-dark); color: #FBF7EC; }
.nav-pills .nav-link.active { background-color: var(--primary); }

* { box-sizing: border-box; }

/* Redam rubber-banding pada perangkat pointer halus; biarkan bawaan untuk layar sentuh */
@media (pointer: fine) {
    html { overscroll-behavior-y: none; }
}

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

/* ---- AUTH PAGES (fallback; tampilan utama pakai layout auth) ---- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}
.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}
.auth-card .logo {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-card .logo h2 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--dark);
    font-size: 1.8rem;
    letter-spacing: -.02em;
}
.auth-card .logo p {
    font-family: var(--font-mono);
    color: var(--muted);
    font-size: .74rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-top: .25rem;
}

/* ---- SIDEBAR ---- */
.sidebar {
    position: fixed;
    left: 0; top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--ink-deep);
    color: #D8D0BF;
    z-index: 1000;
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
}
.sidebar.collapsed {
    transform: translateX(-100%);
}
.sidebar .brand {
    padding: 1.4rem 1.5rem;
    border-bottom: 1px solid rgba(226,217,197,.14);
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
}
.sidebar .brand .brand-icon {
    width: 40px; height: 40px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: #FBF7EC;
    flex-shrink: 0;
}
.sidebar .brand .brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #FBF7EC;
    padding: 3px;
    flex-shrink: 0;
}
.sidebar .brand h5 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.12rem;
    letter-spacing: .2px;
    color: #F2ECDD;
}
.sidebar .brand small {
    font-family: var(--font-mono);
    color: #8C8574;
    font-size: .66rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.sidebar .nav-section {
    padding: .75rem 0 1rem;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.sidebar .nav-section-title {
    font-family: var(--font-mono);
    padding: .5rem 1.5rem;
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: #7E7768;
    font-weight: 500;
}
.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .62rem 1.5rem;
    color: #C4BCAA;
    text-decoration: none;
    font-size: .875rem;
    border-radius: 0;
    border-left: 3px solid transparent;
    transition: background-color .2s, color .2s, border-color .2s;
}
.sidebar .nav-link:hover {
    background: rgba(226,217,197,.06);
    color: #F5F0E4;
    border-left-color: rgba(201,154,63,.55);
}
.sidebar .nav-link.active {
    background: var(--primary);
    border-left-color: var(--brass);
    color: #FBF7EC;
    font-weight: 600;
}
.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: .95rem;
}
.sidebar .user-info {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(226,217,197,.14);
    flex-shrink: 0;
    background: var(--dark);
}
.sidebar .user-info .avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(201,154,63,.5);
    background: rgba(180,71,31,.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    color: #E8C9A0;
}
.sidebar .user-info .avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(201,154,63,.5);
    object-fit: cover;
}
.sidebar .user-info-logout {
    background: none;
    border: none;
    padding: .25rem .35rem;
    color: #A79F8D;
    font-size: .95rem;
    cursor: pointer;
    transition: color .2s;
}
.sidebar .user-info-logout:hover { color: #F5F0E4; }

/* ---- MAIN CONTENT ---- */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin .3s ease;
}
.main-content.expanded {
    margin-left: 0;
}
.topbar {
    background: rgba(251,247,236,.88);
    backdrop-filter: blur(10px);
    padding: .95rem 2rem;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(27,26,22,.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 900;
}
.topbar-title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: -.2px; color: var(--dark); }
.topbar-date { font-family: var(--font-mono); font-size: .74rem; color: var(--muted); letter-spacing: .03em; }
.content-area { padding: 1.75rem 2rem; max-width: 1400px; }

/* ---- CARDS ---- */
.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
    overflow: hidden;
}
.card-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.35rem;
    font-weight: 700;
    color: var(--dark);
}
.card-header strong { color: var(--primary); }
.card-footer {
    background: rgba(226,217,197,.28);
    border-top: 1px solid var(--line);
    padding: .8rem 1.35rem;
}

/* ---- STAT CARDS ---- */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .25s, border-color .25s;
    position: relative;
    overflow: hidden;
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--line-strong);
}
.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--dark);
    line-height: 1;
}
.stat-card .stat-label {
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--muted);
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-top: .35rem;
}
.stat-card.bg-gradient-1 .stat-icon { background: rgba(180,71,31,.12); color: var(--primary); }
.stat-card.bg-gradient-2 .stat-icon { background: rgba(78,110,142,.14); color: var(--secondary); }
.stat-card.bg-gradient-3 .stat-icon { background: rgba(49,87,74,.14); color: var(--success); }
.stat-card.bg-gradient-4 .stat-icon { background: rgba(201,154,63,.18); color: #96701F; }

/* ---- ADMIN DASHBOARD (redesign) ---- */
.dash-welcome { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.dash-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--dark); margin: 0 0 .25rem; letter-spacing: -.3px; line-height: 1.2; }
.dash-sub { color: var(--muted); font-size: .9rem; margin: 0; }
.dash-date-badge { font-family: var(--font-mono); font-size: .74rem; color: var(--primary-dark); background: var(--surface); border: 1px solid var(--line-strong); padding: .4rem .8rem; border-radius: var(--radius-xs); font-weight: 500; letter-spacing: .03em; white-space: nowrap; }

.dash-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); display: grid; grid-template-columns: repeat(5, 1fr); overflow: hidden; margin-bottom: 1.4rem; }
.dash-sum-item { padding: 1.05rem 1.2rem; }
.dash-sum-item + .dash-sum-item { border-left: 1px solid var(--line); }
.dash-sum-top { display: flex; align-items: center; gap: .45rem; margin-bottom: .4rem; }
.dash-sum-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.dash-sum-lbl { font-family: var(--font-mono); font-size: .68rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.dash-sum-num { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--dark); line-height: 1; }
.dash-sum-word { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 500; letter-spacing: .02em; }
.dot-primary { background: var(--primary); } .dot-info { background: var(--secondary); } .dot-success { background: var(--success); } .dot-warn { background: var(--brass); } .dot-muted { background: var(--line-strong); }
@media (max-width: 991px) { .dash-summary { grid-template-columns: repeat(3, 1fr); } .dash-sum-item:nth-child(3n+1) { border-left: none; } .dash-sum-item:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 575px) { .dash-summary { grid-template-columns: repeat(2, 1fr); } .dash-sum-item:nth-child(3n+1) { border-left: 1px solid var(--line); } .dash-sum-item:nth-child(2n+1) { border-left: none; } }

.dash-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.dash-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.dash-panel-title { font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--dark); margin: 0; display: flex; align-items: center; gap: .55rem; }
.dash-panel-title::before { content: ''; width: 3px; height: 16px; border-radius: 2px; background: var(--primary); }
.dash-count-pill { font-family: var(--font-mono); font-size: .68rem; font-weight: 500; letter-spacing: .04em; color: #7A5514; background: rgba(201,154,63,.16); border: 1px solid rgba(201,154,63,.32); padding: .2rem .55rem; border-radius: var(--radius-xs); }

.dash-kat-summary { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; padding: .7rem 1.2rem; background: rgba(226,217,197,.30); border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.dash-kat-summary b { color: var(--dark); font-variant-numeric: tabular-nums; }
.dash-kat-summary i { color: var(--primary); width: 14px; }

.dash-panel-body { padding: .35rem 0; }
.dash-list-item { display: flex; align-items: center; gap: .85rem; padding: .7rem 1.2rem; }
.dash-list-item:hover { background: rgba(226,217,197,.30); }
.dash-avatar { width: 38px; height: 38px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 500; font-size: .82rem; background: rgba(180,71,31,.10); border: 1px solid rgba(180,71,31,.20); color: var(--primary-dark); flex-shrink: 0; }
.dash-li-main { flex: 1; min-width: 0; }
.dash-li-name { font-weight: 600; font-size: .9rem; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-li-meta { font-size: .75rem; color: var(--muted); }
.dash-chip { font-family: var(--font-mono); font-size: .66rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; padding: .22rem .55rem; border-radius: var(--radius-xs); border: 1px solid transparent; white-space: nowrap; }
.chip-proposal { background: rgba(78,110,142,.12); border-color: rgba(78,110,142,.26); color: #3B5670; } .chip-hasil { background: rgba(180,71,31,.10); border-color: rgba(180,71,31,.24); color: var(--primary-dark); } .chip-tutup { background: rgba(49,87,74,.12); border-color: rgba(49,87,74,.26); color: #264539; }
.dash-li-time { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); min-width: 80px; text-align: right; }
.dash-list-foot { padding: .7rem 1.2rem; border-top: 1px dashed var(--line-strong); font-size: .75rem; color: var(--muted); margin-top: .2rem; }
.dash-list-foot i { color: var(--secondary); }

.dash-empty { text-align: center; padding: 2.4rem 1rem; color: var(--muted); }
.dash-empty i { font-size: 2rem; color: var(--line-strong); margin-bottom: .6rem; display: block; }
.dash-empty p { margin: 0; font-size: .85rem; line-height: 1.5; }

.dash-actions { padding: .5rem .6rem; }
.dash-action { display: flex; align-items: center; gap: .8rem; padding: .6rem .75rem; border-radius: var(--radius-sm); color: var(--dark); text-decoration: none; }
.dash-action:hover { background: rgba(226,217,197,.34); }
.dash-action-ic { width: 34px; height: 34px; border-radius: var(--radius-xs); display: flex; align-items: center; justify-content: center; font-size: .9rem; background: rgba(180,71,31,.10); border: 1px solid rgba(180,71,31,.18); color: var(--primary); flex-shrink: 0; }
.dash-action-label { font-size: .88rem; font-weight: 600; color: var(--dark); }
.dash-action-label small { display: block; color: var(--muted); font-weight: 400; font-size: .72rem; margin-top: 1px; }
.dash-action .chev { margin-left: auto; color: var(--line-strong); font-size: .75rem; }

.dash-mini { padding: .5rem 1.2rem; }
.dash-mini-row { display: flex; justify-content: space-between; align-items: center; padding: .55rem 0; border-bottom: 1px dashed var(--line); font-size: .88rem; }
.dash-mini-row:last-child { border-bottom: none; }
.dash-mini-row span { color: var(--muted); }
.dash-mini-row b { color: var(--dark); font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-mini-foot { display: flex; gap: .6rem; padding: .8rem 1.2rem; border-top: 1px solid var(--line); }
.dash-mini-foot a { flex: 1; text-align: center; text-decoration: none; font-size: .78rem; font-weight: 600; color: var(--primary-dark); background: var(--paper); border: 1px solid var(--line); padding: .5rem; border-radius: var(--radius-xs); }
.dash-mini-foot a:hover { background: rgba(180,71,31,.08); border-color: var(--line-strong); }

/* Dash row links & status chips (staff/mahasiswa reuse) */
a.dash-list-item { text-decoration: none; color: inherit; cursor: pointer; }
a.dash-action { text-decoration: none; }
.dash-li-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.dash-li-link:hover { text-decoration: underline; }
.chip-success { background: rgba(49,87,74,.12); border-color: rgba(49,87,74,.26); color: #264539; } .chip-warn { background: rgba(201,154,63,.16); border-color: rgba(201,154,63,.34); color: #7A5514; } .chip-danger { background: rgba(158,66,68,.12); border-color: rgba(158,66,68,.26); color: #7E3234; } .chip-muted { background: rgba(138,129,104,.14); border-color: rgba(138,129,104,.24); color: var(--muted); }

/* ---- SK YUDISIUM (mahasiswa) ---- */
.sk-wrap { max-width: 780px; margin-inline: auto; }
.sk-cert { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.sk-cert-head { position: relative; padding: 1.7rem 1.5rem 1.35rem; text-align: center; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(201,154,63,.10), rgba(201,154,63,0)); }
.sk-cert-head::after { content: ''; position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%); width: 64px; height: 3px; border-radius: 2px; background: var(--brass); }
.sk-seal { width: 68px; height: 68px; margin: 0 auto .9rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.75rem; color: var(--success); background: rgba(49,87,74,.10); border: 2px solid rgba(49,87,74,.28); box-shadow: inset 0 0 0 4px rgba(49,87,74,.05); }
.sk-cert-org { font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.sk-cert-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--dark); margin: .4rem 0 .1rem; letter-spacing: -.3px; }
.sk-cert-sub { font-size: .82rem; color: var(--ink-soft); }
.sk-cert-body { padding: 1.35rem 1.5rem; }
.sk-mhs { text-align: center; padding-bottom: 1.1rem; margin-bottom: 1.1rem; border-bottom: 1px dashed var(--line-strong); }
.sk-mhs-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: var(--dark); }
.sk-mhs-meta { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.sk-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.sk-cell { background: var(--surface); padding: .85rem .5rem; text-align: center; }
.sk-cell-lbl { font-family: var(--font-mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .4rem; }
.sk-cell-val { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: var(--dark); font-variant-numeric: tabular-nums; line-height: 1; }
.sk-cell-val small { font-size: .68rem; color: var(--muted); font-family: var(--font-body); }
.sk-cell.is-final .sk-cell-val { color: var(--primary-dark); }
.sk-cert-foot { display: flex; gap: .8rem; align-items: center; justify-content: center; flex-wrap: wrap; padding: 1.2rem 1.5rem; border-top: 1px solid var(--line); background: rgba(226,217,197,.25); }
.sk-issued { font-size: .74rem; color: var(--muted); font-family: var(--font-mono); width: 100%; text-align: center; order: 3; margin-top: .1rem; }
.sk-btn-file { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-family: var(--font-body); font-size: .88rem; font-weight: 600; color: #fff; background: var(--success); border: 1px solid var(--success); padding: .6rem 1.2rem; border-radius: var(--radius-sm); }
.sk-btn-file:hover { background: #264539; border-color: #264539; color: #fff; }
.sk-btn-ghost { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-size: .85rem; font-weight: 600; color: var(--primary-dark); background: var(--paper); border: 1px solid var(--line-strong); padding: .6rem 1rem; border-radius: var(--radius-sm); }
.sk-btn-ghost:hover { background: rgba(180,71,31,.08); color: var(--primary-dark); }
.sk-note { text-align: center; font-size: .82rem; color: var(--ink-soft); background: rgba(201,154,63,.12); border: 1px solid rgba(201,154,63,.28); border-radius: var(--radius-sm); padding: .75rem 1rem; }
.sk-check { display: flex; align-items: center; gap: .85rem; padding: .8rem 1.2rem; border-bottom: 1px solid var(--line); }
.sk-check:last-child { border-bottom: none; }
.sk-check-ic { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .85rem; flex-shrink: 0; }
.sk-check-ic.done { background: rgba(49,87,74,.12); color: var(--success); border: 1px solid rgba(49,87,74,.26); }
.sk-check-ic.todo { background: rgba(201,154,63,.16); color: #7A5514; border: 1px solid rgba(201,154,63,.32); }
.sk-check-main { flex: 1; min-width: 0; }
.sk-check-name { font-weight: 600; font-size: .9rem; color: var(--dark); }
.sk-check-meta { font-size: .75rem; color: var(--muted); }
@media (max-width: 575px) { .sk-grid { grid-template-columns: repeat(2, 1fr); } .sk-cell:last-child { grid-column: 1 / -1; } }

/* ---- TABLE ---- */
.table {
    font-size: .875rem;
    margin: 0;
}
.table thead th {
    background: rgba(226,217,197,.35);
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    font-size: .66rem;
    letter-spacing: .08em;
    border-bottom: 1px solid var(--line-strong);
    padding: .8rem 1rem;
    white-space: nowrap;
}
.table tbody td {
    padding: .8rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--line);
    color: var(--text);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background-color .12s; }
.table-hover tbody tr:hover { background: rgba(226,217,197,.30); }
/* Tautan biasa di sel tabel tetap bertone rust. Kelas .btn dikecualikan supaya
   warna teks varian tombol (btn-warning/btn-success di kolom aksi) tidak tertimpa. */
.table td a:not(.btn) { color: var(--primary); font-weight: 500; text-decoration: none; }
.table td a:not(.btn):hover { text-decoration: underline; }

/* ---- PAGINATION ---- */
.pagination { gap: .3rem; }
.pagination .page-link {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-xs);
    background: var(--surface);
    color: var(--text);
    font-size: .82rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 34px;
    text-align: center;
    padding: .3rem .55rem;
    transition: background-color .15s, color .15s, border-color .15s;
}
.pagination .page-link:hover { background: rgba(226,217,197,.42); color: var(--dark); border-color: var(--muted); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #FBF7EC; }
.pagination .page-item.disabled .page-link { color: var(--line-strong); background: var(--paper); border-color: var(--line); opacity: .9; }

/* ---- BADGES ---- */
.badge {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: .68rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .32em .6em;
    border-radius: var(--radius-xs);
}
.badge.bg-success { background: rgba(49,87,74,.13) !important; border: 1px solid rgba(49,87,74,.26); color: #264539 !important; }
.badge.bg-info { background: rgba(78,110,142,.13) !important; border: 1px solid rgba(78,110,142,.26); color: #3B5670 !important; }
.badge.bg-warning { background: rgba(201,154,63,.17) !important; border: 1px solid rgba(201,154,63,.34); color: #7A5514 !important; }
.badge.bg-danger { background: rgba(158,66,68,.13) !important; border: 1px solid rgba(158,66,68,.26); color: #7E3234 !important; }
.badge.bg-secondary { background: rgba(138,129,104,.14) !important; border: 1px solid rgba(138,129,104,.24); color: var(--muted) !important; }
.badge.bg-primary { background: rgba(180,71,31,.11) !important; border: 1px solid rgba(180,71,31,.24); color: var(--primary-dark) !important; }

/* ---- BUTTONS ---- */
.btn {
    font-weight: 600;
    border-radius: var(--radius-xs);
    padding: .5rem 1.1rem;
    font-size: .85rem;
    line-height: 1.4;
    transition: background-color .18s, border-color .18s, color .18s, box-shadow .18s, transform .12s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible,
.btn-check:focus + .btn { outline: 2px solid var(--primary); outline-offset: 2px; box-shadow: 0 0 0 4px rgba(180,71,31,.18); }
.btn.disabled, .btn:disabled, fieldset:disabled .btn { opacity: .55; }

/* Varian tombol diatur lewat CSS variable Bootstrap agar hover, aktif, fokus,
   nonaktif dan grup .btn-check ikut palette ledger (bukan biru bawaan BS). */
.btn-primary {
    --bs-btn-color: #FBF7EC; --bs-btn-bg: #B4471F; --bs-btn-border-color: #8F3814;
    --bs-btn-hover-color: #FBF7EC; --bs-btn-hover-bg: #8F3814; --bs-btn-hover-border-color: #7A2F10;
    --bs-btn-active-color: #FBF7EC; --bs-btn-active-bg: #7A2F10; --bs-btn-active-border-color: #6B280D;
    --bs-btn-disabled-color: #FBF7EC; --bs-btn-disabled-bg: #B4471F; --bs-btn-disabled-border-color: #8F3814;
    --bs-btn-focus-shadow-rgb: 180,71,31;
}
.btn-success {
    --bs-btn-color: #FBF7EC; --bs-btn-bg: #31574A; --bs-btn-border-color: #264539;
    --bs-btn-hover-color: #FBF7EC; --bs-btn-hover-bg: #264539; --bs-btn-hover-border-color: #1F3A2F;
    --bs-btn-active-color: #FBF7EC; --bs-btn-active-bg: #1F3A2F; --bs-btn-active-border-color: #193026;
    --bs-btn-disabled-color: #FBF7EC; --bs-btn-disabled-bg: #31574A; --bs-btn-disabled-border-color: #264539;
    --bs-btn-focus-shadow-rgb: 49,87,74;
}
.btn-danger {
    --bs-btn-color: #FBF7EC; --bs-btn-bg: #9E4244; --bs-btn-border-color: #7E3234;
    --bs-btn-hover-color: #FBF7EC; --bs-btn-hover-bg: #7E3234; --bs-btn-hover-border-color: #6E2A2C;
    --bs-btn-active-color: #FBF7EC; --bs-btn-active-bg: #6E2A2C; --bs-btn-active-border-color: #5F2426;
    --bs-btn-disabled-color: #FBF7EC; --bs-btn-disabled-bg: #9E4244; --bs-btn-disabled-border-color: #7E3234;
    --bs-btn-focus-shadow-rgb: 158,66,68;
}
.btn-warning {
    --bs-btn-color: #241A06; --bs-btn-bg: #C99A3F; --bs-btn-border-color: #A87F2C;
    --bs-btn-hover-color: #FBF7EC; --bs-btn-hover-bg: #A87F2C; --bs-btn-hover-border-color: #8E6A1F;
    --bs-btn-active-color: #FBF7EC; --bs-btn-active-bg: #8E6A1F; --bs-btn-active-border-color: #7A5514;
    --bs-btn-disabled-color: #241A06; --bs-btn-disabled-bg: #C99A3F; --bs-btn-disabled-border-color: #A87F2C;
    --bs-btn-focus-shadow-rgb: 201,154,63;
}
.btn-info {
    --bs-btn-color: #FBF7EC; --bs-btn-bg: #4E6E8E; --bs-btn-border-color: #3B5670;
    --bs-btn-hover-color: #FBF7EC; --bs-btn-hover-bg: #3B5670; --bs-btn-hover-border-color: #33495D;
    --bs-btn-active-color: #FBF7EC; --bs-btn-active-bg: #33495D; --bs-btn-active-border-color: #2C3E4F;
    --bs-btn-disabled-color: #FBF7EC; --bs-btn-disabled-bg: #4E6E8E; --bs-btn-disabled-border-color: #3B5670;
    --bs-btn-focus-shadow-rgb: 78,110,142;
}
/* Abu-abu netral didinginkan jadi abu kayu hangat */
.btn-secondary {
    --bs-btn-color: #F5F0E4; --bs-btn-bg: #6B6353; --bs-btn-border-color: #57503F;
    --bs-btn-hover-color: #F5F0E4; --bs-btn-hover-bg: #57503F; --bs-btn-hover-border-color: #4A4436;
    --bs-btn-active-color: #F5F0E4; --bs-btn-active-bg: #4A4436; --bs-btn-active-border-color: #3F3A2E;
    --bs-btn-disabled-color: #F5F0E4; --bs-btn-disabled-bg: #6B6353; --bs-btn-disabled-border-color: #57503F;
    --bs-btn-focus-shadow-rgb: 107,99,83;
}
/* Tombol sekunder terang: kertas + garis, paling sering dipakai di menu list */
.btn-light {
    --bs-btn-color: #221F19; --bs-btn-bg: #F5F0E4; --bs-btn-border-color: #C9BCA0;
    --bs-btn-hover-color: #1B1A16; --bs-btn-hover-bg: #EADFCC; --bs-btn-hover-border-color: #8A8168;
    --bs-btn-active-color: #1B1A16; --bs-btn-active-bg: #E2D9C5; --bs-btn-active-border-color: #8A8168;
    --bs-btn-disabled-color: #221F19; --bs-btn-disabled-bg: #F5F0E4; --bs-btn-disabled-border-color: #C9BCA0;
    --bs-btn-focus-shadow-rgb: 138,129,104;
}
.btn-link {
    --bs-btn-color: #8F3814; --bs-btn-border-color: transparent;
    --bs-btn-hover-color: #B4471F; --bs-btn-hover-border-color: transparent; --bs-btn-hover-bg: rgba(180,71,31,.08);
    --bs-btn-active-color: #7A2F10; --bs-btn-active-border-color: transparent;
    --bs-btn-disabled-color: #A9A08B; --bs-btn-focus-shadow-rgb: 180,71,31;
    text-decoration: none;
}
.btn-link:hover { text-decoration: underline; }

/* Varian garis: hover berupa lapisan tipis hangat, bukan blok warna penuh */
.btn-outline-primary {
    --bs-btn-color: #8F3814; --bs-btn-border-color: #B4471F; --bs-btn-bg: transparent;
    --bs-btn-hover-color: #7A2F10; --bs-btn-hover-bg: rgba(180,71,31,.10); --bs-btn-hover-border-color: #8F3814;
    --bs-btn-active-color: #7A2F10; --bs-btn-active-bg: rgba(180,71,31,.16); --bs-btn-active-border-color: #8F3814;
    --bs-btn-disabled-color: #8F3814; --bs-btn-disabled-border-color: #C9BCA0;
    --bs-btn-focus-shadow-rgb: 180,71,31;
}
.btn-outline-secondary {
    --bs-btn-color: #5F5849; --bs-btn-border-color: #C9BCA0; --bs-btn-bg: transparent;
    --bs-btn-hover-color: #1B1A16; --bs-btn-hover-bg: rgba(226,217,197,.55); --bs-btn-hover-border-color: #8A8168;
    --bs-btn-active-color: #1B1A16; --bs-btn-active-bg: rgba(226,217,197,.75); --bs-btn-active-border-color: #8A8168;
    --bs-btn-disabled-color: #A9A08B; --bs-btn-disabled-border-color: #E2D9C5;
    --bs-btn-focus-shadow-rgb: 138,129,104;
}
.btn-outline-danger {
    --bs-btn-color: #7E3234; --bs-btn-border-color: #9E4244; --bs-btn-bg: transparent;
    --bs-btn-hover-color: #FBF7EC; --bs-btn-hover-bg: #9E4244; --bs-btn-hover-border-color: #7E3234;
    --bs-btn-active-color: #FBF7EC; --bs-btn-active-bg: #7E3234; --bs-btn-active-border-color: #6E2A2C;
    --bs-btn-disabled-color: #9E4244; --bs-btn-disabled-border-color: #DCC9C0;
    --bs-btn-focus-shadow-rgb: 158,66,68;
}
.btn-outline-success {
    --bs-btn-color: #264539; --bs-btn-border-color: #31574A; --bs-btn-bg: transparent;
    --bs-btn-hover-color: #FBF7EC; --bs-btn-hover-bg: #31574A; --bs-btn-hover-border-color: #264539;
    --bs-btn-active-color: #FBF7EC; --bs-btn-active-bg: #264539; --bs-btn-active-border-color: #1F3A2F;
    --bs-btn-disabled-color: #31574A; --bs-btn-disabled-border-color: #C9BCA0;
    --bs-btn-focus-shadow-rgb: 49,87,74;
}
.btn-sm { padding: .35rem .7rem; font-size: .78rem; border-radius: var(--radius-xs); }

/* Kedalaman halus saat disentuh kursor pada tombol terisi */
.btn-primary:hover { box-shadow: 0 6px 16px -6px rgba(143,56,20,.45); }
.btn-success:hover { box-shadow: 0 6px 16px -6px rgba(38,69,57,.42); }
.btn-danger:hover { box-shadow: 0 6px 16px -6px rgba(126,50,52,.42); }
.btn-warning:hover { box-shadow: 0 6px 16px -6px rgba(168,127,44,.42); }
.btn-info:hover { box-shadow: 0 6px 16px -6px rgba(59,86,112,.42); }
.btn-secondary:hover { box-shadow: 0 6px 16px -6px rgba(87,80,63,.42); }

/* Tombol tutup (modal & offcanvas): lingkaran hangat, bukan X keabuan */
.btn-close {
    opacity: .55;
    border-radius: var(--radius-xs);
    --bs-btn-close-focus-shadow: 0 0 0 3px rgba(180,71,31,.26);
    transition: opacity .18s, background-color .18s;
}
.btn-close:hover { opacity: 1; background-color: rgba(180,71,31,.10); }

/* ---- FORMS ---- */
.form-control, .form-select {
    border-radius: var(--radius-xs);
    border: 1px solid var(--line-strong);
    padding: .6rem .95rem;
    font-size: .875rem;
    color: var(--text);
    background: var(--surface);
    transition: border-color .18s, box-shadow .18s;
}
.form-control::placeholder { color: #AFA691; }
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 0 0 3px rgba(180,71,31,.13);
}
.form-label {
    font-weight: 600;
    font-size: .78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .4rem;
}
.input-group-text {
    border-radius: var(--radius-xs) 0 0 var(--radius-xs);
    border: 1px solid var(--line-strong);
    background: rgba(226,217,197,.42);
    color: var(--muted);
}

/* ---- TIMELINE (Progress) ---- */
.progress-timeline {
    position: relative;
    padding-left: 2rem;
}
.progress-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--line-strong);
}
.progress-item {
    position: relative;
    margin-bottom: 1.5rem;
}
.progress-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--line-strong);
    border: 2px solid var(--surface);
    box-shadow: 0 0 0 2px var(--line-strong);
}
.progress-item.done::before { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.progress-item.pending::before { background: var(--brass); box-shadow: 0 0 0 2px var(--brass); }
.progress-item.rejected::before { background: var(--danger); box-shadow: 0 0 0 2px var(--danger); }
.progress-item .progress-title { font-weight: 600; font-size: .9rem; }
.progress-item .progress-desc { font-size: .8rem; color: var(--muted); }

/* ---- MOBILE RESPONSIVE ---- */
.sidebar-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--dark);
    padding: .25rem;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 999;
}

/* ---- MOBILE APP-LIKE UI ---- */
@media (max-width: 768px) {
    /* Safe areas for notched devices */
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    /* Sidebar as full-screen drawer */
    .sidebar {
        transform: translateX(-100%);
        width: 85%;
        max-width: 320px;
        box-shadow: 4px 0 24px rgba(20,19,16,.35);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar.collapsed {
        transform: translateX(-100%);
    }

    /* Main content full width */
    .main-content {
        margin-left: 0 !important;
        padding-bottom: 70px; /* Space for bottom nav */
    }
    .main-content.expanded {
        margin-left: 0 !important;
    }

    /* Overlay */
    .sidebar-overlay.show {
        display: block;
        backdrop-filter: blur(2px);
        overscroll-behavior: contain;
    }

    /* Compact topbar */
    .topbar {
        padding: .75rem 1rem;
        position: sticky;
    }
    .topbar-title {
        font-size: 1.1rem;
    }
    .topbar .text-muted,
    .topbar time {
        display: none;
    }

    /* Content area */
    .content-area {
        padding: 1rem;
    }

    /* Stat cards grid */
    .row.g-3.mb-4 > .col-lg {
        flex: 0 0 calc(50% - .5rem);
        max-width: calc(50% - .5rem);
    }
    .stat-card {
        padding: 1rem;
    }
    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: .75rem;
    }
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
    .stat-card .stat-label {
        font-size: .7rem;
    }

    /* Cards */
    .card {
        margin-bottom: 1rem;
    }
    .card-header {
        padding: .85rem 1rem;
        font-size: .9rem;
    }
    .card-body {
        padding: 1rem;
    }

    /* Forms */
    .form-control, .form-select {
        padding: .75rem 1rem;
        font-size: 1rem;
    }
    .btn {
        padding: .65rem 1.25rem;
        font-size: .9rem;
    }

    /* Tables */
    .table {
        font-size: .8rem;
    }
    .table thead th {
        padding: .6rem .5rem;
        font-size: .65rem;
    }
    .table td {
        padding: .6rem .5rem;
    }

    /* Toast */
    .toast-container {
        top: .5rem;
        right: .5rem;
        left: .5rem;
        max-width: none;
    }
    .satria-toast .toast-body {
        padding: .75rem 1rem;
        font-size: .8rem;
    }

    /* Modal */
    .modal-dialog {
        margin: 1rem auto;
        max-width: calc(100% - 2rem);
    }
    .modal-content {
        border-radius: var(--radius);
    }
}

/* Bottom Navigation Bar - Mobile Only */
.bottom-nav {
    display: none;
}
button.bottom-nav-item {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--surface);
        border-top: 1px solid var(--line-strong);
        padding: .5rem 0 calc(.5rem + env(safe-area-inset-bottom));
        z-index: 950;
        justify-content: space-around;
        box-shadow: 0 -2px 10px rgba(27,26,22,.06);
    }
    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--muted);
        font-size: .6rem;
        padding: .25rem .25rem;
        transition: color .2s;
        min-width: 50px;
    }
    .bottom-nav-item i {
        font-size: 1.1rem;
        margin-bottom: .15rem;
    }
    .bottom-nav-item.active {
        color: var(--primary);
    }
    .bottom-nav-item:hover {
        color: var(--primary);
    }

    /* Mobile Menu Offcanvas */
    .offcanvas-bottom {
        border-top-left-radius: var(--radius);
        border-top-right-radius: var(--radius);
    }
    .offcanvas-bottom .offcanvas-header {
        border-bottom: 1px solid var(--line);
    }
    .offcanvas-bottom .list-group-item {
        font-size: 1rem;
        border: none;
        background: var(--surface);
        color: var(--text);
        border-bottom: 1px solid var(--line);
    }
    .offcanvas-bottom .list-group-item:last-child {
        border-bottom: none;
    }
    .offcanvas-bottom .list-group-item i {
        width: 24px;
        text-align: center;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .row.g-3.mb-4 > .col-lg {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .auth-card {
        padding: 1.5rem;
    }
}

/* ---- MISC ---- */
.page-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.55rem;
    color: var(--dark);
    margin-bottom: .25rem;
}
.page-subtitle {
    color: var(--muted);
    font-size: .85rem;
}
.empty-state {
    text-align: center;
    padding: 3.2rem 1.5rem;
    color: var(--muted);
}
.empty-state i {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: rgba(226,217,197,.5);
    border: 1px solid var(--line);
    color: var(--line-strong);
}
.empty-state p { margin: 0; font-size: .9rem; }
.alert {
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: .85rem;
    padding: .9rem 1.1rem;
}
.alert-info { background: rgba(78,110,142,.10); border-color: rgba(78,110,142,.28); color: #3B5670; }
.alert-success { background: rgba(49,87,74,.10); border-color: rgba(49,87,74,.28); color: #264539; }
.alert-warning { background: rgba(201,154,63,.14); border-color: rgba(201,154,63,.34); color: #7A5514; }
.alert-danger { background: rgba(158,66,68,.10); border-color: rgba(158,66,68,.28); color: #7E3234; }
.alert .fas, .alert .far { opacity: .8; }
.modal-content {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
}
.modal-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.modal-header .modal-title { font-family: var(--font-display); font-weight: 600; color: var(--dark); }
.modal-footer { border-top: 1px solid var(--line); }
.offcanvas {
    background: var(--surface);
    color: var(--text);
    overscroll-behavior: contain;
}

/* ===== Logout confirmation modal ===== */
.logout-modal {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: 0 24px 60px -18px rgba(20,19,16,.45);
    overflow: hidden;
}
#logoutModal .modal-dialog {
    animation: logoutPop .28s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes logoutPop {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to   { opacity: 1; transform: none; }
}
.logout-modal-body {
    padding: 2rem 1.75rem 1.1rem;
    text-align: center;
}
.logout-icon {
    width: 74px; height: 74px;
    margin: 0 auto 1.1rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(158,66,68,.10);
    border: 1px solid rgba(158,66,68,.26);
    color: var(--danger);
    font-size: 1.7rem;
}
.logout-title {
    font-family: var(--font-display);
    font-size: 1.15rem; font-weight: 600;
    color: var(--dark); letter-spacing: -.2px;
    margin-bottom: .4rem;
}
.logout-text {
    font-size: .875rem; color: var(--muted);
    margin: 0; line-height: 1.5;
}
.logout-actions {
    display: flex; gap: .65rem;
    padding: 1.1rem 1.75rem 1.6rem;
}
.logout-actions > * { flex: 1; }
.logout-btn-cancel {
    border: 1px solid var(--line-strong); background: var(--paper); color: var(--text);
    border-radius: var(--radius-xs); padding: .6rem 1rem;
    font-weight: 600; font-size: .875rem;
    transition: background .18s ease, border-color .18s ease;
}
.logout-btn-cancel:hover { background: rgba(226,217,197,.5); border-color: var(--muted); color: var(--text); }
.logout-btn-confirm:focus-visible,
.logout-btn-cancel:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.logout-btn-confirm {
    background: var(--danger); color: #FBF7EC; border: 1px solid #7E3234;
    border-radius: var(--radius-xs); padding: .6rem 1rem;
    font-weight: 600; font-size: .875rem; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 18px -8px rgba(158,66,68,.7);
    transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.logout-btn-confirm:hover { background: #7E3234; color: #FBF7EC; box-shadow: 0 10px 22px -8px rgba(158,66,68,.8); }
.logout-btn-confirm:active { transform: translateY(1px); }

/* ---- TOAST NOTIFICATIONS ---- */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-width: 380px;
    width: 100%;
}
.satria-toast {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 0;
    border: 1px solid var(--line-strong);
    overflow: hidden;
    animation: toastSlideIn .4s cubic-bezier(.16,1,.3,1);
}
.satria-toast.toast-hiding {
    animation: toastSlideOut .3s ease forwards;
}
@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}
@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to   { transform: translateX(100%); opacity: 0; }
}
.satria-toast .toast-body {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text);
}
.satria-toast .toast-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.satria-toast .toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 .25rem;
    transition: color .2s;
}
.satria-toast .toast-close:hover { color: var(--text); }
.satria-toast .toast-progress {
    height: 3px;
    background: rgba(138,129,104,.22);
}
.satria-toast .toast-progress-bar {
    height: 100%;
    transform: scaleX(1);
    transform-origin: left center;
    transition: transform linear;
}

/* Toast variants */
.satria-toast.toast-success .toast-icon { background: rgba(49,87,74,.12); color: var(--success); }
.satria-toast.toast-success .toast-progress-bar { background: var(--success); }
.satria-toast.toast-error .toast-icon { background: rgba(158,66,68,.12); color: var(--danger); }
.satria-toast.toast-error .toast-progress-bar { background: var(--danger); }
.satria-toast.toast-warning .toast-icon { background: rgba(201,154,63,.16); color: #96701F; }
.satria-toast.toast-warning .toast-progress-bar { background: var(--brass); }
.satria-toast.toast-info .toast-icon { background: rgba(78,110,142,.13); color: var(--secondary); }
.satria-toast.toast-info .toast-progress-bar { background: var(--secondary); }

/* ============================================================
   ACCESSIBILITY & BEST PRACTICES (SKILLdesign2)
   ============================================================ */

/* Focus-visible: visible focus ring only on keyboard navigation */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.form-control:focus-visible,
.form-select:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(180,71,31,.14);
}
.sidebar .nav-link:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: -3px;
}
.bottom-nav-item:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 8px;
}

/* Touch interaction: prevent double-tap zoom delay */
button,
a,
input[type="submit"],
input[type="button"] {
    touch-action: manipulation;
}

/* Tabular numbers for data columns and stats */
.stat-value,
.stat-card .stat-value,
.dash-sum-num,
table td,
.badge,
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* Heading text-wrap for better readability */
h1, h2, h3, h4, h5, h6,
.page-title {
    text-wrap: balance;
}

/* Scroll margin for heading anchors */
[id] {
    scroll-margin-top: 80px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: #FBF7EC;
    padding: 8px 16px;
    z-index: 10000;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 var(--radius-xs) 0;
}
.skip-link:focus {
    top: 0;
}

/* Reduced motion: respect user preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Empty state improvements */
.empty-state { padding: 3.2rem 1.5rem; }
.empty-state i { opacity: 1; }

/* ============================================================
   AUTOMOTION (dashboard) - reveal bertahap saat digulir
   State tersembunyi hanya aktif jika html.reveal-on dipasang JS,
   sehingga halaman tetap terlihat utuh saat script gagal.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
    html.reveal-on .reveal {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .3, 1);
    }
    html.reveal-on .reveal.in-view {
        opacity: 1;
        transform: none;
    }
}

/* Long text truncation helpers */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Image loading optimization */
img[loading="lazy"] {
    content-visibility: auto;
}
