/* ==========================================================================
   neumorphism.css : Soft UI / Neumorphism untuk Sistem Poin Pelanggaran Siswa
   Daftar isi:
   1. Variabel & reset        7. Tombol
   2. Layout aplikasi          8. Form & input
   3. Sidebar                  9. Tabel, badge, pagination
   4. Topbar                  10. Dashboard (stat, chart, progress)
   5. Kartu & alert           11. Halaman login
   6. Utilitas                12. Responsif & cetak
   ========================================================================== */

/* ------------------------------ 1. Variabel ------------------------------ */
:root {
    --bg: #f0f4f8;
    --card: #ffffff;
    --shadow-dark: #d1d9e6;
    --shadow-light: #ffffff;

    --text: #2b3a55;
    --text-soft: #6b7a99;
    --text-faint: #9aa7c0;

    --primary: #5b7fdb;
    --primary-dark: #4a6ccb;
    --primary-light: #8aa6ea;
    --primary-tint: #e3ebfc;
    --grad-primary: linear-gradient(180deg, #7b9bec 0%, #5b7fdb 55%, #4f74d3 100%);

    --success: #1f9d7a;  --success-bg: #dcf5ec;
    --warning: #d98a1c;  --warning-bg: #fdf0d5;
    --danger:  #d9534f;  --danger-bg:  #fde3e2;
    --info:    #4a7fd9;  --info-bg:    #e1ecfb;
    --purple:  #8b6ad9;

    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --sh-card: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    --sh-card-sm: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
    --sh-inset: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    --sh-inset-deep: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    --sh-btn: 4px 4px 9px rgba(91, 127, 219, .35), -3px -3px 8px #ffffff;

    --sidebar-w: 280px;
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; color: var(--text); }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img, svg { max-width: 100%; }
.ico { flex: none; vertical-align: middle; }
button { font-family: inherit; }
[hidden] { display: none !important; }

/* ------------------------------ 2. Layout -------------------------------- */
.app { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { flex: 1; padding: 8px 32px 24px; }
.footer { padding: 18px 32px 26px; text-align: center; color: var(--text-faint); font-size: 12px; }

/* ------------------------------ 3. Sidebar ------------------------------- */
.sidebar {
    width: var(--sidebar-w);
    flex: none;
    margin: 16px 0 16px 16px;
    padding: 22px 18px 18px;
    background: var(--bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--sh-card);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 16px;
    height: calc(100vh - 32px);
    overflow-y: auto;
    scrollbar-width: thin;
    z-index: 40;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); padding: 2px 6px; }
.brand:hover { color: var(--text); }
.brand-logo {
    width: 46px; height: 46px; border-radius: 15px; color: #fff;
    display: grid; place-items: center; background: var(--grad-primary);
    box-shadow: var(--sh-btn);
}
.brand-text { font-weight: 800; font-size: 15px; line-height: 1.25; color: #2a3b66; }

.role-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-radius: var(--radius);
    background: var(--bg); box-shadow: var(--sh-card-sm);
}
.role-card small { display: block; color: var(--text-soft); font-size: 11px; }
.role-card strong { color: var(--primary); font-size: 14px; }
.role-ico {
    width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
    color: var(--primary); box-shadow: var(--sh-inset);
}

.nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav-link, .nav-sublink {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 11px 14px; border: 0; background: transparent;
    border-radius: var(--radius-sm); color: var(--text-soft);
    font-size: 14px; font-weight: 600; cursor: pointer; text-align: left;
    transition: box-shadow .2s, color .2s, background .2s;
}
.nav-link:hover, .nav-sublink:hover { color: var(--primary); }
.nav-link.active, .nav-sublink.active {
    color: var(--primary); background: var(--primary-tint);
    box-shadow: var(--sh-inset);
}
.nav-link.active-parent { color: var(--primary); }
.nav-link span:not(.chev) { flex: 1; }
.chev { display: grid; transition: transform .25s; color: var(--text-faint); }
.nav-group.open > .nav-toggle .chev { transform: rotate(180deg); }
.nav-sub { display: none; flex-direction: column; gap: 4px; padding: 4px 0 4px 14px; }
.nav-group.open > .nav-sub { display: flex; }
.nav-sublink { padding: 9px 14px; font-size: 13px; font-weight: 500; }
.nav-logout { color: var(--danger); background: var(--bg); box-shadow: var(--sh-card-sm); margin-top: auto; }
.nav-logout:hover { color: var(--danger); box-shadow: var(--sh-inset); }
.sidebar-backdrop { display: none; }

/* ------------------------------ 4. Topbar -------------------------------- */
.topbar {
    display: flex; align-items: center; gap: 16px;
    padding: 22px 32px 18px;
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 26px; font-weight: 800; color: #24365f; }
.topbar-title p { color: var(--text-soft); margin-top: 2px; }

.search-box {
    display: flex; align-items: center; gap: 10px; width: 340px; max-width: 34vw;
    padding: 0 18px; height: 46px; border-radius: 999px;
    background: var(--bg); box-shadow: var(--sh-card-sm); color: var(--text-faint);
}
.search-box input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
    font: inherit; color: var(--text);
}
.search-box:focus-within { box-shadow: var(--sh-inset); }

.icon-btn {
    position: relative; width: 46px; height: 46px; border-radius: 50%;
    display: grid; place-items: center; border: 0; cursor: pointer;
    background: var(--bg); color: var(--primary); box-shadow: var(--sh-card-sm);
    transition: box-shadow .2s;
}
.icon-btn:hover { color: var(--primary-dark); }
.icon-btn:active { box-shadow: var(--sh-inset); }
.bell-count {
    position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 999px; background: var(--primary-dark); color: #fff;
    font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.menu-btn { display: none; }

.user-menu { position: relative; }
.user-btn {
    display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px 0 8px;
    border: 0; border-radius: 999px; background: var(--bg); box-shadow: var(--sh-card-sm);
    cursor: pointer; color: var(--text-soft);
}
.avatar {
    width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    background: var(--grad-primary); color: #fff; font-weight: 700; font-size: 13px;
}
.user-info { text-align: left; line-height: 1.2; }
.user-info strong { display: block; font-size: 13px; color: var(--text); }
.user-info small { color: var(--text-faint); font-size: 11px; }
.user-dropdown {
    display: none; position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px;
    padding: 8px; border-radius: var(--radius); background: var(--bg);
    box-shadow: var(--sh-card); z-index: 60;
}
.user-menu.open .user-dropdown { display: block; }
.user-dropdown a {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border-radius: var(--radius-sm); color: var(--text-soft); font-weight: 600;
}
.user-dropdown a:hover { color: var(--primary); box-shadow: var(--sh-inset); }

/* ------------------------------ 5. Kartu --------------------------------- */
.card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--sh-card);
    padding: 24px;
    margin-bottom: 24px;
}
.card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 18px;
}
.card-head h2, .card-title { font-size: 17px; font-weight: 700; }
.card-sub { color: var(--text-soft); font-size: 13px; margin-top: 2px; }
.card-flat { box-shadow: var(--sh-inset); }

