/* ===== MistriHQ — admin design system (Figma: node 16:6) ===== */
:root {
  --navy: #1B2A4A; --teal: #0D9488; --teal-700: #0F766E; --teal-800: #115E59; --teal-900: #134E4A;
  --teal-tint: #CCFBF1; --teal-pale: #99F6E4; --teal-bright: #2DD4BF; --teal-active-bg: rgba(20,184,166,.13);
  --sky: #0EA5E9;
  --slate: #475569; --slate-lt: #94A3B8; --line: #E2E8F0; --bg: #F8FAFC;
  --amber: #F59E0B; --amber-bg: #FEF3C7;
  --green: #16A34A; --green-bg: #DCFCE7;
  --blue: #2563EB; --blue-bg: #DBEAFE;
  --red: #DC2626; --red-bg: #FEE2E2;
  --r: 12px;
  --shadow: 0 6px 9px rgba(15,23,42,.05);
  --font-display: "Outfit", "Plus Jakarta Sans", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Plus Jakarta Sans", system-ui, sans-serif; background: var(--bg); color: var(--navy); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.boot { padding: 100px 24px; text-align: center; color: var(--slate); }
h1, h2, h3, h4 { font-family: var(--font-display); }

/* ===== Shell: sidebar + main ===== */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: var(--teal-pale); padding: 32px 16px; display: flex; flex-direction: column; gap: 40px; position: relative; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 12px; }
.sidebar-brand .mark { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; gap: 2px; flex-shrink: 0; }
.sidebar-brand .mark span { display: block; width: 5px; height: 20px; border-radius: 2px; }
.sidebar-brand .wordmark { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #fff; letter-spacing: -0.01em; white-space: nowrap; }
.nav-list { display: flex; flex-direction: column; gap: 6px; }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 8px;
  color: var(--teal-pale); font-weight: 500; font-size: 14px; cursor: pointer; border: none; background: none;
  font-family: inherit; text-align: left; width: 100%; transition: all .15s ease;
}
.side-link .ic { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.side-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-link.on { background: var(--teal-active-bg); color: var(--teal-bright); font-weight: 700; }
.side-link.on .ic { opacity: 1; }
.side-link .count { margin-left: auto; font-weight: 800; font-size: 11px; }
.sidebar-footer { margin-top: auto; padding: 0 12px; display: flex; flex-direction: column; gap: 12px; }
.sidebar-footer .live { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--teal-pale); }
.sidebar-footer .live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-bright); box-shadow: 0 0 0 3px rgba(45,212,191,.25); }
.sidebar-footer .ver { font-size: 11px; color: var(--teal-pale); opacity: .6; }
.sidebar-footer .side-user { font-size: 12px; color: var(--teal-pale); opacity: .85; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-footer .logout-link { background: none; border: none; color: var(--teal-pale); font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 4px 0; text-align: left; }
.sidebar-footer .logout-link:hover { color: #fff; }

/* ===== Topbar ===== */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; flex-shrink: 0; }
.topbar h1 { font-size: 20px; font-weight: 800; color: var(--navy); font-family: "Plus Jakarta Sans"; }
.topbar-actions { display: flex; align-items: center; gap: 24px; }
.topbar-search { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; gap: 10px; padding: 10px 16px; width: 260px; }
.topbar-search input { border: none; background: none; padding: 0; font-size: 13px; color: var(--slate); width: 100%; }
.topbar-search input:focus { outline: none; box-shadow: none; }
.topbar-search .ic { width: 16px; height: 16px; flex-shrink: 0; color: var(--slate-lt); }
.topbar-bell { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--slate); position: relative; border: none; background: none; cursor: pointer; }
.topbar-bell:hover { background: var(--bg); }
.topbar-bell .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); border: 1.5px solid #fff; }
.topbar-divider { width: 1px; height: 24px; background: var(--line); }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.topbar-user .avatar { width: 36px; height: 36px; border-radius: 18px; background: var(--teal); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.topbar-user .who { display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.topbar-user .who strong { font-size: 14px; font-weight: 700; color: var(--navy); }
.topbar-user .who span { font-size: 11px; font-weight: 500; color: var(--slate-lt); }

.content { padding: 40px; display: flex; flex-direction: column; gap: 24px; flex: 1; }
.main-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.main-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; color: var(--navy); }
.main-head p { color: var(--slate); font-size: 13px; margin-top: 4px; }
.count-pill { display: inline-flex; align-items: center; background: var(--teal-tint); color: var(--teal-800); border-radius: 6px; padding: 4px 8px; font-weight: 700; font-size: 12px; margin-left: 10px; }

/* ===== Breadcrumb ===== */
.crumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--slate-lt); font-weight: 500; }
.crumb a, .crumb .cur { background: none; border: none; font: inherit; cursor: pointer; padding: 0; color: var(--slate-lt); }
.crumb .cur { color: var(--teal); font-weight: 700; }
.crumb .sep { opacity: .6; }

