/* Sanggar Alam — mobile-first, minimalis. Warna utama dari backoffice (variabel --primary). */
:root {
  --primary: #2F5D50;
  --primary-soft: #E2EAE7;
  --primary-tint: #95ADA6;
  --primary-dark: #203F36;
  --bg: #F6F7F3;
  --surface: #FFFFFF;
  --line: #E3E7E1;
  --line-strong: #D5DBD3;
  --text: #17211C;
  --text-2: #33403A;
  --muted: #5C6862;
  --ok-bg: var(--primary-soft); --ok-fg: var(--primary-dark);
  --warn-bg: #FBF1E1; --warn-fg: #6B4210;
  --danger-bg: #FBEAE6; --danger-fg: #8E2A1B;
  --info-bg: #E8EEF4; --info-fg: #284A6B;
  --violet-bg: #F1EEF8; --violet-fg: #4D3B7A;
  --muted-bg: #EEF1EC; --muted-fg: #33403A;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 12px 32px rgba(23, 33, 28, .06);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.55; }
img, svg { max-width: 100%; }
a { color: var(--primary-dark); }
a:hover { color: var(--primary); }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(24px, 5vw, 32px); }
h2 { font-size: 22px; }
.h2 { font-size: 22px; }
.h3, h3 { font-size: 16px; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--primary-tint); 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; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 10px 14px; background: var(--surface); border-radius: 10px; }
.skip-link:focus { top: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Layout */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.section { padding-top: 32px; padding-bottom: 8px; }
.section-sm { margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-xs { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.grow { flex: 1; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.grid-auto-lg { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.card-flat { border: 0; padding: 14px; }
.narrow-card { max-width: 560px; }
.page-head { margin-bottom: 16px; display: flex; flex-direction: column; gap: 4px; }
.page-head.row-between { flex-direction: row; align-items: flex-start; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.small-strong { font-size: 14px !important; }
.text-danger { color: var(--danger-fg); }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; display: block; }
.empty { color: var(--muted); font-size: 14px; padding: 12px 0; }
.count { display: inline-flex; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--muted-bg); color: var(--muted-fg); font-size: 12px; font-weight: 700; align-items: center; justify-content: center; }
.is-dim { opacity: .6; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 13px; border: 1px solid transparent; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: var(--surface); border-color: var(--primary); color: var(--primary-dark); }
.btn-outline:hover { background: var(--primary-soft); color: var(--primary-dark); }
.btn-light { background: #fff; color: var(--primary-dark); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text-2); }
.btn-ghost:hover { background: var(--muted-bg); color: var(--text); }
.btn-danger-text { color: var(--danger-fg); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 13px; border-radius: 11px; }
.btn-lg { min-height: 50px; padding: 0 22px; font-size: 15px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font: inherit; font-size: 18px; }
.icon-btn:hover { background: var(--muted-bg); }
.icon-btn-danger { color: var(--danger-fg); }

/* Badges & notices */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; align-self: flex-start; }
.badge-ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge-warn { background: var(--warn-bg); color: var(--warn-fg); }
.badge-danger { background: var(--danger-bg); color: var(--danger-fg); }
.badge-info { background: var(--info-bg); color: var(--info-fg); }
.badge-violet { background: var(--violet-bg); color: var(--violet-fg); }
.badge-muted { background: var(--muted-bg); color: var(--muted-fg); }
.notice { padding: 10px 12px; border-radius: 12px; font-size: 14px; display: block; text-decoration: none; }
.notice-ok { background: var(--ok-bg); color: var(--ok-fg); }
.notice-warn { background: var(--warn-bg); color: var(--warn-fg); }
.notice-danger { background: var(--danger-bg); color: var(--danger-fg); }
.notice-muted { background: var(--muted-bg); color: var(--muted-fg); }
.notice-link:hover { filter: brightness(.97); }
.flash-wrap:empty { display: none; }
.flash-wrap { padding-top: 12px; }
.flash { padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.flash-ok { background: var(--ok-bg); color: var(--ok-fg); }
.flash-error { background: var(--danger-bg); color: var(--danger-fg); }
.flash-warn { background: var(--warn-bg); color: var(--warn-fg); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #4B5650; min-width: 0; }
.field input, .field select, .field textarea, .search-field input {
  width: 100%; min-height: 46px; border-radius: 12px; border: 1px solid var(--line-strong); padding: 0 12px;
  font: inherit; font-size: 15px; font-weight: 400; color: var(--text); background: var(--surface);
}
.field textarea { padding: 10px 12px; min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); outline: 3px solid var(--primary-soft); outline-offset: 0; }
.field-inline { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; font-weight: 500; }
.field-inline select { flex: 1; }
.field-grow { flex: 1 1 200px; }
.input-xs { max-width: 90px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); flex: 0 0 20px; }
.check-strong { padding: 12px; border-radius: 14px; border: 1.5px solid var(--line-strong); }
.check-pad { padding-top: 26px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; }
.choice input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--primary); flex: 0 0 20px; }
.choice > span { display: flex; flex-direction: column; font-size: 14px; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice-compact { align-items: center; }
.upload { position: relative; min-height: 96px; border-radius: 14px; border: 1.5px dashed #C9D1C6; background: #FAFBF9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 14px; text-align: center; color: var(--text-2); cursor: pointer; }
.upload input[type=file] { margin-top: 6px; max-width: 100%; font-size: 13px; }
.upload:focus-within { border-color: var(--primary); }
.otp-input { font-size: 22px !important; letter-spacing: .3em; text-align: center; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 14px; }
.toolbar .field { flex: 0 1 auto; }
.form-divider { padding-top: 12px; border-top: 1px solid #EEF1EC; }
.switch { position: relative; display: inline-flex; flex: 0 0 56px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-ui { width: 56px; height: 32px; border-radius: 999px; background: #B9C2BC; position: relative; transition: background .2s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + .sr-only + .switch-ui { background: var(--primary); }
.switch input:checked + .sr-only + .switch-ui::after { transform: translateX(24px); }
.switch input:focus-visible + .sr-only + .switch-ui { outline: 3px solid var(--primary-tint); outline-offset: 2px; }

/* Segmented */
.segmented { display: flex; gap: 6px; padding: 4px; background: #E9EDE7; border-radius: 14px; overflow-x: auto; margin-bottom: 12px; }
.segmented a, .segmented-inputs label { flex: 1; min-height: 40px; padding: 0 12px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 700; color: #4B5650; text-decoration: none; white-space: nowrap; cursor: pointer; }
.segmented a.is-active { background: var(--surface); color: var(--text); }
.segmented-inputs { margin-bottom: 0; }
.segmented-inputs input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-inputs label:has(input:checked) { background: var(--primary); color: #fff; }
.segmented-inputs label:has(input:focus-visible) { outline: 3px solid var(--primary-tint); }
.segmented-inputs label:has(input[value=kotor]:checked), .segmented-inputs label:has(input[value=rusak]:checked), .segmented-inputs label:has(input[value=hilang]:checked) { background: var(--danger-fg); }
.segmented-4 label { padding: 0 6px; }

/* Public header & footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex: 1 1 auto; min-width: 0; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text span { font-size: 12px; color: var(--muted); }
.site-nav { flex: 1 1 100%; display: flex; gap: 2px; overflow-x: auto; margin: 0 -6px; scrollbar-width: none; }
.site-nav a { padding: 12px 10px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--text); }
@media (min-width: 900px) {
  .site-header-row { flex-wrap: nowrap; padding-bottom: 12px; }
  .site-nav { flex: 0 1 auto; order: 2; margin: 0; }
  .site-header-row .btn { order: 3; }
  .brand { order: 1; }
}
.site-footer { margin-top: 48px; background: var(--primary-dark); color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; padding-top: 32px; padding-bottom: 32px; font-size: 14px; }
.footer-title { font-size: 16px; }
.footer-muted, .footer-label { color: #DDE5E0; font-size: 13px; }
.footer-label { font-weight: 600; }
.footer-link { color: #fff; }
.footer-link:hover { color: #DDE5E0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 14px 0; font-size: 12px; color: #DDE5E0; }
.site-footer .btn { align-self: flex-start; }

/* Public content */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; align-items: center; padding-top: 28px; padding-bottom: 20px; }
.hero h1 { font-size: clamp(32px, 8vw, 54px); line-height: 1.08; letter-spacing: -.02em; }
.eyebrow { align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: 12px; font-weight: 600; }
.lead { font-size: 16px; color: #4B5650; max-width: 460px; }
.check-card { box-shadow: var(--shadow); border-radius: 20px; padding: 20px; }
.feature-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.feature { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.feature > span:last-child { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.feature strong { font-size: 14px; color: var(--text); }
.feature-icon, .icon-tile { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-dark); display: flex; align-items: center; justify-content: center; }
.section-head { margin-bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.section-head p { font-size: 14px; }
.pill-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.pill { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
.pill.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.product-media { aspect-ratio: 4 / 3; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; position: relative; }
.product-media svg { stroke-width: 1.3; }
.product-media-lg { border-radius: 20px; aspect-ratio: 4 / 3; }
.product-cat { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 999px; background: #fff; font-size: 11px; font-weight: 600; color: #4B5650; }
.product-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-body h3 { font-size: 14px; line-height: 1.3; }
.product-body h3 a { color: var(--text); text-decoration: none; }
.price { display: flex; align-items: baseline; gap: 4px; margin-top: auto; padding-top: 6px; }
.price strong { font-size: 15px; }
.price span { font-size: 12px; color: var(--muted); }
.price-lg strong { font-size: 22px; }
.package-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.package { display: flex; flex-direction: column; gap: 12px; border-width: 1.5px; border-radius: 20px; padding: 18px; }
.package.is-featured { border-color: var(--primary); }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-2); }
.check-list li { display: flex; gap: 8px; align-items: center; }
.check-list svg { color: var(--primary); flex: 0 0 16px; }
.steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; gap: 12px; }
.steps li > span:last-child { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.steps strong { font-size: 14px; color: var(--text); }
.step-no { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.soft-panel { background: var(--primary-soft); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.soft-panel h2 { color: var(--primary-dark); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.item-detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: start; }
.link-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; }
.link-list li { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }

/* Booking */
.booking-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 960px) { .booking-layout { grid-template-columns: minmax(0, 1fr) 340px; } .booking-summary { position: sticky; top: 16px; } }
.qty-group { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 2px; }
.qty-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #EEF1EC; }
.qty-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qty-info strong { font-size: 14px; }
.qty-ctrl { display: flex; align-items: center; gap: 4px; }
.qty-btn { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 18px; color: var(--text); cursor: pointer; }
.qty-btn:disabled { opacity: .4; cursor: not-allowed; }
.qty-input { width: 46px; height: 40px; text-align: center; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-weight: 700; -moz-appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-row.is-full .qty-info [data-avail] { color: var(--danger-fg); }
.qty-row.is-low .qty-info [data-avail] { color: var(--warn-fg); }
.summary-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.summary-lines li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--text-2); }
.summary-totals { margin: 0; display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid #EEF1EC; font-size: 14px; }
.summary-totals div { display: flex; justify-content: space-between; gap: 10px; }
.summary-totals dt { color: var(--muted); }
.summary-totals dd { margin: 0; text-align: right; }
.summary-total { font-size: 16px; }
.summary-total dt, .summary-total dd { color: var(--text) !important; font-weight: 700; }
.summary-dp { padding: 10px; margin-top: 4px; border-radius: 12px; background: var(--primary-soft); }
.summary-dp dt, .summary-dp dd { color: var(--primary-dark) !important; font-weight: 700; }
.tile { padding: 10px 12px; border-radius: 12px; background: #F6F7F3; display: flex; flex-direction: column; font-size: 14px; }
.tile > span:first-child { font-size: 12px; color: var(--muted); }
.tile.row-between { flex-direction: row; flex-wrap: wrap; }
.pay-box { border-radius: 16px; background: #FAFBF9; border: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pay-box img { border-radius: 12px; background: #fff; height: auto; }

/* Staff app shell */
.app-bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.app-bar-row { max-width: 1320px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.area-kasir .app-bar { background: var(--primary-dark); border-color: var(--primary-dark); }
.area-kasir .app-bar .brand, .area-kasir .app-bar .brand-text span { color: #fff; }
.area-kasir .brand-mark { background: rgba(255,255,255,.16); }
.area-kasir .avatar, .area-kasir .app-user .icon-btn { background: rgba(255,255,255,.14); border-color: transparent; color: #fff; }
.area-kasir .area-switch a { color: #DDE5E0; }
.area-kasir .area-switch a.is-active { background: rgba(255,255,255,.16); color: #fff; }
.area-switch { order: 3; flex: 1 1 100%; display: flex; gap: 4px; overflow-x: auto; }
.area-switch a { padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.area-switch a.is-active { background: var(--primary-soft); color: var(--primary-dark); }
@media (min-width: 720px) { .area-switch { order: 0; flex: 0 1 auto; } }
.app-user { display: flex; gap: 6px; align-items: center; }
.app-user form { margin: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #E9EDE7; color: var(--text-2); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.app-shell { max-width: 1320px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.app-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.app-nav a { flex: 0 0 auto; min-height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 14px; font-weight: 600; display: flex; align-items: center; text-decoration: none; white-space: nowrap; }
.app-nav a.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.app-main { min-width: 0; flex: 1; }
@media (min-width: 900px) {
  .app-shell { flex-direction: row; align-items: flex-start; }
  .app-nav { flex: 0 0 220px; flex-direction: column; margin: 0; padding: 0; overflow: visible; position: sticky; top: 16px; }
  .app-nav a { width: 100%; }
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.stat > span { font-size: 12px; color: var(--muted); }
.stat strong { font-size: 22px; line-height: 1.2; }
.stat-danger { border-color: #F0D5CE; }
.stat-danger > span, .stat-danger strong { color: var(--danger-fg); }
.stat-primary { background: var(--primary-soft); border-color: var(--primary-soft); }
.stat-primary > span, .stat-primary strong { color: var(--primary-dark); }
.action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.action { min-height: 66px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; text-align: center; padding: 6px; }
.action-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.action-primary:hover { color: #fff; background: var(--primary-dark); }
.search { margin-bottom: 12px; }
.search-field { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); }
.search-field input { border: 0; min-height: 44px; padding: 0; outline: none; }
.queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.queue-card { background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; color: var(--text); text-decoration: none; font-size: 14px; }
.queue-card:hover { border-color: var(--primary); color: var(--text); }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; text-decoration: none; margin-bottom: 8px; min-height: 40px; }
.pay-row { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding-top: 10px; border-top: 1px solid #EEF1EC; }
.unit-pick, .inspect { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.unit-pick legend, .inspect legend { font-weight: 700; font-size: 14px; padding: 0 4px; display: flex; gap: 8px; align-items: baseline; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #EEF1EC; flex-wrap: wrap; }
.list-row > .stack-xs { flex: 1 1 180px; }
.list-row form { margin: 0; }
.list-block { padding: 12px 0; border-top: 1px solid #EEF1EC; }
.unit-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid #EEF1EC; }
.unit-row > .stack-xs { flex: 1 1 160px; }
.unit-row .field select, .unit-row .field input { min-height: 40px; font-size: 14px; }
.rule-row { display: grid; grid-template-columns: minmax(0, 1.4fr) 80px minmax(0, 1.4fr); gap: 6px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.card.table-wrap { padding: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 12px 14px; white-space: nowrap; }
td { padding: 12px 14px; border-top: 1px solid #EEF1EC; vertical-align: top; }
.num { text-align: right; white-space: nowrap; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.pager a { min-width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; text-decoration: none; background: var(--surface); }
.pager a.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
details > summary { cursor: pointer; font-weight: 600; font-size: 14px; min-height: 32px; display: flex; align-items: center; }
details[open] > summary { margin-bottom: 10px; }

.chart { width: 100%; height: auto; }
.chart-bar { fill: var(--primary-tint); }
.chart-bar-max { fill: var(--primary); }
.chart-value { font-size: 15px; fill: #4B5650; font-family: var(--font); }
.chart-label { font-size: 15px; fill: var(--muted); font-family: var(--font); }
.bar { width: 100%; height: 8px; display: block; }
.bar-bg { fill: #EEF1EC; }
.bar-fg { fill: var(--primary); }

.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.swatch { padding: 8px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 4px; cursor: pointer; position: relative; }
.swatch input { position: absolute; opacity: 0; }
.swatch:has(input:checked) { border-color: var(--text); }
.swatch:has(input:focus-visible) { outline: 3px solid var(--primary-tint); }
.swatch-chip { width: 100%; height: 40px; display: block; }
.swatch-name { font-size: 12px; font-weight: 700; }
.preview { border-radius: 16px; background: #F6F7F3; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.qris-preview { border-radius: 12px; border: 1px solid var(--line); height: auto; }

.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.kanban-col { flex: 0 0 272px; background: #ECEFEA; border-radius: 18px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.kanban-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-size: 14px; }
.kanban-head strong { flex: 1; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #8A9590; }
.dot-produksi { background: #B7791F; } .dot-review { background: #6B5CA5; } .dot-terjadwal { background: #3B6E9C; } .dot-tayang { background: var(--primary); }
.kanban-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.kanban-title { font-weight: 700; font-size: 14px; line-height: 1.35; color: var(--text); text-decoration: none; }
.kanban-move { display: flex; gap: 6px; justify-content: flex-end; margin: 0; }
.kanban-empty { margin: 0; padding: 14px; border-radius: 12px; border: 1.5px dashed #C9D1C6; font-size: 12px; color: var(--muted); text-align: center; }
.cal-row { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid #EEF1EC; }
.cal-row:first-child { border-top: 0; }
.cal-date { flex: 0 0 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; background: #F6F7F3; padding: 6px 0; font-size: 11px; color: var(--muted); font-weight: 600; }
.cal-date strong { font-size: 18px; color: var(--text); line-height: 1.1; }
.is-today .cal-date { background: var(--primary); color: #fff; }
.is-today .cal-date strong { color: #fff; }
.cal-posts { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.cal-post { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 8px 10px; border-radius: 10px; font-size: 13px; color: var(--text); text-decoration: none; }
.cal-ok { background: var(--ok-bg); } .cal-warn { background: var(--warn-bg); } .cal-info { background: var(--info-bg); } .cal-violet { background: var(--violet-bg); } .cal-muted { background: var(--muted-bg); }

/* Plain (auth) */
.plain-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px; }
.plain-brand { flex: 0 0 auto; }
.plain-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; padding: 22px; box-shadow: var(--shadow); }
.plain-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; font-size: 13px; }
.plain-links a { padding: 8px 0; }
.secret-box { padding: 12px; border-radius: 12px; background: #F6F7F3; display: flex; flex-direction: column; gap: 4px; }
.secret { font-size: 16px; font-weight: 700; letter-spacing: .08em; word-break: break-all; }
.numbered { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.device-code { font-size: 32px; font-weight: 700; letter-spacing: .2em; text-align: center; padding: 12px; border-radius: 14px; background: var(--primary-soft); color: var(--primary-dark); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .app-bar, .app-nav, .btn, form { display: none !important; } body { background: #fff; } }

/* Karyawan, gaji, kalender kas */
.split-tight { gap: 12px; }
.table-title { padding: 16px 16px 4px; }
.segmented-att label { padding: 0 6px; font-size: 12px; }
.segmented-inputs label:has(input[value=alpa]:checked) { background: var(--danger-fg); }
.segmented-inputs label:has(input[value=izin]:checked), .segmented-inputs label:has(input[value=sakit]:checked) { background: #8A5A12; }
.segmented-inputs label:has(input[value=libur]:checked) { background: #5C6862; }
.pay-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding-top: 12px; border-top: 1px solid #EEF1EC; }
.pay-bar .field { flex: 1 1 140px; }
.slip { display: flex; flex-direction: column; gap: 14px; }
.slip-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--text); }
.slip-right { text-align: right; }
.slip-meta { border-top: 0; padding-top: 0; }
.slip-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 18px; }
.slip-sign > div { display: flex; flex-direction: column; gap: 44px; }
.slip-line { border-top: 1px solid var(--text-2); padding-top: 4px; font-size: 13px; }
@media print { .slip { border: 0; box-shadow: none; max-width: none; } .back-link { display: none; } }

@media (min-width: 1100px) { .split-cal { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month-dow { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; padding: 4px 0; }
.month-cell { min-height: 52px; border-radius: 12px; background: #F6F7F3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: var(--text); border: 1.5px solid transparent; }
.month-cell.is-blank { background: transparent; }
.month-cell:hover { border-color: var(--line-strong); color: var(--text); }
.month-cell.is-today .month-num { background: var(--primary-soft); color: var(--primary-dark); }
.month-cell.is-selected { border-color: var(--primary); background: var(--surface); }
.month-cell.is-overdue { background: var(--danger-bg); }
.month-num { font-size: 14px; font-weight: 700; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.month-dots { display: flex; gap: 3px; height: 6px; }
.mdot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.mdot-out { background: var(--danger-fg); }
.mdot-in { background: var(--primary); }
.mdot-done { background: #A9B3AD; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.legend .mdot { margin-left: 6px; }
.cash-item { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.cash-item.is-done { background: #FAFBF9; }
.cash-item.is-done strong { text-decoration: line-through; color: var(--muted); }
.cash-amt { font-weight: 700; white-space: nowrap; font-size: 14px; }
.cash-keluar { color: var(--danger-fg); }
.cash-masuk { color: var(--primary-dark); }
.cash-done { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.cash-done .field { flex: 1 1 140px; }
.cash-done .check { align-self: center; }
.list-link { color: var(--text); text-decoration: none; }
.list-link:hover { color: var(--text); background: #FAFBF9; }

/* Logo & SEO */
.brand-logo { height: 38px; width: auto; max-width: 160px; object-fit: contain; flex: 0 0 auto; }
.app-bar .brand-logo { height: 34px; max-width: 120px; }
.plain-brand .brand-logo { height: 44px; max-width: 200px; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.brand-slot { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.brand-slot form { margin: 0; }
.brand-preview { min-height: 96px; border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: 10px; text-align: center;
  background-color: #fff; background-image: linear-gradient(45deg, #EEF1EC 25%, transparent 25%, transparent 75%, #EEF1EC 75%), linear-gradient(45deg, #EEF1EC 25%, transparent 25%, transparent 75%, #EEF1EC 75%);
  background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.brand-preview img { max-height: 76px; max-width: 100%; height: auto; }
.brand-preview-icon img { width: 76px; height: 76px; border-radius: 16px; }
.brand-preview-og img { border-radius: 8px; }
.meta-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px; padding-top: 8px; border-top: 1px solid #EEF1EC; }
.meta-row .field:last-child { grid-column: 1 / -1; }
@media (min-width: 720px) { .meta-row { grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1.4fr); } .meta-row .field:last-child { grid-column: auto; } }
.serp { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; font-family: Arial, sans-serif; }
.serp-site { font-size: 12px; color: #4d5156; }
.serp-title { font-size: 19px; line-height: 1.3; color: #1a0dab; }
.serp-desc { font-size: 14px; color: #4d5156; line-height: 1.45; }
.char-count { font-size: 11px; font-weight: 500; color: var(--muted); align-self: flex-end; }
.char-count.is-over { color: var(--danger-fg); font-weight: 700; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--muted-bg); padding: 1px 5px; border-radius: 6px; }

/* Jadwal gajian */
.pay-fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 0; }
.weekday-picker { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.weekday { position: relative; }
.weekday input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.weekday span { min-height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--text-2); }
.weekday input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.weekday input:focus-visible + span { outline: 3px solid var(--primary-tint); outline-offset: 2px; }
.weekday input:disabled + span { opacity: .4; }
.section-label { margin: 22px 0 10px; }
.period-row { border-top: 1px solid #EEF1EC; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.period-row.is-paid { opacity: .75; }
.period-amt { align-items: flex-end; text-align: right; }
.period-row .field select { min-height: 40px; font-size: 14px; }
.period-adjust { flex: 1 1 100%; }
.period-adjust summary { font-size: 13px; color: var(--muted); }

/* Cari alat di form booking */
.item-search { position: sticky; top: 0; z-index: 5; display: flex; flex-direction: column; gap: 10px; padding: 12px; box-shadow: 0 6px 18px rgba(23, 33, 28, .06); }
.item-search .search-field { min-height: 46px; }
.filter-pills { margin: 0; padding-bottom: 2px; }
.filter-pills .pill { min-height: 36px; padding: 0 12px; font-size: 13px; font: inherit; font-weight: 600; cursor: pointer; gap: 6px; }
.filter-pills .pill .count { background: rgba(255,255,255,.25); color: inherit; }
.filter-pills .pill:not(.is-active) .count { background: var(--muted-bg); }
[data-filter-group] > .qty-group:first-child { margin-top: 6px; }

/* Rincian pecahan */
.denoms { display: flex; flex-direction: column; gap: 10px; }
.denom-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
@media (min-width: 560px) { .denom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; } }
.denom-kind { grid-column: 1 / -1; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 6px; }
.denom-row { display: grid; grid-template-columns: 84px 14px 78px minmax(0, 1fr); align-items: center; gap: 6px; padding: 4px 8px; border-radius: 12px; background: #F6F7F3; }
.denom-row.has-value { background: var(--primary-soft); }
.denom-label { font-weight: 700; font-size: 14px; }
.denom-x { color: var(--muted); text-align: center; }
.denom-row input { width: 100%; min-height: 40px; border-radius: 10px; border: 1px solid var(--line-strong); text-align: center; font: inherit; font-weight: 700; font-size: 15px; background: #fff; -moz-appearance: textfield; }
.denom-row input::-webkit-outer-spin-button, .denom-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.denom-sub { text-align: right; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.text-ok { color: var(--primary-dark); }
.denom-inline dd { font-size: 12px; max-width: 60%; }
.denom-detail summary { font-size: 13px; min-height: 24px; }
.denom-table { min-width: 0; width: auto; font-size: 13px; }
.denom-table td { padding: 4px 8px; border-top: 0; }

/* Terima bayar & nota */
.head-actions { align-items: flex-end; }
.walkin-pay { padding-top: 10px; border-top: 1px solid #EEF1EC; }
.receipt-page { background: #E9EDE7; }
.receipt-page main { max-width: 420px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.receipt-tools { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.receipt-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.receipt-status:empty { display: none; }
.receipt-help ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--text-2); }
.receipt { margin: 0 auto; background: #fff; color: #000; padding: 14px 10px; font-family: ui-monospace, 'Courier New', monospace; font-size: 12px; line-height: 1.35; white-space: pre; overflow-x: auto; box-shadow: 0 8px 24px rgba(0,0,0,.08); border-radius: 4px; }
.receipt-32 { width: calc(32ch + 20px); }
.receipt-48 { width: calc(48ch + 20px); }
.receipt span { display: block; min-height: 1.35em; }
.receipt .rc { text-align: center; }
.receipt .rb { font-weight: 700; }
.receipt .rh { font-size: 1.25em; }
@media print {
  @page { margin: 0; size: auto; }
  .receipt-page { background: #fff; }
  .receipt-tools, .flash { display: none !important; }
  .receipt-page main { padding: 0; max-width: none; }
  .receipt { box-shadow: none; padding: 0; width: auto; overflow: visible; }
}
