/* ============================================================
   LAMPION POS — app.css
   UI ala Loyverse: datar, accent oranye, sidebar slate gelap
   ============================================================ */

:root{
  --brand:#F26D21;  --brand-dark:#E05E16;  --brand-soft:#FEF1E7;
  --navy:#2B3A4A;   --navy-2:#34475C;      --navy-line:#3F526B;
  --bg:#F4F5F7;     --card:#ffffff;        --text:#2C2C2C;
  --muted:#7A869A;  --line:#E6E8EC;        --line-soft:#EFF1F4;
  --green:#1FAD5B;  --red:#E5484D;         --yellow:#F5A623; --blue:#2D7FF3;
  --radius:8px;     --radius-sm:6px;
  --shadow:0 1px 3px rgba(21,32,43,.08), 0 1px 2px rgba(21,32,43,.04);
  --shadow-lg:0 10px 34px rgba(21,32,43,.18);
  --font:'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

*,*::before,*::after{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  font-family:var(--font); color:var(--text); background:var(--bg);
  font-size:14.5px; line-height:1.45;
}
a{ color:var(--brand); text-decoration:none; }
h1,h2,h3,h4{ font-weight:650; letter-spacing:-.01em; }

::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-thumb{ background:#C3C9D2; border-radius:6px; }
::-webkit-scrollbar-track{ background:transparent; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page{ background:#EEF0F3; }
.auth-wrap{ min-height:100%; display:flex; align-items:center; justify-content:center; }
.auth-card{
  width:420px; background:#fff; border-radius:12px; padding:34px 36px;
  box-shadow:var(--shadow-lg); border:1px solid var(--line);
}
.brand-badge-lg{ width:64px; height:64px; font-size:30px; }
.auth-brand{ text-align:center; font-size:26px; margin:12px 0 2px; }
.auth-brand b{ color:var(--brand); font-weight:700; }
.auth-sub{ text-align:center; color:var(--muted); margin:0 0 22px; }
.auth-form label{ display:block; font-size:12.5px; color:var(--muted); margin:10px 0 4px; font-weight:600; }
.auth-form .input{ width:100%; padding:11px 14px; border:1.5px solid var(--line); border-radius:var(--radius); font-size:15px; }
.auth-form .input:focus{ border-color:var(--brand); box-shadow:0 0 0 3px rgba(242,109,33,.14); }
.auth-copy{ text-align:center; color:#B4BDC8; font-size:11.5px; margin-top:20px; }

/* ============================================================
   LAYOUT DASHBOARD (sidebar + topbar)
   ============================================================ */
.dash-wrap{ display:flex; min-height:100vh; }
.dash-main{ flex:1; min-width:0; display:flex; flex-direction:column; }

.sidebar{
  width:232px; background:var(--navy); color:#DCE3EC; position:sticky;
  top:0; height:100vh; overflow-y:auto; display:flex; flex-direction:column;
}
.sidebar-brand{ display:flex; align-items:center; gap:10px; padding:18px 20px; color:#F4F6F9; }
.brand-badge{
  width:34px; height:34px; border-radius:9px; background:var(--brand); color:#fff;
  font-weight:800; font-size:18px; display:inline-flex; align-items:center; justify-content:center;
  box-shadow:inset 0 -2px 0 rgba(0,0,0,.16);
}
.brand-text{ font-weight:800; font-size:17px; letter-spacing:.04em; }
.brand-text b{ color:var(--brand); }

.side-nav{ padding:14px 10px; display:flex; flex-direction:column; gap:2px; }
.side-nav-lower{ border-top:1px solid var(--navy-line); margin-top:6px; padding-top:10px; }
.side-item{
  display:flex; align-items:center; gap:12px; padding:11px 13px; border-radius:var(--radius-sm);
  color:#C7D0DB; font-weight:600; font-size:13.8px; text-decoration:none;
}
.side-item svg{ color:#9DA9BE; }
.side-item:hover{ background:rgba(255,255,255,.07); color:#fff; }
.side-item.active{ background:rgba(242,109,33,.16); color:#fff; box-shadow:inset 3px 0 0 var(--brand); }
.side-item.active svg{ color:var(--brand); }

.sidebar-foot{ border-top:1px solid var(--navy-line); padding:12px 14px; margin-top:auto; }
.sidebar-user{ display:flex; align-items:center; gap:10px; }
.sidebar-user .avatar{ width:30px; height:30px; border-radius:50%; background:var(--brand); color:#fff; font-size:13px; font-weight:700; display:inline-flex; align-items:center; justify-content:center; }
.u-meta{ flex:1; min-width:0; }
.u-meta b{ display:block; font-size:13px; color:#F1F4F8; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.u-meta small{ color:#9DA9BE; font-size:11.5px; }
.sidebar-user .icon-btn{ color:#C7D0DB; }
.sidebar-user .icon-btn:hover{ color:#fff; }
/* ---------- Topbar ---------- */
.topbar{
  background:#fff; border-bottom:1px solid var(--line); height:60px;
  display:flex; align-items:center; gap:16px; padding:0 26px; position:sticky; top:0; z-index:30;
}
.topbar-h{ font-size:17.5px; margin:0; }
.tb-date{ color:var(--muted); font-size:13px; }
.topbar-right{ margin-left:auto; display:flex; align-items:center; gap:16px; }
.tb-user{ display:flex; align-items:center; gap:9px; cursor:pointer; position:relative; padding:6px 10px; border:1px solid var(--line); border-radius:30px; }
.tb-user svg{ color:var(--muted); }
.avatar-sm{ width:28px; height:28px; font-size:12px; }
.tb-user-meta{ text-align:left; line-height:1.15; }
.tb-user-meta b{ font-size:12.5px; display:block; }
.tb-user-meta small{ font-size:11px; color:var(--muted); }
.user-drop{
  display:none; position:absolute; top:calc(100% + 8px); right:0; min-width:190px;
  background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow-lg); padding:6px; z-index:60;
}
.user-drop a{ display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:var(--radius-sm); color:var(--text); font-size:13.5px; }
.user-drop a:hover{ background:var(--line-soft); }
.user-drop a.danger{ color:var(--red); }
.user-drop a.danger:hover{ background:rgba(229,72,77,.09); }
.tb-user.open .user-drop{ display:block; }

/* ---------- Content ---------- */
.content{ padding:26px 26px 46px; max-width:1280px; margin:0 auto; width:100%; }
.flash{
  padding:12px 16px; border-radius:var(--radius); margin:0 0 18px; font-size:13.8px;
  display:flex; gap:10px; align-items:center;
}
.flash-success{ background:#EAF9EF; color:#12613A; border:1px solid #BDE8CB; }
.flash-danger{ background:#FDEEED; color:#8F2330; border:1px solid #F5C8C9; }
.flash-warning{ background:#FEF6E3; color:#835C0B; border:1px solid #F3E4AE; }
.flash-info{ background:#ECF3FE; color:#1F4E9C; border:1px solid #C9DEFB; }
/* ============================================================
   KOMPONENTI — tombol, form, kartu, tabel, badge
   ============================================================ */
.btn{
  display:inline-flex; align-items:center; gap:8px; justify-content:center;
  border:1px solid transparent; border-radius:var(--radius-sm); font-weight:650;
  padding:9px 18px; font-size:13.8px; cursor:pointer; transition:background .12s, border-color .12s, box-shadow .12s;
}
.btn svg{ width:16px; height:16px; }
.btn-primary{ background:var(--brand); color:#fff; }
.btn-primary:hover{ background:var(--brand-dark); box-shadow:0 3px 10px rgba(242,109,33,.25); }
.btn-outline{ background:#fff; color:var(--text); border:1.5px solid var(--line); }
.btn-outline:hover{ border-color:var(--brand); color:var(--brand); }
.btn-danger{ background:#fff; color:var(--red); border:1.5px solid var(--line); }
.btn-danger:hover{ background:var(--red); color:#fff; }
.btn-soft{ background:var(--brand-soft); color:var(--brand-dark); border:1px solid transparent; }
.btn-soft:hover{ background:var(--brand); color:#fff; }
.btn-success{ background:var(--green); color:#fff; }
.btn-success:hover{ filter:brightness(.94); }
.btn-ghost{ background:transparent; color:var(--text); border:1.5px solid var(--line); }
.btn-ghost:hover{ background:var(--line-soft); }
.btn-block{ width:100%; }
.btn-lg{ padding:12px 20px; font-size:15px; border-radius:var(--radius); }
.btn-sm{ padding:5px 11px; font-size:12.4px; border-radius:var(--radius-sm); }
.icon-btn{ display:inline-flex; width:34px; height:34px; padding:0; align-items:center; justify-content:center; border:1.5px solid var(--line); background:#fff; border-radius:var(--radius-sm); color:var(--muted); cursor:pointer; }
.icon-btn:hover{ border-color:var(--brand); color:var(--brand); }
.btn[disabled]{ opacity:.5; cursor:not-allowed; }

/* ---------- Input ---------- */
.input, select.input, textarea.input{
  width:100%; padding:9px 12px; border:1.5px solid var(--line); border-radius:var(--radius-sm);
  font-size:13.8px; background:#fff; color:var(--text);
}
.input:focus{ border-color:var(--brand); box-shadow:0 0 0 3px rgba(242,109,33,.12); outline:none; }
select.input{ padding:9px 10px; }
.input-sm{ padding:6px 9px; font-size:12.8px; }
.input-inline{ width:120px; }
.form-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:14px; }
.field{ display:flex; flex-direction:column; gap:5px; }
.field label{ font-size:12.4px; color:var(--muted); font-weight:600; }
.field .hint{ font-size:11.5px; color:#AEB6C2; }
.form-card{ background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:22px 26px; }
.form-card h3{ font-size:14.5px; margin:0 0 14px; }

/* switch toggel */
.toggle{ position:relative; width:44px; height:24px; display:inline-block; flex:none; }
.toggle input{ position:absolute; opacity:0; width:100%; height:100%; margin:0; cursor:pointer; }
.toggle .track{ position:absolute; inset:0; background:#D3D9E0; border-radius:20px; transition:background .15s; pointer-events:none; }
.toggle .track::after{ content:''; position:absolute; width:18px; height:18px; border-radius:50%; background:#fff; left:3px; top:3px; transition:left .15s, box-shadow .15s; }
.toggle input:checked + .track{ background:var(--brand); }
.toggle input:checked + .track::after{ left:23px; }

/* ---------- Kartu ---------- */
.card{ background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.card-header{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 20px; }
.card-header h3{ font-size:15px; margin:0; }
.card-body{ padding:16px 20px; }
.panel{ margin-top:20px; }
.page-head{ display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:6px; }
.page-head h2{ font-size:19px; margin:0; }
/* ---------- Tabel ---------- */
.table-wrap{ border:1px solid var(--line); border-radius:var(--radius); overflow:auto; background:#fff; }
table.tbl{ width:100%; border-collapse:collapse; font-size:13.4px; }
.tbl th{
  background:#F7F8FA; color:var(--muted); font-weight:650; font-size:12.2px; text-align:left;
  padding:11px 14px; white-space:nowrap; border-bottom:1px solid var(--line);
}
.tbl td{ padding:11px 14px; border-bottom:1px solid var(--line); vertical-align:middle; }
.tbl tbody tr:last-child td{ border-bottom:none; }
.tbl tbody tr:hover td{ background:#F7F8FA; }
.tbl .num{ text-align:right; font-variant-numeric:tabular-nums; }
.tbl-actions{ display:flex; gap:6px; justify-content:flex-end; }
.text-muted{ color:var(--muted); }
.text-danger{ color:var(--red); }
.text-success{ color:var(--green); }
.text-brand{ color:var(--brand); }

/* badge */
.badge{ display:inline-flex; align-items:center; padding:2.5px 10px; border-radius:30px; font-size:11.6px; font-weight:650; }
.badge-green{ background:rgba(31,173,91,.12); color:#157347; }
.badge-red{ background:rgba(229,72,77,.11); color:#A13A40; }
.badge-yellow{ background:rgba(245,166,35,.14); color:#9A6B05; }
.badge-navy{ background:rgba(43,58,74,.12); color:#33465C; }
.badge-brand{ background:rgba(242,109,33,.13); color:#C75A12; }

/* avatar umum */
.avatar{ display:inline-flex; align-items:center; justify-content:center; border-radius:50%; }

/* ---------- Modal ---------- */
.modal-overlay{
  position:fixed; inset:0; background:rgba(30,39,50,.45); z-index:100; display:none;
  align-items:center; justify-content:center; backdrop-filter:blur(1.5px);
}
.modal-overlay.open{ display:flex; }
.modal{
  background:#fff; border-radius:12px; width:560px; max-width:94vw; max-height:90vh; overflow:hidden;
  box-shadow:var(--shadow-lg); border:1px solid var(--line); display:flex; flex-direction:column;
}
.modal-header{ display:flex; align-items:center; gap:10px; padding:16px 20px; border-bottom:1px solid var(--line); }
.modal-header h3{ font-size:15.6px; margin:0; }
.modal-header .icon-btn{ margin-left:auto; }
.modal-body{ padding:18px 22px; overflow-y:auto; }
.modal-footer{ display:flex; gap:10px; justify-content:flex-end; padding:12px 20px; border-top:1px solid var(--line); }
.modal-sm{ width:420px; }
.modal-lg{ width:760px; }

/* ---------- Toast ---------- */
#toast-holder{ position:fixed; top:18px; right:18px; z-index:200; display:flex; flex-direction:column; gap:8px; }
.toast{
  background:#1F2A36; color:#fff; border-radius:var(--radius); padding:12px 16px; font-size:13.2px;
  box-shadow:var(--shadow-lg); display:flex; align-items:center; gap:10px; min-width:240px; max-width:380px;
  animation:toastIn .18s ease-out;
}
.toast.ok{ background:#14663C; } .toast.err{ background:#8F2330; } .toast.warn{ background:#7A5B05; }
@keyframes toastIn{ from{ transform:translateY(-14px); opacity:0; } to{ transform:none; opacity:1; } }
/* ============================================================
   DASHBOARD — stat kartu + grafik
   ============================================================ */
.stat-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:18px; }
.stat-card{ background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:18px 20px; box-shadow:var(--shadow); }
.stat-card .label{ font-size:12.2px; color:var(--muted); font-weight:600; display:flex; align-items:center; gap:8px; }
.stat-card .label svg{ width:16px; height:16px; }
.stat-card .value{ font-size:26px; font-weight:750; margin-top:8px; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.stat-card .sub{ font-size:12px; color:var(--muted); margin-top:6px; }
.stat-card .label .ico{ width:26px; height:26px; border-radius:7px; background:var(--brand-soft); color:var(--brand); display:inline-flex; align-items:center; justify-content:center; }
.stat-card:nth-child(2) .label .ico{ background:rgba(45,127,243,.1); color:#2D7FF3; }
.stat-card:nth-child(3) .label .ico{ background:rgba(31,173,91,.12); color:#1FAD5B; }
.stat-card:nth-child(4) .label .ico{ background:rgba(245,166,35,.14); color:#C98A08; }

.dash-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(330px,1fr)); gap:20px; margin-top:22px; }

.bar-chart{ display:flex; align-items:flex-end; gap:10px; height:190px; padding:10px 6px; }
.bar-chart .bar-col{ flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; }
.bar-chart .bar{
  width:100%; max-width:44px; border-radius:5px 5px 2px 2px; background:var(--brand);
  min-height:3px; position:relative;
}
.bar-chart .bar:hover{ background:var(--brand-dark); }
.bar-chart .bar .tip{
  position:absolute; top:-24px; left:50%; transform:translateX(-50%); white-space:nowrap;
  background:#26313F; color:#fff; font-size:10.6px; padding:2px 6px; border-radius:4px; display:none;
}
.bar-chart .bar:hover .tip{ display:block; }
.bar-chart .bar-label{ font-size:11px; color:var(--muted); white-space:nowrap; }
.bar-chart .bar-empty{ background:#E3E7EC; }

/* list (recent orders etc) */
.mini-list{ list-style:none; margin:0; padding:0; }
.mini-list li{ display:flex; align-items:center; gap:12px; padding:11px 6px; border-bottom:1px solid var(--line-soft); }
.mini-list li:last-child{ border-bottom:none; }
.mini-list .m-icon{ width:34px; height:34px; border-radius:9px; background:var(--line-soft); color:var(--muted); display:inline-flex; align-items:center; justify-content:center; }
.mini-list .m-main{ flex:1; min-width:0; }
.mini-list .m-main b{ display:block; font-size:13.4px; }
.mini-list .m-main small{ color:var(--muted); font-size:11.8px; }
.mini-list .m-right{ font-weight:700; font-size:14px; font-variant-numeric:tabular-nums; }

/* kv list (settings, details) */
.kv{ margin:0; }
.kv .kv-row{ display:flex; justify-content:space-between; gap:12px; padding:9px 4px; border-bottom:1px solid var(--line-soft); }
.kv .kv-row dt{ color:var(--muted); font-size:12.6px; }
.kv .kv-row dd{ font-weight:650; font-size:13.4px; text-align:right; }

/* pyramid top menu */
.top-menu{ list-style:none; padding:0; margin:0; }
.top-menu li{ display:flex; align-items:center; gap:12px; padding:9px 6px; border-bottom:1px solid var(--line-soft); }
.top-menu .rank{ width:24px; height:24px; border-radius:7px; font-size:11.5px; font-weight:750; background:var(--line-soft); display:inline-flex; align-items:center; justify-content:center; }
/* ============================================================
   UTILITI + RESPONSIVE
   ============================================================ */
.text-center{ text-align:center; }
.small-text{ font-size:12px; }
.mt-0{ margin-top:0; } .mt-6{ margin-top:6px; } .mt-12{ margin-top:12px; } .mt-20{ margin-top:20px; }
.mb-0{ margin-bottom:0; } .mb-6{ margin-bottom:6px; } .mb-12{ margin-bottom:12px; }
.flex{ display:flex; align-items:center; gap:10px; }
.flex-sb{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.grid-2{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.w-100{ width:100%; }
.nowrap{ white-space:nowrap; }
.chip{
  display:inline-flex; align-items:center; gap:6px; padding:6px 13px; border-radius:30px;
  border:1.5px solid var(--line); background:#fff; color:var(--text); font-size:12.8px; font-weight:600;
  cursor:pointer; user-select:none;
}
.chip.active{ background:var(--brand-soft); border-color:var(--brand); color:var(--brand-dark); }
.chip.active svg{ color:var(--brand); }

.tabs{ display:flex; gap:4px; padding:6px 10px; background:var(--line-soft); border-radius:10px; }
.tabs button{ border:none; background:transparent; padding:9px 18px; border-radius:8px; font-size:13.4px; font-weight:650; color:var(--muted); cursor:pointer; }
.tabs button.active{ background:#fff; color:var(--text); box-shadow:var(--shadow); }

@media (max-width: 900px){
  .sidebar{ display:none; }
  .content{ padding:16px; }
  .stat-grid{ grid-template-columns:1fr 1fr; }
  .dash-grid{ grid-template-columns:1fr; }
}

/* struk preview (reprint) */
.receipt-card{ max-width:300px; margin:0 auto; background:#fff; border:1px dashed var(--line); padding:14px; font-size:12px; }
.receipt-card .rc-head{ font-weight:800; letter-spacing:.06em; text-align:center; }
.receipt-card .rc-line{ text-align:center; color:var(--muted); }
.receipt-card table{ width:100%; }
.receipt-card td{ padding:2px 0; }
.receipt-card .rc-total{ font-size:15px; font-weight:800; }

@media print{
  body *{ visibility:hidden; }
}
.top-menu .rank.r1{ background:var(--brand); color:#fff; }
.top-menu .bar-bg{ height:8px; background:var(--line-soft); border-radius:6px; flex:1; }
.top-menu .bar-fill{ height:8px; border-radius:6px; background:var(--brand); }

/* empty state */
.empty-state{ text-align:center; padding:46px 20px; color:var(--muted); }
.empty-state b{ display:block; font-size:15px; color:var(--text); margin-top:8px; }

/* checklist permission */
.perm-group{ border:1px solid var(--line); border-radius:var(--radius); margin-bottom:14px; }
.perm-group .pg-head{ padding:10px 16px; background:#F7F8FA; font-weight:700; font-size:13px; }
.perm-group .pg-body{ padding:8px 16px; }
.perm-item{ display:flex; align-items:center; gap:10px; padding:7px 4px; }
.perm-item .toggle{ margin-left:auto; }
.perm-item b{ font-size:13.2px; display:block; }
.perm-item small{ color:var(--muted); font-weight:500; }