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

/* ==========================================================================
   MySalon — design tokens
   Hijau hutan sebagai identitas, kuningan (brass) sebagai aksen langka.
   Nama variabel --abh-* dipertahankan agar semua halaman lama tetap kompatibel.
   ========================================================================== */
:root {
  --abh-forest: #0f2a20;          /* sidebar, panel gelap */
  --abh-forest-2: #16382b;
  --abh-pink: #1f6b4a;            /* primary (nama lama dipertahankan) */
  --abh-pink-dark: #17563b;       /* primary pekat / hover */
  --abh-gold: #a8864f;            /* brass: aksen */
  --abh-gold-ink: #8a6b36;        /* brass untuk teks di atas putih */
  --abh-cream: #f1f4f1;           /* kanvas halaman */
  --abh-surface: #ffffff;
  --abh-charcoal: #14251c;        /* teks utama */
  --abh-gray: #5b6a61;            /* teks sekunder */
  --abh-gray-soft: #7d8a82;       /* teks tersier (kontras >= 4.5 di atas putih) */
  --abh-border: #e0e6e1;
  --abh-border-strong: #cdd6cf;
  --abh-success: #1f7a4f;
  --abh-danger: #b4443f;
  --abh-warning: #b7852a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-pop: 0 18px 48px rgba(15, 42, 32, .22);
  --ring: 0 0 0 3px rgba(31, 107, 74, .18);
  --font-ui: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-family: var(--font-ui);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--abh-cream);
  color: var(--abh-charcoal);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 600; letter-spacing: 0; }
h1, h2 { font-family: var(--font-display); font-weight: 700; }
h3 { font-size: 1.02rem; margin: 0 0 12px; }
p { max-width: 70ch; }
a { color: var(--abh-pink); }
.num, .kpi .value, td, .pos-total-row, .price { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--abh-gold); outline-offset: 2px; }

/* --- Layout shell --- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 252px;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(168,134,79,.16) 0%, rgba(168,134,79,0) 55%),
    linear-gradient(180deg, var(--abh-forest-2) 0%, var(--abh-forest) 100%);
  color: #dbe6df;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 12px;
  padding: 24px 20px 20px;
  font-family: var(--font-display);
  font-size: 1.35rem; line-height: 1.05; color: #fff;
}
.sidebar .brand .mark {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--abh-gold); color: var(--abh-gold);
  font-size: 1.35rem; font-weight: 700;
}
.sidebar .brand small {
  display: block; margin-top: 3px;
  font-family: var(--font-ui); font-size: .72rem; font-weight: 500;
  color: #9fb3a7; letter-spacing: .02em;
}
.sidebar nav { flex: 1; padding: 4px 12px 12px; }
.sidebar .nav-group {
  margin: 18px 10px 6px; font-size: .74rem; font-weight: 600; color: #7f9488;
}
.sidebar nav a {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; margin-bottom: 2px;
  color: #cddad2; text-decoration: none;
  font-size: .9rem; font-weight: 500; border-radius: 9px;
  transition: background .15s, color .15s;
}
.sidebar nav a svg { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.sidebar nav a.active svg { stroke: var(--abh-gold); opacity: 1; }
.sidebar nav a.active::before {
  content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--abh-gold);
}
.sidebar .user-box {
  margin: 8px 12px 16px; padding: 12px 14px;
  background: rgba(255,255,255,.06); border-radius: 10px;
  font-size: .82rem; color: #b6c6bc; line-height: 1.35;
}
.sidebar .user-box strong { color: #fff; font-weight: 600; }
.sidebar .user-box a { display: inline-block; margin-top: 6px; color: var(--abh-gold); font-size: .8rem; font-weight: 600; text-decoration: none; }
.sidebar .user-box a:hover { text-decoration: underline; }

.nav-toggle { display: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 46px; z-index: 30;
  background: rgba(241, 244, 241, .86);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--abh-border);
  padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.topbar h1 { margin: 0; font-size: 1.85rem; line-height: 1.1; }
.content { padding: 28px 32px 48px; max-width: 1480px; width: 100%; }

/* --- Cards / panels --- */
.card {
  background: var(--abh-surface); border: 1px solid var(--abh-border);
  border-radius: var(--radius); padding: 20px 22px;
}
.card > h3:first-child, .card > h2:first-child { margin-top: 0; }
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.kpi { padding: 18px 20px; }
.kpi .label { font-size: .82rem; font-weight: 500; color: var(--abh-gray); }
.kpi .value { font-size: 1.65rem; font-weight: 700; margin-top: 6px; letter-spacing: -.01em; line-height: 1.15; }
.kpi .value.pink { color: var(--abh-pink); }
.kpi .value.gold { color: var(--abh-gold-ink); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-family: inherit; font-size: .88rem; font-weight: 600; line-height: 1.2;
  cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--abh-pink); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--abh-pink-dark); }
