/* ==========================================================================
   BEZFOOD OPERATIONS — Design System
   Merah + kuning tua (gold), glassmorphism ala Apple.
   ========================================================================== */

:root {
  /* brand */
  --red-100: #ffe3e0;
  --red-300: #f4756c;
  --red-500: #e0342f;
  --red-600: #c81e2a;
  --red-700: #9c1620;
  --gold-100: #fff0c4;
  --gold-300: #f0c962;
  --gold-500: #d9a227;
  --gold-600: #b8860b;
  --gold-700: #8a6408;

  /* surfaces (dark) */
  --bg-0: #100608;
  --bg-1: #180a0d;
  --ink: #fdf6f2;
  --ink-2: rgba(253, 246, 242, .74);
  --ink-3: rgba(253, 246, 242, .5);
  --ink-4: rgba(253, 246, 242, .3);

  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .085);
  --glass-hi: rgba(255, 255, 255, .13);
  --stroke: rgba(255, 255, 255, .11);
  --stroke-2: rgba(255, 255, 255, .18);
  --shadow: 0 18px 48px -22px rgba(0, 0, 0, .85);
  --shadow-lg: 0 32px 80px -30px rgba(0, 0, 0, .9);

  --ok: #34c78a;
  --warn: #e8a83a;
  --danger: #f2564e;
  --info: #5aa9f0;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  --sans: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --sidebar-w: 268px;
  --topbar-h: 62px;
}

[data-theme="light"] {
  --bg-0: #fbf5ef;
  --bg-1: #f4e9e0;
  --ink: #23120f;
  --ink-2: rgba(35, 18, 15, .74);
  --ink-3: rgba(35, 18, 15, .55);
  --ink-4: rgba(35, 18, 15, .32);
  --glass: rgba(255, 255, 255, .58);
  --glass-2: rgba(255, 255, 255, .72);
  --glass-hi: rgba(255, 255, 255, .85);
  --stroke: rgba(120, 60, 40, .16);
  --stroke-2: rgba(120, 60, 40, .26);
  --shadow: 0 16px 40px -24px rgba(90, 30, 20, .45);
  --shadow-lg: 0 30px 70px -34px rgba(90, 30, 20, .5);
}

/* ------------------------------- base ---------------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 700px at 8% -8%, rgba(200, 30, 42, .40), transparent 62%),
    radial-gradient(900px 620px at 96% 4%, rgba(184, 134, 11, .30), transparent 60%),
    radial-gradient(1000px 800px at 60% 108%, rgba(156, 22, 32, .28), transparent 62%),
    linear-gradient(168deg, var(--bg-1), var(--bg-0) 55%);
}
[data-theme="light"] body::before {
  background:
    radial-gradient(1100px 700px at 8% -8%, rgba(224, 52, 47, .20), transparent 62%),
    radial-gradient(900px 620px at 96% 4%, rgba(217, 162, 39, .24), transparent 60%),
    radial-gradient(1000px 800px at 60% 108%, rgba(200, 30, 42, .12), transparent 62%),
    linear-gradient(168deg, var(--bg-1), var(--bg-0) 55%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 640; letter-spacing: -.02em; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.26); background-clip: content-box; }
::selection { background: rgba(224, 52, 47, .4); }

/* ------------------------------- glass --------------------------------- */
.glass {
  background: var(--glass);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  position: relative;
}
.glass::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255,255,255,.30), rgba(255,255,255,0) 42%, rgba(217,162,39,.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}

