/* Slotwise — business console & super admin panel */

/* ============================================================ shell */
.shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.main { display: flex; flex-direction: column; min-width: 0; }
.content { width: 100%; max-width: 1440px; margin: 0 auto; padding: 24px 32px 56px; flex: 1; }
.content-narrow { max-width: 1040px; }
.content-full { max-width: none; }
@media (max-width: 1200px) { .content { padding: 22px 22px 48px; } }
@media (max-width: 1024px) { .shell { grid-template-columns: minmax(0, 1fr); } .content { padding: 18px 16px 40px; } }

/* ============================================================ sidebar */
.sidebar {
  --sb-bg: var(--surface); --sb-fg: var(--text-2); --sb-strong: var(--text); --sb-muted: var(--muted-2); --sb-hover: var(--surface-3);
  --sb-active: var(--brand-soft); --sb-active-fg: var(--brand-strong); --sb-line: var(--border);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--sb-bg); border-right: 1px solid var(--sb-line); z-index: 40;
}
.sidebar-dark {
  --sb-bg: #0E0F24; --sb-fg: #B4B6D4; --sb-strong: #FFFFFF; --sb-muted: #6A6D94; --sb-hover: rgba(255, 255, 255, .05);
  --sb-active: color-mix(in srgb, var(--brand) 22%, transparent); --sb-active-fg: #FFFFFF; --sb-line: #1E2042;
  color-scheme: dark;
}
[data-theme="dark"] .sidebar:not(.sidebar-dark) { --sb-bg: #0F1022; --sb-line: #1F2142; --sb-active-fg: #fff; --sb-active: color-mix(in srgb, var(--brand) 22%, transparent); }
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 62px; padding: 0 16px 0 18px; flex: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.sidebar .brand, .sidebar .brand:hover { color: var(--sb-strong); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--brand) 75%, transparent); overflow: hidden; }
.brand-mark svg { width: 20px; height: 20px; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.12; }
.brand-name { font-family: var(--font-display); font-size: 17px; font-weight: 800; letter-spacing: -.025em; }
.brand-sub { font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sb-muted, var(--muted-2)); }
.brand-logo { height: 32px; width: auto; }
.sidebar-close { display: none; color: var(--sb-muted); }

.biz-card { margin: 2px 12px 8px; padding: 9px 10px; display: flex; align-items: center; gap: 10px; border-radius: 12px; border: 1px solid var(--sb-line); background: var(--sb-bg); color: var(--sb-fg); text-align: left; width: calc(100% - 24px); transition: border-color .15s, background .15s; }
.biz-card:hover { border-color: var(--border-strong); background: var(--sb-hover); }
.biz-card .avatar { width: 34px; height: 34px; border-radius: 10px; }
.biz-card-name { display: block; font-size: 13px; font-weight: 650; color: var(--sb-strong); line-height: 1.25; }
.biz-card-plan { font-size: 11.5px; color: var(--sb-muted); display: flex; align-items: center; gap: 6px; margin-top: 1px; }
.biz-switch .dropdown-menu { left: 12px; right: 12px; min-width: 0; }
.sidebar-cta { margin: 2px 12px 6px; }
.sidebar-cta .btn { width: 100%; height: 40px; }

