/* Watoo / SDC POS — tema merah, hitam, putih */
:root {
  --red: #d81f26;
  --red-dark: #b3161c;
  --red-soft: rgba(216, 31, 38, .09);
  --black: #0b0b0c;
  --bg: #f4f4f5;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --ink: #17171a;
  --muted: #64646c;
  --line: #e5e5e8;
  --line-strong: #d1d1d6;
  --sidebar: #0b0b0c;
  --sidebar-ink: #f7f7f8;
  --sidebar-muted: #9a9aa2;
  --green: #157f3d;
  --green-soft: rgba(21, 127, 61, .1);
  --amber: #b45309;
  --amber-soft: rgba(180, 83, 9, .12);
  --blue: #1d4ed8;
  --blue-soft: rgba(29, 78, 216, .1);
  --danger: #b91c1c;
  --danger-soft: rgba(185, 28, 28, .1);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .05);
  --radius: 14px;
  --radius-sm: 9px;
  --serif: Georgia, 'Times New Roman', serif;
}

html[data-theme="dark"] {
  --bg: #0d0d0f;
  --surface: #17171a;
  --surface-2: #1d1d21;
  --ink: #f4f4f5;
  --muted: #a5a5af;
  --line: #2b2b31;
  --line-strong: #3d3d45;
  --red-soft: rgba(239, 68, 68, .14);
  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, .12);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, .12);
  --blue: #93b4ff;
  --blue-soft: rgba(147, 180, 255, .12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, .12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a.text-link { color: var(--red); font-weight: 600; }
a.text-link:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 10px; }
small { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Layout */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 252px; background: var(--sidebar); color: var(--sidebar-ink);
  display: flex; flex-direction: column; z-index: 50; border-right: 1px solid #1f1f23;
}
.sidebar-head { padding: 18px 18px 10px; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 900; letter-spacing: .5px; }
.brand-logo { width: auto; height: 42px; max-width: 44px; object-fit: contain; flex-shrink: 0; }
.logo-themed img.logo-for-dark { display: none; }
html[data-theme="dark"] .logo-themed img.logo-for-light { display: none !important; }
html[data-theme="dark"] .logo-themed img.logo-for-dark { display: inline-block; }
.public-logo-mark img { height: 36px; width: auto; max-width: 42px; object-fit: contain; }
.public-brand-full img { height: 40px; width: auto; max-width: 185px; object-fit: contain; }
.public-footer .public-logo-mark img { height: 30px; max-width: 36px; }
.login-logo { display: block; }
.login-logo img { display: inline-block; width: min(250px, 100%); height: auto; object-fit: contain; }
.login-sub { color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin: -6px 0 20px; }
.login-theme-toggle { position: absolute; top: 14px; right: 14px; }
.brand-name { font-weight: 800; font-size: 15px; line-height: 1.15; color: #fff; }
.brand-sub { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--sidebar-muted); }
.sidebar-nav { overflow-y: auto; padding: 8px 10px 24px; flex: 1; scrollbar-width: thin; }
.nav-group { margin-top: 16px; }
.nav-title { padding: 0 10px 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: #6f6f78; font-weight: 700; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--sidebar-muted); font-weight: 500; margin-bottom: 2px; }
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-link:hover { background: #1c1c20; color: #fff; }
.nav-link.active { background: var(--red); color: #fff; }
.nav-link .nav-count { margin-left: auto; background: rgba(255,255,255,.18); border-radius: 20px; font-size: 11px; padding: 1px 7px; }
.sidebar-foot { border-top: 1px solid #242428; padding: 12px 14px; font-size: 11px; color: #777780; }
.main { margin-left: 252px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 10px 22px; min-height: 62px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar-title { font-weight: 700; font-size: 15px; }
.topbar-sub { font-size: 11px; color: var(--muted); }
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.content { padding: 22px; max-width: 1560px; width: 100%; margin: 0 auto; flex: 1; }
.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 24px; }
.page-head p { color: var(--muted); margin: 4px 0 0; }
.page-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); border-radius: 9px; padding: 8px 13px; font-size: 13px;
  font-weight: 600; cursor: pointer; line-height: 1.2; white-space: nowrap; transition: .12s ease;
}
.btn:hover { border-color: var(--muted); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-dark { background: var(--black); border-color: var(--black); color: #fff; }
html[data-theme="dark"] .btn-dark { background: #2a2a30; border-color: #3d3d45; }
.btn-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 5px 9px; font-size: 12px; border-radius: 7px; }
.btn-lg { padding: 11px 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); }
.icon-btn svg { width: 20px; height: 20px; }
.count-dot { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.hamburger { display: none; }

/* cards & grid */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-title { font-weight: 700; font-size: 14px; }
.card-sub { color: var(--muted); font-size: 12px; }
.card-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.stat-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.stat-top .stat-ico { width: 28px; height: 28px; border-radius: 8px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; }
.stat-top svg { width: 15px; height: 15px; }
.stat-value { font-size: 19px; font-weight: 800; margin-top: 8px; letter-spacing: -.02em; }
.stat-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.stat.red .stat-value { color: var(--red); }
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }

/* badges & alerts */
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--danger-soft); color: var(--danger); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-gray { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.alert { border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 14px; border: 1px solid var(--line); background: var(--surface); display: flex; gap: 9px; align-items: flex-start; font-size: 13px; }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-error { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); background: var(--danger-soft); color: var(--danger); }
.alert-success { border-color: color-mix(in srgb, var(--green) 35%, var(--line)); background: var(--green-soft); color: var(--green); }
.alert-info { border-color: var(--line); background: var(--surface-2); color: var(--ink); }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

/* tables */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 620px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 75%, transparent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table tfoot td { font-weight: 700; background: var(--surface-2); }
.table.compact td, .table.compact th { padding: 7px 10px; }
.table-wrap .table { min-width: 100%; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.empty { text-align: center; padding: 40px 18px; color: var(--muted); }
.empty svg { width: 34px; height: 34px; opacity: .5; margin-bottom: 8px; }

/* forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: span 3; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 12px; font-weight: 700; color: var(--ink); }
.field .req { color: var(--red); }
.field input, .field select, .field textarea, .input {
  width: 100%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  border-radius: 9px; padding: 9px 11px; font: inherit; font-size: 13px; min-height: 40px;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); outline: 2px solid var(--red-soft); outline-offset: 0; }
.field .hint { font-size: 11px; color: var(--muted); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--red); }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 8px 11px; cursor: pointer; font-size: 13px; }
.radio-pill:has(input:checked) { border-color: var(--red); background: var(--red-soft); color: var(--red); font-weight: 600; }
.radio-pill input { accent-color: var(--red); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filter-bar .field { min-width: 140px; }
.filter-bar .field input, .filter-bar .field select { min-height: 36px; padding: 7px 10px; }
.customer-option { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.customer-option:last-child { border-bottom: 0; }
.customer-option:hover, .customer-option:focus { background: var(--red-soft); }
.input-group { display: flex; }
.input-group input { border-radius: 9px 0 0 9px; }
.input-group .btn { border-radius: 0 9px 9px 0; }

/* dashboard chart */
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 12px; }
.bar-chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 6px; min-width: 0; }
.bar-chart .bar-fill { width: 100%; max-width: 34px; background: linear-gradient(180deg, var(--red), #f16a70); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar-chart .bar-label { font-size: 9px; color: var(--muted); white-space: nowrap; transform: rotate(-35deg); transform-origin: center; margin-bottom: -2px; }
.bar-chart.large { height: 220px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; }

/* production */
.production-card .card-head { align-items: flex-start; }
.production-card.overdue { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.production-card.overdue .card-head { background: var(--danger-soft); }
.job-row { display: flex; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.job-row:last-child { border-bottom: 0; }
.job-main { flex: 1; min-width: 220px; }
.job-name { font-weight: 700; }
.job-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.job-stage { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.stage-pill { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; font-size: 11px; color: var(--muted); }
.stage-track { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.stage-track span { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.stage-track span.done { background: var(--green-soft); color: var(--green); border-color: transparent; }
.stage-track span.current { background: var(--red-soft); color: var(--red); border-color: var(--red); font-weight: 700; }
.thumb { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line); background: var(--surface-2); }
.files-list { display: flex; flex-direction: column; gap: 6px; }
.file-item { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; background: var(--surface); }
.file-item svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.file-item .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.file-item form { display: inline; }

/* misc */
.money { font-variant-numeric: tabular-nums; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.red { color: var(--red); }
.green { color: var(--green); }
.small { font-size: 12px; }
.xsmall { font-size: 11px; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.flex { display: flex; gap: 8px; align-items: center; }
.flex-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.flex-wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.hide { display: none !important; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.summary-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 13px; }
.summary-row.total { border-top: 1px solid var(--line-strong); margin-top: 6px; padding-top: 9px; font-size: 16px; font-weight: 800; }
.summary-row.total .money { color: var(--red); }
.pay-info { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.pay-info img { width: 150px; height: auto; max-height: 210px; object-fit: contain; border-radius: 7px; background: #fff; border: 1px solid var(--line); }
.pay-info > .pay-copy { flex: 1; min-width: 0; }
.doc-pay { display: flex; align-items: center; gap: 12px; margin-top: 14px; border: 1px solid #ddd; border-radius: 6px; padding: 8px 10px; font-size: 11px; color: #333; }
.doc-pay img { width: 150px; height: auto; object-fit: contain; }
.doc-pay > div { flex: 1; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--red), #7c1015); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 999px; }
.user-chip:hover { background: var(--surface-2); }
.user-name { font-size: 12px; font-weight: 700; line-height: 1.2; }
.user-role { font-size: 10px; color: var(--muted); }

/* dropdown & toast */
.dropdown { position: relative; }
.dropdown-panel { position: absolute; right: 0; top: 46px; width: 340px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 60; overflow: hidden; }
.dropdown-panel .panel-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.dropdown-panel .panel-list { max-height: 340px; overflow-y: auto; }
.notif-item { display: block; padding: 10px 13px; border-bottom: 1px solid var(--line); }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--red-soft); }
.notif-title { font-weight: 700; font-size: 12px; }
.notif-body { font-size: 11px; color: var(--muted); margin-top: 2px; }
.notif-time { font-size: 10px; color: var(--muted); margin-top: 3px; }
.toast-wrap { position: fixed; top: 16px; right: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 10px; box-shadow: var(--shadow); padding: 11px 13px; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; animation: slidein .2s ease; }
.toast.error { border-left-color: var(--danger); }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast .toast-close { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 2px; }
@keyframes slidein { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 45; display: none; }
.overlay.show { display: block; }

/* tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.tab { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tab:hover { background: var(--surface-2); }
.tab.active { background: var(--red-soft); color: var(--red); }

/* login */
.login-page { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1000px 600px at 100% 0%, #2a0b0d 0%, #0b0b0c 55%, #050506 100%); padding: 18px; }
.login-card { position: relative; width: 100%; max-width: 400px; background: var(--surface); border-radius: 18px; padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand .brand-mark { width: 46px; height: 46px; font-size: 18px; }
.login-brand h1 { font-size: 18px; }
.login-brand p { font-size: 11px; color: var(--muted); margin: 2px 0 0; text-transform: uppercase; letter-spacing: .12em; }
.login-card .field { margin-bottom: 13px; }
.login-foot { margin-top: 18px; text-align: center; font-size: 11px; color: var(--muted); }

/* public */
.public-body { background: var(--bg); }
.public-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.public-nav { max-width: 1180px; margin: 0 auto; padding: 0 18px; height: 64px; display: flex; align-items: center; gap: 18px; }
.public-nav .brand { display: flex; align-items: center; gap: 9px; font-weight: 800; }
.public-nav .brand .brand-mark { width: 34px; height: 34px; border-radius: 9px; font-size: 13px; }
.public-links { display: flex; gap: 4px; margin-left: 10px; }
.public-links a { padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.public-links a:hover, .public-links a.active { background: var(--red-soft); color: var(--red); }
.public-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.hero { max-width: 1180px; margin: 0 auto; padding: 54px 18px 34px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 34px; align-items: center; }
.hero-kicker { color: var(--red); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; font-size: 11px; }
.hero h1 { font-size: clamp(30px, 5vw, 54px); font-weight: 900; letter-spacing: -.03em; margin: 10px 0 14px; }
.hero h1 em { color: var(--red); font-style: normal; }
.hero p { color: var(--muted); font-size: 15px; max-width: 540px; }
.hero-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 22px; }
.hero-art { background: var(--black); border-radius: 24px; padding: 26px; color: #fff; position: relative; overflow: hidden; min-height: 280px; display: flex; flex-direction: column; justify-content: space-between; }
.hero-art:after { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: var(--red); filter: blur(60px); opacity: .3; right: -60px; bottom: -90px; }
.hero-art .big { font-family: var(--serif); font-size: 42px; line-height: 1; font-weight: 700; letter-spacing: -.03em; }
.hero-art .mini { color: #a1a1aa; font-size: 12px; }
.public-section { max-width: 1180px; margin: 0 auto; padding: 28px 18px 44px; }
.section-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { font-size: 24px; }
.section-head p { color: var(--muted); margin: 4px 0 0; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: .15s ease; }
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.product-card .ph { aspect-ratio: 4/3; background: linear-gradient(135deg, #1a1a1d, #3a0d10); display: grid; place-items: center; color: #fff; overflow: hidden; }
.product-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.product-card .ph span { font-size: 34px; font-weight: 900; opacity: .4; }
.product-card .pb { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.product-card .pcat { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--red); font-weight: 800; }
.product-card .pname { font-weight: 700; font-size: 14px; }
.product-card .pprice { font-weight: 800; margin-top: auto; padding-top: 6px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 600; color: var(--muted); }
.chip.active { background: var(--black); border-color: var(--black); color: #fff; }
.public-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 30px; }
.public-footer-inner { max-width: 1180px; margin: 0 auto; padding: 28px 18px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; font-size: 13px; }
.public-footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; }
.public-footer a { color: var(--muted); display: block; padding: 2px 0; }
.public-footer a:hover { color: var(--red); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.detail-media { background: var(--black); border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; display: grid; place-items: center; color: #fff; }
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.price-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.price-table th, .price-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.price-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.cart-panel { position: fixed; right: 16px; bottom: 16px; width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 70; display: none; overflow: hidden; }
.cart-panel.open { display: block; }
.cart-panel .panel-head { padding: 11px 13px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
.cart-panel .panel-body { max-height: 280px; overflow-y: auto; padding: 9px 13px; }
.cart-panel .panel-foot { border-top: 1px solid var(--line); padding: 11px 13px; display: flex; gap: 8px; }
.cart-line { display: flex; gap: 8px; align-items: center; padding: 6px 0; font-size: 12px; }
.cart-line .nm { flex: 1; }
.qty-input { width: 72px; text-align: right; }
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 52px; height: 52px; border-radius: 50%; background: #128c4b; color: #fff; display: grid; place-items: center; box-shadow: 0 12px 30px rgba(18,140,75,.35); }
.wa-float svg { width: 26px; height: 26px; }

/* print */
.print-page { background: #fff; color: #111; font-family: Arial, Helvetica, sans-serif; }
.print-toolbar { position: sticky; top: 0; display: flex; gap: 8px; justify-content: flex-end; padding: 10px 14px; background: #f4f4f5; border-bottom: 1px solid #ddd; }
.a4 { width: 210mm; min-height: 297mm; margin: 10mm auto; background: #fff; padding: 14mm; box-shadow: 0 4px 30px rgba(0,0,0,.12); }
.a4 h1, .a4 h2, .a4 h3 { color: #111; }
.doc-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid #d81f26; padding-bottom: 14px; }
.doc-brand { display: flex; gap: 12px; align-items: flex-start; }
.doc-logo { width: 54px; height: 54px; border-radius: 10px; color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 20px; }
.doc-logo img { max-width: 54px; max-height: 54px; width: auto; height: auto; object-fit: contain; }
.doc-company { font-size: 18px; font-weight: 800; }
.doc-meta { font-size: 12px; color: #555; }
.doc-title { text-align: right; }
.doc-title h1 { font-size: 26px; letter-spacing: .08em; margin: 0; color: #d81f26; }
.doc-title .num { font-weight: 700; font-size: 13px; }
.doc-party { display: flex; justify-content: space-between; gap: 20px; margin: 20px 0; font-size: 13px; }
.doc-party .block { max-width: 48%; }
.doc-party .label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #777; margin-bottom: 3px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.doc-table th { background: #f2f2f2; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; text-align: left; padding: 8px; }
.doc-table td { padding: 7px 8px; border-bottom: 1px solid #eee; vertical-align: top; }
.doc-totals { width: 280px; margin-left: auto; margin-top: 14px; font-size: 12px; }
.doc-totals .r { display: flex; justify-content: space-between; padding: 4px 0; }
.doc-totals .r.grand { border-top: 2px solid #111; margin-top: 5px; padding-top: 7px; font-size: 15px; font-weight: 800; }
.doc-note { margin-top: 20px; font-size: 11px; color: #555; }
.doc-sign { margin-top: 36px; display: flex; justify-content: space-between; font-size: 11px; }
.doc-sign > div { width: 200px; text-align: center; border-top: 1px solid #999; padding-top: 4px; }
.stamp { display: inline-block; border: 2px solid #157f3d; color: #157f3d; font-weight: 800; padding: 2px 9px; border-radius: 5px; font-size: 11px; letter-spacing: .06em; }
.stamp.dp { border-color: #b45309; color: #b45309; }
.stamp.unpaid { border-color: #b91c1c; color: #b91c1c; }
.receipt { width: 80mm; margin: 6mm auto; background: #fff; color: #111; padding: 5mm; font-family: "Courier New", monospace; font-size: 11px; box-shadow: 0 4px 24px rgba(0,0,0,.12); }
.receipt .center { text-align: center; }
.receipt .r-name { font-weight: 800; font-size: 14px; }
.receipt .dash { border-top: 1px dashed #999; margin: 7px 0; }
.receipt table { width: 100%; border-collapse: collapse; font-size: 10px; }
.receipt td { padding: 1px 0; vertical-align: top; }
.receipt .tot { font-size: 13px; font-weight: 800; }
.qr-box { width: 88px; height: 88px; margin: 6px auto; display: grid; place-items: center; }
.qr-box img, .qr-box canvas { width: 88px; height: 88px; image-rendering: pixelated; }

@media (max-width: 1300px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { min-height: 220px; }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .hamburger { display: inline-grid; }
  .public-nav { flex-wrap: wrap; height: auto; padding: 8px 14px; gap: 8px; }
  .public-links { order: 3; width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 2px; }
  .public-links a { white-space: nowrap; }
  .public-brand-full img { height: 34px; max-width: 160px; }
  .grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .content { padding: 14px; }
  .topbar { padding: 8px 12px; min-height: 56px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .stat { padding: 11px; }
  .stat-value { font-size: 15px; }
  .page-head h1 { font-size: 20px; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-grid .span-3 { grid-column: auto; }
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-footer-inner { grid-template-columns: 1fr; }
  .user-name, .user-role { display: none; }
  .page-actions { width: 100%; margin-left: 0; }
  .page-actions .btn { flex: 1 1 auto; }
  .filter-bar .field { flex: 1 1 130px; }
  .a4 { width: auto; margin: 0; padding: 18px; box-shadow: none; min-height: 0; }
  .doc-head, .doc-party { flex-direction: column; }
  .doc-title { text-align: left; }
  .doc-party .block { max-width: 100%; }
  .doc-totals { width: 100%; }
  .job-row { gap: 8px; }
  .job-actions { width: 100%; display: flex; gap: 6px; flex-wrap: wrap; }
  .job-actions .btn { flex: 1 1 auto; }
  .kv { grid-template-columns: 100px 1fr; }
}
@media print {
  :root, html[data-theme="dark"] {
    --bg: #ffffff; --surface: #ffffff; --surface-2: #f6f6f6; --ink: #111111;
    --muted: #555555; --line: #dddddd; --line-strong: #cccccc;
  }
  .print-toolbar, .no-print, .sidebar, .topbar, .overlay, .toast-wrap,
  .public-header, .public-footer, .wa-float, .cart-panel, .page-actions { display: none !important; }
  body { background: #fff !important; color: #111 !important; }
  .main { margin-left: 0 !important; }
  .content { padding: 0 !important; max-width: none !important; }
  .card { box-shadow: none !important; border-color: #ddd !important; break-inside: avoid; }
  .a4 { box-shadow: none; margin: 0; width: auto; min-height: 0; padding: 10mm; }
  .receipt { box-shadow: none; margin: 0; }
  .doc-table th { background: #eee !important; }
  .table th { background: #f4f4f4 !important; color: #333 !important; }
  .table td, .table th { border-color: #ddd !important; }
  @page { margin: 10mm; }
}

/* utilitas ikon */
svg.w-5 { width: 20px; height: 20px; flex-shrink: 0; }
svg.w-6 { width: 24px; height: 24px; flex-shrink: 0; }