/* ------------------------------- layout -------------------------------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  position: sticky; top: 0;
  height: 100vh;
  padding: 16px 12px;
  display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-right: 1px solid var(--stroke);
  z-index: 40;
  transition: transform .28s cubic-bezier(.3,.7,.3,1);
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 12px; }
.sidebar-brand img { height: 42px; width: auto; display: block; }
.nav { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px 6px; mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 14px), transparent 100%); -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 14px), transparent 100%); }
.nav::-webkit-scrollbar { width: 6px; }
.nav-group { margin-bottom: 14px; }
.nav-group-title {
  font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-4); padding: 6px 12px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8.5px 12px; border-radius: 12px;
  color: var(--ink-2); font-weight: 500; font-size: 13.4px;
  cursor: pointer; position: relative;
  transition: background .16s, color .16s, transform .16s;
}
.nav-item:hover { background: var(--glass-2); color: var(--ink); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(100deg, rgba(224,52,47,.92), rgba(184,134,11,.72));
  box-shadow: 0 10px 24px -12px rgba(224,52,47,.9), inset 0 1px 0 rgba(255,255,255,.28);
}
.nav-item .ico { width: 18px; text-align: center; opacity: .95; flex: 0 0 18px; font-size: 14px; }
.nav-item .badge-count {
  margin-left: auto; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: rgba(255,255,255,.16);
}
.nav-item.active .badge-count { background: rgba(0,0,0,.28); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  background: rgba(20,8,10,.5);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border-bottom: 1px solid var(--stroke);
}
[data-theme="light"] .topbar { background: rgba(255,255,255,.55); }
.topbar h1 { font-size: 16.5px; font-weight: 650; }
.topbar .sub { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.topbar-spacer { flex: 1; }

.content { padding: 22px; flex: 1; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h2 { font-size: 22px; letter-spacing: -.03em; }
.page-head p { margin: 3px 0 0; color: var(--ink-3); font-size: 13px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------ components ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 15px; border-radius: 11px; border: 1px solid var(--stroke-2);
  background: var(--glass-2); color: var(--ink);
  font-size: 13px; font-weight: 560; cursor: pointer; white-space: nowrap;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform .12s, background .16s, border-color .16s, box-shadow .16s;
}
.btn:hover { background: var(--glass-hi); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(100deg, var(--red-500), var(--red-700));
  border-color: rgba(255,255,255,.2); color: #fff;
  box-shadow: 0 12px 26px -14px rgba(224,52,47,.95), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn-primary:hover { background: linear-gradient(100deg, #ec4038, var(--red-600)); }
.btn-gold {
  background: linear-gradient(100deg, var(--gold-500), var(--gold-700));
  border-color: rgba(255,255,255,.2); color: #201400;
  box-shadow: 0 12px 26px -14px rgba(184,134,11,.9), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn-ghost { background: transparent; border-color: var(--stroke); }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 9px; }
.btn-icon { padding: 7px 9px; }

.card { padding: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { font-size: 14.5px; font-weight: 640; }
.card-head .sub { font-size: 11.5px; color: var(--ink-3); }
.card-head .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.span4 { grid-column: span 4; }

/* KPI */
.kpi { padding: 15px 16px; display: flex; flex-direction: column; gap: 4px; min-height: 92px; overflow: hidden; }
.kpi .label { font-size: 11px; font-weight: 620; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.kpi .value { font-size: 25px; font-weight: 700; letter-spacing: -.035em; line-height: 1.12; font-variant-numeric: tabular-nums; }
.kpi .value.sm { font-size: 19px; }
.kpi .meta { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.kpi.accent-red .value { background: linear-gradient(96deg, #ff8a7f, var(--red-500)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi.accent-gold .value { background: linear-gradient(96deg, var(--gold-300), var(--gold-600)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.delta { font-size: 11.5px; font-weight: 640; padding: 1px 7px; border-radius: 999px; }
.delta.up { background: rgba(52,199,138,.16); color: var(--ok); }
.delta.down { background: rgba(242,86,78,.16); color: var(--danger); }

/* badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2.5px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 640; letter-spacing: .01em;
  background: var(--glass-2); border: 1px solid var(--stroke); white-space: nowrap;
}
.badge.ok { background: rgba(52,199,138,.15); border-color: rgba(52,199,138,.32); color: #6ee0b0; }
.badge.warn { background: rgba(232,168,58,.15); border-color: rgba(232,168,58,.34); color: #f0c164; }
.badge.danger { background: rgba(242,86,78,.16); border-color: rgba(242,86,78,.36); color: #ff9a93; }
.badge.info { background: rgba(90,169,240,.15); border-color: rgba(90,169,240,.32); color: #90c6f7; }
.badge.neutral { color: var(--ink-3); }
.badge.gold { background: rgba(217,162,39,.16); border-color: rgba(217,162,39,.36); color: var(--gold-300); }
[data-theme="light"] .badge.ok { color: #14814f; }
[data-theme="light"] .badge.warn { color: #8a5c04; }
[data-theme="light"] .badge.danger { color: #b0221b; }
[data-theme="light"] .badge.info { color: #1c5c99; }
[data-theme="light"] .badge.gold { color: #7a5709; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 7px; }
.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.8px; }
table.tbl th {
  text-align: left; font-weight: 620; font-size: 10.8px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); padding: 8px 11px; border-bottom: 1px solid var(--stroke); white-space: nowrap;
  position: sticky; top: 0; background: transparent; backdrop-filter: blur(8px);
}
table.tbl td { padding: 9px 11px; border-bottom: 1px solid rgba(255,255,255,.055); vertical-align: middle; }
[data-theme="light"] table.tbl td { border-bottom-color: rgba(120,60,40,.09); }
table.tbl tbody tr { transition: background .13s; }
table.tbl tbody tr:hover { background: var(--glass); }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl td.mono { font-family: var(--mono); font-size: 11.8px; }
.tbl-empty { text-align: center; padding: 34px 10px; color: var(--ink-3); font-size: 13px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 11.5px; font-weight: 620; color: var(--ink-3); letter-spacing: .02em; }
.input, select.input, textarea.input {
  width: 100%; padding: 8.5px 12px; border-radius: 11px;
  background: rgba(255,255,255,.05); border: 1px solid var(--stroke);
  color: var(--ink); font-size: 13.2px; outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
[data-theme="light"] .input, [data-theme="light"] select.input, [data-theme="light"] textarea.input { background: rgba(255,255,255,.7); }
.input:focus, select.input:focus, textarea.input:focus {
  border-color: rgba(224,52,47,.6); background: rgba(255,255,255,.09);
  box-shadow: 0 0 0 3.5px rgba(224,52,47,.15);
}
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23b98' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
select.input option { background: #1b0d10; color: #fdf6f2; }
[data-theme="light"] select.input option { background: #fff; color: #23120f; }
textarea.input { min-height: 74px; resize: vertical; }
.input::placeholder { color: var(--ink-4); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.form-grid .full { grid-column: 1 / -1; }
.help { font-size: 11px; color: var(--ink-4); }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: rgba(255,255,255,.14); position: relative; transition: background .18s; }
.switch .track::after { content: ''; position: absolute; top: 2.5px; left: 2.5px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .2s cubic-bezier(.3,.8,.3,1); box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.switch input:checked + .track { background: linear-gradient(100deg, var(--red-500), var(--gold-600)); }
.switch input:checked + .track::after { transform: translateX(16px); }

/* segmented */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--glass); border: 1px solid var(--stroke); }
.seg button { border: 0; background: transparent; padding: 5.5px 13px; border-radius: 9px; font-size: 12.2px; font-weight: 560; color: var(--ink-3); cursor: pointer; transition: .15s; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--glass-hi); color: var(--ink); box-shadow: 0 4px 12px -6px rgba(0,0,0,.6); }

/* progress */
.bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--red-500), var(--gold-500)); transition: width .5s cubic-bezier(.3,.8,.3,1); }
.bar.ok > i { background: linear-gradient(90deg, #2fae7c, #6ee0b0); }
.bar.warn > i { background: linear-gradient(90deg, #d08c1c, #f0c164); }
.bar.danger > i { background: linear-gradient(90deg, #c8302a, #ff9a93); }

/* pipeline */
.pipeline { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.pipe-stage {
  flex: 1 1 0; min-width: 104px; padding: 13px 14px; border-radius: var(--r);
  background: var(--glass); border: 1px solid var(--stroke); position: relative;
  transition: transform .15s, border-color .15s; cursor: pointer;
}
.pipe-stage:hover { transform: translateY(-2px); border-color: var(--stroke-2); }
.pipe-stage .n { font-size: 23px; font-weight: 720; letter-spacing: -.04em; line-height: 1; }
.pipe-stage .l { font-size: 11px; color: var(--ink-3); margin-top: 5px; font-weight: 560; }
.pipe-stage.hot { border-color: rgba(224,52,47,.45); background: linear-gradient(160deg, rgba(224,52,47,.16), var(--glass)); }
.pipe-arrow { align-self: center; color: var(--ink-4); font-size: 15px; flex: 0 0 auto; }

/* timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, var(--red-500), var(--gold-600)); opacity: .45; border-radius: 2px; }
.tl-item { position: relative; padding: 0 0 16px; }
.tl-item::before { content: ''; position: absolute; left: -22px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg-1); border: 2.5px solid var(--gold-500); }
.tl-item.done::before { background: var(--gold-500); }
.tl-item .t { font-size: 13px; font-weight: 600; }
.tl-item .d { font-size: 11.5px; color: var(--ink-3); }

/* modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,4,5,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center; padding: 42px 18px;
  overflow-y: auto; animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.modal {
  width: min(880px, 100%); border-radius: var(--r-xl); padding: 22px;
  background: linear-gradient(165deg, rgba(40,18,22,.94), rgba(24,10,13,.96));
  backdrop-filter: blur(34px) saturate(180%); -webkit-backdrop-filter: blur(34px) saturate(180%);
  border: 1px solid var(--stroke-2); box-shadow: var(--shadow-lg);
  animation: pop .22s cubic-bezier(.2,.8,.3,1);
}
[data-theme="light"] .modal { background: linear-gradient(165deg, rgba(255,252,248,.97), rgba(248,238,230,.98)); }
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(.985) } to { opacity: 1; transform: none } }
.modal.wide { width: min(1180px, 100%); }
.modal.narrow { width: min(520px, 100%); }
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.modal-head h3 { font-size: 17px; }
.modal-head .close { margin-left: auto; cursor: pointer; color: var(--ink-3); font-size: 20px; line-height: 1; padding: 4px 8px; border-radius: 8px; }
.modal-head .close:hover { background: var(--glass-2); color: var(--ink); }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--stroke); }

/* toast */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 9px; max-width: 380px; }
.toast {
  padding: 12px 15px; border-radius: var(--r); font-size: 13px;
  background: linear-gradient(150deg, rgba(46,20,24,.96), rgba(26,11,14,.97));
  border: 1px solid var(--stroke-2); box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px); animation: slideIn .24s cubic-bezier(.2,.8,.3,1);
}
[data-theme="light"] .toast { background: linear-gradient(150deg, rgba(255,252,249,.98), rgba(247,238,231,.98)); }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px) } to { opacity: 1; transform: none } }
.toast.ok { border-left: 3px solid var(--ok); }
.toast.err { border-left: 3px solid var(--danger); }
.toast.warn { border-left: 3px solid var(--warn); }
.toast .tt { font-weight: 640; margin-bottom: 2px; }
.toast .tb { color: var(--ink-3); font-size: 12.2px; }

/* notifications panel */
.notif-panel {
  position: fixed; top: var(--topbar-h); right: 12px; width: min(420px, calc(100vw - 24px)); max-height: 72vh;
  overflow-y: auto; z-index: 60; padding: 8px;
  background: linear-gradient(165deg, rgba(42,18,22,.96), rgba(24,10,13,.97));
  border: 1px solid var(--stroke-2); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  backdrop-filter: blur(30px) saturate(180%); animation: pop .18s ease;
}
[data-theme="light"] .notif-panel { background: linear-gradient(165deg, rgba(255,252,248,.98), rgba(248,239,232,.98)); }
.notif { display: flex; gap: 10px; padding: 10px 11px; border-radius: 12px; cursor: pointer; }
.notif:hover { background: var(--glass-2); }
.notif.unread { background: rgba(224,52,47,.07); }
.notif .ic { flex: 0 0 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; background: var(--glass-2); }
.notif .tt { font-size: 12.8px; font-weight: 600; }
.notif .bd { font-size: 11.7px; color: var(--ink-3); margin-top: 1px; }
.notif .tm { font-size: 10.5px; color: var(--ink-4); margin-top: 3px; }

/* charts */
.chart { width: 100%; display: block; overflow: visible; }
.chart .grid-line { stroke: rgba(255,255,255,.075); stroke-width: 1; }
[data-theme="light"] .chart .grid-line { stroke: rgba(120,60,40,.12); }
.chart .axis-label { fill: var(--ink-4); font-size: 10px; font-family: var(--sans); }
.chart .series-label { fill: var(--ink-3); font-size: 10.5px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); margin-top: 8px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; }

/* misc */
.muted { color: var(--ink-3); }
.tiny { font-size: 11px; }
.mono { font-family: var(--mono); }
.row { display: flex; align-items: center; gap: 8px; }
.wrap { flex-wrap: wrap; }
.right { margin-left: auto; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.sep { height: 1px; background: var(--stroke); margin: 14px 0; }
.avatar { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; flex: 0 0 30px; }
.searchbox { position: relative; flex: 0 1 320px; }
.searchbox .input { padding-left: 32px; }
.searchbox .mag { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-4); font-size: 13px; }
.search-results { position: absolute; top: 110%; left: 0; right: 0; z-index: 70; padding: 6px; border-radius: var(--r); background: linear-gradient(165deg, rgba(42,18,22,.97), rgba(24,10,13,.98)); border: 1px solid var(--stroke-2); box-shadow: var(--shadow-lg); }
[data-theme="light"] .search-results { background: rgba(255,252,248,.99); }
.search-results div { padding: 7px 10px; border-radius: 9px; cursor: pointer; font-size: 12.5px; }
.search-results div:hover { background: var(--glass-2); }
.search-results .t { font-size: 10px; color: var(--ink-4); text-transform: uppercase; letter-spacing: .06em; }

.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.11), rgba(255,255,255,.05)); background-size: 200% 100%; animation: shim 1.3s linear infinite; border-radius: 10px; }
@keyframes shim { to { background-position: -200% 0 } }
.spin { display: inline-block; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.25); border-top-color: var(--gold-400, #f0c962); border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg) } }

.hamburger { display: none; }
.scrim { display: none; }

/* responsive */
@media (max-width: 1240px) {
  .g6 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(0,0,0,.5); backdrop-filter: blur(3px); }
  .hamburger { display: inline-flex; }
  .g3, .g4, .g6 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g2 { grid-template-columns: 1fr; }
  .span2, .span3, .span4 { grid-column: span 2; }
  .content { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .g3, .g4, .g6 { grid-template-columns: 1fr; }
  .span2, .span3, .span4 { grid-column: span 1; }
  .kpi .value { font-size: 22px; }
  .topbar .sub { display: none; }
  .searchbox { display: none; }
}


/* Sidebar selalu gelap agar identitas merah–emas Bezfood konsisten di kedua tema */
[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, #26100f, #1a0a0c);
  border-right-color: rgba(255,255,255,.10);
}
[data-theme="light"] .sidebar .nav-item { color: rgba(253,246,242,.72); }
[data-theme="light"] .sidebar .nav-item:hover { background: rgba(255,255,255,.09); color: #fff; }
[data-theme="light"] .sidebar .nav-group-title { color: rgba(253,246,242,.34); }
[data-theme="light"] #sidebar-foot .glass { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); }
[data-theme="light"] #sidebar-foot .glass > .row > div > div:first-child { color: #fff; }
[data-theme="light"] #sidebar-foot .btn { color: rgba(253,246,242,.85); border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.06); }
[data-theme="light"] #sidebar-foot .muted { color: rgba(253,246,242,.5); }

/* ------------------------------ login page ------------------------------ */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(430px, 100%); padding: 34px 32px; border-radius: var(--r-xl); }
.login-card .logo { display: flex; justify-content: center; margin-bottom: 22px; }
.login-card .logo img { height: 62px; }
.login-card h1 { font-size: 20px; text-align: center; margin-bottom: 4px; }
.login-card p.sub { text-align: center; color: var(--ink-3); font-size: 12.8px; margin: 0 0 22px; }
.login-card .field { margin-bottom: 13px; }
.login-card .btn { width: 100%; padding: 11px; font-size: 14px; margin-top: 6px; }
.login-err { background: rgba(242,86,78,.14); border: 1px solid rgba(242,86,78,.34); color: #ff9a93; padding: 9px 12px; border-radius: 11px; font-size: 12.5px; margin-bottom: 13px; }
.login-foot { margin-top: 20px; text-align: center; font-size: 11px; color: var(--ink-4); }
.demo-users { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--stroke); }
.demo-users .t { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-4); margin-bottom: 8px; text-align: center; }
.demo-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--stroke); font-size: 11.5px; margin: 3px; cursor: pointer; }
.demo-chip:hover { background: var(--glass-hi); }
.demo-list { display: flex; flex-wrap: wrap; justify-content: center; }