.nav { flex: 1; overflow-y: auto; padding: 2px 10px 16px; scrollbar-width: thin; }
.nav-section { padding: 16px 10px 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--sb-muted); }
.nav-link { position: relative; display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 9px; color: var(--sb-fg); font-size: 13.5px; font-weight: 520; transition: background .12s, color .12s; }
.nav-link .icon { width: 18px; height: 18px; color: var(--sb-muted); transition: color .12s; }
.nav-link:hover { background: var(--sb-hover); color: var(--sb-strong); }
.nav-link:hover .icon { color: var(--sb-fg); }
.nav-link.is-active { background: var(--sb-active); color: var(--sb-active-fg); font-weight: 620; }
.nav-link.is-active .icon { color: var(--brand); }
.sidebar-dark .nav-link.is-active .icon, [data-theme="dark"] .nav-link.is-active .icon { color: var(--brand-2); }
.nav-link.is-active::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-group-toggle { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; border-radius: 8px; }
.nav-group-toggle:hover { color: var(--sb-fg); }
.nav-chevron { width: 14px; height: 14px; margin-left: auto; transition: transform .2s var(--ease); }
.nav-group-count { margin-left: auto; }
.nav-group-count + .nav-chevron { margin-left: 6px; }
.nav-group.is-open .nav-group-count { display: none; }
.nav-group.is-open .nav-chevron { transform: rotate(180deg); }
.nav-group-items { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s var(--ease); }
.nav-group-items > div { overflow: hidden; min-height: 0; }
.nav-group.is-open .nav-group-items { grid-template-rows: 1fr; }
.nav.no-anim .nav-group-items, .nav.no-anim .nav-chevron { transition: none; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--brand); color: #fff; }
.nav-badge.soft { background: var(--surface-3); color: var(--text-2); }
.sidebar-dark .nav-badge.soft { background: rgba(255, 255, 255, .08); color: #C9CBE6; }
.nav-badge.warn { background: #F59F00; color: #1F1300; }
.nav-lock { margin-left: auto; color: var(--sb-muted); }
.nav-lock .icon { width: 13px; height: 13px; }

.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: block; }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--sb-line); flex: none; }
.link-card { padding: 12px; border-radius: 12px; background: var(--grad-soft); border: 1px solid var(--brand-line); }
.sidebar-dark .link-card { background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 22%, transparent), color-mix(in srgb, var(--brand-2) 8%, transparent)); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.link-card-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.link-card-url { display: block; margin: 6px 0 10px; font-size: 12.5px; font-weight: 600; color: var(--sb-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-card .btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.usage-card { padding: 12px; border-radius: 12px; background: var(--grad-soft); border: 1px solid var(--brand-line); }
.sidebar-dark .usage-card { background: rgba(255, 255, 255, .04); border-color: #25284A; }
.usage-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.usage-card-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.usage-card-value { font-size: 20px; font-weight: 800; color: var(--sb-strong); letter-spacing: -.02em; }
.usage-card-value small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.usage-card .meter { margin: 8px 0 10px; }

@media (max-width: 1024px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--sh-3); }
  .sidebar.is-open { transform: none; }
  .sidebar-close { display: inline-grid; }
}
.backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(10, 10, 30, .45); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .2s; }
.backdrop.is-open { opacity: 1; pointer-events: auto; }

/* ============================================================ top bar */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 32px; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--border); }
@media (max-width: 1200px) { .topbar { padding: 0 22px; } }
@media (max-width: 1024px) { .topbar { padding: 0 12px; } }
.menu-toggle { display: none; }
@media (max-width: 1024px) { .menu-toggle { display: inline-flex; } }
.search-trigger { display: flex; align-items: center; gap: 10px; width: min(360px, 100%); height: 38px; padding: 0 8px 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted-2); font-size: 13.5px; box-shadow: var(--sh-1); transition: border-color .15s; }
.search-trigger:hover { border-color: var(--border-strong); color: var(--muted); }
.search-trigger kbd { margin-left: auto; }
.search-trigger input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13.5px; }
.search-trigger input::placeholder { color: var(--muted-2); }
@media (max-width: 720px) { .search-trigger { width: 38px; padding: 0; justify-content: center; } .search-trigger span, .search-trigger kbd, .search-trigger input { display: none; } }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.topbar .btn-icon { color: var(--text-2); }
.topbar-divider { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 650; color: var(--text-2); border: 1px solid var(--border); background: var(--surface); white-space: nowrap; }
.status-pill:hover { color: var(--text); border-color: var(--border-strong); }
.status-pill.is-trial { color: var(--brand-strong); border-color: var(--brand-line); background: var(--brand-soft); }
.status-pill.is-warning { color: var(--amber); border-color: var(--amber-line); background: var(--amber-bg); }