.alert {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 13px 18px; margin-bottom: 20px; border-radius: var(--radius);
    font-weight: 500; box-shadow: var(--sh-card-sm);
}
.alert-success { background: var(--success-bg); color: #137a5c; }
.alert-danger  { background: var(--danger-bg);  color: #b13a37; }
.alert-warning { background: var(--warning-bg); color: #a96a0c; }
.alert-info    { background: var(--info-bg);    color: #2f5fb3; }
.alert-close { border: 0; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; opacity: .6; }
.alert-close:hover { opacity: 1; }

.empty-state { text-align: center; padding: 56px 24px; }
.empty-state h2 { margin: 14px 0 8px; }
.empty-state p { color: var(--text-soft); max-width: 460px; margin: 0 auto 22px; }
.empty-icon {
    width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
    color: var(--primary); box-shadow: var(--sh-inset-deep);
}

/* ------------------------------ 6. Utilitas ------------------------------ */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.flex { display: flex; } .items-center { align-items: center; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.wrap { flex-wrap: wrap; } .ml-auto { margin-left: auto; }
.text-right { text-align: right; } .text-center { text-align: center; }
.muted { color: var(--text-soft); } .faint { color: var(--text-faint); }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; } .mb-0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
.small { font-size: 12px; }
.fw-600 { font-weight: 600; }

/* ------------------------------ 7. Tombol -------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border: 0; border-radius: 14px; cursor: pointer;
    font: inherit; font-weight: 600; line-height: 1.2; white-space: nowrap;
    transition: transform .12s, box-shadow .2s, filter .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    color: #fff; background: var(--grad-primary); box-shadow: var(--sh-btn);
    text-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}
.btn-primary:hover { color: #fff; filter: brightness(1.05); }
.btn-primary:active { box-shadow: inset 3px 3px 7px rgba(40, 70, 160, .45), inset -2px -2px 6px rgba(255, 255, 255, .15); }
.btn-soft {
    color: var(--primary-dark); background: var(--bg); box-shadow: var(--sh-card-sm);
}
.btn-soft:hover { color: var(--primary-dark); }
.btn-soft:active { box-shadow: var(--sh-inset); }
.btn-danger { color: var(--danger); background: var(--bg); box-shadow: var(--sh-card-sm); }
.btn-danger:hover { color: #fff; background: var(--danger); }
.btn-danger:active { box-shadow: var(--sh-inset); }
.btn-lg { padding: 14px 22px; font-size: 16px; border-radius: 16px; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-icon {
    width: 36px; height: 36px; padding: 0; border-radius: 12px;
    color: var(--primary); background: var(--bg); box-shadow: 3px 3px 7px var(--shadow-dark), -3px -3px 7px #fff;
}
.btn-icon:hover { color: var(--primary-dark); }
.btn-icon:active { box-shadow: var(--sh-inset); }
.btn-icon.danger { color: var(--danger); }
.btn-icon.warn { color: var(--warning); }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.actions { display: flex; gap: 8px; justify-content: flex-end; }
.actions form { margin: 0; display: inline; }

/* ------------------------------ 8. Form ---------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.form-grid .full { grid-column: 1 / -1; }
.field-label, .form-group > label { display: block; margin: 0 0 8px; font-weight: 600; font-size: 13px; color: var(--text); }
.req { color: var(--danger); }
.hint { margin-top: 6px; color: var(--text-faint); font-size: 12px; }
.form-error { margin-top: 6px; color: var(--danger); font-size: 12px; }

.input, .select, .textarea,
.input-inset {
    width: 100%; border: 0; outline: 0; font: inherit; color: var(--text);
    background: var(--bg); border-radius: 14px; box-shadow: var(--sh-inset);
}
.input, .select { height: 46px; padding: 0 16px; }
.textarea { padding: 12px 16px; min-height: 100px; resize: vertical; }
.input::placeholder, .textarea::placeholder, .input-inset input::placeholder { color: var(--text-faint); }
.input:focus, .select:focus, .textarea:focus { box-shadow: var(--sh-inset-deep), 0 0 0 2px rgba(91, 127, 219, .35); }
.select {
    appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7a99' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
select[size], select[multiple] { height: auto; padding: 8px; background-image: none; }
select[size] option { padding: 8px 10px; border-radius: 8px; }
select[size] option:checked { background: var(--primary-tint) linear-gradient(0deg, var(--primary-tint), var(--primary-tint)); color: var(--primary-dark); }

.input-inset { display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 16px; margin-bottom: 20px; color: var(--text-faint); background: var(--bg); box-shadow: var(--sh-card-sm); }
.input-inset input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; color: var(--text); }
.input-inset:focus-within { box-shadow: var(--sh-inset); }
.eye-btn { border: 0; background: transparent; color: var(--text-faint); cursor: pointer; display: grid; padding: 4px; }
.eye-btn:hover { color: var(--primary); }

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text-soft); user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box { width: 24px; height: 24px; border-radius: 8px; background: var(--bg); box-shadow: var(--sh-card-sm); display: grid; place-items: center; }
.check input:checked + .box { box-shadow: var(--sh-inset); }
.check input:checked + .box::after { content: ''; width: 10px; height: 6px; border-left: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary); transform: rotate(-45deg) translate(1px, -1px); }
.check input:focus-visible + .box { outline: 2px solid var(--primary-light); outline-offset: 2px; }

.filter-bar { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 20px; }
.filter-bar .grow { flex: 1; min-width: 220px; }
.filter-bar .item { min-width: 160px; }
.filter-bar label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--text-soft); }

.bobot-preview {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 20px; border-radius: var(--radius); box-shadow: var(--sh-inset);
}
.bobot-preview strong { font-size: 28px; color: var(--primary); }

/* ------------------------------ 9. Tabel --------------------------------- */
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px 6px; }
.table { width: 100%; border-collapse: collapse; min-width: 560px; }
.table th {
    padding: 12px 14px; text-align: left; font-size: 12px; font-weight: 600;
    color: var(--text-soft); text-transform: none; white-space: nowrap;
    border-bottom: 1px solid rgba(160, 175, 200, .35);
}
.table td { padding: 13px 14px; border-bottom: 1px solid rgba(160, 175, 200, .22); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, .55); }
.table .num { text-align: right; }
.table-empty { text-align: center; color: var(--text-faint); padding: 34px 14px !important; }
.cell-user { display: flex; align-items: center; gap: 12px; }
.cell-user .avatar { width: 36px; height: 36px; font-size: 12px; flex: none; }
.cell-user strong { display: block; line-height: 1.25; }
.cell-user small { color: var(--text-faint); }

.badge {
    display: inline-block; padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: 12px; white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-muted   { background: #e6ebf3; color: var(--text-soft); }
.badge-primary { background: var(--primary-tint); color: var(--primary-dark); }

.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 22px; flex-wrap: wrap; }
.page-link {
    min-width: 38px; height: 38px; padding: 0 12px; display: grid; place-items: center;
    border-radius: 12px; font-weight: 600; color: var(--text-soft);
    background: var(--bg); box-shadow: 3px 3px 7px var(--shadow-dark), -3px -3px 7px #fff;
}
.page-link:hover { color: var(--primary); }
.page-link.active { color: var(--primary); box-shadow: var(--sh-inset); background: var(--primary-tint); }
.page-link.disabled { opacity: .4; pointer-events: none; }
.page-gap { color: var(--text-faint); }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; color: var(--text-soft); font-size: 13px; }

.detail-list { display: grid; grid-template-columns: 150px 1fr; gap: 12px 16px; }
.detail-list dt { color: var(--text-soft); }
.detail-list dd { margin: 0; font-weight: 600; }
.profile-top { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.profile-top .avatar { width: 68px; height: 68px; font-size: 22px; }
.score-box {
    display: grid; place-items: center; text-align: center; padding: 20px 28px;
    border-radius: var(--radius); box-shadow: var(--sh-inset-deep);
}
.score-box strong { font-size: 40px; line-height: 1; }
.score-box small { color: var(--text-soft); }
.score-box.success strong { color: var(--success); }
.score-box.warning strong { color: var(--warning); }
.score-box.danger strong { color: var(--danger); }

/* ------------------------------ 10. Dashboard ---------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-bottom: 24px; }
.stat {
    position: relative; padding: 22px 24px 18px; border-radius: var(--radius-lg);
    background: var(--bg); box-shadow: var(--sh-card);
}
.stat-label { font-weight: 600; font-size: 14px; }
.stat-value { font-size: 34px; font-weight: 800; line-height: 1.15; margin: 6px 0 2px; }
.stat-note { color: var(--text-soft); }
.stat-trend { display: flex; align-items: center; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(160, 175, 200, .3); color: var(--text-soft); font-size: 12.5px; }
.stat-trend b { font-weight: 700; }
.stat-trend .up { color: var(--success); } .stat-trend .down { color: var(--danger); } .stat-trend .flat { color: var(--text-faint); }
.stat-ico {
    position: absolute; top: 20px; right: 22px; width: 58px; height: 58px; border-radius: 50%;
    display: grid; place-items: center; box-shadow: var(--sh-card-sm);
}
.stat.blue .stat-label, .stat.blue .stat-value { color: var(--primary-dark); }
.stat.blue .stat-ico { color: var(--primary); background: #e4ecfd; }
.stat.green .stat-label, .stat.green .stat-value { color: var(--success); }
.stat.green .stat-ico { color: var(--success); background: var(--success-bg); }
.stat.orange .stat-label, .stat.orange .stat-value { color: #e07a1f; }
.stat.orange .stat-ico { color: #e07a1f; background: #fdeadb; }
.stat.red .stat-label, .stat.red .stat-value { color: var(--danger); }
.stat.red .stat-ico { color: var(--danger); background: var(--danger-bg); }

.dash-row { display: grid; gap: 24px; margin-bottom: 24px; }
.dash-row-3 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1.1fr) minmax(0, 1.1fr); }
.dash-row-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dash-row > * { min-width: 0; }
.dash-row .card { margin-bottom: 0; }
.chart-box { position: relative; height: 270px; }
.chart-box.donut { height: 210px; }
.mini-select { width: auto; height: 34px; padding: 0 30px 0 14px; border-radius: 12px; font-size: 12px; box-shadow: var(--sh-card-sm); background-position: right 10px center; }

.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(160, 175, 200, .25); }
.rank li:last-child { border-bottom: 0; }
.rank-no { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; flex: none; }
.rank-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-val { font-weight: 700; color: var(--danger); }
.rank-1 { background: #5b7fdb; } .rank-2 { background: #33b58f; } .rank-3 { background: #f0a43c; } .rank-4 { background: #6aa2e8; } .rank-5 { background: #8b6ad9; }

.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.legend span { flex: 1; color: var(--text-soft); }
.legend b { font-weight: 600; }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.donut-canvas { position: relative; width: 190px; height: 190px; flex: none; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-center strong { font-size: 24px; line-height: 1.1; }
.donut-center small { color: var(--text-soft); }

.progress { height: 8px; border-radius: 999px; background: var(--bg); box-shadow: var(--sh-inset); overflow: hidden; min-width: 90px; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #8aa6ea, #5b7fdb); }
.cell-progress { display: flex; align-items: center; gap: 12px; }
.cell-progress b { min-width: 34px; font-weight: 500; }
.cell-progress .progress { flex: 1; }
.link-btn { display: block; margin-top: 16px; padding: 11px; text-align: center; border-radius: 14px; font-weight: 600; color: var(--primary); background: var(--bg); box-shadow: var(--sh-card-sm); }
.link-btn:hover { color: var(--primary-dark); }
.link-btn:active { box-shadow: var(--sh-inset); }

/* ------------------------------ 11. Login -------------------------------- */
.login-body { min-height: 100vh; position: relative; overflow-x: hidden; display: grid; place-items: center; padding: 32px 20px; }
.bg-orb { position: fixed; border-radius: 50%; background: var(--bg); box-shadow: var(--sh-card); z-index: 0; }
.orb-1 { width: 240px; height: 240px; top: -90px; left: -60px; }
.orb-2 { width: 180px; height: 180px; top: -50px; right: -40px; }
.orb-3 { width: 200px; height: 200px; bottom: -80px; left: -30px; }
.orb-4 { width: 220px; height: 220px; bottom: -90px; right: -50px; }

.login-wrap {
    position: relative; z-index: 1; width: 100%; max-width: 1080px;
    display: grid; grid-template-columns: 1.12fr 1fr; gap: 28px; align-items: center;
}
.login-hero {
    text-align: center; padding: 44px 40px 40px; border-radius: 64px;
    background: var(--bg); box-shadow: var(--sh-card);
}
.login-hero h2 { font-size: 30px; font-weight: 800; color: #2a3b66; margin-bottom: 14px; }
.login-hero p { color: var(--text-soft); max-width: 420px; margin: 0 auto; font-size: 15px; }

.hero-art { position: relative; height: 385px; margin-bottom: 26px; }
.hero-art .blob { position: absolute; left: 50%; top: 4px; width: 280px; height: 280px; margin-left: -150px; border-radius: 50%; background: linear-gradient(160deg, #dbe5fb, #e7eefc); }
.hero-art .dots { position: absolute; left: 4%; top: 26px; width: 62px; height: 62px; background-image: radial-gradient(circle, #b7c6ea 2px, transparent 2.5px); background-size: 16px 16px; }
.hero-art .ball { position: absolute; border-radius: 50%; background: var(--bg); box-shadow: var(--sh-card-sm); }
.ball-a { width: 38px; height: 38px; right: 12%; top: 42px; }
.ball-b { width: 30px; height: 30px; left: 3%; top: 190px; }
.clipboard {
    position: absolute; left: 50%; top: 40px; width: 250px; margin-left: -130px; padding: 24px 22px 18px;
    border-radius: 22px; background: #f6f8fd; box-shadow: var(--sh-card); text-align: left; z-index: 2;
}
.clipboard .clip { position: absolute; top: -20px; left: 50%; width: 110px; height: 34px; margin-left: -55px; border-radius: 10px 10px 6px 6px; background: linear-gradient(180deg, #7b9bec, #5b7fdb); box-shadow: 0 6px 10px rgba(91, 127, 219, .35); }
.clipboard .clip::after { content: ''; position: absolute; left: 50%; top: 7px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #e6edfc; }
.clipboard h3 { text-align: center; font-size: 16px; color: #2d3f6c; margin: 8px 0 14px; }
.clipboard ul { list-style: none; margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid #dfe5f2; }
.clipboard li { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.clipboard li:last-child { margin-bottom: 0; }
.li-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #7b9bec, #5b7fdb); flex: none; }
.li-lines { flex: 1; display: grid; gap: 6px; }
.li-lines i { display: block; height: 5px; border-radius: 4px; background: #d8e0f1; }
.li-lines i:last-child { width: 55%; }
.clipboard li b { color: var(--danger); font-size: 14px; }
.clip-total { display: flex; align-items: center; justify-content: space-between; color: #3a4a74; font-weight: 600; }
.clip-total strong { padding: 4px 14px; border-radius: 9px; background: #e3ebfc; color: var(--primary-dark); font-size: 20px; }
.shield {
    position: absolute; right: 7%; top: 108px; width: 86px; height: 98px; z-index: 3; color: #fff;
    display: grid; place-items: center; background: linear-gradient(160deg, #86a3ee, #5b7fdb);
    clip-path: path('M43 0 C60 10 76 12 86 12 L86 52 C86 76 66 90 43 98 C20 90 0 76 0 52 L0 12 C10 12 26 10 43 0 Z');
    filter: drop-shadow(0 8px 10px rgba(91, 127, 219, .35));
}
.books { position: absolute; left: 1%; bottom: 0; width: 124px; height: 72px; z-index: 3; }
.books span { position: absolute; left: 0; height: 36px; border-radius: 8px 12px 12px 8px; background: linear-gradient(180deg, #86a3ee, #5b7fdb); box-shadow: 0 8px 12px rgba(91, 127, 219, .3); }
.books span:first-child { bottom: 0; width: 124px; height: 32px; }
.books span:last-child { bottom: 30px; left: 12px; width: 104px; height: 32px; }
.books span::after { content: ''; position: absolute; right: 6px; top: 7px; bottom: 7px; width: 66%; border-radius: 4px; background: #eef2fb; }
.plant { position: absolute; right: 8%; bottom: 0; width: 90px; height: 120px; z-index: 3; }
.plant .pot { position: absolute; left: 14px; bottom: 0; width: 62px; height: 52px; border-radius: 6px 6px 24px 24px; background: linear-gradient(180deg, #f6f8fd, #dfe6f4); box-shadow: var(--sh-card-sm); }
.plant i { position: absolute; bottom: 44px; width: 30px; height: 52px; border-radius: 100% 0 100% 0; background: linear-gradient(160deg, #9db6ef, #6f8fe2); }
.plant i:nth-child(1) { left: 6px; transform: rotate(-28deg); }
.plant i:nth-child(2) { left: 30px; height: 64px; bottom: 50px; transform: rotate(8deg); }
.plant i:nth-child(3) { left: 52px; transform: rotate(40deg) scaleX(-1); }

.login-card {
    padding: 44px 44px 38px; border-radius: 52px; background: var(--bg); box-shadow: var(--sh-card);
}
.login-avatar { width: 112px; height: 112px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; color: var(--primary); background: var(--bg); box-shadow: var(--sh-card); }
.login-avatar .ico { width: 46px; height: 46px; }
.login-card h1 { text-align: center; font-size: 30px; font-weight: 800; color: #2a3b66; }
.login-sub { text-align: center; color: var(--text-soft); margin: 10px 0 30px; font-size: 15px; }
.login-row { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 24px; gap: 12px; flex-wrap: wrap; }
.link { font-weight: 600; }
.forgot-note { margin: -10px 0 20px; padding: 12px 16px; border-radius: 14px; font-size: 13px; color: var(--text-soft); box-shadow: var(--sh-inset); }
.divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--text-faint); }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: rgba(160, 175, 200, .45); }

/* ------------------------------ 12. Responsif & cetak -------------------- */
@media (max-width: 1280px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-row-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .dash-row-3 > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 1024px) {
    .sidebar {
        position: fixed; left: 0; top: 0; margin: 12px; height: calc(100vh - 24px);
        transform: translateX(-120%); transition: transform .3s ease; box-shadow: 14px 14px 30px rgba(120, 135, 165, .35);
    }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(40, 55, 90, .35); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .3s; }
    body.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
    .menu-btn { display: grid; }
    .topbar { padding: 18px 20px 14px; flex-wrap: wrap; }
    .content { padding: 4px 20px 20px; }
    .footer { padding: 16px 20px 24px; }
    .search-box { order: 5; width: 100%; max-width: none; flex: 1 1 100%; }
    .login-wrap { grid-template-columns: 1fr; max-width: 520px; }
    .login-hero { display: none; }
}
@media (max-width: 760px) {
    .grid-2, .grid-3, .grid-4, .dash-row-2, .dash-row-3, .form-grid { grid-template-columns: minmax(0, 1fr); }
    .dash-row-3 > :first-child { grid-column: auto; }
    .stat-grid { grid-template-columns: 1fr; gap: 18px; }
    .user-info { display: none; }
    .user-btn { padding: 0 12px 0 8px; }
    .topbar-title h1 { font-size: 21px; }
    .card { padding: 18px; border-radius: 20px; }
    .detail-list { grid-template-columns: 1fr; gap: 2px 0; }
    .detail-list dd { margin-bottom: 10px; }
    .login-card { padding: 32px 22px 28px; border-radius: 36px; }
}

@media print {
    .sidebar, .topbar, .footer, .no-print, .sidebar-backdrop { display: none !important; }
    body { background: #fff; }
    .content { padding: 0; }
    .card { box-shadow: none; border: 1px solid #ddd; background: #fff; }
}

/* Kanvas Chart.js selalu mengikuti lebar kartu (juga saat library belum termuat) */
.chart-box canvas, .donut-canvas canvas { display: block; max-width: 100%; }
.donut-canvas canvas { width: 100% !important; height: 100% !important; }

/* Tabel di dalam kartu dashboard: tidak perlu digulir, cukup membungkus teks */
.dash-row .table { min-width: 0; }
.dash-row .table th, .dash-row .table td { padding-left: 8px; padding-right: 8px; }
.dash-row .table td.nowrap { white-space: normal; }
.stat-label { padding-right: 70px; }
