/*
 * STFBE - design system area produk (Admin /secret & Detail Token).
 * Diadaptasi dari Portal SBIM (devsbim): portal.css (navbar, dropdown,
 * bottom-nav, sheet, dashboard) + mbkm-forms.css (kartu, field, tombol,
 * tabel, status pill, stepper). Token warna memakai varian biru yang kini
 * dipakai halaman-halaman portal devsbim, jadi tampilannya senada.
 */

:root {
    --navy: #244D75;
    --navy-dark: #16324F;
    --accent: #168BE5;          /* underline nav, indikator bottom-nav */
    --bg: #F4F8FC;
    --card-bg: #FFFFFF;
    --text-primary: #16324F;
    --text-secondary: #6B8298;
    --border: #E5EDF5;

    --blue: #0878D1;
    --blue-deep: #075CB8;
    --blue-bright: #168BE5;
    --blue-soft: #EAF6FF;
    --success: #198754;
    --warning: #F4B400;
    --danger: #DC3545;

    --st-bottom-nav-h: 64px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
}

/* ===== Animasi masuk halaman ===== */
@keyframes stFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.st-page-enter { animation: stFadeIn 0.45s ease-out; }
.st-page-enter .st-pcard,
.st-page-enter .st-stat-tile {
    opacity: 0;
    animation: stFadeIn 0.45s ease-out forwards;
}
.st-page-enter .st-pcard:nth-of-type(1), .st-page-enter .st-stat-tile:nth-of-type(1) { animation-delay: .05s; }
.st-page-enter .st-pcard:nth-of-type(2), .st-page-enter .st-stat-tile:nth-of-type(2) { animation-delay: .12s; }
.st-page-enter .st-pcard:nth-of-type(3), .st-page-enter .st-stat-tile:nth-of-type(3) { animation-delay: .19s; }
.st-page-enter .st-pcard:nth-of-type(4), .st-page-enter .st-stat-tile:nth-of-type(4) { animation-delay: .26s; }
.st-page-enter .st-pcard:nth-of-type(n+5), .st-page-enter .st-stat-tile:nth-of-type(n+5) { animation-delay: .33s; }

