/* Kytha Ops – tema terang, ramah layar HP. */
:root {
  --bg: #f6f3ef;
  --card: #ffffff;
  --ink: #1f1a15;
  --ink2: #4a423a;
  --muted: #7a7167;
  --line: #e9e3db;
  --line2: #f1ece6;
  --brand: #8a5a32;
  --brand-2: #b07a4a;
  --brand-soft: #f4ebe2;
  --ok: #1d8a5a;
  --ok-soft: #e6f4ec;
  --warn: #b7791f;
  --warn-soft: #fbf1df;
  --bad: #c2412d;
  --bad-soft: #fbe9e5;
  --info: #2f6fde;
  --info-soft: #e8f0fd;
  --r: 14px;
  --r-sm: 10px;
  --sh: 0 1px 2px rgba(40, 25, 10, .05), 0 4px 16px rgba(40, 25, 10, .05);
  --f: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f); font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }
a { color: var(--brand); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 .6em; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- tombol & input ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--card); padding: 9px 14px; border-radius: var(--r-sm); font-weight: 600; cursor: pointer; min-height: 40px; transition: background .15s, transform .05s; text-decoration: none; color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #774c29; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.btn.block { width: 100%; }
.link { background: none; border: 0; color: var(--brand); padding: 8px 0; cursor: pointer; font-weight: 600; }
.icon-btn { background: none; border: 0; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 16px; color: var(--muted); }
.icon-btn:hover { background: var(--line2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], input:not([type]), select, textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: var(--r-sm); padding: 10px 12px; min-height: 42px; outline: none; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { min-height: 80px; resize: vertical; }
.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--ink2); margin: 12px 0 5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spin { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; display: inline-block; animation: sp .7s linear infinite; }
.spin.dark { border-color: var(--line); border-top-color: var(--brand); width: 22px; height: 22px; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- badge ---------- */
.b { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--line2); color: var(--ink2); white-space: nowrap; }
.b.ok { background: var(--ok-soft); color: var(--ok); }
.b.warn { background: var(--warn-soft); color: var(--warn); }
.b.bad { background: var(--bad-soft); color: var(--bad); }
.b.info { background: var(--info-soft); color: var(--info); }
.b.brand { background: var(--brand-soft); color: var(--brand); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.info { background: var(--info); }

.note { padding: 10px 12px; border-radius: var(--r-sm); background: var(--info-soft); color: #234d9c; font-size: 13.5px; margin: 10px 0; }
.note.warn { background: var(--warn-soft); color: #7a5214; }
.note.bad { background: var(--bad-soft); color: #8d2a1b; }
.note.ok { background: var(--ok-soft); color: #145f3e; }

/* ---------- toast & modal ---------- */
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); background: #1f1a15; color: #fff; padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; transition: .2s; z-index: 100; max-width: calc(100vw - 32px); box-shadow: 0 8px 30px rgba(0, 0, 0, .2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--bad); }
.modal-wrap { position: fixed; inset: 0; background: rgba(30, 20, 10, .35); display: flex; align-items: flex-end; justify-content: center; z-index: 90; opacity: 0; transition: opacity .18s; }
.modal-wrap.show { opacity: 1; }
.modal { background: var(--card); width: 100%; max-width: 560px; max-height: 92vh; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; transform: translateY(20px); transition: transform .18s; }
.modal.wide { max-width: 860px; }
.modal-wrap.show .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--line2); }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 4px 16px calc(18px + env(safe-area-inset-bottom)); overflow: auto; }
@media (min-width: 700px) { .modal-wrap { align-items: center; } .modal { border-radius: 18px; } }

/* ---------- boot & login ---------- */
.boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.boot-err { max-width: 420px; margin: 20vh auto; text-align: center; padding: 16px; }
.logo { width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 16px; max-width: 420px; margin: auto; }
.login-card { background: var(--card); border-radius: 20px; padding: 24px 20px; box-shadow: var(--sh); }
.brand-lg { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.brand-lg b { font-size: 20px; display: block; }
.brand-lg small { color: var(--muted); }
.login .btn.block { margin-top: 16px; }
.kode { text-align: center; font-size: 26px !important; letter-spacing: .35em; font-weight: 700; margin: 8px 0; }

/* ================= OWNER ================= */
.o-top { position: sticky; top: 0; z-index: 20; background: rgba(246, 243, 239, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.o-top-in { max-width: 1280px; margin: auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.o-top .brand { display: flex; align-items: center; gap: 10px; }
.o-top .brand .logo { width: 34px; height: 34px; font-size: 17px; border-radius: 10px; }
.o-top .brand b { font-size: 16px; display: block; line-height: 1.1; }
.o-top .brand small { color: var(--muted); font-size: 12px; }
.o-top .sp { flex: 1; }
.seg { display: inline-flex; background: #ece6df; border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 11px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--ink2); white-space: nowrap; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.chips { max-width: 1280px; margin: auto; padding: 0 16px 8px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; text-decoration: none; color: var(--ink2); font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 99px; background: #fff; border: 1px solid var(--line); }
.chips a .c { color: var(--bad); margin-left: 3px; }
.o-main { max-width: 1280px; margin: auto; padding: 14px 16px 60px; }
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 6px 0 14px; flex-wrap: wrap; }
.hello h1 { font-size: 22px; }
.hello p { margin: 2px 0 0; color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--card); border-radius: var(--r); padding: 13px 14px; box-shadow: var(--sh); border-top: 3px solid var(--line); cursor: default; }
.kpi.click { cursor: pointer; }
.kpi .k { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 22px; font-weight: 750; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi.ok { border-top-color: var(--ok); } .kpi.warn { border-top-color: var(--warn); } .kpi.bad { border-top-color: var(--bad); } .kpi.brand { border-top-color: var(--brand); } .kpi.info { border-top-color: var(--info); }
.up { color: var(--ok); } .down { color: var(--bad); }

.grid-o { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 1000px) { .grid-o { grid-template-columns: 1.15fr 1fr; } .span2 { grid-column: 1 / -1; } }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 14px 16px; min-width: 0; scroll-margin-top: 110px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.card-h h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.card-h .sub { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.narr { color: var(--ink2); font-size: 14px; margin: 0 0 10px; }
.empty { color: var(--muted); font-size: 13.5px; padding: 12px 0; text-align: center; }

.todo { display: flex; flex-direction: column; gap: 8px; }
.todo-i { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line2); border-radius: var(--r-sm); background: #fcfbf9; }
.todo-i .tx { flex: 1; min-width: 0; font-size: 14px; }
.todo-i .tx small { display: block; color: var(--muted); font-size: 12.5px; }
.todo-i .ic { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex: none; font-size: 15px; background: var(--line2); }
.todo-i.bad .ic { background: var(--bad-soft); } .todo-i.warn .ic { background: var(--warn-soft); } .todo-i.info .ic { background: var(--info-soft); }

.tbl-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--card); }
table.t td { padding: 8px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #fbf8f5; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tfoot td { font-weight: 700; border-top: 1px solid var(--line); border-bottom: 0; }

/* jadwal */
.sched { border-collapse: separate; border-spacing: 3px; width: 100%; font-size: 12.5px; }
.sched th { font-weight: 600; color: var(--muted); padding: 4px; text-align: center; white-space: nowrap; }
.sched th.today { color: var(--brand); }
.sched td.nm { white-space: nowrap; font-weight: 600; padding-right: 6px; font-size: 13px; }
.sched td.c { text-align: center; padding: 0; }
.sched td.c button { width: 100%; min-width: 46px; border: 0; border-radius: 7px; padding: 7px 2px; font-weight: 700; font-size: 11.5px; cursor: pointer; }
.sh-PAGI { background: #fdf0d8; color: #8a5a10; }
.sh-MIDDLE { background: #e3eefc; color: #234d9c; }
.sh-SORE { background: #efe5f8; color: #5b2f87; }
.sh-OFF { background: #f0ede9; color: #9a9188; }
.sh-NONE { background: #fff; color: #c8c0b6; outline: 1px dashed #e2dbd2; }
.sh-IZIN { background: var(--ok-soft); color: var(--ok); }

/* absensi hari ini */
.att { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.att-i { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); border: 1px solid var(--line2); }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.att-i .tx { flex: 1; min-width: 0; font-size: 13.5px; }
.att-i .tx b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-i .tx small { color: var(--muted); }

/* grafik */
.chart { width: 100%; height: 220px; }
.chart text { font-size: 11px; fill: var(--muted); font-family: var(--f); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink2); margin-top: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }

.bar { height: 7px; background: var(--line2); border-radius: 9px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 9px; }
.bar.bad > i { background: var(--bad); } .bar.warn > i { background: var(--warn); } .bar.ok > i { background: var(--ok); }

.tabs-mini { display: inline-flex; gap: 4px; }
.tabs-mini button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 9px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--ink2); }
.tabs-mini button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.foto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.foto-grid figure { margin: 0; font-size: 12px; color: var(--muted); }
.foto-grid img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px; background: var(--line2); display: block; }
.slip-lines .ln { display: grid; grid-template-columns: 1fr 140px 32px; gap: 6px; margin-bottom: 6px; }

/* ================= STAFF ================= */
.s-wrap { max-width: 520px; margin: auto; padding: 0 0 90px; }
.s-top { padding: calc(14px + env(safe-area-inset-top)) 16px 10px; display: flex; align-items: center; gap: 10px; }
.s-top .tx { flex: 1; }
.s-top .tx small { color: var(--muted); display: block; font-size: 13px; }
.s-top .tx b { font-size: 19px; }
.s-sec { padding: 0 16px; margin-top: 14px; }
.s-sec > h3 { font-size: 14px; color: var(--muted); font-weight: 650; margin: 0 0 8px 2px; }
.shift-card { background: var(--card); border-radius: 18px; padding: 16px; box-shadow: var(--sh); }
.shift-card .when { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.shift-card .big { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.shift-card .st { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.btn-absen { width: 100%; margin-top: 14px; min-height: 58px; border-radius: 14px; font-size: 17px; font-weight: 750; border: 0; color: #fff; background: var(--ok); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-absen.keluar { background: var(--ink); }
.btn-absen:disabled { opacity: .6; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { background: var(--card); border: 0; border-radius: 16px; padding: 14px 8px 12px; box-shadow: var(--sh); display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 650; font-size: 13.5px; cursor: pointer; text-align: center; position: relative; }
.tile .em { font-size: 24px; line-height: 1; }
.tile small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.tile .flag { position: absolute; top: 8px; right: 8px; }
.tile:active { transform: scale(.97); }
.list { background: var(--card); border-radius: 16px; box-shadow: var(--sh); overflow: hidden; }
.list .li { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line2); font-size: 14px; }
.list .li:last-child { border-bottom: 0; }
.list .li .tx { flex: 1; min-width: 0; }
.list .li .tx small { display: block; color: var(--muted); font-size: 12.5px; }
.list .li.today { background: var(--brand-soft); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { background: var(--card); border-radius: 14px; padding: 10px; text-align: center; box-shadow: var(--sh); }
.stat b { font-size: 20px; display: block; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: 11.5px; }

/* layar form penuh staff */
.sheet { position: fixed; inset: 0; background: var(--bg); z-index: 50; display: flex; flex-direction: column; animation: slideIn .18s ease-out; }
@keyframes slideIn { from { transform: translateY(16px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-h { padding: calc(10px + env(safe-area-inset-top)) 8px 10px; display: flex; align-items: center; gap: 6px; background: var(--card); border-bottom: 1px solid var(--line); }
.sheet-h h2 { font-size: 17px; flex: 1; }
.sheet-b { flex: 1; overflow: auto; padding: 12px 16px 120px; max-width: 560px; width: 100%; margin: 0 auto; }
.sheet-f { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); z-index: 51; }
.sheet-f .in { max-width: 528px; margin: auto; display: flex; gap: 8px; }
.sheet-f .btn { flex: 1; min-height: 50px; font-size: 16px; border-radius: 12px; }
.fcard { background: var(--card); border-radius: 14px; padding: 12px 14px; box-shadow: var(--sh); margin-bottom: 10px; }
.opts { display: flex; gap: 6px; flex-wrap: wrap; }
.opt { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 13px; font-weight: 600; cursor: pointer; font-size: 14px; }
.opt.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.stock-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line2); }
.stock-row:last-child { border-bottom: 0; }
.stock-row .tx { flex: 1; min-width: 0; font-size: 14px; }
.stock-row .tx small { display: block; color: var(--muted); font-size: 12px; }
.stock-row .tx.low b { color: var(--bad); }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex: none; }
.stepper button { width: 36px; height: 40px; border: 0; background: #faf8f5; font-size: 18px; cursor: pointer; }
.stepper input { width: 58px; border: 0 !important; text-align: center; min-height: 40px !important; padding: 0 !important; border-radius: 0 !important; box-shadow: none !important; font-weight: 700; }
.stepper.filled { border-color: var(--brand-2); }
.cat-h { font-size: 12.5px; font-weight: 700; color: var(--brand); margin: 14px 0 2px; text-transform: uppercase; letter-spacing: .03em; }
.search { position: sticky; top: -12px; background: var(--bg); padding: 8px 0; z-index: 2; }
.ck { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line2); }
.ck:last-child { border-bottom: 0; }
.ck .tx { flex: 1; font-size: 14.5px; }
.ck .tx small { display: block; color: var(--muted); font-size: 12px; }
.ck .state { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; flex: none; font-size: 14px; color: #fff; }
.ck.done .state { background: var(--ok); border-color: var(--ok); }
.ck input[type=number], .ck input.angka { width: 130px; flex: none; text-align: right; }
.ck .foto-btn { flex: none; }
.ck .thumb { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex: none; }
.progress { height: 8px; background: var(--line2); border-radius: 9px; overflow: hidden; margin: 6px 0 2px; }
.progress i { display: block; height: 100%; background: var(--ok); transition: width .3s; }
.denom { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.denom label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.denom label span { width: 64px; flex: none; color: var(--ink2); }
.total-line { display: flex; justify-content: space-between; font-weight: 750; font-size: 16px; padding: 10px 0 2px; border-top: 1px dashed var(--line); margin-top: 10px; }
.done-screen { text-align: center; padding: 40px 10px; }
.done-screen .ic { font-size: 54px; }
.done-screen h2 { margin: 10px 0 6px; }

@media (max-width: 760px) {
  .o-top-in { flex-wrap: wrap; row-gap: 8px; }
  .seg { order: 3; width: 100%; display: flex; }
  .seg button { flex: 1; padding: 7px 4px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .o-top .brand small { display: none; }
  .hello h1 { font-size: 19px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi .v { font-size: 19px; }
  .grid3 { grid-template-columns: 1fr 1fr; }
}
@media print { .o-top, .chips, .btn { display: none !important; } .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; } }

/* ================= v2.1: penyempurnaan tampilan ================= */
:root { --f: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --sh: 0 1px 2px rgba(40, 25, 10, .04), 0 6px 20px rgba(40, 25, 10, .045); }
body { font-feature-settings: "cv11", "ss01"; }
.card { border: 1px solid var(--line2); border-radius: 16px; padding: 16px 18px; }
.card-h { margin-bottom: 12px; }
.card-h h2 { font-size: 15.5px; font-weight: 700; }
.sub-h { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.narr { line-height: 1.6; }
p.narr#narasi { background: var(--card); border: 1px solid var(--line2); border-radius: 14px; padding: 12px 16px; box-shadow: var(--sh); font-size: 14.5px; }

/* KPI: titik warna status + angka besar, tanpa garis atas tebal */
.kpi { border-top: 0; border: 1px solid var(--line2); border-radius: 14px; padding: 14px 15px; position: relative; transition: transform .12s, box-shadow .12s; }
.kpi.click:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(40,25,10,.05), 0 10px 24px rgba(40,25,10,.07); }
.kpi .k { display: flex; align-items: center; gap: 6px; }
.kpi .k::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line); flex: none; }
.kpi.ok .k::before { background: var(--ok); } .kpi.warn .k::before { background: var(--warn); } .kpi.bad .k::before { background: var(--bad); } .kpi.brand .k::before { background: var(--brand); }
.kpi .v { font-size: 24px; margin-top: 6px; }
.kpi.bad .v { color: var(--bad); }

.todo { max-height: 470px; overflow: auto; padding-right: 2px; }
.todo-i { background: #fff; border-color: var(--line2); }
.todo-i.bad { border-left: 3px solid var(--bad); } .todo-i.warn { border-left: 3px solid var(--warn); } .todo-i.info { border-left: 3px solid var(--info); }

table.t th { background: #faf8f5; text-transform: uppercase; letter-spacing: .03em; font-size: 11px; }
table.t thead th:first-child { border-top-left-radius: 8px; } table.t thead th:last-child { border-top-right-radius: 8px; }
table.t tbody tr:nth-child(even) td { background: #fdfcfa; }
.sw { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: 0; }

/* ringkasan kecil di atas grafik */
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line2); border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.mini-stats > div { background: #fff; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.mini-stats span { font-size: 12px; color: var(--muted); font-weight: 600; }
.mini-stats b { font-size: 15.5px; font-variant-numeric: tabular-nums; }
.mini-stats small { font-size: 11.5px; color: var(--muted); }

/* grafik batang omzet: semua angka tampil */
.bars-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px 4px; scrollbar-width: thin; }
.bars { min-width: 100%; display: inline-flex; flex-direction: column; width: 100%; }
.plot { position: relative; height: 230px; display: flex; align-items: stretch; gap: 4px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent 45px, #f3eee8 45px, #f3eee8 46px); }
.dates { display: flex; gap: 4px; padding-top: 6px; }
.bc, .bd { flex: 1 0 42px; min-width: 42px; }
.bc { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; cursor: pointer; border-radius: 8px 8px 0 0; outline: none; position: relative; z-index: 1; }
.bc:hover, .bc.sel, .bc:focus-visible { background: rgba(138, 90, 50, .07); }
.bc .bv { font-size: 10.5px; font-weight: 700; color: var(--ink2); font-variant-numeric: tabular-nums; margin-bottom: 3px; white-space: nowrap; letter-spacing: -.02em; }
.bc.best .bv { color: var(--brand); }
.bc.sel .bv { color: var(--ink); }
.bstack { width: 64%; max-width: 30px; display: flex; flex-direction: column-reverse; gap: 2px; border-radius: 5px 5px 0 0; overflow: hidden; transition: filter .12s; }
.bstack i { display: block; min-height: 2px; }
.bc.kosong .bstack { background: #e2dbd2; }
.bc.nanti { opacity: .45; cursor: default; }
.bc.sel .bstack, .bc:hover .bstack { filter: saturate(1.15) brightness(1.03); }
.bd { text-align: center; font-size: 10.5px; color: var(--muted); line-height: 1.25; }
.bd b { display: block; font-size: 12px; color: var(--ink2); }
.bd.today b { color: var(--brand); }
.avg-line { position: absolute; left: 0; right: 0; border-top: 1.5px dashed #c9b49e; z-index: 2; pointer-events: none; }
.avg-line span { position: absolute; right: 0; top: -19px; font-size: 11px; color: var(--brand); background: #fff; padding: 1px 6px; border-radius: 6px; font-weight: 600; border: 1px solid #eadfd3; }
.om-detail { margin-top: 12px; border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; background: #fcfbf9; min-height: 92px; }
.om-d-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.om-d-h .big { font-size: 18px; font-variant-numeric: tabular-nums; }
.om-d-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px 14px; }
.om-d-grid > div { display: flex; flex-direction: column; gap: 1px; }
.om-d-grid span { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.om-d-grid b { font-size: 15px; font-variant-numeric: tabular-nums; }
.om-d-grid small { font-size: 11.5px; color: var(--muted); }
.key { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.kanal-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; margin-top: 8px; }
.kanal-row .nm { display: flex; align-items: center; }
.bar.thin { height: 6px; margin-top: 4px; }
.legend { margin-top: 10px; }

/* staff: tombol akun & halaman akun */
.av-btn { border: 0; cursor: pointer; width: 38px; height: 38px; font-size: 13px; }
.av-lg { width: 58px; height: 58px; font-size: 20px; }
.akun-hero { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: 16px; padding: 16px; box-shadow: var(--sh); margin-bottom: 10px; }
.akun-hero b { font-size: 18px; }
.stat.flat { box-shadow: none; background: var(--bg); }
.list.flat { box-shadow: none; border: 1px solid var(--line2); }
.li-btn { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; }
.li-btn:active { background: var(--line2); }
.slip-row { padding: 7px 0; border-bottom: 1px solid var(--line2); font-size: 14px; }
.slip-row.tot { border-bottom: 0; font-weight: 700; }
.big-num { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 2px 0; }
.shift-card { border: 1px solid var(--line2); }
.tile { border: 1px solid var(--line2); }
.list { border: 1px solid var(--line2); }

@media (max-width: 760px) {
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
  .grid2.split { grid-template-columns: 1fr; gap: 18px; }
  .card { padding: 14px; }
  .bars-wrap { margin: 0 -14px; padding: 0 14px 4px; }
}

/* ================= v2.2: navigasi menu (tanpa scroll panjang) ================= */
.tabbar { max-width: 1280px; margin: auto; padding: 0 16px 10px; display: flex; gap: 6px; }
.tabbar button { position: relative; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 8px 14px; font-weight: 650; font-size: 14px; color: var(--ink2); cursor: pointer; }
.tabbar button .ic { font-size: 15px; line-height: 1; }
.tabbar button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tabbar .c, .subtabs .c { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.subtabs { max-width: 1280px; margin: 0 auto; padding: 10px 16px 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button { flex: none; border: 0; background: none; padding: 8px 12px 10px; font-weight: 650; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2.5px solid transparent; display: inline-flex; align-items: center; gap: 6px; }
.subtabs button.on { color: var(--ink); border-bottom-color: var(--brand); }
.modul { animation: fadeIn .16s ease-out; }
@keyframes fadeIn { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: none; } }
#v-beranda[hidden], .modul[hidden] { display: none !important; }

@media (max-width: 760px) {
  /* HP: menu utama jadi bar bawah seperti aplikasi */
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); gap: 0; max-width: none; }
  .tabbar button { flex: 1; flex-direction: column; gap: 2px; border: 0; background: none; padding: 5px 2px; font-size: 11px; border-radius: 10px; }
  .tabbar button .ic { font-size: 20px; }
  .tabbar button.on { background: var(--brand-soft); color: var(--brand); }
  .tabbar .c { position: absolute; top: 2px; left: calc(50% + 6px); }
  .subtabs { padding: 6px 12px 0; }
  .subtabs button { font-size: 13.5px; padding: 8px 10px 9px; }
  .o-main { padding-bottom: 96px; }
  body.has-tabbar #pita { bottom: calc(74px + env(safe-area-inset-bottom)) !important; }
}
@media print { .tabbar, .subtabs { display: none !important; } .modul[hidden], #v-beranda[hidden] { display: block !important; } }
@media (max-width: 760px) {
  /* backdrop-filter membuat elemen fixed di dalam header ikut header; matikan di HP */
  .o-top { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
}
.kpi.ok, .kpi.warn, .kpi.bad, .kpi.brand, .kpi.info { border-top-color: var(--line2); }