.bell { position: relative; }
.bell-count { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.notif-menu { width: 380px; padding: 0; overflow: hidden; }
.notif-menu-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--border); }
.notif-menu-list { max-height: 420px; overflow-y: auto; }
.notif-menu-foot { padding: 8px; border-top: 1px solid var(--border); text-align: center; background: var(--surface-2); }
@media (max-width: 520px) { .notif-menu { width: calc(100vw - 24px); right: -60px; } }
.notif-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.notif-item:hover { background: var(--surface-2); color: var(--text-2); }
.notif-item.is-unread { background: color-mix(in srgb, var(--brand-soft) 60%, var(--surface)); }
.notif-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand); }
.notif-icon.success { background: var(--green-bg); color: var(--green); }
.notif-icon.warning { background: var(--amber-bg); color: var(--amber); }
.notif-icon.danger { background: var(--red-bg); color: var(--red); }
.notif-title { font-size: 13px; font-weight: 650; color: var(--text); line-height: 1.35; }
.notif-body { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.notif-time { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; }

.user-btn { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 8px 0 4px; border-radius: 999px; border: 1px solid transparent; }
.user-btn:hover { background: var(--surface); border-color: var(--border); }
.user-btn .user-name { font-size: 13px; font-weight: 650; color: var(--text); line-height: 1.2; text-align: left; }
.user-btn .user-role { font-size: 11px; color: var(--muted); text-align: left; }
@media (max-width: 720px) { .user-btn .user-meta { display: none; } }

.impersonate-bar { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 7px 16px; background: repeating-linear-gradient(-45deg, #1C1B45, #1C1B45 12px, #24235A 12px, #24235A 24px); color: #E3E2FF; font-size: 13px; font-weight: 600; }
.impersonate-bar .btn { height: 28px; }
.announce-bar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 9px 16px; font-size: 13px; font-weight: 600; text-align: center; color: #fff; background: var(--grad); }
.announce-bar a { color: #fff; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
@media (max-width: 720px) { .announce-bar .announce-body { display: none; } .announce-bar { font-size: 12.5px; padding: 8px 12px; } }
.announce-bar.is-success { background: linear-gradient(90deg, #0B8A5E, #12B886); }
.announce-bar.is-warning { background: linear-gradient(90deg, #B45309, #D97706); }
.announce-bar.is-danger { background: linear-gradient(90deg, #B91C1C, #E5484D); }
.trial-bar { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--brand-strong); background: var(--brand-soft); border-bottom: 1px solid var(--brand-line); text-align: center; }
.trial-bar a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================ page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head-main { min-width: 0; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); font-weight: 550; }
.crumbs a:hover { color: var(--brand); }
.crumbs .icon { width: 13px; height: 13px; color: var(--muted-2); }
.page-title { font-family: var(--font-display); font-size: 25px; font-weight: 800; letter-spacing: -.03em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-sub { margin-top: 4px; font-size: 14px; color: var(--muted); max-width: 760px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 720px) { .page-title { font-size: 21px; } .page-head { align-items: flex-start; } }

.hero-panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 22px 24px; margin-bottom: 20px; border-radius: 18px; color: #fff; background: radial-gradient(900px 300px at 100% 0%, color-mix(in srgb, var(--brand-2) 45%, transparent), transparent 60%), linear-gradient(120deg, var(--ink) 0%, color-mix(in srgb, var(--brand) 60%, var(--ink)) 100%); box-shadow: var(--sh-2); }
.hero-panel::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 240px; height: 240px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, .05); pointer-events: none; }
.hero-panel h1 { color: #fff; font-size: 23px; font-weight: 800; letter-spacing: -.03em; }
.hero-panel p { color: rgba(255, 255, 255, .78); margin-top: 4px; font-size: 14px; }
.hero-panel .segmented { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .14); }
.hero-panel .segmented a, .hero-panel .segmented button { color: rgba(255, 255, 255, .75); }
.hero-panel .segmented .is-active { background: #fff; color: var(--ink); }

/* ============================================================ layout helpers */
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.grid-main-wide { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.grid-side-left { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.grid-half { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grid-thirds { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1280px) { .grid-main-wide { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 1100px) { .grid-main, .grid-main-wide, .grid-thirds, .grid-side-left { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .grid-half { grid-template-columns: minmax(0, 1fr); } }
.sticky-side { position: sticky; top: 82px; }
@media (max-width: 1100px) { .sticky-side { position: static; } }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-title h2 { font-size: 16px; font-weight: 750; }

/* ============================================================ stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1280px) { .stats-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .stats, .stats-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stats, .stats-3, .stats-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .stats .stat { padding: 14px 14px 12px; } .stat-value { font-size: 22px !important; } }
.stat { position: relative; padding: 17px 18px 15px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; min-width: 0; }
a.stat { color: inherit; transition: border-color .15s, box-shadow .15s; }
a.stat:hover { border-color: var(--brand-line); box-shadow: var(--sh-2); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-label { font-size: 12.5px; font-weight: 600; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.stat-icon .icon { width: 17px; height: 17px; }
.stat-icon.green { background: var(--green-bg); color: var(--green); }
.stat-icon.red { background: var(--red-bg); color: var(--red); }
.stat-icon.amber { background: var(--amber-bg); color: var(--amber); }
.stat-icon.blue { background: var(--blue-bg); color: var(--blue); }
.stat-icon.violet { background: var(--violet-bg); color: var(--violet); }
.stat-icon.orange { background: var(--orange-bg); color: var(--orange); }
.stat-icon.teal { background: var(--teal-bg); color: var(--teal); }
.stat-icon.pink { background: var(--pink-bg); color: var(--pink); }
.stat-value { margin-top: 8px; font-family: var(--font-display); font-size: 27px; font-weight: 800; letter-spacing: -.035em; color: var(--text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 14px; font-weight: 650; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.stat-foot { margin-top: 7px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; position: relative; z-index: 1; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 12px; padding: 1px 6px; border-radius: 6px; }
.delta.up { color: var(--green); background: var(--green-bg); }
.delta.down { color: var(--red); background: var(--red-bg); }
.delta.flat { color: var(--muted); background: var(--surface-3); }
.stat-spark { position: absolute; right: 0; bottom: 0; width: 42%; height: 36px; opacity: .85; pointer-events: none; }
.stat.has-spark .stat-foot { max-width: 58%; }
.stat-hero { background: var(--grad); border: 0; color: #fff; }
.stat-hero .stat-label, .stat-hero .stat-foot { color: rgba(255, 255, 255, .8); }
.stat-hero .stat-value, .stat-hero .stat-value small { color: #fff; }
.stat-hero .stat-icon { background: rgba(255, 255, 255, .16); color: #fff; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--border); border-top: 1px solid var(--border); }
.metric { padding: 13px 18px; background: var(--surface); }
.metric-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.metric-value { font-size: 18px; font-weight: 800; color: var(--text); margin-top: 2px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; font-family: var(--font-display); }

/* ============================================================ charts */
.chart { position: relative; width: 100%; height: 260px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-sm { height: 180px; }
.chart-lg { height: 320px; }
.chart .grid-line { stroke: var(--border); stroke-dasharray: 3 4; }
.chart .axis-label { fill: var(--muted-2); font-size: 11px; font-family: var(--font); }
.chart .bar { transition: opacity .15s; }
.chart .bar:hover { opacity: .8; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; padding: 8px 11px; border-radius: 10px; background: #12122B; color: #E4E4F6; font-size: 12px; line-height: 1.5; box-shadow: var(--sh-3); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); opacity: 0; transition: opacity .12s; }
.chart-tip.is-on { opacity: 1; }
.chart-tip b { color: #fff; }
.chart-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.chart-empty { display: grid; place-items: center; height: 100%; color: var(--muted-2); font-size: 13px; }
.donut-wrap { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px; align-items: center; }
@media (max-width: 480px) { .donut-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; } }
.donut { position: relative; width: 160px; height: 160px; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-center strong { font-family: var(--font-display); font-size: 25px; font-weight: 800; letter-spacing: -.03em; color: var(--text); line-height: 1.1; }
.donut-center span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.legend-list { display: flex; flex-direction: column; gap: 9px; width: 100%; }
.legend-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.legend-row .legend-val { margin-left: auto; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.legend-row .legend-pct { width: 44px; text-align: right; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.hbars { display: flex; flex-direction: column; gap: 13px; }
.hbar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 6px; }
.hbar-top span:first-child { color: var(--text-2); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-top span:last-child { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar-track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 999px; background: var(--grad); }
.heatmap { display: grid; gap: 3px; font-size: 11px; }
.heatmap-cell { height: 22px; border-radius: 5px; background: var(--surface-3); display: grid; place-items: center; color: transparent; font-weight: 700; }
.heatmap-cell:hover { color: var(--text); outline: 1px solid var(--border-strong); }
.heatmap-label { color: var(--muted); display: flex; align-items: center; font-weight: 600; }

/* ============================================================ lists */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); color: var(--text-2); min-width: 0; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--surface-2); color: var(--text-2); }
.list-title { font-size: 13.5px; font-weight: 650; color: var(--text); line-height: 1.3; }
.list-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.list-meta { margin-left: auto; text-align: right; font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* appointment row (dashboard, customer history) */
.appt-row { display: grid; grid-template-columns: 74px 4px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 20px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.appt-row:last-child { border-bottom: 0; }
a.appt-row:hover { background: var(--surface-2); color: var(--text-2); }
.appt-time { font-weight: 700; color: var(--text); font-size: 13.5px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.appt-time small { display: block; font-size: 11.5px; font-weight: 550; color: var(--muted); margin-top: 1px; }
.appt-bar { align-self: stretch; border-radius: 4px; background: var(--brand); min-height: 34px; }
.appt-main { min-width: 0; }
.appt-title { font-weight: 650; color: var(--text); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.appt-row.is-past { opacity: .62; }
.appt-row.is-now { background: color-mix(in srgb, var(--green-bg) 70%, var(--surface)); }
@media (max-width: 560px) { .appt-row { grid-template-columns: 62px 4px minmax(0, 1fr); } .appt-row > :last-child { grid-column: 3; } }

/* timeline */
.timeline { position: relative; display: flex; flex-direction: column; }
.tl-item { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; }
.tl-item::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--border); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item:last-child::before { display: none; }
.tl-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); border: 1px solid var(--border); z-index: 1; }
.tl-icon .icon { width: 14px; height: 14px; }
.tl-icon.brand { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.tl-icon.green { background: var(--green-bg); color: var(--green); border-color: var(--green-line); }
.tl-icon.red { background: var(--red-bg); color: var(--red); border-color: var(--red-line); }
.tl-icon.amber { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.tl-icon.blue { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-line); }
.tl-text { font-size: 13px; color: var(--text-2); line-height: 1.45; padding-top: 5px; }
.tl-time { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }

/* checklist (dashboard setup) */
.checklist { display: flex; flex-direction: column; }
.check-item { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--border); color: var(--text-2); font-size: 13.5px; font-weight: 550; }
.check-item:last-child { border-bottom: 0; }
a.check-item:hover { background: var(--surface-2); color: var(--text); }
.check-mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; flex: none; color: transparent; }
.check-item.is-done .check-mark { background: var(--green); border-color: var(--green); color: #fff; }
.check-item.is-done .check-label { text-decoration: line-through; color: var(--muted); }
.check-mark .icon { width: 13px; height: 13px; stroke-width: 3; }

/* ============================================================ tabs & settings layout */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px; font-size: 13.5px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--brand-strong); border-bottom-color: var(--brand); }
.tab .icon { width: 16px; height: 16px; }
.tab .nav-badge { margin-left: 2px; }
.settings-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 960px) { .settings-layout { grid-template-columns: minmax(0, 1fr); } }
.settings-nav { position: sticky; top: 82px; display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 960px) { .settings-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; } }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--text-2); font-weight: 550; font-size: 13.5px; white-space: nowrap; }
.settings-nav a:hover { background: var(--surface-3); color: var(--text); }
.settings-nav a.is-active { background: var(--surface); color: var(--brand-strong); box-shadow: var(--sh-1); border: 1px solid var(--border); font-weight: 650; }
.settings-nav a .icon { color: var(--muted); width: 17px; height: 17px; }
.settings-nav a.is-active .icon { color: var(--brand); }
.settings-group { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; padding: 22px; border-bottom: 1px solid var(--border); }
.settings-group:last-child { border-bottom: 0; }
.settings-group h3 { font-size: 14.5px; font-weight: 700; }
.settings-group-intro p { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
@media (max-width: 860px) { .settings-group { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.setting-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.setting-row:first-child { padding-top: 0; }
.setting-row:last-child { border-bottom: 0; padding-bottom: 0; }
.setting-row-text { min-width: 0; }
.setting-row-title { font-size: 13.5px; font-weight: 650; color: var(--text); }
.setting-row-hint { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.setting-row-control { flex: none; }

/* ============================================================ hours editor */
.hours-editor { display: flex; flex-direction: column; }
.hours-day { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.hours-day:last-child { border-bottom: 0; }
.hours-day-name { display: flex; align-items: center; gap: 10px; height: 38px; font-weight: 650; color: var(--text); }
.hours-slots { display: flex; flex-direction: column; gap: 8px; }
.hours-slot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hours-slot .input { width: 128px; }
.hours-closed { height: 38px; display: flex; align-items: center; color: var(--muted-2); font-size: 13px; font-weight: 550; }
@media (max-width: 640px) { .hours-day { grid-template-columns: minmax(0, 1fr); gap: 6px; } .hours-slot .input { width: 112px; } }

/* ============================================================ entity headers & profiles */
.profile-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile-head h1 { font-size: 23px; font-weight: 800; letter-spacing: -.03em; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 5px; font-size: 13px; color: var(--muted); }
.profile-meta span { display: inline-flex; align-items: center; gap: 6px; }
.profile-meta .icon { width: 14px; height: 14px; color: var(--muted-2); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--border); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.info-cell { padding: 12px 14px; background: var(--surface); }
.info-cell-label { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.info-cell-value { font-size: 16px; font-weight: 750; color: var(--text); margin-top: 2px; font-variant-numeric: tabular-nums; }

/* service & staff cards (console) */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-1); color: inherit; transition: border-color .15s, box-shadow .15s; min-width: 0; }
a.tile:hover { border-color: var(--brand-line); box-shadow: var(--sh-2); color: inherit; }
.tile.is-off { opacity: .6; }
.tile-top { display: flex; align-items: flex-start; gap: 12px; }
.tile-title { font-weight: 700; color: var(--text); font-size: 14.5px; line-height: 1.3; }
.tile-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.tile-foot > span { display: inline-flex; align-items: center; gap: 6px; }
.color-chip { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.color-bar { width: 4px; align-self: stretch; border-radius: 4px; flex: none; }
.service-thumb { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; }

/* category group headers */
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.group-head:first-child { margin-top: 0; }
.group-head h3 { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: 8px; }

/* booking link box */
.share-box { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.share-box span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--text); }
.qr-box { width: 180px; height: 180px; padding: 10px; border-radius: 14px; background: #fff; border: 1px solid var(--border); }
.qr-box svg, .qr-box img { width: 100%; height: 100%; }

/* locked (plan) */
.locked-panel { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; border: 1px dashed var(--brand-line); background: var(--grad-soft); }
.locked-panel .icon-wrap { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--brand); flex: none; box-shadow: var(--sh-1); }

/* status select pills (appointment actions) */
.action-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.status-flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.status-step { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 650; color: var(--muted); background: var(--surface-3); }
.status-step.is-done { color: var(--green); background: var(--green-bg); }
.status-step.is-current { color: #fff; background: var(--brand); }

/* plan cards (billing) */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-1); }
.plan-card.is-featured { border: 2px solid var(--brand); box-shadow: 0 16px 40px -18px color-mix(in srgb, var(--brand) 50%, transparent); }
.plan-card.is-current { background: var(--grad-soft); border-color: var(--brand-line); }
.plan-name { font-family: var(--font-display); font-size: 17px; font-weight: 800; }
.plan-price { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: var(--text); }
.plan-price small { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--text-2); }
.plan-features li { display: flex; gap: 8px; align-items: flex-start; }
.plan-features .icon { width: 15px; height: 15px; color: var(--green); margin-top: 2px; }
.plan-features li.is-off { color: var(--muted-2); }
.plan-features li.is-off .icon { color: var(--muted-2); }
.plan-ribbon { position: absolute; top: -11px; left: 20px; height: 22px; padding: 0 10px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; }

/* ============================================================ auth-less pages inside the console */
.center-page { min-height: 70vh; display: grid; place-items: center; text-align: center; }

/* misc */
.muted-box { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.dashed-box { padding: 18px; border-radius: 14px; border: 1.5px dashed var(--border-strong); background: var(--surface-2); text-align: center; }
.kbd-hint { font-size: 12px; color: var(--muted-2); }
.inline-edit { display: flex; gap: 8px; align-items: center; }
.pill-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.money { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--text); white-space: nowrap; }
.big-number { font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -.04em; color: var(--text); line-height: 1; }
