/* AL HIDAYAH — pondasi SIPOOL. Tanpa library eksternal. */
:root {
    --primary: #0e7490;
    --primary-dark: #155e75;
    --primary-soft: #ecfeff;
    --sidebar: #0f172a;
    --sidebar-2: #1e293b;
    --sidebar-text: #cbd5e1;
    --bg: #f1f5f9;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --success: #16a34a;
    --success-soft: #f0fdf4;
    --warning: #d97706;
    --warning-soft: #fffbeb;
    --info: #2563eb;
    --info-soft: #eff6ff;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
    --sidebar-w: 250px;
    --sidebar-mini: 72px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.5; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: middle; }
.icon-xl { width: 48px; height: 48px; color: var(--muted); }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-muted { color: var(--muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1rem; }
.fw-bold { font-weight: 600; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--sidebar); color: var(--sidebar-text); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 40; transition: width .2s ease, transform .2s ease; }
.sidebar-brand { display: flex; align-items: center; gap: .65rem; padding: 1rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.06); min-height: 60px; }
.brand-logo { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; background: #fff; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--primary); display: grid; place-items: center; color: #fff; flex: 0 0 auto; }
.brand-text { font-weight: 700; color: #fff; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem .6rem; }
.sidebar-foot { padding: .6rem 1rem; font-size: 12px; color: #64748b; border-top: 1px solid rgba(255,255,255,.06); }
.nav-link { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .6rem .75rem; border-radius: 8px; color: var(--sidebar-text); background: none; border: 0; font: inherit; cursor: pointer; text-align: left; margin-bottom: 2px; position: relative; }
.nav-link:hover { background: var(--sidebar-2); color: #fff; text-decoration: none; }
.nav-link.active { background: var(--primary); color: #fff; }
.nav-link.active-parent { color: #fff; }
.nav-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caret { width: 14px; height: 14px; transition: transform .2s; }
.nav-item.open > .nav-link .caret { transform: rotate(90deg); }
.submenu { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.nav-item.open > .submenu { grid-template-rows: 1fr; }
.submenu-inner { overflow: hidden; padding-left: .9rem; }
.submenu-title { display: none; }
.sub-link { display: flex; align-items: center; gap: .6rem; padding: .45rem .75rem; border-radius: 8px; color: #94a3b8; font-size: 13.5px; margin: 1px 0; }
.sub-link .icon { width: 16px; height: 16px; }
.sub-link:hover { color: #fff; background: var(--sidebar-2); text-decoration: none; }
.sub-link.active { color: #fff; background: rgba(14,116,144,.55); }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; transition: margin-left .2s ease; }
.topbar { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem; min-height: 60px; }
.page-title { font-size: 1.1rem; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-toggle, .collapse-btn { background: none; border: 1px solid var(--border); border-radius: 8px; padding: .4rem; cursor: pointer; color: var(--text); display: grid; place-items: center; }
.menu-toggle { display: none; }
.content { padding: 1.25rem; flex: 1; }
.footer { padding: .9rem 1.25rem; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--border); background: #fff; }

.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: .55rem; cursor: pointer; padding: .3rem .4rem; border-radius: 8px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--bg); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.user-name { display: flex; flex-direction: column; font-weight: 600; font-size: 13.5px; line-height: 1.2; }
.user-name small { color: var(--muted); font-weight: 400; font-size: 12px; }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(15,23,42,.12); min-width: 190px; padding: .35rem; z-index: 50; }
.dropdown a { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; border-radius: 6px; color: var(--text); }
.dropdown a:hover { background: var(--bg); text-decoration: none; }

/* Sidebar mini (desktop) */
@media (min-width: 993px) {
    html.sidebar-mini .sidebar { width: var(--sidebar-mini); }
    html.sidebar-mini .main { margin-left: var(--sidebar-mini); }
    html.sidebar-mini .brand-text, html.sidebar-mini .nav-text, html.sidebar-mini .caret, html.sidebar-mini .sidebar-foot { display: none; }
    html.sidebar-mini .sidebar-brand { justify-content: center; padding: 1rem .5rem; }
    html.sidebar-mini .sidebar-nav { overflow: visible; }
    html.sidebar-mini .nav-link { justify-content: center; padding: .7rem; }
    html.sidebar-mini .nav-link[data-tooltip]:hover::after { content: attr(data-tooltip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); background: #111827; color: #fff; padding: .35rem .6rem; border-radius: 6px; font-size: 12.5px; white-space: nowrap; z-index: 60; }
    html.sidebar-mini .nav-item.has-sub > .nav-link[data-tooltip]:hover::after { display: none; }
    html.sidebar-mini .nav-item { position: relative; }
    html.sidebar-mini .nav-item > .submenu { position: absolute; left: calc(100% + 6px); top: 0; display: none; background: var(--sidebar); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.3); min-width: 210px; z-index: 60; }
    html.sidebar-mini .nav-item:hover > .submenu { display: block; }
    html.sidebar-mini .nav-item > .submenu::before { content: ""; position: absolute; left: -10px; top: 0; width: 10px; height: 100%; }
    html.sidebar-mini .submenu-inner { padding: .4rem; overflow: visible; }
    html.sidebar-mini .submenu-title { display: block; color: #fff; font-weight: 600; padding: .4rem .75rem .5rem; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: .3rem; }
}

/* Mobile */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 35; }
    body.sidebar-open .sidebar-overlay { display: block; }
    .main { margin-left: 0; }
    .menu-toggle { display: grid; }
    .collapse-btn { display: none; }
}
@media (max-width: 576px) {
    .content { padding: .8rem; }
    .topbar { padding: 0 .8rem; }
    .user-name { display: none; }
    .card-body { padding: .9rem; }
}

/* ---------- Komponen ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.1rem; }
.card-header { padding: .85rem 1.1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.card-header h3 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: .5rem; }
.card-body { padding: 1.1rem; }
.card-footer { padding: .8rem 1.1rem; border-top: 1px solid var(--border); background: #f8fafc; border-radius: 0 0 var(--radius) var(--radius); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .5rem .9rem; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 500; cursor: pointer; background: var(--bg); color: var(--text); white-space: nowrap; line-height: 1.3; }
.btn:hover { text-decoration: none; filter: brightness(.96); }
.btn:disabled, .btn.disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-light { background: #fff; border-color: var(--border); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-info { background: var(--info); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: .3rem .55rem; font-size: 12.5px; }
.btn-sm .icon { width: 15px; height: 15px; }
.btn-block { width: 100%; }

.form-group { margin-bottom: .9rem; display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.form-group > label { font-weight: 600; font-size: 13px; }
.form-group .req { color: var(--danger); }
.form-control { width: 100%; padding: .5rem .7rem; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; background: #fff; color: var(--text); min-height: 38px; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,116,144,.15); }
.form-control[readonly], .form-control:disabled { background: #f8fafc; }
textarea.form-control { min-height: 80px; resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 1rem; }
.form-hint { font-size: 12px; color: var(--muted); }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon .form-control { padding-left: 2.2rem; }
.input-icon .toggle-pass { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; color: var(--muted); padding: .3rem; }
.form-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
input.angka, .form-control.angka { text-align: right; font-variant-numeric: tabular-nums; }

.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.toolbar .form-group { margin-bottom: 0; }
.toolbar .grow { flex: 1; min-width: 180px; }
.toolbar .spacer { flex: 1; }

.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .6rem .7rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { background: #f8fafc; font-size: 12.5px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.table tbody tr:hover { background: #f8fafc; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 700; background: #f8fafc; }
.table tr.batal td { color: #94a3b8; text-decoration: line-through; }
.table-footer { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding-top: .9rem; color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: .3rem; justify-content: flex-end; flex-wrap: nowrap; }
.actions form { margin: 0; }

.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: 12px; font-weight: 600; background: #e2e8f0; color: #334155; white-space: nowrap; }
.badge-primary { background: var(--primary-soft); color: var(--primary-dark); }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-secondary { background: #e2e8f0; color: #334155; }

.alert { display: flex; align-items: flex-start; gap: .6rem; padding: .75rem .9rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid; }
.alert span { flex: 1; }
.alert-close { background: none; border: 0; cursor: pointer; color: inherit; padding: 0; opacity: .7; }
.alert-success { background: var(--success-soft); border-color: #bbf7d0; color: #166534; }
.alert-danger { background: var(--danger-soft); border-color: #fecaca; color: #991b1b; }
.alert-warning { background: var(--warning-soft); border-color: #fde68a; color: #92400e; }
.alert-info { background: var(--info-soft); border-color: #bfdbfe; color: #1e40af; }
.alert ul { margin: .2rem 0 0; padding-left: 1.1rem; }

.pagination { display: flex; gap: .25rem; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 34px; height: 34px; padding: 0 .55rem; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--text); font-size: 13px; }
.pagination a:hover { background: var(--bg); text-decoration: none; }
.pagination .active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .disabled { color: #cbd5e1; }
.pagination .dots { border: 0; background: none; }

.grid { display: grid; gap: 1rem; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 1.1rem; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; display: flex; gap: .9rem; align-items: center; box-shadow: var(--shadow); }
.stat-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: 0 0 auto; }
.stat-icon.danger { background: var(--danger-soft); color: var(--danger); }
.stat-icon.success { background: var(--success-soft); color: var(--success); }
.stat-icon.warning { background: var(--warning-soft); color: var(--warning); }
.stat-label { color: var(--muted); font-size: 12.5px; }
.stat-value { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.check-item { display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: #fff; }
.check-item.disabled { background: #f8fafc; color: var(--muted); cursor: default; }
.check-item input { width: 16px; height: 16px; accent-color: var(--primary); }

.logo-preview { width: 96px; height: 96px; border: 1px dashed #cbd5e1; border-radius: 10px; display: grid; place-items: center; background: #f8fafc; overflow: hidden; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

.info-list { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; font-weight: 500; }

.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty h3 { color: var(--text); margin-top: .6rem; }
.welcome { background: linear-gradient(120deg, var(--primary), #0891b2); color: #fff; border: 0; }
.welcome .card-body { padding: 1.4rem; }
.welcome p { margin: .2rem 0 0; opacity: .9; }

.summary-box { background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; font-variant-numeric: tabular-nums; }
.summary-row.total { font-size: 1.15rem; font-weight: 700; border-top: 1px dashed #cbd5e1; margin-top: .3rem; padding-top: .55rem; }
.summary-row .form-control { max-width: 170px; text-align: right; }

.diff-table td { vertical-align: top; font-size: 13px; }
.diff-table .lama { background: #fef2f2; color: #991b1b; }
.diff-table .baru { background: #f0fdf4; color: #166534; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }

/* Cari barang (autocomplete) */
.autocomplete { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 10px 30px rgba(15,23,42,.12); max-height: 280px; overflow-y: auto; z-index: 20; display: none; }
.ac-list.show { display: block; }
.ac-item { padding: .5rem .7rem; cursor: pointer; display: flex; justify-content: space-between; gap: .5rem; border-bottom: 1px solid #f1f5f9; }
.ac-item:hover, .ac-item.active { background: var(--primary-soft); }
.ac-item small { color: var(--muted); }

/* Login */
.auth-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #0f172a, #0e7490); padding: 1rem; }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.25); padding: 2rem; }
.auth-head { text-align: center; margin-bottom: 1.4rem; }
.auth-head .brand-mark, .auth-head .brand-logo { width: 56px; height: 56px; margin: 0 auto .7rem; border-radius: 14px; }
.auth-head .brand-mark .icon { width: 28px; height: 28px; }
.auth-head p { color: var(--muted); margin: 0; }

/* Cetak */
.print-only { display: none; }
@media print {
    @page { margin: 12mm; }
    body { background: #fff; font-size: 12px; }
    .sidebar, .topbar, .footer, .no-print, .toolbar, .pagination, .alert, .actions, .sidebar-overlay { display: none !important; }
    .main { margin: 0 !important; }
    .content { padding: 0; }
    .card { border: 0; box-shadow: none; }
    .card-header { padding: 0 0 .5rem; }
    .print-only { display: block; }
    .table th, .table td { padding: .3rem .4rem; }
    a { color: inherit; }
}

/* =====================================================================
   Komponen bersama v1.2 (dipakai kedua tema)
   ===================================================================== */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: inherit; cursor: pointer; padding: 0; flex: 0 0 auto; }
.icon-btn:hover { filter: brightness(.97); }
.sidebar .close-btn { display: none; margin-left: auto; background: transparent; border-color: rgba(255,255,255,.15); color: inherit; }
@media (max-width: 992px) { .sidebar .close-btn { display: inline-flex; } }
.btn.loading { opacity: .7; pointer-events: none; }
.form-error { color: var(--danger); font-size: 12.5px; }
.table th.text-right, .table td.text-right { text-align: right; }
.table .col-no { width: 48px; color: var(--muted); }
.cell-user { display: flex; align-items: center; gap: .6rem; }
.cell-sub { display: block; font-size: 12px; color: var(--muted); }
.badge-light { background: #f1f5f9; color: #475569; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 992px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.logo-preview.small { width: 56px; height: 56px; }

/* Judul halaman + tombol aksi */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 700; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.klasik-actions { justify-content: flex-end; margin-bottom: 1rem; }

/* Chip ikon pastel */
:where(.chip-ikon) { width: 46px; height: 46px; border-radius: 14px; display: inline-grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: 0 0 auto; }
.chip-ikon .icon { width: 22px; height: 22px; }
.chip-kuning { background: #fef3c7; color: #b45309; }
.chip-biru { background: #e0f2fe; color: #0369a1; }
.chip-ungu { background: #ede9fe; color: #6d28d9; }
.chip-pink { background: #fce7f3; color: #be185d; }
.chip-hijau { background: #dcfce7; color: #15803d; }
.chip-oranye { background: #ffedd5; color: #c2410c; }
.chip-indigo { background: #e0e7ff; color: #4338ca; }
.chip-merah { background: #fee2e2; color: #b91c1c; }

/* Pilihan tema di Pengaturan */
.tema-pilihan { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.tema-opsi { position: relative; display: block; border: 2px solid var(--border); border-radius: 14px; padding: .8rem; cursor: pointer; background: #fff; transition: border-color .15s, box-shadow .15s; }
.tema-opsi input { position: absolute; opacity: 0; pointer-events: none; }
.tema-opsi:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,116,144,.12); }
.tema-opsi:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.tema-opsi strong { display: block; margin-top: .6rem; }
.tema-opsi small { color: var(--muted); }
.tema-cek { position: absolute; top: .6rem; right: .6rem; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; display: none; place-items: center; }
.tema-cek .icon { width: 15px; height: 15px; }
.tema-opsi:has(input:checked) .tema-cek { display: grid; }
.tema-mini { display: grid; grid-template-columns: 30% 1fr; height: 96px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(0,0,0,.06); }
.tema-mini i { display: block; }
.tema-mini .tm-side { padding: 8px 6px; display: flex; flex-direction: column; gap: 5px; }
.tema-mini .tm-side i { height: 6px; border-radius: 3px; }
.tema-mini .tm-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.tema-mini .tm-hero { height: 26px; border-radius: 6px; }
.tema-mini .tm-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.tema-mini .tm-row i { height: 20px; border-radius: 5px; background: #fff; }
.tm-klasik .tm-side { background: #0f172a; } .tm-klasik .tm-side i { background: #334155; } .tm-klasik .tm-side i:first-child { background: #0e7490; }
.tm-klasik .tm-body { background: #f1f5f9; } .tm-klasik .tm-hero { background: linear-gradient(120deg, #0e7490, #0891b2); }
.tm-hangat .tm-side { background: #fbf7f3; border-right: 1px solid #ece4dc; } .tm-hangat .tm-side i { background: #ece4dc; } .tm-hangat .tm-side i:first-child { background: #fff; box-shadow: 0 1px 2px rgba(60,40,20,.12); }
.tm-hangat .tm-body { background: #f5efe8; } .tm-hangat .tm-hero { background: linear-gradient(120deg, #98806e, #6e5847 55%, #5c4d40); }

/* Dashboard hangat juga dipakai saat tema hangat; komponen daftar bersama */
.list-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.list-head { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--border); }
.list-head h3 { margin: 0; font-size: 16px; }
.list-head .list-sub { color: var(--muted); font-size: 12.5px; }
.list-head .btn { margin-left: auto; }
.list-row { display: flex; justify-content: space-between; gap: .8rem; padding: .7rem 1.1rem; border-bottom: 1px solid var(--border); align-items: center; }
.list-row:last-child { border-bottom: 0; }
.list-row .redup { color: var(--muted); }
.list-row .kanan { color: var(--muted); font-size: 13px; text-align: right; white-space: nowrap; }
.list-empty { padding: 1.4rem; text-align: center; color: var(--muted); }
@media (max-width: 576px) { .list-row { flex-wrap: wrap; } .list-row .kanan { text-align: left; } }
.sidebar-nav [hidden], .nav-empty[hidden] { display: none !important; }
.input-icon .toggle-pass .icon { position: static; transform: none; color: inherit; }
.input-icon:has(.toggle-pass) .form-control { padding-right: 2.6rem; }
.stat > div:last-child { min-width: 0; }
.card-header .actions { flex-wrap: wrap; justify-content: flex-start; }

/* =====================================================================
   Keranjang transaksi (kasir, pembelian, opname) — kartu per barang,
   rapi di HP dan komputer. Kontrol qty: [−] [qty] [+] [×]
   ===================================================================== */
.cart-list { border-top: 1px solid var(--border); }
.cart-list:empty { border-top: 0; }
.cart-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1rem; padding: .95rem 0; border-bottom: 1px solid var(--border); }
.ci-nama { font-weight: 700; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.ci-total { font-weight: 700; font-size: 15px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ci-sub { grid-column: 1 / -1; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.ci-ctrl { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-end; gap: .55rem; margin-top: .55rem; }
.ci-field { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.ci-field > span { font-size: 12px; color: var(--muted); }
.ci-field .form-control { width: 140px; height: 44px; }
.ci-field.lebar { flex: 1 1 200px; }
.ci-field.lebar .form-control { width: 100%; }
.ci-cek { display: inline-flex; align-items: center; gap: .4rem; height: 44px; padding: 0 .8rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; user-select: none; font-size: 14px; }
.ci-cek input { width: 17px; height: 17px; accent-color: var(--primary); }
.stepper { display: inline-flex; align-items: center; gap: .4rem; }
.stepper button, .ci-hapus { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); display: inline-grid; place-items: center; cursor: pointer; padding: 0; flex: 0 0 auto; }
.stepper button:hover, .ci-hapus:hover { background: var(--bg); }
.stepper button:active { transform: scale(.96); }
.stepper button .icon { width: 18px; height: 18px; }
.stepper input { width: 76px; height: 44px; text-align: center !important; font-size: 16px; font-weight: 600; padding: 0 .3rem; }
.ci-hapus { color: var(--danger); }
.ci-hapus .icon { width: 20px; height: 20px; }
.ci-warn { color: var(--danger) !important; }
@media (min-width: 993px) {
    /* Di layar lebar kontrol sejajar di kanan */
    .cart-item { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
    .ci-nama { grid-column: 1; grid-row: 1; }
    .ci-sub { grid-column: 1; grid-row: 2; }
    .ci-ctrl { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; flex-wrap: nowrap; }
    .ci-total { grid-column: 3; grid-row: 1 / span 2; min-width: 120px; }
}
@media (max-width: 576px) {
    .ci-field .form-control { width: 100%; }
    .ci-field { flex: 1 1 120px; }
    .stepper input { width: 64px; }
}
