/* ==========================================================
   Kadana Laundry — Dashboard & Login Stylesheet
   Mengikuti Design Guidelines PRD (Bagian 6)
========================================================== */
:root {
  --midnight: #02050A;
  --navy: #00224E;
  --ocean: #4376AB;
  --gold: #F6BF41;
  --white: #FFFFFF;
  --light-gray: #F5F5F5;
  --med-gray: #9CA3AF;
  --dark-gray: #374151;
  --success: #10B981;
  --warning: #F6BF41;
  --info: #4376AB;
  --error: #EF4444;
  --radius: 12px;
  --shadow: 0 4px 6px rgba(0,0,0,.07);
  --shadow-lg: 0 16px 40px rgba(2,5,10,.16);
  --sidebar-w: 256px;
  --font: "Geist", "Inter", system-ui, -apple-system, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); color: var(--midnight); -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
input, select, button { font-family: inherit; }
ul { list-style: none; }

/* ==========================================================
   LOGIN
========================================================== */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--midnight) 0%, var(--navy) 100%);
  padding: 24px; position: relative; overflow: hidden;
}
.login-body::before, .login-body::after {
  content: ""; position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(67,118,171,.35), transparent 70%);
}
.login-body::before { width: 460px; height: 460px; top: -140px; left: -120px; }
.login-body::after { width: 380px; height: 380px; bottom: -120px; right: -100px; background: radial-gradient(circle, rgba(246,191,65,.18), transparent 70%); }
.login-wrap { position: relative; z-index: 1; width: 100%; max-width: 420px; }
.login-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 40px 34px; }
.login-logo img { height: 42px; margin: 0 auto 22px; }
.login-card h1 { font-size: 24px; text-align: center; color: var(--navy); }
.login-sub { text-align: center; color: var(--med-gray); font-size: 14.5px; margin: 8px 0 28px; }

.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-size: 13.5px; font-weight: 600; color: var(--dark-gray); margin-bottom: 7px; }
.field input, .field select {
  width: 100%; padding: 12px 14px; font-size: 15px; border-radius: 10px;
  border: 1.5px solid rgba(67,118,171,.3); background: var(--light-gray); transition: border .2s, box-shadow .2s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--ocean); box-shadow: 0 0 0 4px rgba(67,118,171,.12); background: #fff; }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 17px; padding: 6px; }
