/* ==================================================================
   Lumière Clinic Cloud — Design System
   Palette: deep forest, champagne gold, warm ivory.
   ================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --sans: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --sidebar-w: 268px;
}

/* ---------- Tema TERANG (default): forest, champagne gold, ivory ---------- */
:root,
:root[data-theme='light'] {
  --ink: #14231f;
  --ink-2: #2c3b36;
  --forest: #123a32;
  --forest-2: #185445;
  --forest-3: #0c2a24;
  --accent-ink: #123a32;
  --forest-soft: rgba(18, 58, 50, 0.09);
  --gold: #c9a227;
  --gold-2: #b18d1a;
  --gold-soft: #f2e8c9;
  --cream: #faf7f1;
  --cream-2: #f3eee4;
  --paper: #ffffff;
  --surface-2: var(--surface-2);
  --line: #e7e0d3;
  --line-2: #d9d1c1;
  --border-soft: var(--border-soft);
  --muted: #78827c;
  --muted-2: #9aa39d;
  --ok: #2c7a59;
  --ok-soft: #e6f2ec;
  --warn: #b5761f;
  --warn-soft: #fbf0dc;
  --danger: #ad4438;
  --danger-soft: #f8e7e4;
  --info: #376b8c;
  --info-soft: #e7f0f6;
  --plum: #6d4a6b;
  --plum-soft: #f1e8f0;
  --teal: #217a7a;
  --teal-soft: #e1efec;
  --violet: #6f4bb3;
  --violet-soft: #ece6f8;
  --skel-1: var(--skel-1);
  --skel-2: var(--skel-2);
  --topbar-bg: rgba(250, 247, 241, 0.88);
  --ring: rgba(24, 84, 69, 0.14);
  --hero-bg: linear-gradient(135deg, #123a32 0%, #185445 60%, #236b57 100%);
  --auth-bg: radial-gradient(circle at 20% 15%, rgba(201, 162, 39, 0.2), transparent 45%),
             linear-gradient(155deg, #0c2a24 0%, #123a32 55%, #1c5748 100%);
  --lock-bg: var(--lock-bg);
  --hero-frame-bg: var(--hero-frame-bg);
  --shadow-sm: 0 1px 2px rgba(20, 35, 31, 0.05), 0 4px 14px rgba(20, 35, 31, 0.04);
  --shadow: 0 2px 6px rgba(20, 35, 31, 0.05), 0 18px 40px rgba(20, 35, 31, 0.08);
  --shadow-lg: 0 30px 70px rgba(12, 42, 36, 0.18);
}

/* ---------- Tema PINK: blush rose, rose gold, wine (kecantikan) ---------- */
:root[data-theme='pink'] {
  --ink: #3b232c;
  --ink-2: #5d3b47;
  --forest: #8e3a57;
  --forest-2: #a85473;
  --forest-3: #331723;
  --accent-ink: #7d2f4d;
  --forest-soft: rgba(142, 58, 87, 0.1);
  --gold: #b4697a;
  --gold-2: #955060;
  --gold-soft: #f7e4e7;
  --cream: #fdf5f6;
  --cream-2: #f7e8ea;
  --paper: #fffdfd;
  --surface-2: #fdf7f7;
  --line: #ecd8dd;
  --line-2: #dcc0c8;
  --border-soft: #f3e3e7;
  --muted: #8d707a;
  --muted-2: #ab929a;
  --ok: #2f7a54;
  --ok-soft: #e8f2ec;
  --warn: #a96a1c;
  --warn-soft: #f9eeda;
  --danger: #b0483f;
  --danger-soft: #f9e7e4;
  --info: #3d6b8c;
  --info-soft: #e8eef4;
  --plum: #7c4672;
  --plum-soft: #f2e6ef;
  --teal: #216b68;
  --teal-soft: #e0efec;
  --violet: #7a4a9e;
  --violet-soft: #eee5f6;
  --skel-1: #f3e6ea;
  --skel-2: #faf0f2;
  --topbar-bg: rgba(253, 245, 246, 0.88);
  --ring: rgba(142, 58, 87, 0.16);
  --hero-bg: linear-gradient(135deg, #57263a 0%, #6f3149 55%, #8e3a57 100%);
  --auth-bg: radial-gradient(circle at 20% 15%, rgba(183, 110, 121, 0.28), transparent 45%),
             linear-gradient(155deg, #331723 0%, #57263a 55%, #7a3753 100%);
  --lock-bg: radial-gradient(circle at 50% 20%, #57263a, #331723 70%);
  --hero-frame-bg: linear-gradient(160deg, #331723, #7a3753);
  --shadow-sm: 0 1px 2px rgba(59, 35, 44, 0.06), 0 4px 14px rgba(59, 35, 44, 0.06);
  --shadow: 0 2px 6px rgba(59, 35, 44, 0.06), 0 18px 40px rgba(59, 35, 44, 0.1);
  --shadow-lg: 0 30px 70px rgba(59, 35, 44, 0.28);
}

/* ---------- Tema GELAP: charcoal, mint accent, champagne gold ---------- */
:root[data-theme='dark'] {
  --ink: #e9e7dc;
  --ink-2: #c9c6b8;
  --forest: #2e7d5f;
  --forest-2: #3c9070;
  --forest-3: #0e1412;
  --accent-ink: #86d3ae;
  --forest-soft: rgba(134, 211, 174, 0.13);
  --gold: #d4af37;
  --gold-2: #e8cf8f;
  --gold-soft: #302b1c;
  --cream: #141817;
  --cream-2: #1b201e;
  --paper: #1f2523;
  --surface-2: #262d2a;
  --line: #2d3633;
  --line-2: #3c4744;
  --border-soft: #252d2a;
  --muted: #8f988f;
  --muted-2: #69726b;
  --ok: #57b98c;
  --ok-soft: #1e352a;
  --warn: #d9a05a;
  --warn-soft: #352c1d;
  --danger: #e08073;
  --danger-soft: #392522;
  --info: #79aecd;
  --info-soft: #202d37;
  --plum: #b48cc0;
  --plum-soft: #2d2433;
  --teal: #54b8b1;
  --teal-soft: #1c3230;
  --violet: #a98fd6;
  --violet-soft: #28223a;
  --skel-1: #232b28;
  --skel-2: #2c3431;
  --topbar-bg: rgba(20, 24, 23, 0.88);
  --ring: rgba(134, 211, 174, 0.22);
  --hero-bg: linear-gradient(135deg, #16382d 0%, #1d4a38 60%, #255c46 100%);
  --auth-bg: radial-gradient(circle at 20% 15%, rgba(212, 175, 55, 0.14), transparent 45%),
             linear-gradient(155deg, #0e1412 0%, #16382d 55%, #1f5040 100%);
  --lock-bg: radial-gradient(circle at 50% 20%, #16382d, #0e1412 70%);
  --hero-frame-bg: linear-gradient(160deg, #0e1412, #1f5040);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.28);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 18px 40px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; line-height: 1.15; }
h1, h2, h3 { font-family: var(--serif); letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.35rem; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: var(--gold-soft); color: var(--accent-ink); }

/* --------------------------- utilities --------------------------- */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 20px; } .mb-6 { margin-bottom: 24px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 600; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.right { text-align: right; }
.center { text-align: center; }
.uppercase { text-transform: uppercase; letter-spacing: 0.12em; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.full { width: 100%; }
.divider { height: 1px; background: var(--line); border: 0; margin: 16px 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp 0.35s ease both; }

/* --------------------------- buttons ----------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 13px; line-height: 1.2; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  background: var(--forest); color: #fff;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(18, 58, 50, 0.18); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 16px; height: 16px; }
.btn-gold { background: var(--gold); color: var(--forest-3); }
.btn-gold:hover { box-shadow: 0 8px 20px rgba(201, 162, 39, 0.35); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--cream-2); box-shadow: none; }
.btn-soft { background: var(--gold-soft); color: var(--accent-ink); }
.btn-soft:hover { background: color-mix(in srgb, var(--gold-soft) 62%, var(--gold)); box-shadow: none; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { box-shadow: 0 8px 18px rgba(173, 68, 56, 0.3); }
.btn-outline-danger { background: transparent; color: var(--danger); border-color: #e5c3bd; }
.btn-outline-danger:hover { background: var(--danger-soft); box-shadow: none; }
.btn-sm { padding: 7px 12px; font-size: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: 999px; }
.btn-lg { padding: 14px 26px; font-size: 14px; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 12px; }
.btn-icon.btn-sm { width: 32px; height: 32px; }
.btn-block { width: 100%; }

/* --------------------------- forms ------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 11px;
  background: var(--paper); color: var(--ink); outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--forest-2); box-shadow: 0 0 0 3px var(--ring); }
.textarea { min-height: 92px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2378827c' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }
.input[data-money] { text-align: right; font-variant-numeric: tabular-nums; }
.input[type='date'], .input[type='time'] { min-height: 42px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.check input { width: 16px; height: 16px; accent-color: var(--accent-ink); }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.search .input { padding-left: 36px; }
.help { font-size: 11.5px; color: var(--muted); }
.error-text { color: var(--danger); font-size: 12px; }
fieldset { border: 0; padding: 0; margin: 0; }

/* --------------------------- badges ------------------------------ */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
  background: var(--cream-2); color: var(--ink-2);
}
.badge-dot::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-gold { background: var(--gold-soft); color: var(--gold-2); }
.badge-plum { background: var(--plum-soft); color: var(--plum); }
.badge-forest { background: var(--forest-soft); color: var(--accent-ink); }

/* --------------------------- cards ------------------------------- */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 20px;
}
.card-pad-sm { padding: 14px; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3 { font-family: var(--sans); font-size: 14px; font-weight: 700; letter-spacing: 0.01em; }
.card-title { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.kpi { position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; right: -30px; top: -40px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(201,162,39,0.14), transparent 65%); }
.kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.11em; color: var(--muted); font-weight: 600; }
.kpi-value { font-family: var(--serif); font-size: clamp(1.7rem, 2.5vw, 2.3rem); font-weight: 600; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi-foot { margin-top: 8px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-2); }
.kpi-icon svg { width: 19px; height: 19px; }
.kpi-dark { background: var(--forest); color: #f7f1e3; border-color: transparent; }
.kpi-dark .kpi-label, .kpi-dark .kpi-foot { color: rgba(247, 241, 227, 0.62); }
.kpi-dark::after { background: radial-gradient(circle, rgba(201,162,39,0.35), transparent 65%); }
.kpi-dark .kpi-icon { background: rgba(201, 162, 39, 0.18); color: var(--gold); }

/* --------------------------- tables ------------------------------ */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; min-width: 560px; }
.table th {
  text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: var(--surface-2);
}
.table td { padding: 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.12s ease; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table-compact td { padding: 8px 10px; }
.table-compact th { padding: 8px 10px; }
.row-title { font-weight: 600; color: var(--ink); }
.row-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.table-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }

/* --------------------------- shell ------------------------------- */
.shell { min-height: 100vh; display: flex; background: var(--cream); }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: var(--forest-3); color: #f3eddf;
  position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; flex-direction: column;
  border-right: 1px solid rgba(201, 162, 39, 0.18);
}
.sidebar-head { padding: 22px 20px 16px; display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold), #a98413); color: var(--forest-3);
  font-family: var(--serif); font-size: 24px; font-weight: 700; box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}
.brand-name { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.1; }
.brand-sub { font-size: 9.5px; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(243, 237, 223, 0.48); margin-top: 3px; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 6px 12px 20px; }
.nav-group { margin: 16px 0 4px; padding: 0 10px; font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(243, 237, 223, 0.34); }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
  color: rgba(243, 237, 223, 0.74); font-size: 13px; font-weight: 500; margin: 2px 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-item svg { width: 17px; height: 17px; opacity: 0.8; flex: 0 0 auto; }
.nav-item:hover { background: rgba(255, 255, 255, 0.055); color: #fff; }
.nav-item.active { background: rgba(201, 162, 39, 0.15); color: #f5e8bd; }
.nav-item.active svg { color: var(--gold); opacity: 1; }
.nav-badge { margin-left: auto; font-size: 10px; font-weight: 700; background: var(--gold); color: var(--forest-3); border-radius: 999px; padding: 1px 7px; }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.user-chip:hover { background: rgba(255,255,255,0.05); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: linear-gradient(150deg, #e8d9a8, #c9a227); color: var(--forest-3); font-weight: 700; font-size: 13px;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 52px; height: 52px; font-size: 18px; }
.user-name { font-size: 12.5px; font-weight: 600; color: #f3eddf; line-height: 1.2; }
.user-role { font-size: 10.5px; color: rgba(243, 237, 223, 0.5); margin-top: 2px; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
  padding: 12px 26px; background: var(--topbar-bg); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { min-width: 0; }
.topbar-title h1 { font-size: 22px; font-family: var(--serif); font-weight: 600; line-height: 1.1; }
.topbar-title p { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.topbar-spacer { flex: 1; }
.topbar-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--paper); display: grid; place-items: center; color: var(--ink-2);
}
.icon-btn:hover { background: var(--cream-2); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }
.menu-toggle { display: none; }
.content { padding: 24px 26px 60px; max-width: 1500px; width: 100%; margin: 0 auto; }
.page-actions-row { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 14px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* --------------------------- tabs -------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab {
  padding: 10px 14px; border: 0; background: transparent; color: var(--muted); font-weight: 600;
  font-size: 12.5px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent-ink); border-bottom-color: var(--gold); }
.pill-tabs { display: inline-flex; background: var(--cream-2); border-radius: 999px; padding: 3px; gap: 2px; }
.pill-tabs button { border: 0; background: transparent; padding: 7px 13px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pill-tabs button.active { background: var(--paper); color: var(--accent-ink); box-shadow: var(--shadow-sm); }

/* --------------------------- modal / drawer ----------------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(12, 28, 24, 0.5);
  backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 18px;
  animation: fadeUp 0.18s ease both;
}
.modal {
  background: var(--paper); border-radius: var(--radius-lg); width: 100%; max-width: 580px;
  max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal.modal-lg { max-width: 860px; }
.modal.modal-xl { max-width: 1080px; }
.modal.modal-sm { max-width: 420px; }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.modal-head h3 { font-size: 21px; }
.modal-head p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); }
.modal-close { border: 0; background: transparent; color: var(--muted); width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
.modal-close:hover { background: var(--cream-2); color: var(--ink); }
.drawer-backdrop { align-items: stretch; justify-content: flex-end; padding: 0; }
.drawer { max-width: 560px; height: 100vh; max-height: 100vh; border-radius: 0; animation: slideIn 0.22s ease both; }
.drawer.drawer-lg { max-width: 760px; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0.5; } to { transform: none; opacity: 1; } }

/* --------------------------- toast ------------------------------- */
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 36px)); }
.toast {
  background: var(--forest-3); color: #f7f1e3; border-radius: 12px; padding: 12px 15px;
  box-shadow: var(--shadow-lg); font-size: 12.5px; display: flex; gap: 10px; align-items: flex-start;
  animation: fadeUp 0.22s ease both; border-left: 3px solid var(--gold);
}
.toast.ok { border-left-color: #7fc3a8; }
.toast.error { border-left-color: #e29a90; }
.toast.warn { border-left-color: #e8c07a; }
.toast b { display: block; font-size: 12.5px; }
.toast span { color: rgba(247, 241, 227, 0.78); }

/* --------------------------- empty / loader ----------------------- */
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 38px; height: 38px; margin: 0 auto 10px; opacity: 0.45; }
.empty h4 { font-family: var(--serif); font-size: 19px; color: var(--ink-2); margin-bottom: 4px; }
.empty p { font-size: 12px; }
.loader { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 50px; color: var(--muted); font-size: 12.5px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--accent-ink); border-radius: 50%; animation: spin 0.8s linear infinite; }
.skeleton { background: linear-gradient(100deg, var(--skel-1) 30%, var(--skel-2) 50%, var(--skel-1) 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* --------------------------- login ------------------------------- */
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 0.95fr; background: var(--cream); }
.auth-visual {
  background: var(--auth-bg);
  color: #f7f1e3; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-visual::after {
  content: ''; position: absolute; width: 460px; height: 460px; border: 1px solid rgba(201,162,39,0.22);
  border-radius: 50%; right: -180px; bottom: -160px;
}
.auth-visual::before {
  content: ''; position: absolute; width: 300px; height: 300px; border: 1px solid rgba(255,255,255,0.09);
  border-radius: 50%; left: -120px; top: 20%;
}
.auth-quote { font-family: var(--serif); font-size: clamp(2rem, 3.5vw, 3.4rem); font-weight: 400; line-height: 1.08; max-width: 520px; position: relative; z-index: 1; }
.auth-quote em { color: var(--gold); font-style: italic; }
.auth-meta { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(247,241,227,0.45); }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 390px; }
.auth-card h2 { font-size: 34px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.auth-demo { margin-top: 22px; padding: 14px; background: var(--cream-2); border: 1px dashed var(--line-2); border-radius: 12px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.auth-demo code { background: var(--paper); padding: 1px 5px; border-radius: 4px; color: var(--accent-ink); font-size: 11px; }
.lock-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--lock-bg); color: #f7f1e3; text-align: center; }
.lock-card { max-width: 440px; }
.lock-card .brand-mark { margin: 0 auto 18px; width: 56px; height: 56px; font-size: 30px; }
.lock-card h1 { font-size: 44px; margin-bottom: 8px; }
.lock-card p { color: rgba(247,241,227,0.7); font-size: 13px; }
.lock-detail { margin: 22px 0; padding: 16px; border: 1px solid rgba(201,162,39,0.28); border-radius: 14px; background: rgba(0,0,0,0.12); font-size: 12px; }

/* --------------------------- dashboard bits ----------------------- */
.hero-strip {
  background: var(--hero-bg);
  color: #f7f1e3; border-radius: var(--radius-lg); padding: 24px 26px; position: relative; overflow: hidden;
}
.hero-strip::after { content: ''; position: absolute; width: 280px; height: 280px; border-radius: 50%; right: -80px; top: -120px; background: radial-gradient(circle, rgba(201,162,39,0.3), transparent 60%); }
.hero-strip h2 { color: #fff; font-size: 28px; }
.hero-strip p { color: rgba(247,241,227,0.7); font-size: 12.5px; margin-top: 4px; }
.hero-strip .btn { position: relative; z-index: 1; }
.trend-bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 12px; }
.trend-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.trend-bar .bar { width: 100%; max-width: 40px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #cfae46, #e6d7a4); min-height: 3px; transition: height 0.4s ease; position: relative; }
.trend-bar:hover .bar { background: linear-gradient(180deg, var(--gold), #d8bd67); }
.trend-bar .lbl { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.queue-list { display: flex; flex-direction: column; gap: 8px; }
.queue-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.queue-no { width: 34px; height: 34px; border-radius: 10px; background: var(--forest); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.mini-list { display: flex; flex-direction: column; gap: 9px; }
.mini-row { display: flex; align-items: center; gap: 10px; padding-bottom: 9px; border-bottom: 1px dashed var(--line); }
.mini-row:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-title { font-size: 12.5px; font-weight: 600; }
.mini-sub { font-size: 10.5px; color: var(--muted); }
.progress { height: 7px; border-radius: 99px; background: var(--cream-2); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--forest-2), #3f8b73); }
.progress.gold > i { background: linear-gradient(90deg, var(--gold-2), var(--gold)); }
.progress.danger > i { background: linear-gradient(90deg, #c06a5d, var(--danger)); }

/* --------------------------- POS -------------------------------- */
.pos-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.pos-catalog { min-width: 0; }
.pos-cart { position: sticky; top: 82px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.pos-cart-head { padding: 14px 16px; background: var(--forest); color: #f7f1e3; display: flex; justify-content: space-between; align-items: center; }
.pos-cart-body { max-height: 42vh; overflow-y: auto; padding: 6px 14px; }
.pos-cart-foot { padding: 14px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.cart-line { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-name { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.cart-meta { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.cart-controls { display: flex; align-items: center; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.qty-btn { width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--paper); display: grid; place-items: center; font-size: 14px; line-height: 1; }
.qty-btn:hover { background: var(--cream-2); }
.qty-num { min-width: 24px; text-align: center; font-size: 12px; font-weight: 700; }
.cart-price { text-align: right; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sum-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 3px 0; color: var(--ink-2); }
.sum-row.total { font-size: 18px; font-family: var(--serif); font-weight: 700; padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--line); }
.pos-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pos-tile { text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 11px; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.pos-tile:hover { border-color: var(--gold); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.pos-tile .t-name { font-size: 12px; font-weight: 600; line-height: 1.25; }
.pos-tile .t-meta { font-size: 10px; color: var(--muted); margin-top: 3px; }
.pos-tile .t-price { font-size: 12px; font-weight: 700; color: var(--accent-ink); margin-top: 7px; font-variant-numeric: tabular-nums; }
.stock-chip { font-size: 9.5px; color: var(--muted); }
.line-staff { display: flex; gap: 4px; }
.line-staff select { font-size: 10px; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); max-width: 96px; }

/* --------------------------- patient / emr ---------------------- */
.patient-hero { background: linear-gradient(135deg, #fff 0%, var(--surface-2) 100%); }
.patient-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.patient-meta b { color: var(--ink); font-weight: 600; }
.allergy-banner { background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); border-radius: 12px; padding: 10px 13px; font-size: 12px; display: flex; gap: 9px; align-items: flex-start; }
.allergy-banner svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }
.soap-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.soap-letter { font-family: var(--serif); font-size: 24px; color: var(--gold-2); line-height: 1; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.photo-card { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); aspect-ratio: 4/3; }
.photo-card img { width: 100%; height: 100%; object-fit: cover; }
.photo-tag { position: absolute; left: 6px; top: 6px; font-size: 9px; padding: 2px 6px; border-radius: 4px; background: rgba(12,42,36,0.78); color: #fff; }
.signature-pad { border: 1px dashed var(--line-2); border-radius: 12px; background: var(--paper); touch-action: none; width: 100%; height: 170px; }
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 1px; background: var(--line-2); }
.timeline-item { position: relative; padding-bottom: 16px; }
.timeline-item::before { content: ''; position: absolute; left: -18px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-2); }

/* --------------------------- reports / charts ------------------- */
.bar-list { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 120px minmax(0,1fr) 90px; gap: 10px; align-items: center; font-size: 11.5px; }
.bar-track { height: 8px; border-radius: 99px; background: var(--cream-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--forest-2), #4d9b82); }
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.report-hero { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; }
.stat-line { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.stat-line:last-child { border-bottom: 0; }
.stat-line b { font-variant-numeric: tabular-nums; }

/* --------------------------- receipt / print -------------------- */
.receipt { font-family: 'Courier New', monospace; color: #111; background: #fff; width: 100%; max-width: 340px; margin: 0 auto; font-size: 11px; line-height: 1.5; }
.receipt h4 { font-family: var(--serif); font-size: 17px; text-align: center; margin-bottom: 2px; }
.receipt .center { text-align: center; }
.receipt .line { border-top: 1px dashed #999; margin: 7px 0; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { padding: 1px 0; vertical-align: top; }
.receipt .r { text-align: right; }
.label-sheet { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.med-label { border: 1px dashed #888; border-radius: 6px; padding: 10px; font-size: 10px; background: #fff; }
.med-label h5 { font-size: 12px; margin-bottom: 2px; }
.med-label .big { font-size: 14px; font-weight: 700; }
.print-only { display: none; }

@media print {
  /* Cetak selalu putih/hitam terlepas dari tema layar */
  :root, :root[data-theme='pink'], :root[data-theme='dark'] {
    --ink: #111; --ink-2: #333; --muted: #555; --muted-2: #777;
    --paper: #fff; --surface-2: #fff; --cream: #fff; --cream-2: #f4f4f4;
    --line: #ddd; --line-2: #bbb; --border-soft: #eee;
    --gold-soft: #f3ead0; --ok-soft: #e8f2ec; --warn-soft: #fbf0dc;
    --danger-soft: #f8e7e4; --info-soft: #e7f0f6; --plum-soft: #f1e8f0;
    --teal-soft: #e1efec; --violet-soft: #ece6f8; --skel-1: #f1f1f1; --skel-2: #fafafa;
    --shadow-sm: none; --shadow: none; --shadow-lg: none;
  }
  body { background: #fff; }
  .sidebar, .topbar, .page-actions, .tabs, .no-print, .toast-wrap, .modal-backdrop { display: none !important; }
  .main { margin-left: 0; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border-color: #ddd; break-inside: avoid; }
  .print-only { display: block; }
  .print-page { padding: 0; }
  .receipt { max-width: none; font-size: 12px; }
}

/* --------------------------- landing ---------------------------- */
.landing { background: var(--cream); }
.landing-nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 6vw; max-width: 1320px; margin: 0 auto; }
.landing-nav .links { display: flex; gap: 26px; font-size: 12.5px; color: var(--ink-2); }
.landing-nav .links a:hover { color: var(--gold-2); }
.landing-hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; padding: 56px 6vw 70px; max-width: 1320px; margin: 0 auto; }
.landing-hero .eyebrow { font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-2); font-weight: 700; margin-bottom: 16px; }
.landing-hero h1 { font-size: clamp(2.8rem, 6vw, 4.8rem); line-height: 0.98; font-weight: 500; }
.landing-hero h1 em { color: var(--gold-2); font-style: italic; }
.landing-hero .lead { color: var(--muted); font-size: 14px; max-width: 470px; margin: 20px 0 26px; line-height: 1.7; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 11.5px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
.hero-note span { display: flex; align-items: center; gap: 6px; }
.hero-note svg { width: 14px; height: 14px; color: var(--ok); }
.hero-visual { position: relative; }
.hero-frame { background: var(--hero-frame-bg); border-radius: 26px; padding: 18px; box-shadow: var(--shadow-lg); color: #f7f1e3; transform: rotate(-1.5deg); }
.hero-frame .mock-top { display: flex; gap: 5px; margin-bottom: 14px; }
.hero-frame .mock-top i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.25); display: block; }
.mock-dash { background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.09); border-radius: 14px; padding: 14px; }
.mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 12px; }
.mock-kpi { background: rgba(255,255,255,0.07); border-radius: 9px; padding: 9px; }
.mock-kpi small { font-size: 7px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(247,241,227,0.5); }
.mock-kpi b { display: block; font-family: var(--serif); font-size: 16px; margin-top: 3px; }
.mock-chart { display: flex; align-items: flex-end; gap: 5px; height: 100px; padding-top: 8px; }
.mock-chart i { flex: 1; background: linear-gradient(180deg, #d8bb60, rgba(201,162,39,0.35)); border-radius: 4px 4px 1px 1px; display: block; }
.mock-row { display: flex; justify-content: space-between; font-size: 8px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.07); color: rgba(247,241,227,0.7); }
.hero-badge { position: absolute; right: -12px; bottom: 26px; background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); padding: 11px 14px; display: flex; gap: 9px; align-items: center; transform: rotate(2deg); }
.hero-badge .avatar { background: var(--forest); color: #fff; }
.hero-badge b { display: block; font-size: 11px; }
.hero-badge span { font-size: 9.5px; color: var(--muted); }
.section { padding: 62px 6vw; max-width: 1320px; margin: 0 auto; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 38px; }
.section-head .eyebrow { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-2); font-weight: 700; margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 13px; margin-top: 10px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.feature { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; transition: transform 0.18s, box-shadow 0.18s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-2); display: grid; place-items: center; margin-bottom: 13px; }
.feature-ico svg { width: 19px; height: 19px; }
.feature h3 { font-family: var(--sans); font-size: 14px; font-weight: 700; margin-bottom: 5px; }
.feature p { font-size: 12px; color: var(--muted); line-height: 1.65; }
.band { background: var(--forest); color: #f7f1e3; }
.band .section-head p { color: rgba(247,241,227,0.65); }
.band .section-head .eyebrow { color: var(--gold); }
.band-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; text-align: center; }
.band-stat b { font-family: var(--serif); font-size: 34px; display: block; color: var(--gold); font-weight: 600; }
.band-stat span { font-size: 11px; color: rgba(247,241,227,0.6); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; align-items: stretch; }
.price-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--gold); box-shadow: 0 20px 50px rgba(201,162,39,0.18); position: relative; }
.price-card.featured::before { content: 'Paling Populer'; position: absolute; top: 16px; right: 16px; background: var(--gold); color: var(--forest-3); font-size: 9px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.price-card h3 { font-family: var(--serif); font-size: 24px; }
.price-card .price { font-family: var(--serif); font-size: 34px; margin: 12px 0 2px; }
.price-card .price small { font-family: var(--sans); font-size: 11px; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 16px 0 22px; display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--ink-2); }
.price-card li::before { content: '✓'; color: var(--ok); font-weight: 700; margin-right: 8px; }
.price-card .btn { margin-top: auto; }
.landing-foot { border-top: 1px solid var(--line); padding: 26px 6vw; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); max-width: 1320px; margin: 0 auto; }

/* --------------------------- booking ---------------------------- */
.booking-page { min-height: 100vh; background: radial-gradient(circle at 80% -10%, rgba(201,162,39,0.16), transparent 45%), var(--cream); padding: 28px 16px 60px; }
.booking-shell { max-width: 880px; margin: 0 auto; }
.booking-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.booking-brand .brand-mark { background: var(--forest); color: var(--gold); }
.booking-brand b { font-family: var(--serif); font-size: 22px; display: block; }
.booking-brand span { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.booking-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.booking-head { padding: 26px 28px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(160deg, #fff, var(--surface-2)); }
.booking-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.booking-head p { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.booking-body { padding: 24px 28px 28px; }
.steps { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); font-weight: 600; }
.step i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--cream-2); color: var(--muted); font-style: normal; font-size: 10px; }
.step.active { color: var(--accent-ink); }
.step.active i { background: var(--forest); color: #fff; }
.step.done i { background: var(--ok-soft); color: var(--ok); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 9px; }
.choice { text-align: left; border: 1px solid var(--line); border-radius: 12px; padding: 13px; background: var(--paper); transition: border-color 0.15s, background 0.15s; }
.choice:hover { border-color: var(--gold); background: var(--surface-2); }
.choice.selected { border-color: var(--accent-ink); background: var(--surface-2); box-shadow: 0 0 0 2px var(--ring); }
.choice b { display: block; font-size: 13px; }
.choice span { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.choice .price { color: var(--accent-ink); font-weight: 700; margin-top: 7px; font-size: 12px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px,1fr)); gap: 7px; }
.slot { border: 1px solid var(--line); background: var(--paper); padding: 8px; border-radius: 8px; font-size: 12px; font-weight: 600; text-align: center; }
.slot:hover { border-color: var(--gold); }
.slot.selected { background: var(--forest); border-color: var(--accent-ink); color: #fff; }
.slot:disabled { opacity: 0.35; text-decoration: line-through; cursor: not-allowed; }
.booking-summary { background: var(--cream-2); border-radius: 14px; padding: 14px 16px; font-size: 12.5px; }
.booking-summary .row { display: flex; justify-content: space-between; padding: 3px 0; }
.booking-success { text-align: center; padding: 20px 10px; }
.booking-success .check { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 16px; }
.booking-success .check svg { width: 30px; height: 30px; }
.booking-ref { display: inline-block; font-family: monospace; font-size: 16px; letter-spacing: 0.12em; background: var(--paper); border: 1px dashed var(--line-2); padding: 8px 16px; border-radius: 10px; margin: 10px 0 16px; }

/* --------------------------- responsive ------------------------- */
@media (max-width: 1180px) {
  .pos-layout { grid-template-columns: minmax(0,1fr) 340px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .band-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 1024px) {
  :root { --sidebar-w: 252px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .landing-hero { grid-template-columns: 1fr; }
  .hero-visual { max-width: 540px; }
  .auth-screen { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.24s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .menu-toggle { display: grid; }
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(12,28,24,0.45); z-index: 35; }
  .pos-layout { grid-template-columns: 1fr; }
  .pos-cart { position: static; }
  .pos-cart-body { max-height: none; }
  .content { padding: 18px 16px 80px; }
  .topbar { padding: 10px 14px; }
  .page-actions-row { margin-bottom: 10px; }
  .pricing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .soap-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .band-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .card { padding: 16px; }
  .kpi-value { font-size: 1.75rem; }
  .topbar-title h1 { font-size: 18px; }
  .topbar-title p { display: none; }
  .modal { max-height: calc(100vh - 20px); }
  .modal-backdrop { padding: 10px; }
  .modal-head, .modal-body, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .drawer { max-width: none; }
  .landing-nav .links { display: none; }
  .landing-hero { padding-top: 30px; }
  .landing-hero h1 { font-size: clamp(2.4rem, 12vw, 3.6rem); }
  .section { padding: 44px 16px; }
  .hero-badge { right: 6px; bottom: 10px; }
  .booking-head, .booking-body { padding-left: 18px; padding-right: 18px; }
  .table { min-width: 520px; }
  .bar-row { grid-template-columns: 92px minmax(0,1fr) 72px; }
  .toast-wrap { right: 12px; left: 12px; bottom: 12px; max-width: none; }
}
@media (max-width: 420px) {
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .grid-auto { grid-template-columns: 1fr; }
  .pos-product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* ============ Konektivitas, outbox & mode developer ============ */
.net-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; border: 1px solid transparent; user-select: none;
}
.net-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.net-pill.is-online { color: var(--ok); background: var(--ok-soft); border-color: #cfe4d9; }
.net-pill.is-offline { color: var(--warn); background: var(--warn-soft); border-color: #ecd9b4; animation: net-blink 1.5s ease-in-out infinite; }
@keyframes net-blink { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

.outbox-btn { position: relative; }
.outbox-badge {
  position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--gold); color: #33240c; font-size: 10px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--cream); box-shadow: var(--shadow-sm);
}

.server-chip {
  display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold-2); background: var(--gold-soft);
  border: 1px solid #e3d49a; border-radius: 8px; padding: 5px 9px; user-select: none; white-space: nowrap;
}
.server-chip.is-jual { color: #7a3b12; background: #f7e0cf; border-color: #ecc4a8; }

.server-pick {
  margin-top: 16px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm);
  padding: 12px 14px; background: var(--surface-2);
}
.server-options { display: grid; gap: 8px; margin-top: 8px; }
.server-option {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--paper); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.server-option:hover { border-color: var(--gold); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.server-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.server-fake {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--line-2); background: var(--paper); position: relative; transition: border-color .15s;
}
.server-fake::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%;
  background: var(--forest); transform: scale(0); transition: transform .18s;
}
.server-option.selected { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,.25); }
.server-option.selected .server-fake { border-color: var(--accent-ink); }
.server-option.selected .server-fake::after { transform: scale(1); }
.server-name { display: grid; min-width: 0; flex: 1; }
.server-name b { font-size: 13px; color: var(--ink); }
.server-name small { font-size: 11px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.server-tag {
  flex: 0 0 auto; font-size: 9.5px; font-weight: 800; letter-spacing: .12em; color: var(--ok);
  background: var(--ok-soft); border-radius: 6px; padding: 4px 7px; text-transform: uppercase;
}
.server-tag.tag-jual { color: #7a3b12; background: #f7e0cf; }

@media (max-width: 720px) {
  .net-pill { font-size: 9px; padding: 4px 8px; letter-spacing: .04em; }
  .net-pill::before { width: 6px; height: 6px; }
  .server-chip { display: none !important; }
  .server-pick { padding: 10px; }
}

.stock-chip.stock-low { color: var(--danger); font-weight: 700; }
.picker-row:hover { border-color: var(--gold) !important; background: var(--surface-2) !important; }

/* ============ Sidebar mini & accordion grup navigasi ============ */
@media (min-width: 901px) {
  .sidebar, .main { transition: width 0.22s ease, flex-basis 0.22s ease, margin-left 0.22s ease; }

  .sidebar-head { position: relative; }
  .sidebar-toggle {
    margin-left: auto; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.06);
    color: rgba(243, 237, 223, 0.75); display: grid; place-items: center; cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
  }
  .sidebar-toggle:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
  .sidebar-toggle svg { transition: transform 0.25s ease; }

  /* ---- accordion per grup ---- */
  .nav-group {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    background: transparent; border: 0; cursor: pointer; text-align: left; font-family: inherit;
    margin: 10px 0 2px; padding: 6px 10px; border-radius: 8px;
    font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase;
    color: rgba(243, 237, 223, 0.42); transition: color 0.15s ease, background 0.15s ease;
  }
  .nav-group:hover { color: #f3eddf; background: rgba(255, 255, 255, 0.05); }
  .nav-group svg { opacity: 0.55; transition: transform 0.22s ease; flex: 0 0 auto; }
  .nav-section.open .nav-group svg { transform: rotate(90deg); }
  .nav-items { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.28s ease; }
  .nav-section.open .nav-items { grid-template-rows: 1fr; }
  .nav-items-inner { overflow: hidden; min-height: 0; display: flex; flex-direction: column; }
  .nav-item { position: relative; }

  /* ---- mode mini ---- */
  body.sidebar-mini { --sidebar-w: 76px; }
  body.sidebar-mini .sidebar-head { justify-content: center; padding: 20px 8px 16px; gap: 0; }
  body.sidebar-mini .brand-text { display: none; }
  body.sidebar-mini .sidebar-toggle {
    position: absolute; right: -14px; top: 36px; z-index: 45;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--forest-3); border: 1px solid rgba(201, 162, 39, 0.45);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  }
  body.sidebar-mini .sidebar-toggle svg { transform: rotate(180deg); }
  body.sidebar-mini .sidebar-scroll { padding: 6px 8px 16px; }
  body.sidebar-mini .nav-group { display: none; }
  body.sidebar-mini .nav-items { grid-template-rows: 1fr !important; }
  body.sidebar-mini .nav-item { justify-content: center; padding: 10px 6px; gap: 0; }
  body.sidebar-mini .nav-item .nav-label,
  body.sidebar-mini .nav-badge { display: none; }
  body.sidebar-mini .nav-item svg { width: 20px; height: 20px; opacity: 0.92; }
  body.sidebar-mini .sidebar-foot { padding: 12px 8px; }
  body.sidebar-mini .user-chip { justify-content: center; }
  body.sidebar-mini .user-meta { display: none; }

  /* tooltip saat mode mini */
  body.sidebar-mini .nav-item:hover::after {
    content: attr(data-label);
    position: absolute; left: calc(100% + 16px); top: 50%; transform: translateY(-50%);
    background: #14231f; color: #f3eddf; font-size: 12px; font-weight: 600;
    padding: 7px 12px; border-radius: 8px; white-space: nowrap; z-index: 60;
    border: 1px solid rgba(201, 162, 39, 0.3); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    pointer-events: none;
  }
}
@media (max-width: 900px) {
  .sidebar-toggle { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .main, .sidebar-toggle svg, .nav-items, .nav-group svg { transition: none !important; }
}

/* ============ WhatsApp Web/Desktop (mode manual) ============ */
.wa-how { padding: 16px 18px; }
.wa-steps { margin: 10px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); }
.wa-steps li { margin: 3px 0; }
.wa-kpi-warn { border-left: 4px solid var(--gold); }
.wa-queue { display: flex; flex-direction: column; gap: 10px; }
.wa-msg { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 13px; background: var(--surface-2); }
.wa-msg-head { display: flex; align-items: center; gap: 10px; }
.wa-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--forest-2); color: var(--gold); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.wa-msg-target { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.wa-msg-target b { font-size: 13px; }
.wa-msg-target span { font-size: 11px; color: var(--muted); }
.wa-ref { flex: 0 0 auto; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ok); background: var(--ok-soft); border-radius: 6px; padding: 4px 8px; }
.wa-msg-body { font-size: 12.5px; white-space: pre-wrap; color: var(--ink-2); background: var(--paper); border: 1px dashed var(--line); border-radius: 10px; padding: 9px 11px; margin: 10px 0 8px; max-height: 140px; overflow: auto; }
.wa-msg-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.wa-msg-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ============ Pengaturan: hari operasional (chip) ============ */
.day-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 15px; font-size: 12.5px; cursor: pointer; background: var(--paper); user-select: none; transition: background .15s, border-color .15s, color .15s; }
.day-chip:hover { border-color: var(--gold); }
.day-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.day-chip.selected { background: var(--forest); border-color: var(--accent-ink); color: #f3edda; font-weight: 700; }

/* ============ Field tanggal DD-MM-YYYY ============ */
.date-mask { display: block; min-width: 0; }
.date-masked { width: 100%; }
.input-invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(173, 68, 56, 0.15) !important; }

/* ============ WhatsApp default client toggle ============ */
.segmented { display: inline-flex; background: var(--cream-2); border-radius: 999px; padding: 3px; gap: 2px; }
.segment { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--muted); cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.segment:hover { color: var(--ink); }
.segment.active { background: var(--paper); color: var(--accent-ink); box-shadow: var(--shadow-sm); }

/* ============ QRIS klinik (preview & panel kasir) ============ */
.qris-preview { display: grid; place-items: center; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); background: var(--cream-2); padding: 18px; min-height: 120px; margin-top: 10px; }
.qris-empty { text-align: center; color: var(--muted); }

/* ============ QRIS panel di POS & preview besar ============ */
.qris-panel { border: 1px dashed #e3d49a; background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 8px; }
.qris-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.qris-panel-title { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; color: var(--accent-ink); letter-spacing: .04em; }
.qris-panel-body { display: flex; gap: 12px; align-items: center; }
.qris-panel-img { width: 92px; height: 92px; object-fit: contain; background: var(--paper); border-radius: 10px; border: 1px solid var(--line); flex: 0 0 auto; }
.qris-panel-side { min-width: 0; }
.qris-panel-total { font-family: var(--serif); font-size: 21px; font-weight: 700; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.qris-missing { font-size: 12px; color: var(--warn); background: var(--warn-soft); border-radius: 10px; padding: 10px 12px; }
.qris-big { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 0 4px; }
.qris-big img { max-width: min(320px, 74vw); width: 100%; background: var(--paper); border-radius: 16px; padding: 14px; border: 1px solid var(--line); }
.qris-big-amount { font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--accent-ink); margin-top: 14px; font-variant-numeric: tabular-nums; }

/* ============ Status operasional (chip ringkasan klinik) ============ */
.status-ops { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.status-chip { display: flex; align-items: center; gap: 10px; text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; transition: transform .18s, box-shadow .18s, border-color .18s; }
.status-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--gold); }
.status-chip-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; color: var(--accent-ink); background: var(--gold-soft); }
.status-chip-icon svg { width: 19px; height: 19px; }
.status-chip-body { display: flex; flex-direction: column; min-width: 0; }
.status-chip-body b { font-size: 17px; font-family: var(--serif); color: var(--accent-ink); line-height: 1.15; font-variant-numeric: tabular-nums; }
.status-chip-body small { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tone-amber .status-chip-icon { background: var(--gold-soft); color: var(--gold-2); }
.tone-plum .status-chip-icon { background: var(--plum-soft); color: var(--plum); }
.tone-blue .status-chip-icon { background: var(--info-soft); color: var(--info); }
.tone-warn .status-chip-icon { background: var(--warn-soft); color: var(--warn); }
.tone-green .status-chip-icon { background: var(--ok-soft); color: var(--ok); }
.tone-danger .status-chip-icon { background: var(--danger-soft); color: var(--danger); }
.tone-teal .status-chip-icon { background: var(--teal-soft); color: var(--teal); }
.tone-violet .status-chip-icon { background: var(--violet-soft); color: var(--violet); }
.tone-amber .status-chip-body b { color: var(--gold-2); }
.tone-plum .status-chip-body b { color: var(--plum); }
.tone-blue .status-chip-body b { color: var(--info); }
.tone-warn .status-chip-body b { color: var(--warn); }
.tone-green .status-chip-body b { color: var(--ok); }
.tone-danger .status-chip-body b { color: var(--danger); }
.tone-teal .status-chip-body b { color: var(--teal); }
.tone-violet .status-chip-body b { color: var(--violet); }
@media (max-width: 720px) { .status-ops { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }

/* ============ Tema aplikasi (pengaturan) ============ */
.theme-pick { display: grid; gap: 8px; }
.theme-option { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s, transform .15s, background .15s; width: 100%; }
.theme-option:hover { border-color: var(--gold); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.theme-option.active { border-color: var(--gold); background: var(--surface-2); box-shadow: 0 0 0 2px var(--ring); }
.theme-meta { display: flex; flex-direction: column; min-width: 0; }
.theme-meta b { font-size: 13px; color: var(--ink); }
.theme-meta small { font-size: 11px; color: var(--muted); }
.theme-check { margin-left: auto; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; transition: border-color .15s, background .15s, color .15s; }
.theme-option.active .theme-check { border-color: var(--gold); background: var(--gold); color: #2a1f07; }
.theme-swatch { width: 62px; height: 42px; border-radius: 8px; border: 1px solid rgba(0,0,0,.18); flex: 0 0 auto; position: relative; overflow: hidden; }
.theme-swatch::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 26%; }
.theme-swatch::after { content: ''; position: absolute; right: 6px; top: 8px; width: 34%; height: 5px; border-radius: 3px; opacity: .95; }
.theme-swatch-light { background: #faf7f1; }
.theme-swatch-light::before { background: #0c2a24; }
.theme-swatch-light::after { background: #c9a227; }
.theme-swatch-pink { background: #fdf5f6; }
.theme-swatch-pink::before { background: #331723; }
.theme-swatch-pink::after { background: #b4697a; }
.theme-swatch-dark { background: #1f2523; }
.theme-swatch-dark::before { background: #0e1412; }
.theme-swatch-dark::after { background: #d4af37; }
