:root {
  --brand: #0D7A8A;
  --brand-deep: #0A5E6B;
  --ink: #0A1929;
  --ink-soft: #1A2B3F;
  --muted: #6B7A8A;
  --muted-light: #9AA8B5;
  --bg: #F4F6F8;
  --surface: #FFFFFF;
  --line: #E6EAEF;
  --danger: #DC2626;
  --success: #059669;
  --accent: #F59E0B;
  --purple: #7C3AED;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px;
}
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}
.login-card {
  background: white; padding: 40px; border-radius: 16px; width: 400px; max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.login-brand { text-align: center; margin-bottom: 24px; }
.brand-logo {
  display: block; object-fit: cover; flex: 0 0 auto;
  background: var(--brand); box-shadow: 0 12px 28px rgba(13, 122, 138, 0.22);
}
.brand-logo-login {
  width: 76px; height: 76px; border-radius: 20px; margin: 0 auto 14px;
}
.login-brand h1 { margin: 0 0 4px; font-size: 22px; }
.login-brand p { margin: 0; font-size: 13px; color: var(--muted); }
form label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 14px 0 6px; }
form input, form textarea, form select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; outline: none; font-family: inherit; background: white;
}
/* Checkbox + radio jangan ke-stretch full-width — tetap natural size native */
form input[type="checkbox"], form input[type="radio"] {
  width: auto; padding: 0; flex: 0 0 auto;
}
form input:focus, form textarea:focus, form select:focus { border-color: var(--brand); }
.seg-radio-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.seg-radio-card {
  min-height: 66px; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: white; cursor: pointer;
  display: flex; align-items: center; gap: 10px; margin: 0;
  transition: border-color 150ms, background 150ms, box-shadow 150ms;
}
.seg-radio-card:hover { border-color: #b8c7d3; background: #fbfdfe; }
.seg-radio-card:has(input:checked) {
  border-color: var(--brand); background: #f0fdfa;
  box-shadow: 0 0 0 2px rgba(13, 122, 138, 0.08);
}
.seg-radio-card input { accent-color: var(--brand); }
.seg-radio-text { min-width: 0; line-height: 1.25; }
.seg-radio-title { display: block; color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
.seg-radio-sub { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
button.btn {
  padding: 11px 20px; background: var(--brand); color: white; border: none;
  border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer;
  font-family: inherit;
}
button.btn:hover { background: var(--brand-deep); }
button.btn:disabled { opacity: 0.5; cursor: not-allowed; }
button.btn.ghost { background: white; color: var(--ink); border: 1px solid var(--line); }
button.btn.ghost:hover { background: var(--bg); }
button.btn.danger { background: var(--danger); }
button.btn.danger:hover { background: #b91c1c; }
button.btn.full { width: 100%; padding: 13px; }
button.btn.btn-sm { padding: 7px 10px; font-size: 12px; border-radius: 7px; }
.err { color: var(--danger); font-size: 13px; margin-top: 12px; min-height: 18px; }

/* App shell */
.shell { display: grid; grid-template-columns: 300px 1fr; min-height: 100vh; }
.sidebar {
  background: #ffffff; color: #475569; padding: 20px;
  border-right: 1px solid #e2e8f0;
  position: sticky; top: 0; height: 100vh;
  /* Flex column biar nav scroll mid + footer pinned bottom — anti overflow
     kalau nav items + trial badge + footer total > viewport height. */
  display: flex; flex-direction: column; min-height: 0;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid #e2e8f0; flex-shrink: 0; }
.brand-logo-sidebar {
  width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}
.sidebar-brand > div:last-child { min-width: 0; }
.sidebar-title { font-weight: 700; color: var(--ink); white-space: nowrap; }
.sidebar-sub {
  font-size: 11px; color: #64748b; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-nav {
  margin-top: 16px; display: flex; flex-direction: column; gap: 2px;
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  /* Scrollbar minimal — visible kalau hover */
  scrollbar-width: thin; scrollbar-color: rgba(15,23,42,0.18) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.15); border-radius: 2px; }
.sidebar-nav a {
  padding: 12px 14px; border-radius: 8px; color: #475569; text-decoration: none;
  font-size: 15.5px; font-weight: 500; display: flex; align-items: center; gap: 12px;
  transition: all 150ms;
  white-space: nowrap;
}
.sidebar-nav a:hover { background: #f1f5f9; color: #0f172a; }
.sidebar-nav a.active { background: #e6f6fb; color: var(--brand); font-weight: 600; }
.sidebar-nav a .ic { display: inline-flex; align-items: center; flex: 0 0 auto; }
.nav-ic-svg { width: 21px; height: 21px; display: block; flex: 0 0 auto; }
.nav-group-icon .nav-ic-svg { width: 20px; height: 20px; }
.sidebar-nav a .nav-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; border-radius: 999px;
  background: #ef4444; color: white; display: inline-flex; align-items: center;
  justify-content: center; padding: 0 6px; font-size: 11px; font-weight: 800;
  box-shadow: 0 0 0 2px #ffffff;
}
.sidebar-foot {
  /* Flex item — pinned bawah via flex layout (nav grow, footer auto height).
     Was absolute positioned → overlap nav saat overflow. */
  flex-shrink: 0;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  font-size: 12px; color: #64748b;
  /* Truncate email kalau panjang biar gak overflow ke samping */
  overflow-wrap: break-word;
  word-break: break-word;
}
.sidebar-foot b { color: var(--ink); display: block; margin-bottom: 2px; }

main { padding: 24px 32px; overflow-y: auto; }
main h1 { margin: 0 0 4px; font-size: 22px; }
main .sub { color: var(--muted); margin-bottom: 20px; font-size: 13px; }

/* Cards */
.card { background: var(--surface); border-radius: 12px; padding: 20px; border: 1px solid var(--line); margin-bottom: 16px; box-shadow: 0 1px 3px rgba(15,23,42,0.05); }
.card h2 { margin: 0 0 12px; font-size: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat {
  background: white; padding: 16px; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(15,23,42,0.05);
}
.stat .lbl { font-size: 11px; color: var(--muted); letter-spacing: 0.5px; text-transform: uppercase; font-weight: 600; }
.stat .val { font-size: 26px; font-weight: 800; margin-top: 4px; color: var(--ink); }
.stat .sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.dashboard-kpi-row {
  display: grid; grid-template-columns: repeat(8, minmax(112px, 1fr));
  gap: 10px; margin: 14px 0 18px;
}
.dashboard-kpi-row.expert {
  grid-template-columns: repeat(6, minmax(148px, 1fr));
  gap: 12px;
}
.dashboard-kpi {
  min-width: 0; min-height: 92px; background: white; border: 1px solid var(--line);
  border-radius: 8px; padding: 12px; display: flex; gap: 9px; align-items: flex-start; box-shadow: 0 1px 3px rgba(15,23,42,0.05);
}
.dashboard-kpi .kpi-icon {
  width: 28px; height: 28px; border-radius: 8px; background: #ecfeff; color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  font-size: 13px; font-weight: 800;
}
.dashboard-kpi .lbl {
  color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.35px; line-height: 1.25;
}
.dashboard-kpi .val {
  margin-top: 6px; color: var(--ink); font-size: 22px; font-weight: 850; line-height: 1;
  white-space: nowrap;
}
.dashboard-kpi .val.money { font-size: 18px; letter-spacing: 0; }
.dashboard-kpi .val.text {
  font-size: 17px;
  line-height: 1.15;
  white-space: normal;
}
.dashboard-kpi .sub { margin-top: 6px; font-size: 11px; color: var(--muted); white-space: normal; line-height: 1.3; }
.dashboard-kpi.primary { background: var(--brand); border-color: var(--brand); color: white; }
.dashboard-kpi.primary .kpi-icon { background: rgba(255,255,255,0.16); color: white; }
.dashboard-kpi.primary .lbl, .dashboard-kpi.primary .sub { color: rgba(255,255,255,0.78); }
.dashboard-kpi.primary .val { color: white; }
.dashboard-kpi.danger .kpi-icon { background: #fef2f2; color: var(--danger); }
.dashboard-kpi.danger .val { color: var(--danger); }
.dashboard-insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.dashboard-insight-card { margin-bottom: 0; }
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.section-head h2 { margin-bottom: 4px; }
.section-head strong {
  color: var(--brand);
  font-size: 18px;
  white-space: nowrap;
}
.section-sub {
  color: var(--muted);
  font-size: 12px;
}
.insight-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.insight-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.insight-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}
.insight-item b {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 20px;
}
.mix-bars {
  display: grid;
  gap: 12px;
}
.mix-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.mix-track {
  height: 8px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 7px;
}
.mix-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #22c55e);
  border-radius: inherit;
}
.mix-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.empty.compact { padding: 18px; }

@media (max-width: 1100px) {
  .dashboard-kpi-row,
  .dashboard-kpi-row.expert { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .dashboard-insight-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .dashboard-kpi-row,
  .dashboard-kpi-row.expert { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .insight-list { grid-template-columns: 1fr; }
}

/* Table — .tbl (existing) + .data-table (Booking + AI Conversations) styled identical */
.tbl, .data-table { width: 100%; border-collapse: collapse; background: white; border-radius: 10px; overflow: hidden; }
.tbl th, .data-table th { text-align: left; padding: 12px 14px; font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; background: var(--bg); border-bottom: 1px solid var(--line); }
.tbl td, .data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.tbl tr:last-child td, .data-table tr:last-child td { border-bottom: none; }
.tbl tr:hover, .data-table tr:hover { background: #fafbfc; }
.tbl .actions { display: flex; gap: 6px; }
/* Mobile: compact + horizontal scroll buat table 8 kolom (Booking) */
@media (max-width: 768px) {
  .tbl, .data-table { font-size: 11px; display: block; overflow-x: auto; white-space: nowrap; }
  .tbl th, .data-table th, .tbl td, .data-table td { padding: 8px 10px; }
}
.badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: 0.3px; }
.badge.brand { background: rgba(13,122,138,0.1); color: var(--brand); }
.badge.purple { background: rgba(124,58,237,0.1); color: var(--purple); }
.badge.green { background: rgba(5,150,105,0.1); color: var(--success); }
.badge.gray { background: rgba(107,122,138,0.1); color: var(--muted); }

/* Chat Admin */
.chat-admin-page { display: flex; flex-direction: column; gap: 14px; height: calc(100vh - 48px); min-height: 680px; }
.chat-admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.chat-admin-head h1 { margin: 0 0 4px; }
.chat-admin-head p { margin: 0; color: var(--muted); font-size: 13px; }
.chat-status-tabs { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 10px; }
.chat-status-tab {
  border: 1px solid var(--line); background: white; border-radius: 8px; padding: 12px;
  display: flex; align-items: center; gap: 9px; cursor: pointer; color: var(--ink);
  font-family: inherit; text-align: left;
}
.chat-status-tab b { flex: 1; font-size: 13px; }
.chat-status-tab em {
  font-style: normal; min-width: 28px; height: 24px; border-radius: 999px;
  background: var(--bg); display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: var(--ink);
}
.chat-status-tab.active { border-color: var(--brand); background: #ecfeff; box-shadow: 0 0 0 2px rgba(13,122,138,0.08); }
.chat-admin-shell {
  flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px, 360px) 1fr;
  gap: 14px;
}
.chat-list-panel, .chat-thread-panel {
  min-height: 0; background: white; border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden;
}
.chat-list-panel { display: flex; flex-direction: column; }
.chat-list-top {
  padding: 14px; border-bottom: 1px solid var(--line); display: flex;
  justify-content: space-between; align-items: center;
}
.chat-list-top span { color: var(--muted); font-size: 12px; }
.chat-list-items { flex: 1; min-height: 0; overflow-y: auto; }
.chat-list-item {
  width: 100%; border: 0; border-bottom: 1px solid var(--line); background: white;
  padding: 13px 14px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 5px;
  font-family: inherit; color: var(--ink);
}
.chat-list-item:hover { background: #f8fafc; }
.chat-list-item.active { background: #ecfeff; box-shadow: inset 3px 0 0 var(--brand); }
.chat-list-title, .chat-list-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chat-list-title b, .chat-list-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list-phone, .chat-list-meta, .chat-list-preview { color: var(--muted); font-size: 12px; }
.chat-status-pill {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px;
  border-radius: 999px; font-size: 11px; font-weight: 800;
}
.chat-status-pending { background: #fef3c7; color: #92400e; }
.chat-status-handled { background: #dbeafe; color: #1e40af; }
.chat-status-done { background: #dcfce7; color: #166534; }
.chat-thread-panel { display: flex; flex-direction: column; }
.chat-thread-head {
  padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex;
  justify-content: space-between; gap: 12px; align-items: center;
}
.chat-thread-head h2 { margin: 0 0 2px; font-size: 18px; }
.chat-thread-head p { margin: 0; color: var(--muted); font-size: 12px; }
.chat-thread-actions { padding: 10px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }
.chat-thread-note { margin: 10px 18px 0; padding: 9px 11px; border-radius: 7px; background: #eff6ff; color: #1e40af; font-size: 12px; }
.chat-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; background: #f8fafc; display: flex; flex-direction: column; gap: 10px; }
.chat-bubble-row { display: flex; }
.chat-bubble-row.left { justify-content: flex-start; }
.chat-bubble-row.right { justify-content: flex-end; }
.chat-bubble { max-width: min(72%, 620px); padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: white; }
.chat-bubble.bot { background: #dbeafe; border-color: #bfdbfe; }
.chat-bubble.admin { background: #fef3c7; border-color: #fde68a; }
.chat-bubble-sender, .chat-bubble-time { font-size: 10px; color: var(--muted); }
.chat-bubble-content { margin-top: 3px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.chat-bubble-time { margin-top: 5px; text-align: right; }
.chat-reply-box { padding: 14px 18px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.chat-reply-box textarea {
  resize: vertical; min-height: 64px; width: 100%; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 8px; font: inherit; outline: none;
}
.chat-reply-box textarea:focus { border-color: var(--brand); }
.chat-reply-disabled { padding: 11px 12px; border-radius: 8px; background: #f8fafc; color: var(--muted); font-size: 12px; }
.chat-thread-empty { height: 100%; min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: var(--muted); text-align: center; padding: 20px; }
.chat-thread-empty .ico { font-size: 36px; }
.chat-thread-empty b { color: var(--ink); }

@media (max-width: 920px) {
  .chat-admin-page { height: auto; min-height: 0; }
  .chat-status-tabs, .chat-admin-shell { grid-template-columns: 1fr; }
  .chat-list-panel { max-height: 420px; }
  .chat-thread-panel { min-height: 560px; }
}

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal { background: white; border-radius: 14px; width: 600px; max-width: 100%; max-height: 90vh; overflow-y: auto; }
.modal-head { padding: 20px 24px 0; display: flex; align-items: center; gap: 12px; }
.modal-head h3 { margin: 0; flex: 1; font-size: 18px; }
.modal-head .x { background: var(--bg); border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 16px; }
.modal-body { padding: 20px 24px; }
.modal-foot { padding: 16px 24px 20px; display: flex; gap: 10px; justify-content: flex-end; }

.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.row h2 { margin: 0; }

.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty .ico { font-size: 48px; margin-bottom: 12px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 12px; align-items: center; }
.toolbar input { flex: 1; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.mono { font-family: ui-monospace, 'SF Mono', Monaco, monospace; font-size: 12px; }

.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.feature-list label {
  display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer; margin: 0; font-size: 13px;
}
.feature-list label.active { border-color: var(--brand); background: rgba(13,122,138,0.05); }
.feature-list input[type=checkbox] { width: auto; }
.feature-list .fee { font-size: 11px; color: var(--muted); margin-left: auto; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--brand);
  color: white; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.avatar.purple { background: var(--purple); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: span 2; }
@media (max-width: 600px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
}

.toast { position: fixed; bottom: 24px; right: 24px; background: var(--ink); color: white; padding: 12px 18px; border-radius: 10px; font-size: 13px; z-index: 100; opacity: 0; transform: translateY(20px); transition: all 200ms; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--success); }
.toast.err { background: var(--danger); }
.cs-incoming-notice {
  position: fixed; right: 22px; bottom: 82px; z-index: 120;
  width: min(430px, calc(100vw - 32px)); display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: 12px; border: 1px solid #99f6e4;
  background: #ecfeff; color: #0f172a; box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  opacity: 0; transform: translateY(12px); transition: all 180ms ease;
}
.cs-incoming-notice.show { opacity: 1; transform: translateY(0); }
.cs-incoming-icon {
  width: 34px; height: 34px; border-radius: 10px; background: var(--brand);
  color: white; display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.cs-incoming-copy { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.cs-incoming-copy b { font-size: 13px; }
.cs-incoming-copy span { font-size: 12px; color: #475569; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cs-incoming-close {
  width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent;
  color: #64748b; font-size: 18px; line-height: 1; cursor: pointer;
}
.cs-incoming-close:hover { background: rgba(15, 23, 42, 0.08); color: #0f172a; }

/* ============================================================================
   Sidebar Nav Groups (collapsible) — UX restructure 2026-04-28
   ============================================================================ */
.nav-group {
  margin-bottom: 4px;
}

.nav-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  color: #475569;
  font-size: 14.5px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  transition: background 0.15s, color 0.15s;
}

.nav-group-header:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.nav-group.has-active .nav-group-header {
  color: var(--brand);
}

.nav-group-icon {
  font-size: 15px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.nav-group-label {
  flex: 1 1 auto;
  text-align: left;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
}

.nav-group-chevron {
  font-size: 12px;
  transition: transform 0.2s;
  opacity: 0.6;
}

.nav-group.collapsed .nav-group-chevron {
  transform: rotate(-90deg);
}

.nav-group-items {
  overflow: hidden;
  max-height: 600px;
  transition: max-height 0.25s ease-out;
  padding-left: 8px;
  border-left: 1px solid #e5e7eb;
  margin-left: 16px;
}

.nav-group.collapsed .nav-group-items {
  max-height: 0;
  border-left-color: transparent;
}

.nav-group-items a {
  font-size: 15.5px;
}

/* section header icons */
.card-h2-ic { display:flex; align-items:center; gap:8px; }
.sec-ic { width:18px; height:18px; color:var(--brand); flex:0 0 auto; }
.rate-ic { width:14px; height:14px; color:var(--brand); vertical-align:-2px; display:inline-block; }

/* shared inline svg icons */
.ic-svg{width:1.05em;height:1.05em;display:inline-block;vertical-align:-0.16em;flex:0 0 auto}
button .ic-svg,.btn .ic-svg{vertical-align:-0.18em}
.badge .ic-svg{width:1em;height:1em;vertical-align:-0.12em}

/* nav flyout submenu */
.nav-group-items { display: none; }
.nav-flyout {
  position: fixed; width: 212px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 8px 8px 24px rgba(15,23,42,.12), 0 2px 8px rgba(15,23,42,.08);
  z-index: 200; padding: 6px 0 8px;
  opacity: 0; transform: translateX(-6px);
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none; visibility: hidden;
}
.nav-flyout.open { opacity: 1; transform: translateX(0); pointer-events: auto; visibility: visible; }
.nav-flyout-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  color: var(--brand); padding: 8px 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.nav-flyout-links { display: flex; flex-direction: column; gap: 1px; padding: 2px 6px; }
.nav-flyout-links a {
  display: block; padding: 9px 12px; border-radius: 7px; color: #475569;
  font-size: 13.5px; text-decoration: none; white-space: nowrap; transition: background .1s, color .1s;
}
.nav-flyout-links a:hover { background: #f1f5f9; color: #0f172a; }
.nav-flyout-links a.active { background: #e6f6fb; color: var(--brand); font-weight: 600; }
.nav-group.flyout-open > .nav-group-header { background: #e6f6fb; color: var(--brand); }
.nav-group-chevron { opacity: .45; transform: none; }
.nav-group.flyout-open .nav-group-chevron,
.nav-group.has-active .nav-group-chevron { opacity: 1; color: var(--brand); }
@media (max-width: 600px) {
  .nav-group-items { display: block; }
  .nav-flyout { display: none; }
}