/* ===== KPI cards ===== */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpis.cols-3 { grid-template-columns: repeat(3, 1fr); }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.kpi .kpi-label { color: var(--slate); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.kpi .kpi-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.kpi .kpi-value { font-size: 32px; font-weight: 800; color: var(--navy); font-family: var(--font-display); }
.kpi .kpi-delta { background: var(--green-bg); color: var(--navy); border-radius: 6px; padding: 4px 8px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.kpi .kpi-sub { color: var(--slate); font-size: 12px; }
.kpi .kpi-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }

/* ===== Filter bar ===== */
.filter-bar { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-bar.justify { justify-content: space-between; }
.filter-ctrl { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; height: 40px; padding: 0 12px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--slate); font-weight: 500; cursor: pointer; white-space: nowrap; }
.filter-ctrl .ic { width: 14px; height: 14px; flex-shrink: 0; }
.filter-ctrl select { border: none; background: none; padding: 0; font: inherit; color: inherit; appearance: none; cursor: pointer; }
.filter-ctrl select:focus { outline: none; box-shadow: none; }
.filter-search { flex: 1; min-width: 200px; }
.filter-search input { border: none; background: none; padding: 0; font-size: 13px; }
.pill-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-tab { border: 1px solid var(--line); background: #fff; color: var(--slate); font-family: inherit; font-weight: 700; font-size: 13px; padding: 10px 18px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.pill-tab.on { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ===== Panels & tables ===== */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.panel-pad { padding: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 24px 24px 0; gap: 12px; flex-wrap: wrap; }
.panel-head h3 { font-size: 16px; font-weight: 800; color: var(--navy); }
.panel-head .sub { font-size: 12px; color: var(--slate); margin-top: 2px; }
.panel-link { background: none; border: none; color: var(--teal); font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 16px 24px; background: var(--bg); color: var(--slate); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 800; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 24px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--navy); }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: rgba(13,148,136,.025); }
.dim { color: var(--slate-lt); font-size: 12px; }
.empty { padding: 48px; text-align: center; color: var(--slate-lt); }
.chip { display: inline-block; background: var(--bg); border-radius: 6px; padding: 4px 8px; font-weight: 600; font-size: 11px; color: var(--slate); }
.mono-id { color: var(--teal); font-weight: 700; }

/* ===== Status badges ===== */
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 11px; text-transform: capitalize; white-space: nowrap; }
.status-badge.pending { background: var(--amber-bg); color: var(--teal); }
.status-badge.approved { background: var(--green-bg); color: var(--navy); } /* generic success (partners, payouts, leads, tickets) */
.status-badge.b-approved { background: var(--blue-bg); color: var(--blue); } /* booking-workflow "Approved" step, per Figma */
.status-badge.in_progress { background: var(--teal-tint); color: var(--teal); }
.status-badge.completed { background: var(--green-bg); color: var(--navy); }
.status-badge.rejected, .status-badge.cancelled, .status-badge.suspended { background: var(--red-bg); color: var(--red); }
.status-badge.active { background: var(--green-bg); color: var(--navy); }
.status-badge.rescheduled { background: var(--teal-tint); color: var(--teal); }
.status-badge.overdue { background: var(--red-bg); color: var(--red); }

/* ===== Pagination ===== */
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--slate); flex-wrap: wrap; gap: 12px; }
.pager { display: flex; gap: 8px; }
.pager button { border: 1px solid var(--line); background: #fff; color: var(--slate); font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-family: inherit; }
.pager button.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.pager button:disabled { opacity: .5; cursor: default; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: 8px;
  font-weight: 700; font-size: 13px; text-decoration: none; border: 1.5px solid transparent;
  cursor: pointer; font-family: inherit; transition: all .15s ease; white-space: nowrap;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-700); }