.btn-gold { background: var(--abh-gold); color: #fff; }
.btn-gold:hover { background: var(--abh-gold-ink); }
.btn-outline { background: var(--abh-surface); border-color: var(--abh-border-strong); color: var(--abh-charcoal); }
.btn-outline:hover:not(:disabled) { border-color: var(--abh-pink); color: var(--abh-pink); }
.btn-danger { background: var(--abh-danger); color: #fff; }
.btn-danger:hover { background: #9a3733; }
.btn-sm { padding: 6px 11px; font-size: .79rem; }
.btn-block { width: 100%; }

/* --- Forms --- */
label { display: block; font-size: .83rem; font-weight: 500; margin-bottom: 6px; color: var(--abh-gray); }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--abh-border-strong);
  border-radius: var(--radius-sm); font-family: inherit; font-size: .92rem;
  margin-bottom: 14px; background: #fff; color: var(--abh-charcoal);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #98a49c; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--abh-pink); box-shadow: var(--ring); }
input[type="checkbox"], input[type="radio"] { width: auto; margin: 0; accent-color: var(--abh-pink); }
input[type="file"] { padding: 8px; font-size: .84rem; }

/* --- Tables --- */
table { width: 100%; border-collapse: collapse; font-size: .89rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--abh-border); vertical-align: middle; }
th { color: var(--abh-gray); font-weight: 600; font-size: .8rem; background: #f7f9f7; white-space: nowrap; }
th:first-child { border-top-left-radius: 8px; } th:last-child { border-top-right-radius: 8px; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f6f9f6; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.4; }
.badge-pink { background: #e1f0e7; color: var(--abh-pink-dark); }
.badge-green { background: #dff1e6; color: #176341; }
.badge-gray { background: #e9eeea; color: var(--abh-gray); }
.badge-gold { background: #f3ead9; color: #765a29; }
.badge-red { background: #f8e3e1; color: #9a3733; }

/* --- Modal (semua modal di aplikasi memakai div fixed inline) --- */
div[style*="position:fixed"] { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); background: rgba(15, 42, 32, .5) !important; }
div[style*="position:fixed"] > .card { box-shadow: var(--shadow-pop); border-radius: 16px; padding: 24px; max-height: 92vh; overflow-y: auto; animation: modal-in .18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }

/* --- Login --- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--abh-surface); }
.login-aside {
  position: relative; overflow: hidden; color: #fff;
  padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(circle at 18% 112%, rgba(168,134,79,.35) 0, rgba(168,134,79,0) 42%),
    linear-gradient(160deg, var(--abh-forest-2), var(--abh-forest));
}
.login-aside::before, .login-aside::after {
  content: ''; position: absolute; border-radius: 50%; border: 1px solid rgba(168,134,79,.38);
}
.login-aside::before { width: 520px; height: 520px; right: -190px; top: -170px; }
.login-aside::after { width: 340px; height: 340px; right: -100px; top: -80px; }
.login-aside .brand-lg { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; gap: 12px; position: relative; }
.login-aside .brand-lg .mark { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--abh-gold); color: var(--abh-gold); display: grid; place-items: center; }
.login-aside .statement { position: relative; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1.05; max-width: 14ch; }
.login-aside .sub { position: relative; color: #a9bdb1; font-size: .95rem; max-width: 38ch; margin-top: 16px; }
.login-pane { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--abh-cream); }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { margin: 0 0 6px; font-size: 2rem; }
.login-card .tagline { color: var(--abh-gray); font-size: .92rem; margin-bottom: 26px; }
.login-card .hint { margin-top: 18px; font-size: .8rem; color: var(--abh-gray-soft); }
.login-error { background: #f8e3e1; color: #9a3733; padding: 10px 14px; border-radius: var(--radius-sm); font-size: .86rem; margin-bottom: 16px; }

/* --- Appointment grid (15-minute) --- */
.appt-grid-wrap { overflow-x: auto; border: 1px solid var(--abh-border); border-radius: var(--radius); background: #fff; }
.appt-grid { display: grid; min-width: 900px; }
.appt-grid .time-col { border-right: 1px solid var(--abh-border); background: #f7f9f7; font-size: .72rem; color: var(--abh-gray); text-align: center; padding: 2px; }
.appt-grid .therapist-header { text-align: center; font-weight: 600; padding: 12px 4px; border-bottom: 1px solid var(--abh-border); font-size: .84rem; background: #fff; position: sticky; top: 0; }
.slot-cell { border-bottom: 1px solid #eef2ef; border-right: 1px solid #eef2ef; height: 28px; position: relative; }
.slot-cell.hour-start { border-top: 1px solid var(--abh-border-strong); }
.slot-cell:hover { background: #eef6f0; cursor: pointer; }
.appt-block {
  position: absolute; left: 3px; right: 3px; top: 1px;
  background: var(--abh-pink); color: #fff; border-radius: 7px;
  font-size: .73rem; padding: 4px 8px; overflow: hidden; z-index: 2;
  box-shadow: 0 1px 2px rgba(15,42,32,.2);
}
.appt-block.status-confirmed { background: var(--abh-gold); }
.appt-block.status-in_service { background: #346f8f; }
.appt-block.status-completed { background: #819086; }
.appt-block.status-cancelled { background: #b9c4bc; text-decoration: line-through; opacity: .6; }

/* --- POS --- */
.pos-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 22px; align-items: start; }
.pos-layout > div:last-child { position: sticky; top: 130px; }
.pos-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.pos-item-card {
  border: 1px solid var(--abh-border); border-radius: 10px; padding: 12px 14px; background: #fff;
  cursor: pointer; font-size: .88rem; font-weight: 500;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pos-item-card:hover { border-color: var(--abh-pink); box-shadow: 0 4px 14px rgba(31,107,74,.12); transform: translateY(-1px); }
.pos-item-card .price { color: var(--abh-pink); font-weight: 700; margin-top: 6px; }
.cart-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--abh-border); font-size: .88rem; }
.cart-line .therapist-select { width: 130px; margin: 0; padding: 4px 6px; font-size: .74rem; }
.pos-total-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: .92rem; color: var(--abh-gray); }
.pos-total-row.grand { font-size: 1.3rem; font-weight: 700; color: var(--abh-charcoal); border-top: 1px dashed var(--abh-border-strong); padding-top: 12px; margin-top: 8px; }
.pay-methods { display: flex; gap: 8px; margin: 12px 0; }
.pay-methods button { flex: 1; }

/* --- Responsif --- */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pos-layout { grid-template-columns: minmax(0, 1fr) 360px; }
}
@media (max-width: 980px) {
  .sidebar { position: fixed; z-index: 80; left: 0; top: 0; transform: translateX(-100%); transition: transform .22s ease; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-pop); }
  body.nav-open::after { content: ''; position: fixed; inset: 0; z-index: 70; background: rgba(15,42,32,.45); }
  .nav-toggle {
    display: grid; place-items: center; position: fixed; z-index: 60; left: 12px; top: 12px;
    width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--abh-border-strong);
    background: #fff; color: var(--abh-charcoal); cursor: pointer;
  }
  .nav-toggle svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
  .topbar { padding: 14px 16px 14px 64px; }
  .topbar h1 { font-size: 1.5rem; }
  .content { padding: 20px 16px 40px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .pos-layout { grid-template-columns: 1fr; }
  .pos-layout > div:last-child { position: static; }
  .card { overflow-x: auto; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-aside { display: none; }
}
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }

/* ==========================================================================
   MySalon v2 — sidebar ciut, utility bar, command palette, grafik
   ========================================================================== */
.sidebar { transition: width .2s ease; }
.sidebar .brand .mark-svg { width: 38px; height: 38px; flex-shrink: 0; color: var(--abh-gold); }
.sidebar .brand-text { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.sidebar .user-box { display: flex; align-items: center; gap: 10px; }
.sidebar .user-box .avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--abh-gold); color: #fff; font-weight: 700; }
.sidebar .user-box .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sidebar .user-box .who strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .user-box a.logout { margin: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: #cddad2; }
.sidebar .user-box a.logout:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.sidebar .user-box a.logout svg, .collapse-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar .credit { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 16px 14px 20px; font-size: .68rem; color: #7f9488; line-height: 1.35; }
.collapse-btn { flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(255,255,255,.14); background: transparent; color: #cddad2; cursor: pointer; display: grid; place-items: center; }
.collapse-btn:hover { background: rgba(255,255,255,.1); }
.collapse-btn svg { transition: transform .2s; }

.nav-collapsed .sidebar { width: 72px; }
.nav-collapsed .sidebar .brand { padding: 22px 0 18px; justify-content: center; }
.nav-collapsed .sidebar .brand-text, .nav-collapsed .sidebar .credit span,
.nav-collapsed .sidebar .user-box .who, .nav-collapsed .sidebar .nav-group { display: none; }
.nav-collapsed .sidebar nav { padding: 8px 10px; }
.nav-collapsed .sidebar nav a { justify-content: center; padding: 11px 0; font-size: 0; gap: 0; }
.nav-collapsed .sidebar nav a svg { width: 20px; height: 20px; }
.nav-collapsed .sidebar nav a.active::before { left: -10px; }
.nav-collapsed .sidebar .user-box { flex-direction: column; margin: 8px 10px 12px; padding: 10px 0; }
.nav-collapsed .sidebar .credit { justify-content: center; padding: 0 0 14px; }
.nav-collapsed .collapse-btn svg { transform: rotate(180deg); }

.utilbar {
  position: sticky; top: 0; z-index: 31; height: 46px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 32px; background: var(--abh-forest); color: #cddad2; font-size: .8rem;
}
.utilbar .crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
.utilbar .crumb-brand { color: var(--abh-gold); font-weight: 700; letter-spacing: .04em; }
.utilbar .sep { opacity: .4; }
.utilbar strong { color: #fff; font-weight: 600; }
.util-tools { display: flex; align-items: center; gap: 10px; }
.util-search { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px 0 10px; min-width: 260px; border-radius: 8px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); color: #a9bdb1; font: inherit; cursor: pointer; }
.util-search:hover { background: rgba(255,255,255,.12); color: #fff; }
.util-search svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.util-search span { flex: 1; text-align: left; }
.util-search kbd { font: 600 .68rem var(--font-ui); padding: 2px 6px; border-radius: 5px; background: rgba(255,255,255,.12); color: #dbe6df; }
.quick-wrap { position: relative; }
.quick-btn { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 12px; }
.quick-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }
.quick-menu { position: absolute; right: 0; top: 36px; min-width: 200px; background: #fff; border: 1px solid var(--abh-border); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 6px; }
.quick-menu[hidden] { display: none; }
.quick-menu a { display: block; padding: 9px 12px; border-radius: 7px; color: var(--abh-charcoal); text-decoration: none; font-size: .86rem; font-weight: 500; }
.quick-menu a:hover { background: var(--abh-cream); }
.util-clock { color: #a9bdb1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.app-footer { margin-top: auto; padding: 16px 32px 22px; font-size: .74rem; color: var(--abh-gray-soft); border-top: 1px solid var(--abh-border); }

.palette { position: fixed; inset: 0; z-index: 200; background: rgba(15,42,32,.5); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.palette[hidden] { display: none; }
.palette-box { width: min(620px, 92vw); background: #fff; border-radius: 14px; box-shadow: var(--shadow-pop); overflow: hidden; }
.palette-box input { width: 100%; border: 0; border-bottom: 1px solid var(--abh-border); border-radius: 0; padding: 16px 18px; font-size: 1rem; margin: 0; box-shadow: none; }
.palette-box input:focus { box-shadow: none; outline: none; }
.palette-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--abh-charcoal); text-decoration: none; font-size: .92rem; }
.palette-item.on { background: var(--abh-forest); color: #fff; }
.palette-item .ph { font-size: .76rem; opacity: .65; white-space: nowrap; }
.palette-note { padding: 12px; color: var(--abh-gray); font-size: .86rem; }
.palette-foot { padding: 9px 16px; border-top: 1px solid var(--abh-border); font-size: .72rem; color: var(--abh-gray-soft); background: var(--abh-cream); }

th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable::after { content: '\2195'; margin-left: 6px; font-size: .7em; opacity: .3; }
th.sortable[aria-sort="ascending"]::after { content: '\2191'; opacity: .9; }
th.sortable[aria-sort="descending"]::after { content: '\2193'; opacity: .9; }
th.sortable:focus-visible { outline: 2px solid var(--abh-pink); outline-offset: -2px; }

/* --- Login --- */
.login-aside .brand-lg .mark-svg { width: 44px; height: 44px; color: var(--abh-gold); }
.login-aside .dev { position: relative; font-size: .78rem; color: #8fa699; letter-spacing: .03em; }
.login-aside .dev strong { color: var(--abh-gold); font-weight: 600; }
.login-card .brand-sm { display: none; }

/* --- Dashboard --- */
.range-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.range-chips a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--abh-border-strong); background: #fff; color: var(--abh-charcoal); font-size: .82rem; font-weight: 600; text-decoration: none; }
.range-chips a:hover { border-color: var(--abh-pink); }
.range-chips a.on { background: var(--abh-forest); border-color: var(--abh-forest); color: #fff; }
.dash-hero { position: relative; overflow: hidden; border-radius: 16px; padding: 24px 28px; color: #fff; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 360px); gap: 24px; align-items: end;
  background: radial-gradient(90% 120% at 100% 0%, rgba(168,134,79,.28) 0%, rgba(168,134,79,0) 60%), linear-gradient(135deg, var(--abh-forest-2), var(--abh-forest)); }
.dash-hero .lbl { font-size: .8rem; color: #a9bdb1; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.dash-hero .big { font-family: var(--font-display); font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 700; line-height: 1.05; margin: 6px 0 8px; font-variant-numeric: tabular-nums; }
.dash-hero .sub { font-size: .84rem; color: #a9bdb1; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.delta.up { background: rgba(31,122,79,.14); color: var(--abh-success); }
.delta.down { background: rgba(180,68,63,.12); color: var(--abh-danger); }
.delta.flat { background: rgba(125,138,130,.15); color: var(--abh-gray); }
.dash-hero .delta.up { background: rgba(120,220,170,.18); color: #8fe3b6; }
.dash-hero .delta.down { background: rgba(255,150,140,.18); color: #ffb0a8; }
.dash-hero .delta.flat { background: rgba(255,255,255,.12); color: #cddad2; }
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.kpi { background: #fff; border: 1px solid var(--abh-border); border-radius: var(--radius); padding: 16px 18px; }
.kpi .k { font-size: .78rem; color: var(--abh-gray); font-weight: 600; }
.kpi .v { font-size: 1.55rem; font-weight: 700; margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.chart-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.chart-card h3 { margin: 0 0 2px; font-size: 1.05rem; }
.chart-card .cap { font-size: .78rem; color: var(--abh-gray-soft); margin-bottom: 10px; }
.chart-wrap { position: relative; }
.chart-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-tip { position: absolute; pointer-events: none; z-index: 5; background: var(--abh-forest); color: #fff; font-size: .76rem; padding: 6px 10px; border-radius: 7px; white-space: nowrap; transform: translate(-50%, -110%); box-shadow: 0 6px 18px rgba(15,42,32,.25); }
.chart-tip[hidden] { display: none; }
.hbar { display: grid; grid-template-columns: minmax(80px, 38%) 1fr auto; align-items: center; gap: 10px; padding: 6px 0; font-size: .84rem; }
.hbar .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .trk { height: 10px; background: var(--abh-cream); border-radius: 0 4px 4px 0; }
.hbar .fill { height: 100%; background: var(--abh-pink); border-radius: 0 4px 4px 0; }
.hbar .val { font-variant-numeric: tabular-nums; font-weight: 600; }
@media (max-width: 1100px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } .chart-grid { grid-template-columns: 1fr; } .dash-hero { grid-template-columns: 1fr; } }
@media (max-width: 980px) {
  .utilbar { padding: 0 12px 0 64px; }
  .util-search span, .util-search kbd, .util-clock, .crumbs .sep, .crumbs span:not(.crumb-brand) { display: none; }
  .util-search { min-width: 0; width: 34px; justify-content: center; padding: 0; }
  .nav-collapsed .sidebar { width: 252px; }
  .app-footer { padding: 14px 16px 20px; }
  .nav-toggle { top: 3px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media print { .no-print { display: none !important; } }
