/* ============================================================
   SimKlinik — Design System (custom, tanpa framework)
   Palet: kertas hangat + teal klinis + tinta gelap + amber
   ============================================================ */

:root {
  /* Warna inti */
  --ink-950: #0a1322;
  --ink-900: #0e1a2e;
  --ink-800: #15243c;
  --brand: #0e7c68;
  --brand-deep: #0a5f50;
  --brand-soft: #e2f1ec;
  --amber: #df9a2c;
  --amber-soft: #fbf1dd;

  /* Permukaan */
  --paper: #f4f1ea;
  --card: #ffffff;
  --line: #e6e1d3;
  --line-soft: #efebe0;

  /* Teks */
  --text: #1d2735;
  --muted: #67707f;
  --faint: #98a0ad;

  /* Semantik */
  --danger: #cf4656;
  --danger-soft: #faecee;
  --ok: #2e8b5f;
  --ok-soft: #e6f3ec;
  --info: #3b6fd6;
  --info-soft: #e9eefb;
  --violet: #7a5bd6;
  --violet-soft: #f0ebfc;
  --rose: #d6507a;
  --rose-soft: #fbeaf1;

  /* Bentuk & bayangan */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-full: 999px;
  --shadow-sm: 0 1px 2px rgba(18, 26, 38, .05), 0 1px 3px rgba(18, 26, 38, .07);
  --shadow-md: 0 4px 14px rgba(18, 26, 38, .09);
  --shadow-lg: 0 18px 42px rgba(18, 26, 38, .16);

  /* Tipografi */
  --font-sans: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --sidebar-w: 270px;
  --topbar-h: 72px;
}

