/* ============================================================
   Vati Massage Spa — Stylesheet
   ============================================================ */
:root {
  --primary: #c25978;
  --primary-dark: #9c3352;
  --primary-light: #fce7f0;
  --primary-soft: #d97a94;
  --primary-rgb: 194, 85, 115;
  --accent: #d97706;
  --bg: #faf5f7;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --line: #f0dbe4;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(var(--primary-rgb), .08);
  --drawer-bg: #43132a;
  --topbar-h: 60px;
  --drawer-w: 280px;
}

/* ---------- Preset warna tema ---------- */
html[data-color="teal"]   { --primary: #0d9488; --primary-dark: #0f766e; --primary-light: #ccfbf1; --primary-soft: #2dd4bf; --primary-rgb: 13, 148, 136; --drawer-bg: #0b2f2c; }
html[data-color="biru"]   { --primary: #3b82f6; --primary-dark: #1d4ed8; --primary-light: #dbeafe; --primary-soft: #60a5fa; --primary-rgb: 59, 130, 246; --drawer-bg: #1b2c52; }
html[data-color="ungu"]   { --primary: #8b5cf6; --primary-dark: #6d28d9; --primary-light: #ede9fe; --primary-soft: #a78bfa; --primary-rgb: 139, 92, 246; --drawer-bg: #33195e; }
html[data-color="hijau"]  { --primary: #16a34a; --primary-dark: #15803d; --primary-light: #dcfce7; --primary-soft: #4ade80; --primary-rgb: 22, 163, 74; --drawer-bg: #123a24; }
html[data-color="oranye"] { --primary: #ea580c; --primary-dark: #c2410c; --primary-light: #ffedd5; --primary-soft: #fb923c; --primary-rgb: 234, 88, 12; --drawer-bg: #46200b; }
html[data-color="merah"]   { --primary: #dc2626; --primary-dark: #991b1b; --primary-light: #fee2e2; --primary-soft: #f87171; --primary-rgb: 220, 38, 38; --drawer-bg: #450a0a; }
html[data-color="magenta"] { --primary: #d946ef; --primary-dark: #a21caf; --primary-light: #fae8ff; --primary-soft: #e879f9; --primary-rgb: 217, 70, 239; --drawer-bg: #4a044e; }
html[data-color="emas"]    { --primary: #d97706; --primary-dark: #a16207; --primary-light: #fef3c7; --primary-soft: #fbbf24; --primary-rgb: 217, 119, 6; --drawer-bg: #451a03; }
html[data-color="abu"]     { --primary: #64748b; --primary-dark: #475569; --primary-light: #e2e8f0; --primary-soft: #94a3b8; --primary-rgb: 100, 116, 139; --drawer-bg: #1e293b; }
html[data-color="cyan"]    { --primary: #06b6d4; --primary-dark: #0e7490; --primary-light: #cffafe; --primary-soft: #22d3ee; --primary-rgb: 6, 182, 212; --drawer-bg: #164e63; }
html[data-color="indigo"]  { --primary: #6366f1; --primary-dark: #4338ca; --primary-light: #e0e7ff; --primary-soft: #818cf8; --primary-rgb: 99, 102, 241; --drawer-bg: #312e81; }

/* ---------- Mode gelap: variabel ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1218;
  --card: #171b24;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --line: #29303e;
  --shadow: 0 2px 12px rgba(0, 0, 0, .4);
  --primary-light: color-mix(in srgb, var(--primary) 20%, transparent);
  --primary-dark: color-mix(in srgb, var(--primary) 72%, #ffffff);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.55;
}
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.01em; }
.ic { vertical-align: -3px; flex-shrink: 0; }

/* ---------- Topbar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h); z-index: 60;
  display: flex; align-items: center; gap: 12px; padding: 0 14px;
  background: linear-gradient(120deg, var(--primary-dark), var(--primary) 55%, var(--primary-soft));
  color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.hamburger {
  background: rgba(255,255,255,.14); border: 0; color: #fff; width: 40px; height: 40px;
  border-radius: 10px; cursor: pointer; display: grid; place-items: center;
}
.hamburger:hover { background: rgba(255,255,255,.25); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16.5px; white-space: nowrap; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: rgba(255,255,255,.18); color: #fff;
}
.brand .logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,.13); padding: 5px 12px 5px 6px; border-radius: 99px; }
.user-chip .ava {
  width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--primary-dark);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.user-chip .nama { font-weight: 600; font-size: 13px; line-height: 1.1; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .role { font-size: 10.5px; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }
.demo-chip { background: #fbbf24; color: #78350f; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }

/* ---------- Drawer / Off-canvas ---------- */
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--drawer-w); z-index: 100;
  background: var(--drawer-bg); color: #f2d9e3; transform: translateX(-105%);
  transition: transform .28s ease; display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.3); }
.drawer-brand {
  padding: 18px 18px 14px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.09); color: #fff;
}
.drawer-brand .logo { width: 38px; height: 38px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary-soft), var(--primary-dark)); }
.drawer-brand .logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.drawer-brand b { font-size: 15.5px; display: block; }
.drawer-brand small { font-size: 11px; opacity: .7; }
.drawer-close { margin-left: auto; background: none; border: 0; color: #eccdd9; cursor: pointer; padding: 6px; }
.drawer-nav { flex: 1; overflow-y: auto; padding: 10px; scrollbar-width: none; -ms-overflow-style: none; }
.drawer-nav::-webkit-scrollbar { display: none; }
.drawer-nav a {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px; margin-bottom: 3px;
  border-radius: 10px; color: #eccdd9; font-weight: 500; font-size: 14px;
}
.drawer-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.drawer-nav a.active { background: var(--primary); color: #fff; font-weight: 600; }
.drawer-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.09); }
.drawer-foot button {
  width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 0;
  color: #f3b8b8; font-size: 14px; font-weight: 600; padding: 10px 13px; border-radius: 10px; cursor: pointer;
}
.drawer-foot button:hover { background: rgba(220,38,38,.15); }
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.drawer-overlay.show { opacity: 1; pointer-events: auto; }

/* ---------- Konten ---------- */
main { max-width: 1180px; margin: 0 auto; padding: calc(var(--topbar-h) + 20px) 16px 60px; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.page-head h1 { font-size: 21px; color: var(--primary-dark); }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Kartu & statistik ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.card h2 { font-size: 15.5px; margin-bottom: 12px; color: var(--primary-dark); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 15px 16px; display: flex; gap: 13px; align-items: center;
}
.stat-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-light); color: var(--primary-dark); display: grid; place-items: center; }
.stat-card.teal .stat-ic { background: #fce7f3; color: #be185d; }
.stat-card.amber .stat-ic { background: #fef3c7; color: #b45309; }
.stat-card.rose .stat-ic { background: #ffe4e6; color: #be123c; }
.stat-card.violet .stat-ic { background: #ede9fe; color: #6d28d9; }
.stat-val { font-size: 19px; font-weight: 800; line-height: 1.15; }
.stat-lbl { font-size: 12px; color: var(--muted); }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; border: 0; cursor: pointer;
  padding: 9px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  transition: filter .15s, transform .05s; font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: #f8fafc; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; }
.icon-btn {
  background: none; border: 0; cursor: pointer; padding: 6px; border-radius: 8px; color: var(--muted);
  display: inline-grid; place-items: center;
}
.icon-btn:hover { background: #eef2f5; color: var(--text); }
.icon-btn.danger:hover { background: #fee2e2; color: var(--danger); }
.icon-btn.ok:hover { background: #d1fae5; color: #047857; }
.icon-btn.wa-btn { color: #128c4b; }
.icon-btn.wa-btn:hover { background: #d1fae5; color: #0c6b39; }
.row-actions { display: flex; gap: 2px; }

/* ---------- Badge ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.b-green { background: #d1fae5; color: #065f46; }
.b-yellow { background: #fef3c7; color: #92400e; }
.b-blue { background: #dbeafe; color: #1e40af; }
.b-purple { background: #ede9fe; color: #5b21b6; }
.b-red { background: #fee2e2; color: #991b1b; }
.b-gray { background: #e2e8f0; color: #475569; }
.b-pink { background: #fce7f3; color: #9d174d; }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
th { background: var(--primary-light); color: var(--primary-dark); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
tbody tr:hover { background: #fdf8fa; }
tbody tr:last-child td { border-bottom: 0; }
td .muted, .muted { color: var(--muted); font-size: 12.5px; }

/* ---------- Form ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid .full { grid-column: 1 / -1; }
label { font-size: 12.5px; font-weight: 600; color: #334155; display: block; margin-bottom: 5px; }
input, select, textarea {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .15); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; padding-top: 8px; }
.check input { width: auto; }

/* Filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: flex-end; }
.filter-bar > div { min-width: 150px; }
.filter-bar label { font-size: 11.5px; }
.filter-bar input, .filter-bar select { padding: 7px 10px; font-size: 13px; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 40, 38, .5); z-index: 200;
  display: grid; place-items: center; padding: 16px; overflow-y: auto;
}
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 520px;
  max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  animation: pop .18s ease;
}
.modal-wide { max-width: 760px; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; color: var(--primary-dark); }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { padding: 13px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; }
.fm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.fm-grid .full { grid-column: 1 / -1; }
.fm-hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* ---------- Toast ---------- */
#toast-root { position: fixed; top: 14px; right: 14px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #065f46; color: #fff; padding: 11px 16px; border-radius: 11px;
  display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 6px 18px rgba(0,0,0,.2); animation: slideIn .25s ease;
}
.toast-err { background: #b91c1c; }
.toast.out { opacity: 0; transition: opacity .3s; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Loading & empty ---------- */
.loading { text-align: center; padding: 46px 0; color: var(--muted); }
.spinner {
  width: 34px; height: 34px; border: 3.5px solid var(--primary-light); border-top-color: var(--primary);
  border-radius: 50%; margin: 0 auto 12px; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 38px 16px; color: var(--muted); background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.err-box { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 14px 16px; border-radius: 12px; }

/* ---------- Grafik ---------- */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding: 10px 4px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.chart-bar { width: 70%; max-width: 38px; background: linear-gradient(180deg, var(--primary-soft), var(--primary-dark)); border-radius: 6px 6px 3px 3px; min-height: 3px; transition: height .4s; }
.chart-lbl { font-size: 9.5px; color: var(--muted); margin-top: 6px; white-space: nowrap; overflow: hidden; max-width: 100%; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button {
  background: none; border: 0; padding: 9px 15px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -2px;
  white-space: nowrap; font-family: inherit;
}
.tabs button.active { color: var(--primary-dark); border-bottom-color: var(--primary); }

/* ---------- Halaman login ---------- */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: linear-gradient(135deg, var(--drawer-bg), var(--primary-dark) 50%, var(--primary));
}
.auth-card { background: #fff; border-radius: 20px; padding: 30px 26px; width: 100%; max-width: 400px; box-shadow: 0 18px 50px rgba(0,0,0,.3); }
.auth-logo { width: 88px; height: 88px; border-radius: 22px; overflow: hidden; box-shadow: 0 8px 22px rgba(156,51,82,.28); margin: 0 auto 14px; }
.auth-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-card h1 { text-align: center; font-size: 21px; color: var(--primary-dark); }
.auth-card .tagline { text-align: center; color: var(--muted); font-size: 13px; margin: 4px 0 20px; }
.auth-card .field { margin-bottom: 13px; }
.auth-foot { text-align: center; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.demo-info { margin-top: 16px; background: #fdf2f6; border: 1px dashed #f9cdd9; border-radius: 12px; padding: 11px 13px; font-size: 12px; color: #9c3352; }
.demo-info b { display: block; margin-bottom: 4px; }
.demo-info code { background: #fadbe4; padding: 1px 6px; border-radius: 5px; font-size: 11.5px; }

/* ---------- Booking ---------- */
.booking-grid { display: grid; grid-template-columns: 1fr 330px; gap: 16px; align-items: start; }
.bk-summary { position: sticky; top: calc(var(--topbar-h) + 16px); }
.svc-cats { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 13px; }
.svc-cats button {
  border: 1.5px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 99px;
  font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; font-family: inherit;
}
.svc-cats button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.svc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 11px; }
.svc-item {
  border: 1.5px solid var(--line); border-radius: 13px; padding: 13px 14px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s; background: #fff;
}
.svc-item:hover { border-color: #f9c1d2; }
.svc-item.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .18); background: #fdf1f5; }
.svc-item .nm { font-weight: 700; font-size: 14px; }
.svc-item .ds { font-size: 12px; color: var(--muted); margin: 3px 0 7px; min-height: 17px; }
.svc-item .pr { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--primary-dark); }
.qty-ctl { display: flex; align-items: center; gap: 8px; }
.qty-ctl button {
  width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; font-weight: 700; line-height: 1;
}
.qty-ctl span { font-weight: 700; min-width: 18px; text-align: center; }
.attr-block { margin-bottom: 15px; }
.attr-block .attr-name { font-weight: 700; font-size: 13.5px; margin-bottom: 7px; }
.attr-block .attr-name small { color: var(--muted); font-weight: 500; }
.opt-row { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; margin-bottom: 6px; cursor: pointer; }
.opt-row:hover { border-color: #f9c1d2; }
.opt-row input { width: auto; }
.opt-row .opt-label { flex: 1; }
.opt-row .opt-price { font-weight: 600; color: var(--accent); font-size: 12.5px; }
.sum-line { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.sum-line.total { border-top: 2px solid var(--line); margin-top: 7px; padding-top: 10px; font-size: 16px; font-weight: 800; color: var(--primary-dark); }
.sum-items { max-height: 190px; overflow-y: auto; margin-bottom: 6px; }
.sum-items .sum-line span:first-child { flex: 1; padding-right: 8px; color: #334155; }

/* ---------- Detail order ---------- */
.ord-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ord-kode { font-weight: 800; font-size: 16px; color: var(--primary-dark); }
.timeline { display: flex; margin: 14px 0 18px; }
.tl-step { flex: 1; text-align: center; position: relative; font-size: 11px; color: var(--muted); }
.tl-step::before {
  content: ''; position: absolute; top: 9px; left: -50%; width: 100%; height: 3px; background: var(--line);
}
.tl-step:first-child::before { display: none; }
.tl-step .dot {
  width: 21px; height: 21px; border-radius: 50%; background: #fff; border: 3px solid var(--line);
  margin: 0 auto 5px; position: relative; z-index: 1;
}
.tl-step.done::before { background: var(--primary); }
.tl-step.done .dot { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .2); }
.tl-step.done { color: var(--primary-dark); font-weight: 600; }
.tl-step.cancel .dot { background: var(--danger); border-color: var(--danger); }
.tl-step.cancel { color: var(--danger); font-weight: 600; }
.dl-list div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; gap: 10px; }
.dl-list div span:first-child { color: var(--muted); }
.dl-list div span:last-child { text-align: right; font-weight: 500; }
.ord-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------- Dashboard pelanggan ---------- */
.step-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 11px; margin-bottom: 16px; }
.step-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 15px; text-align: center; }
.step-card .num { font-size: 24px; font-weight: 800; color: var(--primary-dark); }
.step-card .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Mode halaman publik (login/register): sembunyikan shell ---------- */
body.auth-mode .topbar, body.auth-mode .drawer, body.auth-mode .drawer-overlay,
body.auth-mode .fab-wa { display: none; }

/* ---------- Responsif ---------- */
@media (max-width: 860px) {
  .booking-grid { grid-template-columns: 1fr; }
  .bk-summary { position: static; }
}
@media (max-width: 640px) {
  .form-grid, .fm-grid { grid-template-columns: 1fr; }
  .user-chip .nama { display: none; }
  .user-chip .role { display: none; }
  main { padding-left: 12px; padding-right: 12px; }
  th, td { padding: 9px 10px; }
  .fab-wa { right: 14px; bottom: 14px; padding: 11px 15px; font-size: 12px; }
}
@media (min-width: 1100px) {
  main { padding-left: 28px; padding-right: 28px; }
}

/* ---------- Peringatan larangan (di drawer, bawah menu) ---------- */
.drawer-warn {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 0 10px 10px; padding: 10px 11px; border-radius: 8px;
  background: #fbbf24; color: #78350f;
  font-size: 11px; line-height: 1.45; font-weight: 500;
}
.drawer-warn svg { flex-shrink: 0; margin-top: 1px; }

/* ---------- Bukti bayar di detail order ---------- */
.bukti-box { max-width: 340px; margin: 4px auto 0; }
.bukti-box img { width: 100%; border-radius: 10px; border: 1px solid rgba(0, 0, 0, .1); display: block; }

/* ---------- Guard double-click saat ada permintaan API berjalan ---------- */
body.api-busy { cursor: progress; }
body.api-busy .btn { pointer-events: none; opacity: .6; }

/* ---------- Tombol melayang WhatsApp ---------- */
.fab-wa {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  display: inline-flex; align-items: center; gap: 9px;
  background: linear-gradient(120deg, #25d366, #128c4b);
  color: #fff; text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 12px 18px; border-radius: 40px;
  box-shadow: 0 4px 16px rgba(18, 140, 75, .4);
  transition: transform .15s ease, box-shadow .15s ease;
}
.fab-wa:hover { transform: translateY(-2px); box-shadow: 0 7px 20px rgba(18, 140, 75, .5); }
.fab-wa svg { flex-shrink: 0; }

/* ---------- Upload gambar (foto terapis / QRIS) ---------- */
.img-field { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.img-preview {
  width: 96px; height: 96px; border-radius: 10px;
  border: 1.5px dashed var(--line); background: var(--bg-soft, #fdf8fa);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); overflow: hidden; flex-shrink: 0;
}
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.qris-preview { width: 150px; height: 150px; }
.img-input { flex: 1; min-width: 180px; font-size: 12.5px; }
.img-input::file-selector-button {
  border: none; border-radius: 8px; padding: 8px 12px; margin-right: 10px;
  background: var(--primary); color: #fff; font-family: inherit;
  font-size: 12.5px; cursor: pointer;
}

/* ---------- Avatar & galeri foto terapis ---------- */
.cell-nama { display: flex; align-items: center; gap: 9px; }
.ava-sm {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
}
.ava-sm.foto-empty { background: var(--primary-light); color: var(--primary); }
.foto-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 14px; margin-bottom: 16px;
}
.foto-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; box-shadow: var(--shadow);
}
.foto-img { height: 175px; background: var(--primary-light); }
.foto-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-empty {
  height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--primary); opacity: .5;
}
.foto-info { padding: 10px 12px; font-size: 12.5px; }
.foto-info .muted { font-size: 11.5px; margin-top: 2px; }
.foto-nama { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }

/* ---------- Kotak QRIS di modal bayar ---------- */
.qris-box {
  display: inline-block; padding: 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px;
}
.qris-box img { max-width: 230px; width: 100%; display: block; }

/* ---------- Mode gelap: komponen ---------- */
html[data-theme="dark"] .btn-ghost { background: var(--card); }
html[data-theme="dark"] .btn-ghost:hover { background: #222839; }
html[data-theme="dark"] .icon-btn:hover { background: #262c3a; }
html[data-theme="dark"] .icon-btn.danger:hover { background: rgba(220, 38, 38, .18); }
html[data-theme="dark"] .icon-btn.ok:hover { background: rgba(4, 120, 87, .22); }
html[data-theme="dark"] .icon-btn.wa-btn:hover { background: rgba(18, 140, 75, .22); }
html[data-theme="dark"] tbody tr:hover { background: rgba(255, 255, 255, .04); }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: #12161f; }
html[data-theme="dark"] label { color: #aab4c6; }
html[data-theme="dark"] .modal { background: var(--card); }
html[data-theme="dark"] .svc-cats button { background: var(--card); }
html[data-theme="dark"] .svc-item { background: var(--card); }
html[data-theme="dark"] .svc-item:hover, html[data-theme="dark"] .opt-row:hover { border-color: color-mix(in srgb, var(--primary) 55%, transparent); }
html[data-theme="dark"] .svc-item.selected { background: var(--primary-light); }
html[data-theme="dark"] .qty-ctl button { background: var(--card); }
html[data-theme="dark"] .foto-card { background: var(--card); }
html[data-theme="dark"] .auth-card { background: var(--card); }
html[data-theme="dark"] .tl-step .dot { background: var(--card); }
html[data-theme="dark"] .sum-items .sum-line span:first-child { color: var(--text); }
html[data-theme="dark"] .err-box { background: rgba(220, 38, 38, .12); border-color: rgba(220, 38, 38, .35); color: #fca5a5; }
html[data-theme="dark"] .demo-info { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .14); color: var(--muted); }
html[data-theme="dark"] .demo-info code { background: rgba(255, 255, 255, .09); }
html[data-theme="dark"] .qris-box { background: var(--card); }
html[data-theme="dark"] .img-preview { --bg-soft: #12161f; }

/* ---------- Halaman Tema ---------- */
.theme-mode-row { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-mode-btn {
  flex: 1; min-width: 130px; display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card);
  font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; font-family: inherit;
}
.theme-mode-btn:hover { border-color: var(--primary); }
.theme-mode-btn.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
html[data-theme="dark"] .theme-mode-btn.active { background: rgba(255, 255, 255, .06); }
.theme-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.theme-swatch {
  display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 13px 8px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; font-family: inherit;
}
.theme-swatch:hover { border-color: var(--primary); }
.theme-swatch.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .18); }
.sw-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 -4px 8px rgba(0, 0, 0, .18); }
.sw-label { font-size: 12px; font-weight: 600; color: var(--text); }