/* ===== Navbar ===== */
.navbar.st-navbar {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue-deep) 100%) !important;
}
.navbar-brand { font-weight: 600; }
.st-navbar-logo {
    height: 32px;
    background: #fff;
    padding: 3px 6px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.navbar-dark .navbar-nav .nav-link {
    position: relative;
    color: rgba(255, 255, 255, .82);
    transition: color .2s ease;
}
.navbar-dark .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 8px; right: 8px; bottom: 2px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .2s ease;
}
.navbar-dark .navbar-nav .nav-link:hover { color: #fff; }
.navbar-dark .navbar-nav .nav-link:hover::after { transform: scaleX(1); }
.navbar-dark .navbar-nav .nav-link.active { color: #fff; font-weight: 600; }
.navbar-dark .navbar-nav .nav-link.active::after { transform: scaleX(1); }

/* Ikon bulat (lihat situs) & tombol avatar */
@keyframes stIconNudge {
    0%, 100% { transform: rotate(0deg) scale(1); }
    30% { transform: rotate(-12deg) scale(1.08); }
    60% { transform: rotate(9deg) scale(1.05); }
}
.st-nav-icon {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    transition: background-color .25s ease, color .25s ease;
}
.st-nav-icon:hover, .st-nav-icon:focus-visible { background: var(--accent); color: #fff; }
.st-nav-icon:hover i { animation: stIconNudge .5s ease; }

.st-nav-avatar {
    display: flex; align-items: center;
    border-radius: 999px;
    padding: 6px 16px 6px 10px;
    color: rgba(255, 255, 255, .9);
    text-decoration: none;
    transition: background-color .25s ease, transform .2s ease;
}
.st-nav-avatar::after { display: none !important; }
.st-nav-avatar:hover, .st-nav-avatar:focus-visible, .st-nav-avatar.show {
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}
.st-avatar-circle {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12.5px; font-weight: 700;
}

/* Dropdown menu */
.navbar .dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 12px 28px -8px rgba(23, 43, 77, .25);
    padding: 8px;
    margin-top: 10px !important;
    animation: stDropdownIn .18s ease-out;
}
@keyframes stDropdownIn {
    from { opacity: 0; transform: translateY(-6px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.navbar .dropdown-item {
    border-radius: 8px;
    padding: 8px 12px;
    font-size: .92rem;
    display: flex;
    align-items: center;
}
.navbar .dropdown-item:hover, .navbar .dropdown-item:focus { background: var(--bg); color: var(--navy); }
.navbar .dropdown-item.active { background: var(--navy); color: #fff; }
.navbar .dropdown-header { font-size: .78rem; color: var(--text-secondary); padding: 4px 12px 8px; }

/* ===== Bottom navigation (mobile) ===== */
@media (max-width: 767.98px) {
    body.has-bottom-nav { padding-bottom: calc(var(--st-bottom-nav-h) + env(safe-area-inset-bottom, 0px)); }
    body.has-bottom-nav .navbar .navbar-toggler,
    body.has-bottom-nav .navbar .navbar-collapse { display: none !important; }
}
.st-bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1030;
    display: flex;
    background: var(--card-bg);
    box-shadow: 0 -4px 16px rgba(23, 43, 77, .10);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}
.st-bn-indicator {
    position: absolute;
    top: 4px;
    width: 32px; height: 3px;
    background: var(--accent);
    border-radius: 3px;
    transform: translateX(-50%);
    transition: left .25s cubic-bezier(.34, 1.3, .64, 1);
}
.st-bottom-nav[data-active=""] .st-bn-indicator { display: none; }
.st-bottom-nav[data-active="0"] .st-bn-indicator { left: 10%; }
.st-bottom-nav[data-active="1"] .st-bn-indicator { left: 30%; }
.st-bottom-nav[data-active="2"] .st-bn-indicator { left: 50%; }
.st-bottom-nav[data-active="3"] .st-bn-indicator { left: 70%; }
.st-bottom-nav[data-active="4"] .st-bn-indicator { left: 90%; }
.st-bn-item {
    flex: 1 1 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px;
    padding: 6px 2px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 11px;
    line-height: 1.1;
    position: relative;
}
.st-bn-item i { font-size: 20px; transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), color .2s ease; }
.st-bn-item:active i { transform: scale(.82); }
.st-bn-item.active { color: var(--navy); font-weight: 600; }
.st-bn-item.active i { color: var(--accent); transform: scale(1.15); }
.st-bn-badge {
    position: absolute;
    top: 2px; right: calc(50% - 18px);
    min-width: 15px; height: 15px;
    padding: 0 3px;
    border-radius: 999px;
    background: #DC2626; color: #fff;
    font-size: 9.5px; line-height: 15px; text-align: center;
}

/* ===== Bottom sheet (mobile) ===== */
.st-sheet-backdrop {
    position: fixed; inset: 0;
    background: rgba(23, 43, 77, .35);
    z-index: 1035;
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
}
.st-sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.st-sheet {
    position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 1040;
    background: var(--card-bg);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 24px rgba(23, 43, 77, .18);
    padding: 10px 8px calc(16px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.34, 1.1, .64, 1);
}
.st-sheet.show { transform: translateY(0); }
.st-sheet-handle { width: 40px; height: 4px; background: var(--border); border-radius: 3px; margin: 4px auto 12px; }
.st-sheet-title {
    font-size: 13px; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: .06em;
    padding: 0 12px 8px;
}
.st-sheet-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px;
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}
.st-sheet-item:active, .st-sheet-item.active { background: var(--bg); }
.st-sheet-item i {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: var(--bg);
    color: var(--navy);
    font-size: 17px;
}
.st-sheet-item.danger { color: #DC2626; }
.st-sheet-item.danger i { background: #FEF2F2; color: #DC2626; }

/* ===== Layout halaman ===== */
.st-page-container { max-width: 1240px; margin: 0 auto; padding-bottom: 48px; }
.st-page-header {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.st-breadcrumb { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 10px; }
.st-breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.st-breadcrumb a:hover { color: var(--blue); text-decoration: underline; }
.st-breadcrumb .sep { margin: 0 6px; opacity: .6; }
.st-breadcrumb .current { color: var(--navy); font-weight: 600; }
.st-page-title {
    font-size: 24px; font-weight: 700; color: var(--navy);
    margin: 0 0 4px;
    display: flex; align-items: center; gap: 8px;
}
.st-page-subtitle { font-size: 14px; color: var(--text-secondary); margin: 0; max-width: 640px; line-height: 1.5; }
.st-footer { text-align: center; font-size: 12px; color: var(--text-secondary); padding: 8px 0 28px; }

/* ===== Dashboard: hero + quick menu ===== */
.st-dash-hero {
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
    border-radius: 20px;
    padding: 22px 20px 46px;
    color: #fff;
}
.st-dash-greeting { font-size: 19px; font-weight: 700; }
.st-dash-greeting-sub { margin-top: 3px; font-size: 12.5px; color: rgba(255, 255, 255, .75); }
.st-dash-status-row {
    margin-top: 16px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 14px;
    padding: 12px 14px;
}
.st-dash-status-row .label { font-size: 11px; color: rgba(255, 255, 255, .7); }
.st-dash-status-row .value { font-size: 14px; font-weight: 700; margin-top: 2px; }
.st-dash-status-row .chip-outline {
    font-size: 11.5px; font-weight: 600;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 999px;
    padding: 7px 13px;
    text-decoration: none;
    white-space: nowrap;
    flex: none;
    transition: background-color .15s ease;
}
.st-dash-status-row .chip-outline:hover { background: rgba(255, 255, 255, .12); }

.st-dash-sheet {
    position: relative;
    background: var(--card-bg);
    margin-top: -30px;
    border-radius: 18px;
    padding: 18px 16px 18px;
    box-shadow: 0 8px 30px rgba(22, 50, 79, .08);
}
.st-quickgrid { display: grid; grid-template-columns: repeat(4, 1fr); row-gap: 18px; }
.st-qtile {
    display: flex; flex-direction: column; align-items: center;
    gap: 7px;
    text-align: center;
    text-decoration: none;
    color: inherit;
}
.st-qtile-icon {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    color: var(--navy);
    font-size: 19px;
    position: relative;
    transition: transform .15s ease, background-color .15s ease;
}
.st-qtile:hover .st-qtile-icon { transform: translateY(-2px); background: #E7EEF7; }
.st-qtile-label { font-size: 11px; font-weight: 600; color: var(--text-primary); line-height: 1.25; }
.st-qtile-count {
    position: absolute; top: -3px; right: -6px;
    min-width: 19px; height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--blue); color: #fff;
    font-size: 10.5px; font-weight: 700; line-height: 19px;
}

.st-section-title {
    font-size: 14px; font-weight: 700; color: var(--text-primary);
    margin: 0 0 12px;
    display: flex; align-items: baseline; justify-content: space-between;
}
.st-section-title a { font-size: 12px; font-weight: 600; color: var(--blue); text-decoration: none; }
.st-section-title a:hover { text-decoration: underline; }

.st-app-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 13px 14px;
    display: flex; align-items: center; gap: 12px;
    text-decoration: none;
    color: inherit;
    background: var(--card-bg);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.st-app-card + .st-app-card { margin-top: 10px; }
.st-app-card:hover { border-color: var(--blue-bright); box-shadow: 0 6px 18px rgba(22, 50, 79, .08); }
.st-app-card-icon {
    width: 40px; height: 40px;
    border-radius: 11px;
    background: var(--bg);
    color: var(--navy);
    display: flex; align-items: center; justify-content: center;
    flex: none;
    font-size: 18px;
}
.st-app-card-body { flex: 1; min-width: 0; }
.st-app-card-title {
    display: block;
    font-size: 13.5px; font-weight: 700; color: var(--text-primary);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.st-app-card-sub {
    display: block;
    font-size: 11.5px; color: var(--text-secondary); margin-top: 1px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.st-dash-layout { display: block; }
.st-dash-side { margin-top: 20px; }
.st-dash-side .st-pcard:first-child { margin-top: 0; }

@media (min-width: 992px) {
    .st-dash-layout {
        display: grid;
        grid-template-columns: 1.7fr 1fr;
        gap: 24px;
        align-items: start;
    }
    .st-dash-side { margin-top: 0; }
    .st-dash-hero { padding: 34px 36px 80px; border-radius: 16px; }
    .st-dash-greeting { font-size: 27px; }
    .st-dash-greeting-sub { font-size: 14px; margin-top: 5px; }
    .st-dash-status-row { padding: 16px 20px; margin-top: 20px; }
    .st-dash-status-row .label { font-size: 12px; }
    .st-dash-status-row .value { font-size: 16px; }
    .st-dash-status-row .chip-outline { font-size: 13px; padding: 8px 16px; }
    .st-dash-sheet { margin-top: -40px; padding: 24px 36px; border-radius: 16px; }
    .st-quickgrid { row-gap: 28px; }
    .st-qtile-icon { width: 58px; height: 58px; font-size: 24px; }
    .st-qtile-label { font-size: 13px; }
    .st-section-title { font-size: 15.5px; margin: 0 0 14px; }
    .st-app-card { padding: 16px; border-radius: 16px; }
    .st-app-card-icon { width: 46px; height: 46px; font-size: 20px; }
    .st-app-card-title { font-size: 15px; }
    .st-app-card-sub { font-size: 13px; }
}

/* ===== Kartu umum ===== */
.st-pcard {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 8px 30px rgba(22, 50, 79, .06);
    margin-top: 18px;
    transition: box-shadow .2s ease;
}
.st-pcard.is-flush { padding: 0; overflow: hidden; }
.st-pcard.is-flush .st-pcard-head { padding: 22px 24px 0; }
.st-pcard-head {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
}
.st-pcard-title {
    font-size: 16.5px; font-weight: 700; color: var(--navy);
    margin: 0 0 3px;
    display: flex; align-items: center; gap: 8px;
}
.st-pcard-title .icon, .st-pcard-title > i { color: var(--blue); }
.st-pcard-sub { font-size: 13px; color: var(--text-secondary); margin: 0; }

/* ===== Statistik ===== */
.st-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.st-stat-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.st-stat-tile {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 8px 30px rgba(22, 50, 79, .05);
    text-decoration: none;
    display: block;
    transition: border-color .2s ease, transform .2s ease;
}
a.st-stat-tile:hover { border-color: var(--blue-bright); transform: translateY(-2px); }
.st-stat-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.st-stat-ico {
    width: 28px; height: 28px;
    border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px;
    background: #EEF2F6; color: var(--text-secondary);
    flex: none;
}
.st-stat-ico.tone-info { background: rgba(8, 120, 209, .12); color: var(--blue); }
.st-stat-ico.tone-warning { background: rgba(244, 180, 0, .18); color: #B98900; }
.st-stat-ico.tone-success { background: rgba(25, 135, 84, .12); color: var(--success); }
.st-stat-ico.tone-danger { background: rgba(220, 53, 69, .12); color: var(--danger); }
.st-stat-ico.tone-revisi { background: rgba(90, 93, 196, .14); color: #5A5DC4; }
.st-stat-label { font-size: 12.5px; color: var(--text-secondary); font-weight: 600; line-height: 1.3; }
.st-stat-value { font-size: 27px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.1; }

/* Ringkasan status (bar) */
.st-bar-list { display: grid; gap: 14px; }
.st-bar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
.st-bar-head b { font-variant-numeric: tabular-nums; }
.st-bar-track { height: 8px; background: #E9EEF5; border-radius: 999px; overflow: hidden; }
.st-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--blue) 0%, var(--blue-bright) 100%);
    transition: width .6s cubic-bezier(.4, 0, .2, 1);
}

/* ===== Field form ===== */
.st-field { margin-bottom: 18px; }
.st-field:last-child { margin-bottom: 0; }
.st-field-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-primary); margin-bottom: 7px; }
.st-field-label .req { color: var(--danger); margin-left: 2px; }
.st-input-shell { position: relative; }
.st-input-shell .pfx {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--blue); font-size: 17px; pointer-events: none;
}
.st-input-shell.has-pfx .st-pinput { padding-left: 42px; }

.st-pinput, .st-pselect, textarea.st-pinput {
    width: 100%;
    min-height: 48px;
    border: 1.5px solid #D9E2EC;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    background: #fff;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}
textarea.st-pinput { padding: 12px 16px; resize: vertical; }
.st-pinput::placeholder { color: #A8B7C6; }
.st-pinput:focus, .st-pselect:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(8, 120, 209, .12);
}
.st-pinput[readonly], .st-pinput:disabled { background: #F6F8FA; color: var(--text-secondary); border-style: dashed; }
.st-pinput.is-valid { border-color: var(--success); }
.st-pinput.is-invalid { border-color: var(--danger); }
.st-pinput.is-sm, .st-pselect.is-sm { min-height: 38px; font-size: 13.5px; border-radius: 10px; padding: 0 12px; }

.st-select-shell { position: relative; }
.st-pselect { appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer; }
.st-select-shell .chevron {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    color: var(--text-secondary); font-size: 14px; pointer-events: none;
}
.st-field-helper {
    font-size: 12.5px; color: var(--text-secondary); margin-top: 6px; line-height: 1.4;
    display: flex; align-items: flex-start; gap: 5px;
}
.st-field-helper i { margin-top: 1px; font-size: 12px; }

/* ===== Tombol ===== */
.st-btn-save {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 24px; border: none; border-radius: 12px;
    background: var(--blue); color: #fff; font-size: 14.5px; font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}
.st-btn-save:hover { background: var(--blue-deep); box-shadow: 0 10px 22px -8px rgba(7, 92, 184, .45); color: #fff; transform: translateY(-1px); }
.st-btn-save:active { transform: translateY(0); }
.st-btn-save:disabled { opacity: .7; cursor: default; transform: none; }
.st-btn-save.is-danger { background: var(--danger); }
.st-btn-save.is-danger:hover { background: #BB2D3B; box-shadow: 0 10px 22px -8px rgba(220, 53, 69, .45); }
.st-btn-save.is-navy { background: var(--navy); }
.st-btn-save.is-navy:hover { background: var(--navy-dark); }

.st-btn-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 18px; border: 1.5px solid var(--border); border-radius: 12px;
    background: #fff; color: var(--navy); font-size: 13.5px; font-weight: 700; cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.st-btn-outline:hover { background: var(--blue-soft); border-color: var(--blue-bright); color: var(--blue-deep); }
.st-btn-outline.is-danger { border-color: #F5C2C7; color: var(--danger); }
.st-btn-outline.is-danger:hover { background: #FEECEC; }
.st-btn-outline.is-warning { border-color: #F5DFA3; color: #8A5A00; }
.st-btn-outline.is-warning:hover { background: #FFF8E6; }
.st-btn-sm { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.st-btn-block { width: 100%; }

.st-btn-save:focus-visible,
.st-btn-outline:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--card-bg), 0 0 0 5px var(--blue-bright);
}
.st-action-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.st-link { color: var(--blue); font-weight: 600; text-decoration: none; }
.st-link:hover { color: var(--blue-deep); text-decoration: underline; }

/* ===== Status pill ===== */
.st-status-pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
    white-space: nowrap;
}
.st-status-pill.tone-secondary { background: #EDF1F5; color: var(--text-secondary); }
.st-status-pill.tone-warning { background: #FFF3D6; color: #8A5A00; }
.st-status-pill.tone-info { background: var(--blue-soft); color: var(--blue-deep); }
.st-status-pill.tone-success { background: #DFF5E7; color: var(--success); }
.st-status-pill.tone-danger { background: #FEECEC; color: var(--danger); }
.st-status-pill.tone-revisi { background: #F0F0FC; color: #43449B; }
.st-status-pill.tone-primary { background: var(--navy); color: #fff; }
.st-status-pill.is-lg { font-size: 13px; padding: 7px 15px; }

/* ===== Stepper ===== */
.st-stepper { display: flex; align-items: flex-start; gap: 4px; margin-top: 22px; }
.st-step { flex: 1; text-align: center; position: relative; }
.st-step .dot {
    width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 6px;
    display: flex; align-items: center; justify-content: center;
    background: #E9EEF5; color: var(--text-secondary); font-size: 12.5px; font-weight: 700;
    border: 2px solid #E9EEF5;
    position: relative; z-index: 1;
}
.st-step .line { position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: #E9EEF5; z-index: 0; }
.st-step:first-child .line { display: none; }
.st-step.is-done .dot { background: var(--success); border-color: var(--success); color: #fff; }
.st-step.is-done .line, .st-step.is-current .line { background: var(--success); }
.st-step.is-current .dot { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 0 4px var(--blue-soft); }
.st-step .label { font-size: 12px; font-weight: 600; color: var(--text-secondary); line-height: 1.3; }
.st-step.is-done .label, .st-step.is-current .label { color: var(--text-primary); }

/* ===== Key-value ===== */
.st-kv-list { display: flex; flex-direction: column; }
.st-kv-row {
    display: flex; justify-content: space-between; gap: 14px;
    padding: 11px 0; border-bottom: 1px solid var(--border);
    font-size: 13.5px;
}
.st-kv-row:last-child { border-bottom: none; padding-bottom: 0; }
.st-kv-row:first-child { padding-top: 0; }
.st-kv-row .k { color: var(--text-secondary); flex: none; width: 38%; }
.st-kv-row .v { color: var(--text-primary); font-weight: 600; text-align: right; flex: 1; word-break: break-word; }

.st-readonly-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.st-readonly-item { background: #F6F8FA; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.st-readonly-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 11.5px; font-weight: 600; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: .02em;
    margin-bottom: 5px;
}
.st-readonly-value { font-size: 14.5px; font-weight: 700; color: var(--text-primary); word-break: break-word; }

/* ===== Tabel ===== */
.st-table-wrap { overflow-x: auto; }
.st-table-wrap.is-scroll { max-height: 440px; overflow-y: auto; }
.st-pcard.is-flush .st-table-wrap { border-top: 1px solid var(--border); }
.st-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.st-table thead th {
    background: #F6F8FA;
    color: var(--text-secondary);
    font-size: 11.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .03em;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
    position: sticky; top: 0; z-index: 1;
}
.st-pcard:not(.is-flush) .st-table thead th:first-child { border-top-left-radius: 12px; }
.st-pcard:not(.is-flush) .st-table thead th:last-child { border-top-right-radius: 12px; }
.st-table tbody td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
}
.st-table tbody tr:last-child td { border-bottom: none; }
.st-table tbody tr:hover td { background: #FBFDFF; }
.st-table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; white-space: nowrap; }
.st-table .muted, .st-muted { color: var(--text-secondary); }
.st-table .sub { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.st-table .token { color: var(--blue); }
.st-table-empty { text-align: center; color: var(--text-secondary); padding: 36px 14px !important; font-size: 13.5px; }
.st-table-empty i { display: block; font-size: 26px; color: #B7C6D5; margin-bottom: 6px; }
.st-truncate { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Pagination ===== */
.st-pagination {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 10px;
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    font-size: 13px; color: var(--text-secondary);
}
.st-pages { display: flex; gap: 6px; }
.st-pages a {
    min-width: 36px; height: 36px; padding: 0 8px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    color: var(--navy); font-weight: 700; text-decoration: none;
    transition: background-color .2s ease, border-color .2s ease;
}
.st-pages a:hover { background: var(--blue-soft); border-color: var(--blue-bright); }
.st-pages a.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ===== Segmented tab ===== */
.st-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: #fff; border: 1px solid var(--border); }
.st-seg a, .st-seg button {
    display: inline-flex; align-items: center; gap: 7px;
    height: 38px; padding: 0 16px;
    border: none; border-radius: 10px;
    background: transparent;
    font-size: 13.5px; font-weight: 600; color: var(--text-secondary);
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}
.st-seg a:hover, .st-seg button:hover { color: var(--blue-deep); }
.st-seg .active { background: var(--blue-soft); color: var(--blue-deep); }

/* ===== Alert & banner ===== */
.st-alert {
    display: flex; align-items: flex-start; gap: 10px;
    border-radius: 14px;
    padding: 13px 16px;
    font-size: 13.5px;
    line-height: 1.5;
    border: 1px solid transparent;
    margin-top: 14px;
}
.st-alert i { font-size: 16px; line-height: 1.3; flex: none; }
.st-alert.is-success { background: #EAF9F0; border-color: #BFE8CE; color: #21714A; }
.st-alert.is-danger  { background: #FEECEC; border-color: #F5C2C7; color: #A32232; }
.st-alert.is-warning { background: #FFF8E6; border-color: #F5DFA3; color: #8A6A17; }
.st-alert.is-info    { background: var(--blue-soft); border-color: #C7E6FA; color: #2B587D; }

.st-context-banner {
    display: flex; gap: 12px; align-items: flex-start;
    background: var(--blue-soft);
    border: 1px solid #C7E6FA;
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 18px;
}
.st-context-banner .icon {
    flex: none;
    width: 32px; height: 32px;
    border-radius: 10px;
    background: #D6ECFB; color: var(--blue-deep);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.st-context-banner .title { font-size: 13.5px; font-weight: 700; color: var(--blue-deep); margin-bottom: 2px; }
.st-context-banner .text { font-size: 13px; color: #2B587D; line-height: 1.5; }
.st-context-banner.is-warning { background: #FFF8E6; border-color: #F5DFA3; }
.st-context-banner.is-warning .icon { background: #FCEBBB; color: #92660A; }
.st-context-banner.is-warning .title { color: #7A5300; }
.st-context-banner.is-warning .text { color: #8A6A17; }
.st-context-banner.is-success { background: #EAF9F0; border-color: #BFE8CE; }
.st-context-banner.is-success .icon { background: #D3F1DE; color: var(--success); }
.st-context-banner.is-success .title { color: #0F5C34; }
.st-context-banner.is-success .text { color: #21714A; }
.st-context-banner.is-danger { background: #FEECEC; border-color: #F5C2C7; }
.st-context-banner.is-danger .icon { background: #FADBDD; color: var(--danger); }
.st-context-banner.is-danger .title { color: #8A1723; }
.st-context-banner.is-danger .text { color: #A32232; }

/* ===== Empty state ===== */
.st-empty-state { text-align: center; padding: 48px 20px; }
.st-empty-state .icon {
    width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px;
    background: var(--blue-soft); color: var(--blue);
    display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.st-empty-state h2 { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.st-empty-state p { font-size: 13.5px; color: var(--text-secondary); margin: 0 0 18px; }

/* ===== List item (master data) ===== */
.st-list { display: grid; gap: 10px; }
.st-list-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px 10px 16px;
    font-size: 14px; font-weight: 600;
}
.st-list-item.is-off span { color: var(--text-secondary); text-decoration: line-through; font-weight: 500; }

.st-mini-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700;
    color: var(--blue-deep); background: var(--blue-soft);
    border-radius: 999px; padding: 3px 9px;
}
.st-mini-badge.tone-success { color: var(--success); background: #DFF5E7; }

.st-token-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 700; font-size: 15px;
    padding: 9px 14px;
    border-radius: 10px;
    background: #fff;
    border: 1.5px dashed #BFE8CE;
    color: var(--text-primary);
}

/* ===== Kanvas grafik ===== */
.st-chart { width: 100%; height: 260px; display: block; }

/* ===== Responsif ===== */
@media (max-width: 1199.98px) {
    .st-stat-grid.cols-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767.98px) {
    .st-pcard { border-radius: 16px; padding: 20px; margin-top: 14px; }
    .st-pcard.is-flush .st-pcard-head { padding: 18px 18px 0; }
    .st-pagination { padding: 12px 18px; }
    .st-page-title { font-size: 20px; }
    .st-page-subtitle { font-size: 13px; }
    .st-stat-grid, .st-stat-grid.cols-5 { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
    .st-stat-tile { padding: 13px 14px; }
    .st-stat-value { font-size: 22px; }
    .st-readonly-grid { grid-template-columns: 1fr; }
    .st-pinput, .st-pselect { min-height: 52px; font-size: 16px; }
    .st-kv-row { flex-direction: column; gap: 2px; }
    .st-kv-row .v { text-align: left; }
    .st-kv-row .k { width: auto; font-size: 11.5px; text-transform: uppercase; letter-spacing: .02em; }
    .st-chart { height: 200px; }
}
@media (max-width: 575.98px) {
    .st-stat-grid.cols-5 .st-stat-tile:first-child { grid-column: span 2; }
}

@media (prefers-reduced-motion: reduce) {
    .st-page-enter, .st-page-enter .st-pcard, .st-page-enter .st-stat-tile, .navbar .dropdown-menu {
        animation: none !important; opacity: 1 !important;
    }
    .st-nav-icon:hover i { animation: none !important; }
    * { transition: none !important; }
}

/* ===== Form permohonan (index.php) ===== */
.st-form-section + .st-form-section { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--border); }
.st-form-step {
    display: flex; align-items: center; gap: 10px;
    font-size: 16px; font-weight: 700; color: var(--navy);
    margin: 0 0 18px;
}
.st-form-step .num {
    width: 30px; height: 30px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800;
    flex: none;
}
.st-form-step .desc { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-secondary); margin-top: 1px; }

/* Pilihan pill (radio) - dari .mbkm-choice-group devsbim */
.st-choice-group { display: flex; flex-wrap: wrap; gap: 10px; }
.st-choice-item { position: relative; flex: 1 1 auto; min-width: 150px; }
.st-choice-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.st-choice-item label {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px; padding: 0 16px;
    border: 1.5px solid #D9E2EC; border-radius: 12px;
    font-size: 13.5px; font-weight: 600; color: var(--text-primary);
    background: #fff; cursor: pointer; text-align: center;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}
.st-choice-item label::before {
    content: '';
    width: 15px; height: 15px;
    border-radius: 50%;
    border: 1.5px solid #C6D2DE;
    flex: none;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.st-choice-item input:checked + label { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-deep); }
.st-choice-item input:checked + label::before { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 2.5px #fff; }
.st-choice-item input:focus-visible + label { outline: none; box-shadow: 0 0 0 3px rgba(8, 120, 209, .18); }

/* Upload file - dari .mbkm-file-drop devsbim */
.st-file-drop {
    position: relative;
    border: 1.5px dashed #C4DCF1;
    border-radius: 14px;
    background: var(--blue-soft);
    padding: 28px 16px;
    text-align: center;
    transition: border-color 150ms ease, background-color 150ms ease;
}
.st-file-drop:hover { border-color: var(--blue-bright); background: #E1F0FE; }
.st-file-drop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.st-file-drop .icon { font-size: 30px; color: var(--blue); margin-bottom: 6px; }
.st-file-drop .title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.st-file-drop .hint { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; }
.st-file-drop .filename {
    display: none;
    margin-top: 12px;
    font-size: 13px; font-weight: 600; color: var(--blue-deep);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    align-items: center; justify-content: center; gap: 6px;
}
.st-file-drop.has-file { background: #EAF9F0; border-color: #BFE8CE; }
.st-file-drop.has-file .filename { display: inline-flex; }

/* Tabel peserta yang bisa diisi */
.st-table-input { border: 1px solid var(--border); border-radius: 12px; }
.st-table-input .st-table thead th:first-child { border-top-left-radius: 12px; }
.st-table-input .st-table thead th:last-child { border-top-right-radius: 12px; }
.st-table-input .st-table tbody td { padding: 6px 8px; }
.st-cell-input {
    width: 100%;
    min-width: 110px;
    height: 38px;
    padding: 0 10px;
    font-size: 13.5px;
    font-family: inherit;
    border-radius: 9px;
    border: 1.5px solid transparent;
    background: transparent;
    color: var(--text-primary);
    outline: none;
    transition: border-color .15s ease, background-color .15s ease;
}
.st-cell-input:hover { background: #F6F8FA; }
.st-cell-input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(8, 120, 209, .1); }
.st-row-num { width: 44px; text-align: center; color: var(--text-secondary); font-size: 12.5px; font-weight: 600; }
.st-row-del {
    width: 34px; height: 34px;
    border: none; border-radius: 9px;
    background: transparent;
    color: #B7C6D5;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background-color .15s ease, color .15s ease;
}
.st-row-del:hover { background: #FEECEC; color: var(--danger); }
.st-table-foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    font-size: 12.5px; color: var(--text-secondary);
}
.st-counter { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }

.spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: stSpin .7s linear infinite;
    display: inline-block;
}
@keyframes stSpin { to { transform: rotate(360deg); } }

.st-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.st-form-grid .st-field { margin-bottom: 0; }
@media (max-width: 767.98px) {
    .st-form-grid { grid-template-columns: 1fr; }
}
