/* Tema admin Toko Kue — token dari DESIGN.md (amber/cokelat, kartu 10px). */
:root {
    --tk-primary: #b45309; --tk-primary-soft: #fef3c7; --tk-primary-ink: #92400e;
    --tk-bg: #fafaf9; --tk-line: #e7e5e4; --tk-muted: #78716c;
    --tk-success: #15803d; --tk-success-soft: #dcfce7;
    --tk-danger: #b91c1c; --tk-danger-soft: #fee2e2;
    --tk-info: #1d4ed8; --tk-info-soft: #dbeafe;
    --tk-shadow: 0 1px 2px rgb(28 25 23 / .05), 0 4px 14px rgb(28 25 23 / .05);
}
.dark { --tk-bg: #0c0a09; --tk-line: #292524; --tk-muted: #a8a29e; --tk-primary: #f59e0b; --tk-primary-soft: #451a03; --tk-primary-ink: #fcd34d; }

body.fi-body, .fi-body { background: var(--tk-bg); }
.fi-topbar > nav { border-bottom: 1px solid var(--tk-line); box-shadow: 0 1px 0 rgb(180 83 9 / .08); }
.fi-sidebar { border-right: 1px solid var(--tk-line); }
.fi-sidebar-item-btn { border-radius: 8px; }
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn { background: var(--tk-primary-soft); box-shadow: inset 3px 0 0 var(--tk-primary); }
.fi-sidebar-item.fi-active .fi-sidebar-item-label, .fi-sidebar-item.fi-active .fi-icon { color: var(--tk-primary-ink); font-weight: 600; }
.fi-sidebar-group-label { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; font-weight: 700; }
.fi-section, .fi-ta-ctn, .fi-wi-stats-overview-stat { border-radius: 10px; box-shadow: var(--tk-shadow); }
.fi-btn.fi-color-primary { box-shadow: 0 1px 2px rgb(180 83 9 / .3); }

/* Dashboard */
.tk-hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 24px; border-radius: 14px; color: #fff;
    background: linear-gradient(120deg, #92400e 0%, #b45309 55%, #d97706 100%); box-shadow: 0 6px 20px rgb(180 83 9 / .25); position: relative; overflow: hidden; }
.tk-hero::after { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgb(255 255 255 / .1); }
.tk-hero h2 { margin: 0; font-size: 22px; font-weight: 700; }
.tk-hero p { margin: 4px 0 0; font-size: 14px; opacity: .9; }
.tk-hero .tk-pill { position: relative; z-index: 1; background: rgb(255 255 255 / .18); padding: 6px 14px; border-radius: 9999px; font-size: 13px; font-weight: 600; }

.tk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.tk-card { background: #fff; border: 1px solid var(--tk-line); border-radius: 10px; padding: 16px; box-shadow: var(--tk-shadow); min-width: 0; }
.dark .tk-card { background: #1c1917; }
.tk-kpi { position: relative; padding-top: 18px; transition: transform .15s, box-shadow .15s; }
.tk-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgb(28 25 23 / .1); }
.tk-kpi::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 10px 10px 0 0; background: var(--accent, var(--tk-primary)); }
.tk-kpi-head { display: flex; align-items: center; gap: 10px; color: var(--tk-muted); font-size: 14px; }
.tk-chip { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--soft, var(--tk-primary-soft)); color: var(--accent, var(--tk-primary)); flex-shrink: 0; }
.tk-chip svg { width: 20px; height: 20px; }
.tk-kpi-value { font-size: 26px; font-weight: 800; margin-top: 10px; letter-spacing: -.01em; }
.tk-kpi-note { font-size: 12px; font-weight: 600; margin-top: 4px; }

.tk-title { margin: 0 0 12px; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.tk-title svg { width: 18px; height: 18px; color: var(--tk-primary); }
.tk-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--tk-line); font-size: 14px; }
.tk-muted { color: var(--tk-muted); font-size: 14px; }
.tk-bar { flex-grow: 1; height: 14px; background: #f5f5f4; border-radius: 9999px; overflow: hidden; }
.tk-bar > div { height: 100%; border-radius: 9999px; background: linear-gradient(90deg, #d97706, #b45309); }
.tk-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0; color: var(--tk-muted); font-size: 14px; text-align: center; }
.tk-empty svg { width: 32px; height: 32px; opacity: .45; }
.tk-rank { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--tk-primary-soft); color: var(--tk-primary-ink); margin-right: 8px; }
.tk-badge { flex-shrink: 0; min-width: 72px; text-align: center; padding: 2px 10px; border-radius: 9999px; font-size: 12px; font-weight: 600; }
.tk-grid { display: flex; flex-wrap: wrap; gap: 16px; }

/* ===== Semua halaman admin ===== */
.fi-header-heading { font-weight: 800; letter-spacing: -.01em; }
.fi-header-heading::after { content: ""; display: block; width: 44px; height: 4px; margin-top: 8px; border-radius: 9999px; background: linear-gradient(90deg, #d97706, #b45309); }
.fi-breadcrumbs-item-label { font-size: 12px; }

/* Tabel */
.fi-ta-ctn { border: 1px solid var(--tk-line); overflow: hidden; background: #fff; }
.dark .fi-ta-ctn { background: #1c1917; }
.fi-ta-header-cell { background: #f5f5f4; text-transform: uppercase; letter-spacing: .04em; font-size: 11.5px; }
.dark .fi-ta-header-cell { background: #292524; }
.fi-ta-header-cell-label { font-weight: 700; color: var(--tk-muted); }
.fi-ta-row { transition: background .12s; }
.fi-ta-row:hover { background: #fffbeb; }
.dark .fi-ta-row:hover { background: #292524; }
.fi-ta-row:nth-child(even) { background-color: rgb(250 250 249 / .6); }
.dark .fi-ta-row:nth-child(even) { background-color: transparent; }
.fi-ta-cell { font-size: 14px; }
.fi-ta-empty-state-icon-bg { background: var(--tk-primary-soft); }
.fi-ta-empty-state-icon-bg .fi-icon { color: var(--tk-primary); }
.fi-ta-empty-state-heading { font-weight: 700; }

/* Badge & tombol */
.fi-badge { border-radius: 9999px; font-weight: 600; }
.fi-btn { border-radius: 8px; font-weight: 600; transition: transform .1s, box-shadow .15s, background .15s; }
.fi-btn:active { transform: translateY(1px); }
.fi-btn.fi-color-primary:not(.fi-outlined) { background: linear-gradient(180deg, #c2610d, #b45309); }
.fi-btn.fi-color-primary:not(.fi-outlined):hover { background: linear-gradient(180deg, #b45309, #92400e); }
.fi-icon-btn { border-radius: 8px; }

/* Form */
.fi-input-wrp, .fi-fo-textarea, .fi-select-input-btn { border-radius: 8px; box-shadow: 0 0 0 1px #a8a29e, 0 1px 2px rgb(28 25 23 / .06); transition: box-shadow .15s; }
.fi-input-wrp:hover, .fi-fo-textarea:hover, .fi-select-input-btn:hover { box-shadow: 0 0 0 1px #78716c, 0 1px 2px rgb(28 25 23 / .08); }
.fi-input-wrp:focus-within, .fi-fo-textarea:focus-within, .fi-select-input-btn:focus-visible { box-shadow: 0 0 0 2px #b45309; }
.fi-fo-field-label-content { font-weight: 600; font-size: 13.5px; }
.fi-section-header-heading { font-weight: 700; }
.fi-section-header { border-bottom: 1px solid var(--tk-line); }
.fi-tabs { border-radius: 10px; box-shadow: var(--tk-shadow); }
.fi-tabs-item.fi-active { background: var(--tk-primary-soft); }
.fi-tabs-item.fi-active .fi-tabs-item-label, .fi-tabs-item.fi-active .fi-icon { color: var(--tk-primary-ink); }

/* Modal & notifikasi */
.fi-modal-window { border-radius: 14px; box-shadow: 0 20px 50px rgb(28 25 23 / .25); }
.fi-no-notification { border-radius: 10px; box-shadow: var(--tk-shadow); }

/* Halaman login */
.fi-simple-layout { background: radial-gradient(circle at 15% 10%, #fde68a55, transparent 45%), radial-gradient(circle at 85% 90%, #f59e0b33, transparent 45%), var(--tk-bg); }
.fi-simple-main { border-radius: 16px; box-shadow: 0 12px 40px rgb(120 53 15 / .15); border-top: 4px solid var(--tk-primary); }
.fi-simple-header-heading { font-weight: 800; }
.fi-logo { font-weight: 800; color: var(--tk-primary-ink); }

/* Scrollbar halus */
* { scrollbar-width: thin; scrollbar-color: #d6d3d1 transparent; }
.fi-btn.fi-color-primary:not(.fi-outlined), .fi-btn.fi-color-primary:not(.fi-outlined) .fi-btn-label, .fi-btn.fi-color-primary:not(.fi-outlined) .fi-icon { color: #fff; }

/* ===== Sidebar bersih & rapat ===== */
.fi-sidebar, .fi-sidebar-nav { background: #fff; }
.dark .fi-sidebar, .dark .fi-sidebar-nav { background: #1c1917; }
.fi-sidebar-header { background: transparent; }
.fi-sidebar-nav { padding-top: 16px; padding-bottom: 16px; row-gap: 4px; }
.fi-sidebar-nav-groups { row-gap: 2px; }
.fi-sidebar-group { margin: 0; }
.fi-sidebar-group-btn { background: transparent; border: 0; border-radius: 8px; padding: 6px 10px; }
.fi-sidebar-group-btn:hover { background: var(--tk-primary-soft); }
.fi-sidebar-group-label { color: var(--tk-primary-ink); font-size: 11px; }
.fi-sidebar-group-collapse-btn, .fi-sidebar-group-btn .fi-icon { color: var(--tk-primary); }
.fi-sidebar-group-items { row-gap: 1px; }
.fi-sidebar-item-btn { padding: 6px 10px; }
.fi-sidebar-item-btn:hover { background: #fffbeb; }
.fi-sidebar-item .fi-icon { color: #a8a29e; }
.fi-sidebar-item:hover .fi-icon { color: var(--tk-primary); }
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn { background: var(--tk-primary-soft); box-shadow: none; }

/* Aksi cepat di banner & tombol refresh */
.tk-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.tk-act { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9999px; font-size: 13px; font-weight: 600; color: #fff; background: rgb(255 255 255 / .18); text-decoration: none; transition: background .15s; }
.tk-act:hover { background: rgb(255 255 255 / .3); }
.tk-act svg { width: 16px; height: 16px; }
.tk-act-main { background: #fff; color: #92400e; }
.tk-act-main:hover { background: #fffbeb; }
.tk-refresh { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--tk-primary); }
.tk-refresh:hover { background: var(--tk-primary-soft); }
.tk-refresh svg { width: 16px; height: 16px; }

/* Kolom angka: tanpa tombol panah naik-turun yang memakan tempat dan membuat isian sempit */
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