/* ============================ BASE ============================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: none; }
img, svg { vertical-align: middle; }
::selection { background: var(--brand); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cfc9b8; border-radius: 99px; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: #b8b19c; }

/* ============================ SHELL ============================ */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 500px at -15% -10%, rgba(14, 124, 104, .28), transparent 60%),
    radial-gradient(700px 400px at 110% 115%, rgba(223, 154, 44, .12), transparent 55%),
    var(--ink-950);
  color: #aeb8c8;
  z-index: 60;
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar-thumb { border-color: var(--ink-900); background: #22314d; }

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.sidebar-brand .brand-mark { color: var(--amber); flex: none; filter: drop-shadow(0 4px 10px rgba(223, 154, 44, .35)); }
.brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .01em;
}
.brand-sub { display: block; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #7d8aa0; margin-top: 1px; }
.sidebar-close { display: none; margin-left: auto; color: #8b97ab; }

/* Navigasi */
.sidebar-nav { flex: 1; padding: 14px 14px 10px; }
.nav-section {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #5f6d85;
  padding: 14px 12px 7px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9.5px 12px;
  margin: 1.5px 0;
  border-radius: var(--r-sm);
  color: #9aa6ba;
  font-weight: 500;
  font-size: 13.8px;
  transition: background .16s ease, color .16s ease, transform .16s ease;
  position: relative;
}
.nav-item .ic { flex: none; opacity: .9; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #e8edf5; transform: translateX(2px); }
.nav-item.is-active {
  background: linear-gradient(90deg, rgba(14, 124, 104, .32), rgba(14, 124, 104, .12));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(14, 124, 104, .5);
}
.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 20%;
  bottom: 20%;
  width: 3.5px;
  border-radius: 0 4px 4px 0;
  background: var(--amber);
}
.nav-pill {
  margin-left: auto;
  background: var(--amber);
  color: var(--ink-950);
  font-size: 11px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* Footer sidebar */
.sidebar-foot { padding: 10px 14px 18px; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; }
.sidebar-user strong { display: block; color: #e8edf5; font-size: 13px; }
.sidebar-user .badge { font-size: 10px; }

/* Scrim mobile */
.sidebar-scrim {
  position: fixed; inset: 0; background: rgba(10, 19, 34, .5);
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 55;
}
body.nav-open .sidebar { transform: translateX(0); }
body.nav-open .sidebar-scrim { opacity: 1; pointer-events: auto; }

/* ============================ MAIN ============================ */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px;
  background: rgba(244, 241, 234, .86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-title h1 { font-size: 19px; font-weight: 800; }
.topbar-title span { font-size: 12px; color: var(--muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--muted);
  background: var(--card); border: 1px solid var(--line);
  padding: 7px 13px; border-radius: var(--r-full);
  transition: border-color .16s, box-shadow .16s;
}
.topbar-chip:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.topbar-chip strong { color: var(--brand-deep); }
.user-chip { display: flex; align-items: center; gap: 10px; padding-left: 4px; }
.user-chip-meta strong { display: block; font-size: 13px; line-height: 1.2; }
.user-chip-meta span { font-size: 11px; color: var(--muted); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--r-sm);
  border: 1px solid transparent; background: transparent; color: var(--muted);
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--card); border-color: var(--line); color: var(--text); }

/* Konten */
.content { flex: 1; padding: 26px 28px 10px; width: 100%; max-width: 1460px; margin: 0 auto; }
.app-footer {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 14px 28px 22px; font-size: 12px; color: var(--faint);
  max-width: 1460px; margin: 0 auto; width: 100%;
}

/* ============================ FLASH ============================ */
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--r-md);
  margin-bottom: 20px; font-size: 13.5px; font-weight: 500;
  border: 1px solid; animation: flashIn .3s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes flashIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.flash-ok { background: var(--ok-soft); border-color: #c3e5d2; color: #1f6b47; }
.flash-err { background: var(--danger-soft); border-color: #f3cdd3; color: #a23240; }
.flash-info { background: var(--info-soft); border-color: #cdd9f5; color: #2b549c; }
.flash-x { margin-left: auto; border: 0; background: none; cursor: pointer; color: inherit; opacity: .6; display: inline-flex; padding: 2px; }
.flash-x:hover { opacity: 1; }

/* ============================ KARTU ============================ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 17px 22px; border-bottom: 1px solid var(--line-soft);
}
.card-head h2 { font-size: 15.5px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.card-head .sub { font-size: 12.5px; color: var(--muted); }
.card-head .head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-body { padding: 22px; }
.card-body.flush { padding: 0; }

.page-head {
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head h2 { font-size: 22px; font-weight: 800; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.page-head .head-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================ TOMBOL ============================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 10px 17px; border-radius: var(--r-sm);
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 700;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, background .14s, border-color .14s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, #10907a, var(--brand-deep));
  color: #fff; box-shadow: 0 2px 8px rgba(14, 124, 104, .35), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(14, 124, 104, .4); }
.btn-amber {
  background: linear-gradient(180deg, #eda63f, var(--amber));
  color: var(--ink-950); box-shadow: 0 2px 8px rgba(223, 154, 44, .35), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn-amber:hover { transform: translateY(-1px); }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-deep); }
.btn-soft { background: var(--brand-soft); color: var(--brand-deep); }
.btn-soft:hover { background: #d4e9e2; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #f5d9dd; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-xs { padding: 4px 9px; font-size: 11.5px; border-radius: 8px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ============================ FORM ============================ */
.field { margin-bottom: 17px; }
.field label {
  display: block; font-size: 12.3px; font-weight: 700; color: var(--text);
  margin-bottom: 6px; letter-spacing: .01em;
}
.field label .req { color: var(--danger); }
.field .hint { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.input, select.input, textarea.input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: var(--font-sans); font-size: 13.8px; color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(14, 124, 104, .14);
}
textarea.input { resize: vertical; min-height: 84px; line-height: 1.6; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2367707f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 18px; }
.f-col-3 { grid-column: span 3; } .f-col-4 { grid-column: span 4; }
.f-col-6 { grid-column: span 6; } .f-col-8 { grid-column: span 8; }
.f-col-12 { grid-column: span 12; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; padding-top: 18px; border-top: 1px dashed var(--line); }
input[type="checkbox"].switch {
  appearance: none; width: 40px; height: 22px; border-radius: 99px;
  background: #d8d3c4; position: relative; cursor: pointer; transition: background .18s;
}
input[type="checkbox"].switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
input[type="checkbox"].switch:checked { background: var(--brand); }
input[type="checkbox"].switch:checked::after { transform: translateX(18px); }
.check-row { display: flex; align-items: center; gap: 9px; }

/* ============================ TABEL ============================ */
.table-wrap { overflow-x: auto; border-radius: 0 0 var(--r-lg) var(--r-lg); }
table.table { width: 100%; border-collapse: collapse; font-size: 13.4px; }
.table thead th {
  text-align: left; font-size: 10.8px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint);
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  background: #fbfaf6; white-space: nowrap;
}
.table tbody td { padding: 12.5px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #faf8f1; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .cell-user { display: flex; align-items: center; gap: 11px; }
.table .cell-user strong { display: block; font-size: 13.6px; }
.table .cell-user small { color: var(--muted); font-size: 12px; }
.table .cell-actions { display: flex; gap: 5px; white-space: nowrap; }
.table .mono { font-family: var(--font-mono); font-size: 12.3px; font-weight: 600; color: var(--ink-800); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .num-row td.num { font-weight: 700; }
.table tfoot td { padding: 12px 18px; font-weight: 800; background: #fbfaf6; border-top: 2px solid var(--line); }

/* ============================ BADGE & PILL ============================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.3px; font-weight: 700; letter-spacing: .01em;
  padding: 3.5px 10px; border-radius: var(--r-full);
  white-space: nowrap;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-waiting { background: var(--amber-soft); color: #a56f15; }
.badge-active { background: var(--brand-soft); color: var(--brand-deep); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-rose { background: var(--rose-soft); color: var(--rose); }
.badge-teal { background: var(--brand-soft); color: var(--brand-deep); }
.badge-blue { background: var(--info-soft); color: var(--info); }
.badge-amber { background: var(--amber-soft); color: #a56f15; }
.badge-muted { background: #ecebe4; color: var(--muted); }

/* ============================ AVATAR ============================ */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  font-weight: 800; font-size: 13px; flex: none;
  letter-spacing: .02em;
}
.avatar.tone-teal { background: var(--brand-soft); color: var(--brand-deep); }
.avatar.tone-amber { background: var(--amber-soft); color: #a56f15; }
.avatar.tone-violet { background: var(--violet-soft); color: var(--violet); }
.avatar.tone-rose { background: var(--rose-soft); color: var(--rose); }
.avatar.tone-blue { background: var(--info-soft); color: var(--info); }
.avatar.tone-green { background: var(--ok-soft); color: var(--ok); }

/* ============================ DASHBOARD ============================ */
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-bottom: 22px;
}
.stat-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 19px 20px; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px;
  border-radius: 50%; background: radial-gradient(circle, rgba(14,124,104,.07), transparent 70%);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-ic {
  width: 46px; height: 46px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.stat-card.tone-teal .stat-ic { background: var(--brand-soft); color: var(--brand-deep); }
.stat-card.tone-amber .stat-ic { background: var(--amber-soft); color: #a56f15; }
.stat-card.tone-violet .stat-ic { background: var(--violet-soft); color: var(--violet); }
.stat-card.tone-rose .stat-ic { background: var(--rose-soft); color: var(--rose); }
.stat-card.tone-blue .stat-ic { background: var(--info-soft); color: var(--info); }
.stat-meta span { font-size: 12px; font-weight: 600; color: var(--muted); display: block; }
.stat-meta strong { font-size: 25px; font-weight: 800; letter-spacing: -.02em; display: block; line-height: 1.25; font-variant-numeric: tabular-nums; }
.stat-meta small { font-size: 11.5px; color: var(--faint); }

.dash-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; margin-bottom: 18px; }
.dash-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 18px; }

/* Grafik batang kunjungan (CSS murni) */
.bar-chart { display: flex; align-items: flex-end; gap: 14px; height: 210px; padding: 10px 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar-track { width: 100%; max-width: 46px; flex: 1; display: flex; align-items: flex-end; border-radius: 8px 8px 4px 4px; background: var(--brand-soft); overflow: hidden; }
.bar-fill {
  width: 100%; border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #18a387, var(--brand-deep));
  min-height: 4px; transition: height .6s cubic-bezier(.2,.8,.3,1);
  position: relative;
}
.bar-fill:hover::after {
  content: attr(data-v);
  position: absolute; top: -26px; left: 50%; transform: translateX(-50%);
  background: var(--ink-950); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px; white-space: nowrap;
}
.bar-col:nth-child(7) .bar-fill { background: linear-gradient(180deg, #f0b257, var(--amber)); }
.bar-label { font-size: 11px; font-weight: 600; color: var(--muted); }
.bar-value { font-size: 11px; font-weight: 800; color: var(--ink-800); font-variant-numeric: tabular-nums; }

/* Ring list */
.ring-list { display: flex; flex-direction: column; }
.ring-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.ring-item:last-child { border-bottom: 0; }
.ring-item .ri-info { min-width: 0; flex: 1; }
.ring-item .ri-info strong { display: block; font-size: 13.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ring-item .ri-info small { color: var(--muted); font-size: 12px; }
.queue-no {
  font-family: var(--font-mono); font-weight: 700; font-size: 12.5px;
  background: var(--ink-950); color: #fff; border-radius: 8px; padding: 5px 9px; flex: none;
}

/* ============================ EMPTY STATE ============================ */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .ic { color: #cfc9b6; margin-bottom: 10px; }
.empty-state h2 { font-size: 17px; color: var(--text); margin-bottom: 4px; }
.empty-state p { font-size: 13px; max-width: 380px; margin: 0 auto 16px; }

/* ============================ ANTRIAN ============================ */
.queue-hero {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-bottom: 18px;
}
.qnow {
  background:
    radial-gradient(900px 300px at 20% -30%, rgba(14,124,104,.5), transparent 60%),
    var(--ink-950);
  border-radius: var(--r-lg); color: #fff; padding: 26px 28px;
  box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.qnow::after {
  content: ""; position: absolute; right: -50px; top: -50px; width: 190px; height: 190px;
  border-radius: 50%; border: 1.5px dashed rgba(255,255,255,.14);
}
.qnow-label { font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: #8fd4c3; font-weight: 700; }
.qnow-number { font-family: var(--font-mono); font-size: 74px; font-weight: 700; line-height: 1; margin: 10px 0 4px; letter-spacing: -.02em; }
.qnow-name { font-size: 16px; font-weight: 700; }
.qnow-meta { display: flex; gap: 18px; margin-top: 12px; color: #93a1b5; font-size: 12.5px; flex-wrap: wrap; }
.qnow-meta span { display: inline-flex; align-items: center; gap: 6px; }
.qstats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qstat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.qstat span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.qstat strong { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ============================ DETAIL PASEN / EMR ============================ */
.profile-hero {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  padding: 24px; border-radius: var(--r-lg);
  background:
    radial-gradient(700px 200px at 85% -40%, rgba(223,154,44,.18), transparent 60%),
    linear-gradient(120deg, var(--ink-950), var(--ink-800));
  color: #fff; margin-bottom: 18px; box-shadow: var(--shadow-md);
}
.profile-hero .avatar { width: 62px; height: 62px; font-size: 22px; border: 2px solid rgba(255,255,255,.25); }
.profile-hero h2 { font-size: 21px; }
.profile-hero .ph-meta { display: flex; gap: 18px; flex-wrap: wrap; color: #9fb0c4; font-size: 12.8px; margin-top: 5px; }
.profile-hero .ph-meta span { display: inline-flex; align-items: center; gap: 6px; }
.ph-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.info-item { background: #faf9f4; border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 12px 14px; }
.info-item span { display: block; font-size: 10.8px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--faint); }
.info-item strong { font-size: 13.6px; }

.soap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.soap-box { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.soap-box .sb-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 800; font-size: 12.5px; letter-spacing: .06em; }
.soap-box .sb-body { padding: 14px; font-size: 13.4px; color: var(--text); white-space: pre-wrap; background: #fff; }
.soap-s { background: #eef3ee; color: #3c6b4f; }
.soap-o { background: #edf1f8; color: #3a5a8f; }
.soap-a { background: #faf0e0; color: #8a6517; }
.soap-p { background: #f1edf8; color: #6549a8; }

/* ============================ PAGINASI & LAIN ============================ */
.pagination { display: flex; gap: 6px; padding: 16px 18px; justify-content: center; }
.pg {
  min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--line); background: var(--card);
  font-size: 12.5px; font-weight: 700; color: var(--muted);
}
.pg:hover { border-color: var(--brand); color: var(--brand-deep); }
.pg.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

.search-box { position: relative; }
.search-box input {
  width: 230px; padding: 9px 38px 9px 13px; border: 1px solid var(--line);
  border-radius: var(--r-full); font-family: var(--font-sans); font-size: 13px;
  background: var(--card); transition: box-shadow .15s, border-color .15s, width .2s;
}
.search-box input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14,124,104,.13); width: 260px; }
.search-box button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; color: var(--faint); cursor: pointer; padding: 6px;
}
.search-box button:hover { color: var(--brand); }

.row-act {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.8px; font-weight: 700; padding: 5.5px 10px; border-radius: 8px;
  border: 1px solid transparent; transition: background .14s, border-color .14s, color .14s;
}
.row-act.ghost { background: #f4f2ea; color: var(--muted); }
.row-act.ghost:hover { background: var(--brand-soft); color: var(--brand-deep); }
.row-act.ok { background: var(--ok-soft); color: var(--ok); }
.row-act.ok:hover { background: #d5ebdf; }
.row-act.danger { background: var(--danger-soft); color: var(--danger); }
.row-act.danger:hover { background: #f3d7dc; }
.row-act.amber { background: var(--amber-soft); color: #a56f15; }
.row-act.amber:hover { background: #f5e6c6; }
.row-act.info { background: var(--info-soft); color: var(--info); }
.row-act.info:hover { background: #d7e1f8; }

.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-bar .input { width: auto; padding: 8px 12px; font-size: 13px; }

/* ============================ RESEP / BILLING ITEM ROW ============================ */
.dyn-rows { display: flex; flex-direction: column; gap: 9px; }
.dyn-row { display: grid; grid-template-columns: 1.4fr 1fr 90px 1.6fr 40px; gap: 8px; align-items: center; }
.dyn-row.billing { grid-template-columns: 2fr 90px 130px 40px; }
.dyn-row .input { padding: 8.5px 11px; font-size: 13.2px; }
.dyn-del { border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--faint); cursor: pointer; height: 37px; display: inline-flex; align-items: center; justify-content: center; }
.dyn-del:hover { color: var(--danger); background: var(--danger-soft); border-color: #f0c8cf; }
.add-row-btn {
  border: 1.5px dashed var(--line); background: none; color: var(--muted);
  border-radius: var(--r-sm); padding: 9px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: border-color .15s, color .15s;
}
.add-row-btn:hover { border-color: var(--brand); color: var(--brand-deep); }

/* ============================ LOGIN ============================ */
.login-page {
  min-height: 100vh; display: flex;
  background: var(--paper);
}
.login-brand {
  flex: 1.1; display: flex; flex-direction: column; justify-content: space-between;
  padding: 54px 60px;
  background:
    radial-gradient(900px 480px at -10% -20%, rgba(24,163,135,.4), transparent 60%),
    radial-gradient(700px 420px at 110% 115%, rgba(223,154,44,.22), transparent 55%),
    var(--ink-950);
  color: #fff; position: relative; overflow: hidden;
}
.login-brand::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(700px 500px at 30% 30%, #000 30%, transparent 75%);
}
.login-brand .brand-mark { color: var(--amber); filter: drop-shadow(0 6px 16px rgba(223,154,44,.4)); }
.lb-head { display: flex; align-items: center; gap: 13px; position: relative; z-index: 1; }
.lb-head .brand-name { font-size: 24px; }
.lb-hero { position: relative; z-index: 1; max-width: 520px; }
.lb-hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(30px, 3.6vw, 44px); line-height: 1.14; letter-spacing: -.01em;
  margin-bottom: 16px;
}
.lb-hero h1 em { font-style: italic; color: #7fd4be; }
.lb-hero p { color: #9fb0c4; font-size: 15px; line-height: 1.7; }
.lb-features { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; position: relative; z-index: 1; }
.lb-feature { display: flex; align-items: center; gap: 11px; font-size: 13.5px; color: #c6d0de; }
.lb-feature .ic { color: #7fd4be; flex: none; }
.lb-foot { font-size: 12px; color: #5f6d85; position: relative; z-index: 1; }

.login-panel {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 48px;
}
.login-card { width: 100%; max-width: 420px; }
.login-card h2 { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -.01em; }
.login-card .lc-sub { color: var(--muted); font-size: 13.5px; margin: 6px 0 26px; }
.login-demo {
  margin-top: 24px; border: 1px dashed var(--line); background: #fbfaf4;
  border-radius: var(--r-md); padding: 13px 16px; font-size: 12.3px; color: var(--muted);
}
.login-demo strong { color: var(--text); }
.login-demo code { font-family: var(--font-mono); font-size: 11.6px; background: #efece1; padding: 1.5px 6px; border-radius: 5px; color: var(--brand-deep); }

/* ============================ PROMO ============================ */
.promo { font-family: var(--font-sans); }
.promo-hero {
  background:
    radial-gradient(1000px 500px at 15% -20%, rgba(24,163,135,.45), transparent 60%),
    radial-gradient(800px 420px at 100% 110%, rgba(223,154,44,.25), transparent 55%),
    var(--ink-950);
  color: #fff; padding: 84px 40px 90px; text-align: center; position: relative; overflow: hidden;
}
.promo-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(800px 500px at 50% 40%, #000 20%, transparent 75%);
}
.promo-hero .ph-in { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; }
.promo-hero .lb-head { justify-content: center; margin-bottom: 34px; }
.promo-hero h1 { font-family: var(--font-display); font-size: clamp(34px, 4.5vw, 54px); font-weight: 600; line-height: 1.12; margin-bottom: 18px; }
.promo-hero h1 em { font-style: italic; color: #7fd4be; }
.promo-hero p { color: #a9b6c8; font-size: 16.5px; max-width: 640px; margin: 0 auto 30px; }
.promo-hero .btn { padding: 14px 26px; font-size: 15px; }
.promo-section { max-width: 1080px; margin: 0 auto; padding: 70px 30px; }
.promo-section h2 { font-family: var(--font-display); font-size: 32px; font-weight: 600; text-align: center; margin-bottom: 8px; }
.promo-section .sec-sub { text-align: center; color: var(--muted); margin-bottom: 42px; font-size: 14.5px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; box-shadow: var(--shadow-sm); transition: transform .16s, box-shadow .16s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-card .fc-ic {
  width: 46px; height: 46px; border-radius: var(--r-md); background: var(--brand-soft);
  color: var(--brand-deep); display: flex; align-items: center; justify-content: center; margin-bottom: 15px;
}
.feature-card h3 { font-size: 15.5px; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; position: relative; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-display); font-size: 40px; font-weight: 700;
  color: var(--brand-soft); line-height: 1; display: block; margin-bottom: 10px;
}
.step h3 { font-size: 14.5px; margin-bottom: 5px; }
.step p { font-size: 12.8px; color: var(--muted); }
.promo-cta {
  background: linear-gradient(120deg, var(--brand-deep), var(--brand));
  border-radius: var(--r-lg); padding: 44px; text-align: center; color: #fff;
  box-shadow: var(--shadow-lg);
}
.promo-cta h2 { font-family: var(--font-display); font-weight: 600; font-size: 28px; }
.promo-cta p { color: #c9e8df; margin: 8px 0 22px; }

/* ============================ INSTALL ============================ */
.install-body { background: var(--paper); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px; }
.install-card { width: 100%; max-width: 560px; }
.install-card .card-body { padding: 30px; }
.install-steps { display: flex; gap: 8px; margin-bottom: 26px; }
.istep {
  flex: 1; height: 5px; border-radius: 99px; background: var(--line);
}
.istep.done { background: var(--brand); }
.istep.now { background: var(--amber); }
.req-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.req-row:last-child { border-bottom: 0; }
.req-ok { color: var(--ok); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.req-bad { color: var(--danger); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }

/* ============================ CETAK (PRINT) ============================ */
.print-sheet { display: none; }

@media print {
  body { background: #fff !important; }
  .sidebar, .topbar, .app-footer, .flash, .page-head .head-actions, .no-print { display: none !important; }
  .main { margin-left: 0 !important; }
  .content { padding: 0 !important; max-width: none !important; }
  .card { border: 0; box-shadow: none; }
  .print-sheet { display: block; }
  .print-hide { display: none !important; }
}

/* ============================ RESPONSIF ============================ */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .dash-grid-3, .queue-hero { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .f-col-3, .f-col-4 { grid-column: span 6; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .28s cubic-bezier(.3,.7,.3,1); }
  body.nav-open .sidebar { transform: translateX(0); }
  .sidebar-close { display: inline-flex; }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 16px; }
  .user-chip-meta { display: none; }
  .topbar-chip span { display: none; }
  .login-page { flex-direction: column; }
  .login-brand { padding: 34px 28px; }
  .login-brand .lb-hero h1 { font-size: 28px; }
  .login-brand .lb-hero p { font-size: 13.5px; }
  .login-panel { padding: 30px 20px; }
  .form-grid { gap: 0 12px; }
  .info-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr; }
  .feature-grid, .steps { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .f-col-3, .f-col-4, .f-col-6, .f-col-8 { grid-column: span 12; }
  .soap-grid { grid-template-columns: 1fr; }
  .dyn-row, .dyn-row.billing { grid-template-columns: 1fr; gap: 6px; }
  .dyn-del { height: 34px; }
  .search-box input, .search-box input:focus { width: 100%; }
  .qnow-number { font-size: 52px; }
}