.err { display: block; color: var(--error); font-size: 12.5px; margin-top: 5px; min-height: 14px; }
.login-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; font-size: 13.5px; }
.check { display: flex; align-items: center; gap: 7px; color: var(--dark-gray); cursor: pointer; }
.link-muted { color: var(--ocean); }
.btn-block { width: 100%; padding: 13px; background: var(--gold); color: var(--midnight); border: none; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; transition: transform .15s, box-shadow .2s; }
.btn-block:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(246,191,65,.4); }
.login-demo { margin-top: 22px; background: rgba(67,118,171,.08); border: 1px solid rgba(67,118,171,.2); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--dark-gray); }
.login-demo code { background: #fff; border: 1px solid #e3e3e3; padding: 1px 6px; border-radius: 5px; color: var(--ocean); font-size: 12px; }
.login-foot { text-align: center; color: rgba(255,255,255,.6); font-size: 13px; margin-top: 22px; }
.login-foot a { color: var(--gold); }

/* ==========================================================
   DASHBOARD SHELL
========================================================== */
.dash-body { background: var(--light-gray); min-height: 100vh; }

/* sidebar */
.sidebar {
  position: fixed; top: 0; left: 0; width: var(--sidebar-w); height: 100vh;
  background: var(--navy); color: #fff; display: flex; flex-direction: column; z-index: 50;
}
.sb-top { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sb-logo img { height: 34px; }
.sb-close { display: none; background: none; border: none; color: #fff; font-size: 26px; cursor: pointer; line-height: 1; }
.sb-nav { flex: 1; overflow-y: auto; padding: 16px 14px; }
.sb-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,.4); margin: 16px 10px 8px; }
.sb-label:first-child { margin-top: 0; }
.sb-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: rgba(255,255,255,.78); font-size: 14.5px; font-weight: 500; cursor: pointer; transition: background .18s, color .18s; margin-bottom: 2px; }
.sb-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.sb-item.active { background: var(--ocean); color: #fff; box-shadow: 0 6px 14px rgba(67,118,171,.35); }
.sb-item.locked { opacity: .45; cursor: not-allowed; }
.sb-item.locked:hover { background: none; color: rgba(255,255,255,.78); }
.sb-ic { font-size: 17px; width: 22px; text-align: center; }
.sb-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.sb-logout { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: rgba(255,255,255,.8); font-size: 14.5px; font-weight: 500; transition: background .18s; }
.sb-logout:hover { background: rgba(239,68,68,.18); color: #fff; }
.sb-overlay { display: none; position: fixed; inset: 0; background: rgba(2,5,10,.5); z-index: 40; }

/* main */
.dash-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; background: #fff; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 28px; }
.tb-left { display: flex; align-items: center; gap: 14px; }
.tb-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.tb-burger span { width: 22px; height: 2.5px; background: var(--navy); border-radius: 2px; }
.tb-title { font-size: 20px; color: var(--navy); }
.tb-date { font-size: 13px; color: var(--med-gray); }
.tb-date .tb-clock { color: var(--ocean); font-weight: 600; font-variant-numeric: tabular-nums; }
.tb-right { display: flex; align-items: center; gap: 16px; }
.tb-bell { position: relative; background: none; border: none; font-size: 19px; cursor: pointer; }
.tb-dot { position: absolute; top: 0; right: 2px; width: 8px; height: 8px; background: var(--error); border-radius: 50%; border: 2px solid #fff; }
.tb-user { display: flex; align-items: center; gap: 10px; cursor: pointer; background: none; border: 1px solid transparent; border-radius: 12px; padding: 5px 10px 5px 5px; transition: background .18s, border-color .18s; }
.tb-user:hover { background: var(--light-gray); border-color: #e8eaed; }
.tb-caret { color: var(--med-gray); font-size: 12px; }
.tb-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--ocean), var(--navy)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.tb-user-info strong { display: block; font-size: 14px; }
.tb-user-info span { font-size: 12px; color: var(--med-gray); }

.view { padding: 28px; flex: 1; }

/* ==========================================================
   REUSABLE
========================================================== */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #eef0f3; }
.section-title { font-size: 17px; font-weight: 700; color: var(--navy); }
.muted { color: var(--med-gray); font-size: 13.5px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 14.5px; padding: 11px 18px; border-radius: 10px;
  cursor: pointer; border: 1.5px solid transparent; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ocean); color: #fff; }
.btn-primary:hover { background: #386195; }
.btn-cta { background: var(--gold); color: var(--midnight); }
.btn-cta:hover { box-shadow: 0 8px 18px rgba(246,191,65,.4); }
.btn-ghost { background: #fff; border-color: #e2e5ea; color: var(--dark-gray); }
.btn-ghost:hover { border-color: var(--ocean); color: var(--ocean); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-danger { background: var(--error); color: #fff; }

/* status badges (selaras PRD status colors) */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge .bdot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.diterima { background: rgba(67,118,171,.14); color: var(--info); }
.badge.proses { background: rgba(246,191,65,.2); color: #b8860b; }
.badge.qc { background: rgba(146,64,255,.14); color: #7c3aed; }
.badge.ready { background: rgba(16,185,129,.14); color: var(--success); }
.badge.selesai { background: rgba(55,65,81,.12); color: var(--dark-gray); }
.badge.batal { background: rgba(239,68,68,.13); color: var(--error); }
.badge.pulse .bdot { animation: bpulse 1.4s ease-in-out infinite; }
@keyframes bpulse { 0%,100%{ opacity: 1; } 50%{ opacity: .35; } }

/* ==========================================================
   OVERVIEW
========================================================== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #eef0f3; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.stat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, var(--ocean)); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.sc-label { font-size: 12.5px; color: var(--med-gray); font-weight: 500; }
.sc-value { font-size: 23px; font-weight: 700; color: var(--navy); letter-spacing: -.4px; line-height: 1.2; }
.sc-trend { font-size: 11.5px; font-weight: 600; margin-top: 1px; }
.sc-trend.up { color: var(--success); }
.sc-trend.down { color: var(--error); }
.sc-vs { color: var(--med-gray); font-weight: 500; }

.ov-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin-bottom: 24px; }
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #eef0f3; padding: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }

/* bar chart */
.chart { display: flex; align-items: flex-end; gap: 14px; height: 220px; padding-top: 10px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; max-width: 44px; background: linear-gradient(180deg, var(--ocean), var(--navy)); border-radius: 8px 8px 0 0; position: relative; transition: height .8s cubic-bezier(.2,.8,.2,1); cursor: pointer; }
.chart-bar:hover { filter: brightness(1.12); }
.chart-bar:hover .chart-val { opacity: 1; transform: translateY(-4px); }
.chart-val { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 600; color: var(--navy); background: #fff; padding: 1px 6px; border-radius: 5px; box-shadow: var(--shadow); opacity: 0; white-space: nowrap; transition: opacity .2s; }
.chart-x { font-size: 12px; color: var(--med-gray); }

/* status donut-ish list */
.status-list { display: grid; gap: 12px; }
.status-row { display: flex; align-items: center; gap: 12px; }
.status-row .sr-bar { flex: 1; height: 8px; background: var(--light-gray); border-radius: 999px; overflow: hidden; }
.status-row .sr-fill { height: 100%; border-radius: 999px; }
.status-row .sr-n { font-size: 13px; font-weight: 700; color: var(--navy); min-width: 28px; text-align: right; }
.status-row .sr-name { font-size: 13.5px; color: var(--dark-gray); min-width: 110px; }

/* ----- period selector bar ----- */
.period-bar { display: flex; align-items: center; justify-content: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.seg { display: inline-flex; background: #fff; border: 1px solid #e2e5ea; border-radius: 10px; padding: 4px; gap: 4px; }
.seg-btn { padding: 8px 18px; border: none; background: none; border-radius: 7px; font-size: 13.5px; font-weight: 600; color: var(--dark-gray); cursor: pointer; transition: .18s; }
.seg-btn:hover { color: var(--ocean); }
.seg-btn.active { background: var(--ocean); color: #fff; box-shadow: 0 3px 8px rgba(67,118,171,.3); }
.period-nav { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #e2e5ea; border-radius: 10px; padding: 4px 6px; }
.per-arrow { width: 32px; height: 32px; border-radius: 8px; border: none; background: var(--light-gray); color: var(--navy); font-size: 18px; cursor: pointer; transition: .18s; }
.per-arrow:hover:not(:disabled) { background: var(--ocean); color: #fff; }
.per-arrow:disabled { opacity: .35; cursor: not-allowed; }
.per-label { font-size: 13.5px; font-weight: 600; color: var(--navy); min-width: 150px; text-align: center; padding: 0 6px; }

/* ----- line chart ----- */
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--med-gray); }
.lg { width: 18px; height: 4px; border-radius: 2px; display: inline-block; }
.lg-cur { background: var(--ocean); }
.lg-prev { background: #c9ced6; }
.line-chart { width: 100%; margin-top: 6px; }
.lc-svg { width: 100%; height: auto; display: block; overflow: visible; }
.lc-grid { stroke: #eef0f3; stroke-width: 1; }
.lc-yl { fill: var(--med-gray); font-size: 11px; text-anchor: end; }
.lc-xl { fill: var(--med-gray); font-size: 11px; text-anchor: middle; }
.lc-area { opacity: 0; animation: lcFade .8s ease .3s forwards; }
.lc-prev { fill: none; stroke: #c9ced6; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: lcDraw 1s ease .15s forwards; }
.lc-cur { fill: none; stroke: var(--ocean); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: lcDraw 1.1s ease forwards; }
@keyframes lcDraw { to { stroke-dashoffset: 0; } }
@keyframes lcFade { to { opacity: 1; } }
/* interaksi hover + titik berdenyut */
.lc-cursor { stroke: var(--ocean); stroke-width: 1; stroke-dasharray: 4 4; opacity: .5; }
.lc-hot { fill: #fff; stroke: var(--ocean); stroke-width: 3; }
.lc-pulse { fill: var(--ocean); transform-origin: center; transform-box: fill-box; animation: lcPulse 1.8s ease-out infinite; }
@keyframes lcPulse { 0% { r: 4; opacity: 1; } 70% { r: 11; opacity: 0; } 100% { opacity: 0; } }
.line-chart { position: relative; }
.lc-tip { position: absolute; transform: translate(-50%, -130%); background: var(--navy); color: #fff; padding: 7px 11px; border-radius: 8px; font-size: 12px; line-height: 1.3; box-shadow: var(--shadow-lg); pointer-events: none; white-space: nowrap; z-index: 5; text-align: center; }
.lc-tip strong { display: block; font-size: 13px; }
.lc-tip span { font-size: 10.5px; opacity: .75; }

/* info cards grid (metode bayar / produk terlaris) */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; }
.info-grid.two { grid-template-columns: repeat(2, 1fr); }
.hb-list { display: grid; gap: 16px; padding-top: 4px; }
.hb-row { display: grid; gap: 7px; }
.hb-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hb-name { font-size: 13.5px; color: var(--dark-gray); font-weight: 500; }
.hb-val { font-size: 13px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.hb-track { height: 9px; background: var(--light-gray); border-radius: 999px; overflow: hidden; }
.hb-fill { display: block; height: 100%; border-radius: 999px; transition: width .9s cubic-bezier(.2,.8,.2,1); }

.stock-list { display: grid; gap: 12px; padding-top: 4px; }
.stock-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #f3f4f6; }
.stock-row:last-child { border-bottom: none; padding-bottom: 0; }
.stock-name { font-size: 14px; font-weight: 600; color: var(--midnight); }
.stock-right { display: flex; align-items: center; gap: 12px; }
.stock-qty { font-size: 13.5px; font-weight: 700; color: var(--navy); }

/* profil popup */
.profile-top { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid #eef0f3; }
.profile-avatar { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--ocean), var(--navy)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; flex: none; }
.role-chip { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--ocean); background: rgba(67,118,171,.12); padding: 3px 11px; border-radius: 999px; }

/* detail pelanggan */
.cust-meta { display: grid; gap: 8px; margin-bottom: 16px; }
.cust-meta div { display: flex; justify-content: space-between; gap: 14px; font-size: 13.5px; }
.cust-meta span { color: var(--med-gray); flex: none; }
.cust-meta strong { color: var(--midnight); text-align: right; font-weight: 600; }
.cust-stat { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.cs-box { background: var(--light-gray); border: 1px solid #eef0f3; border-radius: 10px; padding: 12px 14px; }
.cs-box span { display: block; font-size: 12px; color: var(--med-gray); }
.cs-box strong { font-size: 18px; color: var(--navy); }
.acct-box { background: var(--light-gray); border: 1px solid #eef0f3; border-radius: 10px; padding: 14px; margin-top: 4px; }
.landing-box { background: var(--light-gray); border: 1px solid #eef0f3; border-radius: 10px; padding: 14px; margin-top: 12px; }

/* pengaturan */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pay-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pay-chip { display: inline-flex; align-items: center; gap: 7px; background: rgba(67,118,171,.12); color: var(--ocean); font-size: 13.5px; font-weight: 600; padding: 7px 8px 7px 13px; border-radius: 999px; }
.pay-chip button { background: rgba(67,118,171,.25); color: #fff; border: none; width: 18px; height: 18px; border-radius: 50%; cursor: pointer; font-size: 13px; line-height: 1; }
.pay-chip button:hover { background: var(--error); }
.pay-add { display: flex; gap: 8px; }
.pay-add input { flex: 1; padding: 10px 12px; border: 1.5px solid #e2e5ea; border-radius: 9px; font-size: 14px; }
.pay-add input:focus { outline: none; border-color: var(--ocean); }
@media (max-width: 860px) { .settings-grid { grid-template-columns: 1fr; } }
/* hak akses granular per modul — layout seragam */
.perm-list { display: flex; flex-direction: column; gap: 6px; }
.perm-mod { padding: 12px 2px; border-bottom: 1px solid #eef0f3; }
.perm-mod:last-child { border-bottom: none; }
.perm-mod-name { font-size: 14px; font-weight: 700; color: var(--midnight); margin-bottom: 10px; }
.perm-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.perm-act { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1.5px solid #e2e5ea; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--dark-gray); cursor: pointer; transition: .15s; }
.perm-act input { width: 16px; height: 16px; accent-color: var(--ocean); margin: 0; flex: none; }
.perm-act:has(input:checked) { border-color: var(--ocean); background: rgba(67,118,171,.08); color: var(--ocean); }
.perm-act.danger:has(input:checked) { border-color: var(--error); background: rgba(239,68,68,.08); color: var(--error); }
.perm-act:has(input:disabled) { opacity: .6; cursor: default; }
@media (max-width: 560px) { .perm-acts { grid-template-columns: repeat(2, 1fr); } }

/* bulk selection */
.cb-col { width: 38px; text-align: center; }
.cb-col input { width: 16px; height: 16px; accent-color: var(--ocean); cursor: pointer; vertical-align: middle; }
table.data tr.row-sel td { background: rgba(67,118,171,.06); }
.bulk-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--navy); color: #fff; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; animation: fadeIn .2s ease; }
.bulk-count { font-size: 13.5px; font-weight: 600; }
.bulk-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bulk-actions .btn-ghost { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; }
.bulk-actions .btn-ghost:hover { background: rgba(255,255,255,.2); color: #fff; }
.bulk-clear { margin-left: auto; background: none; border: none; color: rgba(255,255,255,.8); font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 8px; border-radius: 7px; }
.bulk-clear:hover { background: rgba(255,255,255,.12); color: #fff; }

/* toolbar laporan */
.rep-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.rep-presets { display: inline-flex; background: #fff; border: 1px solid #e2e5ea; border-radius: 10px; padding: 4px; gap: 4px; }
.rep-range { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #e2e5ea; border-radius: 10px; padding: 5px 10px; }
.rep-range input[type=date] { border: none; outline: none; font-size: 13px; font-family: inherit; color: var(--dark-gray); background: none; }
.rep-filters .f-period .dd-panel { left: 0; right: auto; } /* picker laporan membuka ke kanan */
.rep-exports { display: inline-flex; gap: 8px; margin-left: auto; }
@media (max-width: 560px) { .rep-exports { margin-left: 0; } .rep-presets, .rep-range { flex: 1; justify-content: center; } }
.pos-field input:disabled { background: var(--light-gray); color: var(--med-gray); cursor: not-allowed; }

.qa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.qa-btn { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 18px; border-radius: var(--radius); border: 1px solid #eef0f3; background: #fff; cursor: pointer; transition: transform .18s, box-shadow .2s, border-color .2s; text-align: left; }
.qa-btn:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(67,118,171,.4); }
.qa-btn .qa-ic { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: rgba(67,118,171,.12); }
.qa-btn strong { font-size: 15px; color: var(--navy); }
.qa-btn span { font-size: 12.5px; color: var(--med-gray); }

/* ==========================================================
   TABLE
========================================================== */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; padding: 12px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--med-gray); border-bottom: 1px solid #eef0f3; white-space: nowrap; }
table.data td { padding: 13px 14px; border-bottom: 1px solid #f3f4f6; color: var(--dark-gray); vertical-align: middle; }
table.data tr:hover td { background: #fafbfc; }
table.data .t-order { font-weight: 600; color: var(--navy); }
table.data .t-date { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 13px; }
.t-actions { display: flex; gap: 6px; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid #e2e5ea; background: #fff; cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; transition: .18s; }
.icon-btn:hover { border-color: var(--ocean); background: rgba(67,118,171,.08); }
.icon-btn.danger { color: var(--error); }
.icon-btn.danger:hover { border-color: var(--error); background: rgba(239,68,68,.08); }

/* baris dapat diklik untuk detail */
table.data tr[data-row] { cursor: pointer; }
/* header dapat diurutkan */
table.data th.sortable { cursor: pointer; user-select: none; transition: color .15s; }
table.data th.sortable:hover { color: var(--ocean); }
.sort-arrow { font-size: 10px; margin-left: 3px; color: #c2c7cf; }
.sort-arrow.active { color: var(--ocean); }

/* modal pembatalan */
.cancel-list { display: grid; gap: 8px; }
.cancel-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid #eef0f3; border-radius: 9px; cursor: pointer; transition: .15s; }
.cancel-item:hover { border-color: var(--ocean); }
.cancel-item input { width: 17px; height: 17px; accent-color: var(--ocean); flex: none; }
.cancel-item .ci-info { display: flex; flex-direction: column; gap: 1px; }
.cancel-item .ci-name { font-size: 14px; font-weight: 600; color: var(--midnight); }
.cancel-info { background: rgba(239,68,68,.05); border: 1px solid rgba(239,68,68,.25); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.summary-row.strike span:first-child { text-decoration: line-through; color: var(--med-gray); }
.cancel-reason { font-size: 13px; color: var(--dark-gray); margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(239,68,68,.3); }
.cancel-reason span { font-weight: 700; color: var(--error); }

.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .search-box { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e2e5ea; border-radius: 10px; padding: 9px 13px; flex: 1; min-width: 200px; }
.toolbar .search-box input { border: none; outline: none; font-size: 14px; width: 100%; background: none; }
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ftab { padding: 8px 14px; border-radius: 999px; border: 1.5px solid #e2e5ea; background: #fff; font-size: 13px; font-weight: 600; color: var(--dark-gray); cursor: pointer; transition: .18s; }
.ftab:hover { border-color: var(--ocean); color: var(--ocean); }
.ftab.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ----- toolbar manajemen pesanan + filter ----- */
.ord-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.ord-toolbar .search-box { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e2e5ea; border-radius: 10px; padding: 9px 13px; flex: 1; min-width: 220px; }
.ord-toolbar .search-box input { border: none; outline: none; font-size: 14px; width: 100%; background: none; }
.ord-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; position: relative; }

.dd { position: relative; }
.dd-toggle { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid #e2e5ea; border-radius: 10px; padding: 9px 14px; font-size: 13.5px; font-weight: 600; color: var(--dark-gray); cursor: pointer; transition: .15s; white-space: nowrap; }
.dd-toggle:hover { border-color: var(--ocean); color: var(--ocean); }
.f-period .dd-toggle { width: 222px; justify-content: space-between; } /* lebar tetap agar tidak geser saat label berubah */
.dd-caret { font-size: 11px; color: var(--med-gray); }
.dd-count { background: var(--ocean); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.dd-panel { position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: #fff; border: 1px solid #e8eaed; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 20; padding: 8px; }
.dd-panel[hidden] { display: none; }
.dd-search { width: 100%; padding: 9px 11px; border: 1px solid #e2e5ea; border-radius: 8px; font-size: 13px; margin-bottom: 6px; }
.dd-search:focus { outline: none; border-color: var(--ocean); }
.dd-list { max-height: 200px; overflow-y: auto; }
.dd-opt { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 8px; font-size: 13.5px; color: var(--dark-gray); cursor: pointer; transition: background .12s; }
.dd-opt:hover { background: rgba(67,118,171,.07); }
.dd-opt input { width: 16px; height: 16px; accent-color: var(--ocean); flex: none; }

/* ----- date range picker (preset + 2 bulan + jam) ----- */
.f-period { position: static; } /* panel mengacu ke grup filter agar tidak keluar layar */
.f-period .dd-panel { left: auto; right: 0; }
.f-status .dd-panel, .f-service .dd-panel { left: auto; right: 0; }
.dr-panel { padding: 0; width: max-content; max-width: calc(100vw - 290px); max-height: 82vh; overflow: auto; }
.dr-body { display: flex; align-items: stretch; }
.dr-presets { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; border-right: 1px solid #eef0f3; min-width: 134px; }
.dr-preset { text-align: left; background: none; border: none; padding: 9px 12px; border-radius: 8px; font-size: 13px; color: var(--dark-gray); cursor: pointer; transition: .12s; white-space: nowrap; }
.dr-preset:hover { background: rgba(67,118,171,.1); color: var(--ocean); }
.dr-cals { display: flex; gap: 18px; padding: 14px 16px; }
.drm { width: 212px; }
.drm-title { display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--navy); height: 26px; margin-bottom: 8px; }
.drm-week { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 2px; }
.drm-week span { text-align: center; font-size: 11px; color: var(--med-gray); font-weight: 600; padding: 3px 0; }
.drm-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 3px; }
.drc { height: 32px; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.drd { display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--dark-gray); width: 30px; height: 30px; border-radius: 50%; transition: background .12s; }
.drd:hover { background: rgba(67,118,171,.14); }
.drd.in-range { background: rgba(67,118,171,.16); width: 100%; border-radius: 0; color: var(--navy); }
.drd.sel { background: var(--ocean); color: #fff; font-weight: 700; border-radius: 50%; }
.dr-cal-mobile { display: none; }
.drm-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.drm-nav span { font-weight: 700; color: var(--navy); font-size: 14px; }
.dr-mnav { width: 34px; height: 34px; border-radius: 9px; border: 1px solid #e2e5ea; background: #fff; font-size: 17px; color: var(--navy); cursor: pointer; transition: .15s; }
.dr-mnav:hover { background: var(--light-gray); border-color: var(--ocean); }
.dr-side { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border-left: 1px solid #eef0f3; min-width: 156px; }
.dr-field label { font-size: 12px; color: var(--med-gray); font-weight: 500; }
.dr-date { font-size: 14px; font-weight: 600; color: var(--navy); margin-top: 3px; }
.dr-time { display: flex; align-items: center; gap: 8px; border: 1px solid #e2e5ea; border-radius: 9px; padding: 8px 11px; margin-top: 4px; }
.dr-time input { border: none; outline: none; font-size: 14px; font-family: inherit; color: var(--dark-gray); width: 100%; background: none; }
.dr-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid #eef0f3; }
.dr-range { font-size: 14px; font-weight: 600; color: var(--navy); }
.dr-actions { display: flex; gap: 10px; }
.dr-cancel { background: none; border: none; color: var(--dark-gray); font-weight: 600; font-size: 14px; cursor: pointer; padding: 9px 14px; border-radius: 9px; }
.dr-cancel:hover { background: var(--light-gray); }
.dr-apply { background: var(--ocean); color: #fff; border: none; border-radius: 9px; padding: 9px 22px; font-weight: 600; font-size: 14px; cursor: pointer; transition: .15s; }
.dr-apply:hover { background: #386195; }
.ord-reset { background: none; border: 1px solid transparent; color: var(--error); font-size: 13px; font-weight: 600; padding: 9px 10px; border-radius: 9px; cursor: pointer; transition: .15s; }
.ord-reset:hover { background: rgba(239,68,68,.09); }
.ord-reset.dim { color: var(--med-gray); }
.ord-reset.dim:hover { background: var(--light-gray); }

/* ----- ringkasan periode ----- */
.ord-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.sum-card { display: flex; align-items: center; gap: 12px; background: var(--light-gray); border: 1px solid #eef0f3; border-radius: 12px; padding: 14px 16px; }
.sum-ic { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 19px; background: color-mix(in srgb, var(--c, var(--ocean)) 15%, transparent); flex: none; }
.sum-label { font-size: 12px; color: var(--med-gray); }
.sum-value { font-size: 19px; font-weight: 700; color: var(--navy); letter-spacing: -.3px; }

/* ----- pagination ----- */
.ord-pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 16px; margin-top: 4px; border-top: 1px solid #f3f4f6; }
.pg-left { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--med-gray); }
.pg-left select { padding: 6px 8px; border: 1px solid #e2e5ea; border-radius: 8px; font-size: 13px; font-family: inherit; color: var(--dark-gray); cursor: pointer; background: #fff; }
.pg-info { color: var(--dark-gray); }
.pg-right { display: flex; align-items: center; gap: 4px; }
.pg-arrow, .pg-num { min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid #e2e5ea; background: #fff; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--dark-gray); cursor: pointer; transition: .15s; }
.pg-arrow:hover:not(:disabled), .pg-num:hover { border-color: var(--ocean); color: var(--ocean); }
.pg-arrow:disabled { opacity: .4; cursor: not-allowed; }
.pg-num.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.pg-ellipsis { padding: 0 4px; color: var(--med-gray); }

/* ==========================================================
   POS
========================================================== */
.pos-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.pos-section-label { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.cust-toggle { display: flex; gap: 8px; margin-bottom: 14px; }
.svc-pick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.svc-pick { border: 1.5px solid #e8eaed; border-radius: 12px; padding: 14px; cursor: pointer; transition: .18s; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.svc-pick:hover { border-color: var(--ocean); background: rgba(67,118,171,.05); }
.svc-pick .sp-name { font-weight: 600; font-size: 14px; color: var(--midnight); }
.svc-pick .sp-price { font-size: 12.5px; color: var(--ocean); font-weight: 600; }
.svc-pick .sp-go { color: var(--med-gray); font-size: 20px; line-height: 1; flex: none; transition: transform .18s, color .18s; }
.svc-pick:hover .sp-go { color: var(--ocean); transform: translateX(3px); }

.cart { position: sticky; top: 90px; }
.cart-items { display: grid; gap: 10px; margin: 16px 0; max-height: 280px; overflow-y: auto; }
.cart-empty { text-align: center; color: var(--med-gray); font-size: 14px; padding: 28px 0; }
.cart-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #eef0f3; border-radius: 10px; }
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-name { font-size: 13.5px; font-weight: 600; }
.cart-item .ci-qty { font-size: 12.5px; color: var(--med-gray); margin-top: 2px; }
.ci-sub { font-size: 14px; font-weight: 700; color: var(--navy); text-align: right; white-space: nowrap; }
.ci-edit, .ci-del { background: none; border: none; cursor: pointer; font-size: 15px; padding: 4px; }
.ci-edit { color: var(--ocean); }
.ci-del { color: var(--error); }

/* combobox pelanggan */
.combo { position: relative; }
.combo-input { width: 100%; padding: 10px 12px; border: 1.5px solid #e2e5ea; border-radius: 9px; font-size: 14px; }
.combo-input:focus { outline: none; border-color: var(--ocean); }
.combo-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1px solid #e2e5ea; border-radius: 10px; box-shadow: var(--shadow-lg); max-height: 220px; overflow-y: auto; z-index: 20; }
.combo-opt { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 13px; cursor: pointer; font-size: 13.5px; transition: background .15s; }
.combo-opt:hover { background: rgba(67,118,171,.08); }
.combo-opt strong { color: var(--midnight); font-weight: 600; }
.combo-opt span { color: var(--med-gray); font-size: 12.5px; }
.combo-empty { padding: 14px; text-align: center; color: var(--med-gray); font-size: 13px; }
.input-err { border-color: var(--error) !important; }

/* diskon nominal / persen */
.disc-row { display: flex; gap: 8px; margin-bottom: 14px; }
.disc-toggle { display: inline-flex; border: 1.5px solid #e2e5ea; border-radius: 9px; overflow: hidden; flex: none; }
.disc-t { padding: 0 14px; border: none; background: #fff; font-size: 14px; font-weight: 700; color: var(--dark-gray); cursor: pointer; transition: .15s; }
.disc-t.active { background: var(--ocean); color: #fff; }
.disc-row input { flex: 1; padding: 10px 12px; border: 1.5px solid #e2e5ea; border-radius: 9px; font-size: 14px; }
.disc-row input:focus { outline: none; border-color: var(--ocean); }

/* estimasi */
.eta-box { margin-bottom: 12px; }
.eta-empty { font-size: 13px; color: var(--med-gray); padding: 12px 14px; border: 1px dashed #d8dce2; border-radius: 10px; text-align: center; }
.eta-card { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 10px; background: rgba(246,191,65,.13); border: 1px solid rgba(246,191,65,.45); }
.eta-ic { font-size: 22px; flex: none; }
.eta-label { font-size: 12px; color: #7a5a06; }
.eta-val { font-size: 15px; font-weight: 700; color: #8a6608; }

/* popup jumlah */
.qty-pop { display: flex; align-items: center; gap: 10px; }
.qty-pop input { flex: 1; text-align: center; font-size: 18px; font-weight: 700; color: var(--navy); padding: 10px; border: 1.5px solid #e2e5ea; border-radius: 9px; }
.qp-step { width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid #e2e5ea; background: #fff; font-size: 22px; font-weight: 700; color: var(--ocean); cursor: pointer; flex: none; transition: .15s; }
.qp-step:hover { background: rgba(67,118,171,.08); border-color: var(--ocean); }
.qp-subtotal { margin-top: 16px; text-align: right; font-size: 14px; color: var(--dark-gray); }
.qp-subtotal strong { font-size: 18px; color: var(--navy); }

.pos-field { margin-bottom: 14px; }
.pos-field label { display: block; font-size: 13px; font-weight: 600; color: var(--dark-gray); margin-bottom: 6px; }
.pos-field input, .pos-field select, .pos-field textarea { width: 100%; padding: 10px 12px; border: 1.5px solid #e2e5ea; border-radius: 9px; font-size: 14px; background: #fff; }
.pos-field input:focus, .pos-field select:focus, .pos-field textarea:focus { outline: none; border-color: var(--ocean); }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; color: var(--dark-gray); }
.summary-row.total { border-top: 1px dashed #d8dce2; margin-top: 8px; padding-top: 12px; font-size: 19px; font-weight: 700; color: var(--navy); }
.pay-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 6px 0 14px; }
.pay-opt { padding: 10px; border: 1.5px solid #e2e5ea; border-radius: 9px; text-align: center; font-size: 13px; font-weight: 600; cursor: pointer; transition: .18s; color: var(--dark-gray); }
.pay-opt:hover { border-color: var(--ocean); }
.pay-opt.active { border-color: var(--ocean); background: rgba(67,118,171,.1); color: var(--ocean); }

/* ==========================================================
   MODAL + RECEIPT
========================================================== */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2,5,10,.55); backdrop-filter: blur(2px); animation: fadeIn .2s; }
.modal-box { position: relative; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto; animation: pop .25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid #eef0f3; }
.modal-head h3 { font-size: 17px; color: var(--navy); }
.modal-x { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--med-gray); line-height: 1; }
.modal-pad { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid #eef0f3; display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
/* footer detail pesanan — satu aksi utama + menu ⋮ untuk sisanya */
.detail-foot { gap: 10px; }
.detail-primary { flex: 1; padding: 12px 22px; }
.more-dd { position: relative; flex: none; }
.more-btn { width: 44px; height: 44px; font-size: 20px; color: var(--dark-gray); }
.more-menu { position: absolute; bottom: calc(100% + 8px); left: 0; min-width: 210px; background: #fff; border: 1px solid #e8eaed; border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; z-index: 10; padding: 6px; }
.more-menu[hidden] { display: none; }
.more-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 13px; border: none; border-radius: 8px; background: #fff; font-size: 13.5px; font-weight: 600; color: var(--dark-gray); cursor: pointer; transition: .15s; }
.more-menu button:hover { background: rgba(67,118,171,.1); color: var(--ocean); }
.more-menu button.danger { color: var(--error); }
.more-menu button.danger:hover { background: rgba(239,68,68,.1); color: var(--error); }

/* receipt (struk) */
.receipt { font-family: "Courier New", monospace; color: #111; background: #fff; padding: 22px; }
.receipt-head { text-align: center; border-bottom: 1px dashed #999; padding-bottom: 7px; margin-bottom: 7px; }
.receipt-head h4 { font-size: 17px; letter-spacing: 1px; line-height: 1.2; }
.receipt-head p { font-size: 11px; color: #555; line-height: 1.3; }
.receipt-meta { font-size: 12px; line-height: 1.35; margin-bottom: 6px; }
.receipt-meta div { display: flex; justify-content: space-between; }
.receipt-items { border-top: 1px dashed #999; border-bottom: 1px dashed #999; padding: 6px 0; margin: 6px 0; }
.receipt-items .ri { font-size: 12px; margin-bottom: 3px; line-height: 1.3; }
.receipt-items .ri:last-child { margin-bottom: 0; }
.receipt-items .ri-top { display: flex; justify-content: space-between; font-weight: 700; }
.receipt-items .ri-sub { color: #555; }
.receipt-total div { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 1px; line-height: 1.3; }
.receipt-total .grand { font-size: 15px; font-weight: 700; border-top: 1px dashed #999; padding-top: 4px; margin-top: 4px; }
.receipt-note { font-size: 11.5px; color: #333; border-top: 1px dashed #999; margin-top: 6px; padding-top: 5px; line-height: 1.35; }
.receipt-note span { font-weight: 700; }
.receipt-qr { text-align: center; margin-top: 8px; }
.receipt-qr canvas, .receipt-qr svg { margin: 0 auto; }
.receipt-qr p { font-size: 10.5px; color: #555; margin-top: 4px; line-height: 1.3; }
.receipt-foot { text-align: center; font-size: 11px; color: #555; margin-top: 7px; border-top: 1px dashed #999; padding-top: 6px; line-height: 1.35; }
/* footer struk + tombol */
.receipt-foot-bar { justify-content: flex-end; gap: 10px; padding: 16px 22px; background: #fff; }
.receipt-foot-bar .btn { min-width: 110px; padding: 11px 20px; }
.print-btn { display: inline-flex; align-items: center; gap: 8px; }
.print-btn .pb-caret { font-size: 11px; opacity: .8; }

/* dropdown pilihan cetak */
.print-dd { position: relative; }
.print-menu { position: absolute; bottom: calc(100% + 8px); right: 0; min-width: 210px; background: #fff; border: 1px solid #e8eaed; border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; z-index: 10; padding: 6px; }
.print-menu[hidden] { display: none; }
.print-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 13px; border: none; border-radius: 8px; background: #fff; font-size: 13.5px; font-weight: 600; color: var(--dark-gray); cursor: pointer; transition: .15s; }
.print-menu button:hover { background: rgba(67,118,171,.1); color: var(--ocean); }

/* panggung pratinjau struk + ukuran kertas thermal */
.receipt-stage { background: #eceef1; padding: 18px; display: flex; justify-content: center; max-height: 56vh; overflow-y: auto; }
/* label outlet */
.receipt.label .label-id { text-align: center; font-size: 16px; font-weight: 700; letter-spacing: 1px; border: 2px solid #000; border-radius: 6px; padding: 5px; margin-bottom: 6px; }
.receipt.label .receipt-items { border-top: 1px dashed #999; border-bottom: none; }
.receipt.label .label-foot { margin-top: 5px; border-top: 1px dashed #999; padding-top: 5px; font-size: 11px; font-weight: 700; text-align: center; }
.receipt { box-shadow: 0 4px 14px rgba(2,5,10,.12); }
.receipt.paper-58 { padding: 10px 10px; font-size: 10.5px; }
.receipt.paper-58 .receipt-head h4 { font-size: 15px; }
.receipt.paper-80 { padding: 12px 14px; font-size: 12px; }
.paper-toggle { margin-right: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--med-gray); }
.paper-b { padding: 6px 11px; border: 1px solid #e2e5ea; border-radius: 7px; background: #fff; font-size: 12px; font-weight: 600; color: var(--dark-gray); cursor: pointer; transition: .15s; }
.paper-b.active { background: var(--ocean); color: #fff; border-color: var(--ocean); }

/* konfirmasi checkout */
.confirm-box { border: 1px solid #eef0f3; border-radius: 12px; padding: 16px 18px; background: var(--light-gray); }
.confirm-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; font-size: 14px; color: var(--dark-gray); }
.confirm-row strong { color: var(--midnight); }
.confirm-row.total { border-top: 1px dashed #d8dce2; margin-top: 6px; padding-top: 12px; font-size: 18px; }
.confirm-row.total strong { color: var(--navy); }
.conf-new { font-style: normal; font-size: 11px; font-weight: 700; color: var(--success); background: rgba(16,185,129,.14); padding: 1px 7px; border-radius: 999px; margin-left: 4px; }
.ci-del { font-size: 18px; line-height: 1; }

/* status timeline (detail) */
.timeline { display: grid; gap: 0; }
.tl-row { display: flex; gap: 14px; }
.tl-mark { display: flex; flex-direction: column; align-items: center; }
.tl-dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; background: #e6e6e6; color: var(--med-gray); flex: none; }
.tl-row.done .tl-dot { background: var(--gold); color: var(--midnight); }
.tl-row.current .tl-dot { background: var(--navy); color: #fff; }
.tl-line { width: 2px; flex: 1; background: #e6e6e6; min-height: 22px; }
.tl-row.done .tl-line { background: var(--gold); }
.tl-body { padding-bottom: 18px; }
.tl-body strong { font-size: 14px; color: var(--midnight); }
.tl-body span { display: block; font-size: 12px; color: var(--med-gray); }

/* placeholder view */
.placeholder { text-align: center; padding: 70px 20px; }
.placeholder .ph-ic { font-size: 54px; margin-bottom: 16px; }
.placeholder h2 { font-size: 22px; color: var(--navy); margin-bottom: 8px; }
.placeholder p { color: var(--med-gray); max-width: 420px; margin: 0 auto; }

/* toast */
.toast-wrap { position: fixed; bottom: 22px; right: 22px; z-index: 120; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--navy); color: #fff; padding: 13px 18px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 14px; display: flex; align-items: center; gap: 10px; animation: toastIn .3s ease; }
.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* ==========================================================
   RESPONSIVE
========================================================== */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .ov-grid { grid-template-columns: 1fr; }
  .info-grid, .info-grid.two { grid-template-columns: 1fr; }
  .ord-summary { grid-template-columns: repeat(2, 1fr); }
  .period-bar { justify-content: stretch; }
  .seg, .period-nav { flex: 1; justify-content: center; }
  .pos-grid { grid-template-columns: 1fr; }
  .cart { position: static; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .3s ease; }
  .dash-body.sb-open .sidebar { transform: translateX(0); }
  .dash-body.sb-open .sb-overlay { display: block; }
  .sb-close { display: block; }
  .dash-main { margin-left: 0; }
  .tb-burger { display: flex; }
  .tb-search { display: none; }
}
/* mobile: grafik dibuat dapat di-scroll horizontal agar tetap terbaca */
@media (max-width: 760px) {
  .line-chart { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .lc-svg { min-width: 620px; }
  /* freeze kolom No. Pesanan pada tabel */
  table.data th:first-child, table.data td:first-child {
    position: sticky; left: 0; z-index: 1; background: #fff;
    box-shadow: 6px 0 8px -6px rgba(2,5,10,.18);
  }
  table.data thead th:first-child { z-index: 2; }
  table.data tr:hover td:first-child { background: #fafbfc; }
}
@media (max-width: 560px) {
  .view { padding: 18px 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 14px 14px; }
  .sc-value { font-size: 20px; }
  .qa-grid { grid-template-columns: 1fr; }
  .svc-pick-grid { grid-template-columns: 1fr; }
  .topbar { padding: 12px 16px; }
  .tb-user-info { display: none; }
  .pay-methods { grid-template-columns: 1fr 1fr; }

  /* filter pesanan: baris 1 = periode, baris 2 = layanan · status · reset */
  .ord-filters { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
  .f-period { order: 1; flex: 1 1 100%; }
  .f-service { order: 2; flex: 1; }
  .f-status { order: 3; flex: 1; }
  .ord-reset { order: 4; flex: none; }
  .f-period .dd-toggle, .f-service .dd-toggle, .f-status .dd-toggle { width: 100%; justify-content: space-between; }
  /* panel tampil penuh di bawah baris filter agar tidak keluar layar */
  .f-period, .f-status, .f-service { position: static; }
  .ord-filters .dd-panel { left: 0; right: 0; width: auto; min-width: 0; max-width: none; }
  /* date range picker mobile: 1 bulan saja, fokus ke pemilihan tanggal */
  .dr-presets, .dr-cals, .dr-side { display: none; }
  .dr-cal-mobile { display: block; padding: 14px; }
  .dr-cal-mobile .drm { width: 100%; }
  .dr-cal-mobile .drm-title { display: none; }
  .dr-cal-mobile .drc { height: 40px; font-size: 14px; }
  .dr-cal-mobile .drd { width: 38px; height: 38px; }
  .dr-foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .dr-range { text-align: center; }
  .dr-actions { justify-content: space-between; }
  .dr-cancel, .dr-apply { flex: 1; text-align: center; }

  /* ringkasan periode lebih rapi & ringkas di mobile */
  .ord-summary { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
  .sum-card { padding: 9px 10px; gap: 8px; border-radius: 10px; }
  .sum-ic { width: 28px; height: 28px; font-size: 13px; border-radius: 8px; }
  .sum-label { font-size: 10px; line-height: 1.15; }
  .sum-value { font-size: 14px; letter-spacing: -.2px; }
  .ord-pagination { justify-content: center; gap: 10px; }
  .pg-left, .pg-right { width: 100%; justify-content: center; }
}

/* print only the receipt (lebar mengikuti kertas terpilih: 58mm / 80mm) */
@media print {
  body * { visibility: hidden; }
  .receipt-stage { background: none; padding: 0; overflow: visible; max-height: none; display: block; }
  #receiptPrint, #receiptPrint *, #labelPrint, #labelPrint * { visibility: visible; }
  #receiptPrint, #labelPrint { position: absolute; left: 0; top: 0; box-shadow: none !important; margin: 0 !important; }
  .receipt-tabs { display: none !important; }
  .modal, .modal-box { position: static; max-width: none; box-shadow: none; overflow: visible; }
  .modal-backdrop, .modal-head, .modal-foot { display: none !important; }
}