.btn-ghost { border-color: var(--line); color: var(--slate); background: #fff; }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-ghost.danger { color: var(--red); }
.btn-ghost.danger:hover { border-color: var(--red); background: #FEF2F2; }
.btn-danger { background: var(--red-bg); color: var(--red); border-color: transparent; }
.btn-danger:hover { background: #FCA5A5; }
.btn-outline-danger { border-color: var(--red); color: var(--red); background: transparent; }
.btn-outline-danger:hover { background: #FEF2F2; }
.btn-teal-soft { background: var(--teal-tint); color: var(--teal-800); border-color: transparent; }
.btn-teal-soft:hover { background: #a7f3ea; }
.btn-sm { padding: 6px 13px; font-size: 12px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-x { background: none; border: none; color: var(--red); font-weight: 800; cursor: pointer; font-size: 1rem; padding: 4px 8px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== Forms ===== */
input, select, textarea {
  padding: 11px 14px; border-radius: 10px; border: 1.5px solid var(--line); font-family: inherit;
  font-size: 0.9rem; width: 100%; background: #fff; color: var(--navy); transition: border-color .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-tint); }
textarea { min-height: 70px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-weight: 600; font-size: 0.85rem; color: var(--slate); }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > * { flex: 1 1 220px; }
.form-note { font-weight: 700; min-height: 1.3em; font-size: 0.9rem; }
.form-note.ok { color: var(--green); }
.form-note.err { color: var(--red); }

/* ===== Login ===== */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(160deg, var(--navy), var(--teal-900)); }
.login-card { background: #fff; border-radius: 18px; padding: 38px; width: 100%; max-width: 420px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.login-card .logo { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; color: var(--navy); }
.login-card .logo span { color: var(--teal); }
.login-card p { color: var(--slate); font-size: 0.9rem; margin-bottom: 22px; }

/* ===== Bulk action bar ===== */
.bulk-bar { background: var(--navy); border-radius: var(--r); padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; box-shadow: 0 8px 12px rgba(0,0,0,.13); flex-wrap: wrap; }
.bulk-bar .bulk-info { display: flex; align-items: center; gap: 12px; color: var(--teal-pale); font-size: 13px; }
.bulk-bar .bulk-count { background: var(--teal); color: #fff; border-radius: 6px; padding: 4px 8px; font-weight: 800; font-size: 12px; }
.bulk-bar .bulk-actions { display: flex; gap: 12px; }
.bulk-bar .btn-ghost { color: #fff; border-color: rgba(255,255,255,.25); background: transparent; }
.bulk-bar .btn-ghost:hover { border-color: #fff; }

/* ===== Detail pages (Booking / Partner) ===== */
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.detail-head .titlebar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.detail-head h1 { font-size: 28px; font-weight: 800; color: var(--navy); }
.detail-head .meta { font-size: 13px; color: var(--slate-lt); }
.detail-cols { display: flex; gap: 32px; align-items: flex-start; flex-wrap: wrap; }
.detail-left { flex: 1 1 480px; display: flex; flex-direction: column; gap: 24px; min-width: 320px; }
.detail-right { flex: 0 0 420px; display: flex; flex-direction: column; gap: 24px; min-width: 300px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 28px; }
.card.pad-24 { padding: 24px; }
.card h3 { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 16px; }
.card h4 { font-size: 15px; font-weight: 800; color: var(--navy); margin-bottom: 14px; }
.kv-rows { display: flex; flex-direction: column; gap: 12px; }
.kv-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.kv-row .k { color: var(--slate); }
.kv-row .v { color: var(--navy); font-weight: 700; text-align: right; }
.kv-row .v.muted { color: var(--slate-lt); font-weight: 500; }
.kv-row .v .chip { background: var(--teal-tint); color: var(--teal-800); }
.kv-divider { height: 1px; background: var(--line); margin: 4px 0; }
.price-rows { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.price-row { display: flex; justify-content: space-between; color: var(--navy); }
.price-row .k { color: var(--slate); }
.price-row.total .k { font-weight: 800; font-size: 15px; color: var(--navy); }
.price-row.total .v { font-weight: 800; font-size: 18px; color: var(--teal); }
.assign-select { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.assign-select select { border: none; background: none; padding: 0; font-size: 13px; font-weight: 600; color: var(--navy); }
.timeline { display: flex; flex-direction: column; gap: 16px; }
.timeline-step { display: flex; gap: 10px; align-items: flex-start; }
.timeline-step .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--slate-lt); margin-top: 5px; flex-shrink: 0; }
.timeline-step.active .dot { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-tint); }
.timeline-step .t-title { font-size: 13px; font-weight: 600; color: var(--slate); }
.timeline-step.active .t-title { font-weight: 800; color: var(--navy); }
.timeline-step .t-time { font-size: 11px; color: var(--slate-lt); }
.info-chip { background: var(--teal-tint); color: var(--teal-800); border-radius: 6px; padding: 4px 8px; font-weight: 700; font-size: 11px; display: inline-block; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.area-chip { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; font-size: 11px; color: var(--slate); font-weight: 600; }

/* ===== Partner card grid ===== */
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.partner-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.partner-card .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.partner-card .id-block { display: flex; gap: 12px; align-items: center; }
.partner-card .avatar-sq { width: 44px; height: 44px; border-radius: 10px; background: var(--teal-tint); color: var(--teal-800); font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.partner-card .company { font-weight: 800; font-size: 15px; color: var(--navy); }
.partner-card .applied { font-size: 11px; color: var(--slate-lt); }
.partner-card .row-line { font-size: 12px; color: var(--slate); }
.partner-card .row-line strong { color: var(--navy); }
.partner-card .counts { display: flex; gap: 16px; font-size: 12px; color: var(--slate); }
.partner-card .counts strong { color: var(--navy); }
.partner-card .coverage-label { font-size: 11px; font-weight: 700; color: var(--slate-lt); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.partner-card .card-actions { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.partner-card .card-actions .btn { flex: 1; }

/* ===== Settings ===== */
.settings-stack { display: flex; flex-direction: column; gap: 16px; max-width: 900px; }
.settings-card h3 { margin-bottom: 4px; }
.settings-card .sub { font-size: 13px; color: var(--slate); margin-bottom: 20px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: none; }
.setting-row .field-inline { flex: 1; }
.setting-row label.field-label { font-weight: 700; font-size: 14px; color: var(--navy); display: block; margin-bottom: 2px; }
.setting-row .desc { font-size: 12px; color: var(--slate); }
.setting-row .ctrl { flex: 0 0 260px; }
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider { position: absolute; inset: 0; background: var(--line); border-radius: 999px; cursor: pointer; transition: all .15s ease; }
.toggle .slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: all .15s ease; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked + .slider { background: var(--teal); }
.toggle input:checked + .slider::before { transform: translateX(20px); }
.settings-savebar { position: sticky; bottom: 0; background: var(--bg); padding: 16px 0; display: flex; gap: 12px; justify-content: flex-end; align-items: center; }

/* ===== Analytics ===== */
.chart-row { display: flex; gap: 24px; flex-wrap: wrap; }
.chart-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; flex: 1 1 280px; display: flex; flex-direction: column; gap: 16px; }
.chart-card h4 { font-size: 14px; font-weight: 800; color: var(--navy); }
.chart-card .sub { font-size: 12px; color: var(--slate); }
.plot-area { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; height: 140px; position: relative; overflow: hidden; }
.bars-row { display: flex; align-items: flex-end; gap: 10px; height: 100%; padding: 12px; }
.bars-row .bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.bars-row .bar { width: 100%; max-width: 20px; background: var(--teal); border-radius: 6px 6px 0 0; }
.x-axis { display: flex; gap: 10px; padding: 0 12px; }
.x-axis span { flex: 1; text-align: center; font-size: 11px; font-weight: 700; color: var(--slate); }
.legend-list { display: flex; flex-direction: column; gap: 8px; }
.legend-list .leg-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.legend-list .leg-left { display: flex; align-items: center; gap: 8px; color: var(--slate); }
.legend-list .swatch { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.legend-list .leg-val { font-weight: 800; color: var(--navy); }
.donut-wrap { display: flex; align-items: center; justify-content: center; height: 100%; }
.donut { width: 120px; height: 120px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.donut span { background: var(--bg); width: 74px; height: 74px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; color: var(--navy); }
.area-density { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.area-item { display: flex; flex-direction: column; gap: 8px; }
.area-item .name { font-weight: 700; font-size: 13px; color: var(--navy); }
.area-item .track { height: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.area-item .track .fill { height: 100%; background: var(--navy); border-radius: 999px; }
.area-item .count { font-size: 11px; color: var(--slate); }
.rank-badge { width: 24px; height: 24px; border-radius: 50%; background: var(--teal-tint); color: var(--teal-800); font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }

/* ===== CMS two-panel ===== */
.cms-shell { display: flex; gap: 24px; align-items: flex-start; }
.cms-nav { flex: 0 0 220px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.cms-nav .grp-label { font-size: 11px; font-weight: 800; color: var(--slate-lt); text-transform: uppercase; letter-spacing: .05em; padding: 12px 10px 6px; }
.cms-nav button { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; border: none; background: none; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--slate); text-align: left; cursor: pointer; }
.cms-nav button:hover { background: var(--bg); }
.cms-nav button.on { background: var(--teal-active-bg); color: var(--teal-800); font-weight: 800; }
.cms-editor { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cms-editor-head { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.cms-editor-head .name { font-size: 16px; font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: 10px; }
.cms-editor-head .edited { font-size: 12px; color: var(--slate-lt); }
.cms-block { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.cms-block h4 { color: var(--navy); margin-bottom: 14px; font-size: 15px; font-weight: 800; }
.cms-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; flex-wrap: wrap; background: var(--bg); border-radius: 10px; padding: 10px; }
.cms-row input, .cms-row textarea { width: auto; flex: 1 1 150px; background: #fff; }
.cms-row .grow { flex: 3 1 280px; }
.cms-check { display: flex; align-items: center; gap: 6px; font-size: 0.83rem; font-weight: 600; color: var(--slate); white-space: nowrap; padding-top: 10px; }
.cms-check input { width: auto; }
.save-bar { position: sticky; bottom: 0; background: var(--bg); padding: 16px 0; display: flex; align-items: center; gap: 18px; }

@media (max-width: 1080px) {
  .cms-shell { flex-direction: column; }
  .cms-nav { flex: none; width: 100%; flex-direction: row; overflow-x: auto; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; align-items: center; overflow-x: auto; padding: 12px; gap: 16px; }
  .sidebar-brand { padding: 0; }
  .nav-list { flex-direction: row; }
  .sidebar-footer { display: none; }
  .content { padding: 22px 18px; }
  .kpis, .kpis.cols-3 { grid-template-columns: 1fr 1fr; }
  .detail-cols { flex-direction: column; }
  .detail-right { flex: 1 1 auto; width: 100%; }
  .area-density { grid-template-columns: repeat(2, 1fr); }
}

/* --- Global error/status popup system (Figma: node 20:4109, "Desktop Modal Overlays & Popups") --- */
.modal-scrim { position: fixed; inset: 0; background: rgba(27,42,74,0.4); display: flex; align-items: center; justify-content: center; z-index: 500; padding: 24px; }
.modal-card { background: #fff; border-radius: 16px; padding: 32px; width: 480px; max-width: 100%; box-shadow: 0 12px 12px rgba(15,23,42,0.08); display: flex; flex-direction: column; gap: 24px; }
.modal-icon-header { display: flex; align-items: center; gap: 16px; }
.modal-icon-bg { width: 48px; height: 48px; border-radius: 999px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.modal-icon-bg.red { background: var(--red-bg); color: var(--red); }
.modal-icon-bg.amber { background: var(--amber-bg); color: var(--amber); }
.modal-title-block { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.modal-title { font-weight: 800; font-size: 20px; color: var(--navy); }
.modal-subtitle { font-size: 14px; color: var(--slate-lt); }
.modal-message { font-size: 14px; line-height: 1.5; color: var(--slate); }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }
.btn-modal-secondary { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 600; color: var(--slate); cursor: pointer; }
.btn-modal-secondary:hover { background: var(--bg); }
.btn-modal-primary { border: none; background: var(--teal); border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 700; color: #fff; cursor: pointer; }
.btn-modal-primary:hover { background: var(--teal-700); }
.btn-modal-destructive { border: none; background: var(--red); border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 700; color: #fff; cursor: pointer; }
.btn-modal-destructive:hover { background: #B91C1C; }
@media (max-width: 560px) { .modal-card { padding: 24px; gap: 18px; } }

/* ===== Buildings & Locations (Figma node 113:362) ===== */
.building-card { background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: border-color .15s ease; }
.building-card:hover { border-color: var(--teal-pale); }
.building-card.selected { border-color: var(--teal); box-shadow: 0 4px 6px rgba(13,148,136,.06); }
.building-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.building-card-head .name { font-weight: 700; font-size: 15px; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.building-card-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.building-card-stats span { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--slate); }
.building-card-stats .ic { width: 14px; height: 14px; color: var(--slate-lt); }

.tower-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tower-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.tower-card-head { display: flex; align-items: center; gap: 10px; }
.tower-card-head .name { font-weight: 700; font-size: 15px; color: var(--navy); }
.tower-icon-bg { background: var(--teal-tint); color: var(--teal-800); border-radius: 8px; padding: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tower-stats { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.tower-stats .row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.tower-stats .row span { color: var(--slate); font-weight: 500; }
.tower-stats .row strong { color: var(--navy); }
.tower-card-actions { display: flex; gap: 8px; padding-top: 4px; }
.tower-card-actions .btn { flex: 1; }