/* ------------------------- penghapusan data ---------------------------- */
.btn-danger {
  background: linear-gradient(100deg, #d1332c, #92150f);
  border-color: rgba(255,255,255,.2); color: #fff;
  box-shadow: 0 10px 22px -14px rgba(209,51,44,.95), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-danger:hover { background: linear-gradient(100deg, #e03d35, #a81a13); }
[data-theme="light"] .btn-danger { color: #fff; }

.note-block {
  padding: 12px 14px; border-radius: 12px; font-size: 12.8px; line-height: 1.55;
  background: var(--glass); border: 1px solid var(--stroke); margin-bottom: 14px;
}
.note-block.danger { background: rgba(242,86,78,.12); border-color: rgba(242,86,78,.34); }
.note-block.warn { background: rgba(232,168,58,.12); border-color: rgba(232,168,58,.32); }
.note-block b { font-weight: 640; }
.note-block ul { color: var(--ink-2); }

.opt-card {
  padding: 13px 15px; border-radius: 14px; margin-bottom: 11px;
  background: var(--glass); border: 1px solid var(--stroke);
}
.opt-card.danger { border-color: rgba(242,86,78,.32); background: rgba(242,86,78,.07); }
.opt-card p { margin: 0; }

tbody tr .btn-danger { opacity: .55; transition: opacity .15s; }
tbody tr:hover .btn-danger { opacity: 1; }

/* print */
@media print {
  .sidebar, .topbar, .page-head .actions, .btn { display: none !important; }
  body::before, body::after { display: none; }
  body { background: #fff; color: #000; }
  .glass { border: 1px solid #ccc; box-shadow: none; background: #fff; }
}
