/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   IUSLEAD — Municipal Intelligence Platform
   Apple / Linear / Stripe aesthetic · Quiet premium · Sophisticated dark
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SPLASH SCREEN
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
#splash-screen {
  position: fixed; inset: 0; z-index: 999;
  background: #0a0b0f;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#splash-screen.hide {
  opacity: 0; transform: scale(1.02); pointer-events: none;
}
.splash-content { text-align: center; animation: splashIn 0.6s ease-out; }
@keyframes splashIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

.splash-logo { margin-bottom: 18px; }
.splash-logo-mark {
  width: 56px; height: 56px; margin: 0 auto;
  border-radius: 14px; background: linear-gradient(135deg, #1B3A5C, #2A5A8C);
  display: flex; align-items: center; justify-content: center;
  font-family: system-ui, 'Segoe UI', sans-serif; font-size: 28px; font-weight: 800; color: #D4A054;
  box-shadow: 0 4px 24px rgba(27,58,92,0.4);
}
.splash-title {
  font-size: 22px; font-weight: 700; color: #FFFFFF; letter-spacing: 1.5px;
  margin-bottom: 4px; font-family: system-ui, 'Segoe UI', sans-serif;
}
.splash-subtitle {
  font-size: 12px; color: rgba(255,255,255,0.35); letter-spacing: 0.3px;
  margin-bottom: 28px; font-family: system-ui, 'Segoe UI', sans-serif;
}
.splash-bar-wrap {
  width: 180px; height: 3px; background: rgba(255,255,255,0.06);
  border-radius: 2px; margin: 0 auto 12px; overflow: hidden;
}
.splash-bar {
  height: 100%; width: 0%; border-radius: 2px;
  background: linear-gradient(90deg, #1B3A5C, #D4A054);
  transition: width 0.4s ease;
}
.splash-status {
  font-size: 10.5px; color: rgba(255,255,255,0.3); letter-spacing: 0.2px;
  font-family: system-ui, 'Segoe UI', sans-serif;
}
.splash-footer {
  position: absolute; bottom: 24px; left: 0; right: 0; text-align: center;
  font-size: 10px; color: rgba(255,255,255,0.15); font-family: system-ui, 'Segoe UI', sans-serif;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   CUSTOM TITLEBAR
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
#titlebar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 120;
  height: 32px; background: rgba(14,15,19,0.92); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  -webkit-app-region: drag;
  user-select: none;
}
.tb-drag { flex: 1; padding-left: 14px; }
.tb-app-name {
  font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.35);
  letter-spacing: 0.2px; font-family: system-ui, 'Segoe UI', sans-serif;
}
.tb-controls {
  display: flex; align-items: center; height: 100%;
  -webkit-app-region: no-drag;
}
.tb-btn {
  width: 46px; height: 100%; border: none; background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(255,255,255,0.4); transition: background 0.1s, color 0.1s;
}
.tb-btn svg { width: 11px; height: 11px; }
.tb-btn:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7); }
.tb-close:hover { background: #C42B1C; color: #FFFFFF; }

:root {
  /* Layout-only — design tokens en tokens.css */
  --topbar-h: 56px;
  --dock-pad: 76px;
  --titlebar-h: 0px;
  --aux-bar-h: 0px;
  --shell-top: calc(var(--titlebar-h) + var(--aux-bar-h));
  --chrome-top: calc(var(--shell-top) + var(--topbar-h));
}

/* â”€â”€ BASE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
body {
  font-family: var(--font-ui);
  font-size: 13px; line-height: 1.5;
  color: var(--text); background: var(--bg-base);
  overflow: hidden; height: 100vh; width: 100vw;
}

body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 70% 50% at 50% -10%, rgba(107,138,235,0.025) 0%, transparent 70%);
}

::selection { background: var(--blue-dim); color: var(--blue); }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.07); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }
a { color: var(--blue); text-decoration: none; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   TOPBAR — light, clean, spacious
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
#topbar {
  position: fixed; top: var(--shell-top); left: 0; right: 0;
  height: var(--topbar-h); z-index: 100;
  display: flex; align-items: center; padding: 0 14px; gap: 10px;
  background: linear-gradient(180deg, rgba(15, 19, 28, 0.96), rgba(12, 15, 22, 0.92));
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 1;
  min-width: 0;
  max-width: 360px;
}
.topbar-brand img {
  height: 38px;
  max-width: 220px;
  width: auto;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}
.topbar-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.topbar-brand-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.topbar-brand-tenant {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.topbar-brand-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.08em;
}
.topbar-brand-ver {
  font-size: 9px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 2px 6px;
  letter-spacing: 0.04em;
}

.topbar-divider { width: 1px; height: 22px; background: var(--border); flex-shrink: 0; }

.topbar-status { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.status-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 500; color: var(--text-sec);
  background: rgba(255,255,255,0.035); border: 1px solid var(--border);
  transition: all 0.2s var(--ease);
}
.status-pill:hover { background: var(--bg-surface); }

.status-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.status-dot.live { background: var(--green); animation: pulse-dot 3s ease-in-out infinite; }
.status-dot.offline { background: var(--red); }
.status-dot.warning { background: var(--orange); }
@keyframes pulse-dot { 0%,100%{opacity:1}50%{opacity:0.35} }

.topbar-search { flex: 1 1 120px; min-width: 0; max-width: 420px; margin: 0 auto; position: relative; }
.topbar-search input {
  width: 100%; padding: 7px 12px 7px 32px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-input);
  color: var(--text); font-size: 12px; font-family: inherit; outline: none;
  transition: all 0.2s var(--ease);
}
.topbar-search input::placeholder { color: var(--text-muted); }
.topbar-search input:focus { border-color: var(--border-focus); background: var(--bg-surface-h); }
.topbar-search svg {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  width: 13px; height: 13px; color: var(--text-muted); pointer-events: none;
}
.global-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 360px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  z-index: 200;
  padding: 6px 0;
}
.global-search-results[hidden] { display: none !important; }
.gsr-section {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 6px 12px 4px;
}
.gsr-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.gsr-item:hover, .gsr-item:focus { background: var(--bg-surface-h); outline: none; }
.gsr-item-meta { font-size: 10px; color: var(--text-muted); margin-left: auto; flex-shrink: 0; }
.gsr-empty { padding: 14px 12px; font-size: 12px; color: var(--text-muted); text-align: center; }
.gsr-loading { padding: 12px; font-size: 11px; color: var(--text-muted); text-align: center; }

.dash-setup-banner {
  margin-bottom: var(--s4);
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid rgba(212, 160, 84, 0.35);
  background: linear-gradient(135deg, rgba(27, 58, 92, 0.5), rgba(212, 160, 84, 0.08));
}
.dash-setup-banner h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.dash-setup-banner p {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-sec);
  line-height: 1.45;
}
.dash-setup-steps {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.dash-setup-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-sec);
}
.dash-setup-step.done { border-color: rgba(91, 196, 159, 0.35); }
.dash-setup-step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
}
.dash-setup-step.done .dash-setup-step-icon {
  background: rgba(91, 196, 159, 0.2);
  color: var(--green);
}
.dash-setup-step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dash-setup-step strong { display: block; color: var(--text); font-size: 12px; line-height: 1.3; }
.dash-setup-step-desc {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-muted);
}
.dash-setup-step-actions { margin-top: 2px; }
.dash-setup-step button {
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-family: inherit;
}
.dash-setup-step button:hover { background: var(--bg-surface-h); }

.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; min-width: 0; }
.status-pill,
.topbar-btn,
.topbar-user-chip,
.topbar-time {
  min-height: 36px;
  border-radius: 11px;
}
.topbar-btn {
  position: relative; width: 36px; height: 36px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  color: var(--text-sec); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s var(--ease); text-decoration: none;
  flex-shrink: 0; box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}
.topbar-btn-labeled {
  width: auto !important; min-width: 36px; max-width: 142px;
  padding: 0 12px !important; gap: 7px;
}
.topbar-btn-label {
  font-size: 10.5px; font-weight: 600; white-space: nowrap;
  line-height: 1; letter-spacing: 0.01em;
}
.topbar-btn:hover { background: var(--bg-surface-h); color: var(--text); }
.topbar-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.topbar-badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 14px; height: 14px; border-radius: 7px;
  background: var(--red); color: white;
  font-size: 9px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px; border: 1.5px solid var(--bg-base);
}

.topbar-time {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.72);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   CONTENT
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
#content {
  position: fixed;
  top: var(--chrome-top); left: 0; right: 0;
  bottom: var(--dock-pad);
  overflow-y: auto; overflow-x: hidden;
  padding: var(--s5) var(--s6);
  z-index: 1;
}

.view { display: none; animation: viewIn 0.28s var(--ease-out) both; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   DOCK — thin, floating, macOS-like
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
#dock-wrapper {
  position: fixed; bottom: 6px;
  left: 50%; transform: translateX(-50%);
  z-index: 100;
}

#dock {
  display: flex; align-items: flex-end; gap: 2px;
  padding: 4px 8px 3px;
  border-radius: 14px;
  background: rgba(22,24,32,0.72);
  backdrop-filter: blur(32px) saturate(160%);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
  border: 0.5px solid rgba(255,255,255,0.08);
  box-shadow: var(--sh-dock);
}

.dock-item {
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; padding: 2px 3px 0;
  transition: transform 0.16s var(--ease);
  transform-origin: bottom center;
  position: relative;
}

.dock-icon {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.16s var(--ease);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3), inset 0 0.5px 0 rgba(255,255,255,0.1);
}
.dock-icon svg { width: 16px; height: 16px; color: rgba(255,255,255,0.88); }

.dock-icon.i-dashboard  { background: linear-gradient(160deg, #5880D0, #3D5FA8); }
.dock-icon.i-whatsapp   { background: linear-gradient(160deg, #49B85C, #2F8A3F); }
.dock-icon.i-conv       { background: linear-gradient(160deg, #8A7ABD, #6B5CA5); }
.dock-icon.i-tickets    { background: linear-gradient(160deg, #C9A04A, #A88535); }
.dock-icon.i-analytics  { background: linear-gradient(160deg, #4AA5A8, #358585); }
.dock-icon.i-agenda     { background: linear-gradient(160deg, #B06A92, #8E5075); }
.dock-icon.i-reports    { background: linear-gradient(160deg, #C0783A, #9A5F2A); }
.dock-icon.i-neighbors  { background: linear-gradient(160deg, #4BAA88, #358A6A); }
.dock-icon.i-settings   { background: linear-gradient(160deg, #6B7080, #525660); }

.dock-label {
  font-size: 10px; font-weight: 500; color: var(--text);
  opacity: 0; transform: translateY(2px);
  transition: all 0.14s var(--ease);
  white-space: nowrap; pointer-events: none;
  padding: 2px 7px; border-radius: 5px;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(10px);
  position: absolute; bottom: calc(100% + 4px);
}
.dock-item:hover .dock-label { opacity: 1; transform: translateY(0); }

.dock-indicator {
  width: 3px; height: 3px; border-radius: 50%;
  background: transparent; margin-top: 2px;
  transition: background 0.2s var(--ease);
}
.dock-item.active .dock-indicator { background: rgba(255,255,255,0.6); }
.dock-item:active .dock-icon { transform: scale(0.92); }

.dock-item {
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}

@media (min-width: 769px) {
  .dock-item.dock-item--overflow { display: none !important; }
}

.dock-item--more .dock-icon.i-more {
  background: linear-gradient(160deg, #5a6270, #3d424c);
}

.dock-more-badge {
  position: absolute;
  top: 0;
  right: -2px;
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand-gold, #c9a055);
  color: #1a1c22;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

.dock-more-panel {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: min(520px, calc(100vw - 32px));
  max-height: min(420px, 58vh);
  overflow: auto;
  padding: 14px 16px 16px;
  border-radius: 16px;
  background: rgba(18,20,28,0.94);
  border: 0.5px solid rgba(255,255,255,0.1);
  box-shadow: 0 16px 48px rgba(0,0,0,0.55);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
  z-index: 110;
}

.dock-more-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dock-more-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dock-more-panel-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.dock-more-panel-sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 36rem;
}

.dock-more-panel-close {
  border: none;
  background: rgba(255,255,255,0.06);
  color: var(--text-sec);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.dock-more-panel-close:hover { background: rgba(255,255,255,0.12); }

.dock-more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
}

.dock-more-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}

.dock-more-grid-item:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
}

.dock-more-grid-item .dock-icon {
  width: 36px;
  height: 36px;
}

.dock-more-grid-item--highlight {
  border-color: rgba(201,160,85,0.45);
  background: rgba(201,160,85,0.08);
}

.dock-reorg-hint {
  position: fixed;
  bottom: calc(var(--dock-pad, 72px) + 4px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(520px, calc(100vw - 24px));
  padding: 10px 10px 10px 14px;
  border-radius: 12px;
  background: rgba(22,26,36,0.96);
  border: 1px solid rgba(201,160,85,0.35);
  box-shadow: 0 8px 28px rgba(0,0,0,0.4);
  z-index: 250;
  pointer-events: auto;
  animation: dockHintIn 0.35s var(--ease-out);
}

.dock-reorg-hint[hidden] {
  display: none !important;
}

.dock-reorg-hint.is-visible {
  display: flex;
}

.dock-reorg-hint-text {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-sec);
}

.dock-reorg-hint-dismiss {
  border: none;
  background: var(--brand-gold, #c9a055);
  color: #1a1c22;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 16px;
  min-height: 44px;
  min-width: 44px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.dock-reorg-hint-dismiss:active {
  transform: scale(0.97);
}

@keyframes dockHintIn {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (max-width: 768px) {
  .dock-more-panel { display: none !important; }
  .dock-reorg-hint {
    bottom: calc(62px + env(safe-area-inset-bottom, 0px) + 8px);
    max-width: calc(100vw - 16px);
  }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   CARDS — subtle elevation, no glow
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s4);
  transition: all 0.2s var(--ease);
}
.card:hover { background: var(--bg-card-h); border-color: var(--border-h); }

.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s3); }
.card-title {
  font-size: 12px; font-weight: 600; color: var(--text-sec);
  display: flex; align-items: center; gap: 6px;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.card-title svg { width: 13px; height: 13px; color: var(--text-muted); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   KPI CARDS — compact, informative
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: var(--s3); margin-bottom: var(--s5);
}

.kpi {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 14px 16px 12px;
  transition: all 0.2s var(--ease); position: relative;
}
.kpi::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 2px; height: 100%; border-radius: 0 1px 1px 0;
}
.kpi:hover { background: var(--bg-card-h); border-color: var(--border-h); }

.kpi.blue::before   { background: var(--blue); }
.kpi.green::before  { background: var(--green); }
.kpi.orange::before { background: var(--orange); }
.kpi.red::before    { background: var(--red); }
.kpi.purple::before { background: var(--purple); }
.kpi.teal::before   { background: var(--teal); }
.kpi.gold::before   { background: var(--gold); }

.kpi-label {
  font-size: 10.5px; font-weight: 500; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 4px;
}
.kpi-value {
  font-size: 22px; font-weight: 700; letter-spacing: -0.8px;
  color: var(--text); line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.kpi-sub { font-size: 11px; color: var(--text-sec); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.kpi-up { color: var(--green); font-weight: 600; }
.kpi-down { color: var(--red); font-weight: 600; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SECTION HEADERS
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.section-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--s5); gap: var(--s4); }
.section-title { font-size: 18px; font-weight: 700; letter-spacing: -0.4px; color: var(--text); }
.section-desc { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   GRIDS
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--s3); }
.grid-sidebar { display: grid; grid-template-columns: 320px 1fr; gap: var(--s3); min-height: 0; }
@media (max-width: 1100px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .grid-sidebar { grid-template-columns: 1fr; } }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   TABLES
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--border); background: var(--bg-card); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table-wrap th {
  padding: 8px var(--s3); text-align: left;
  font-weight: 500; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 0.4px; color: var(--text-muted);
  background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border);
}
.table-wrap td { padding: 7px var(--s3); border-bottom: 1px solid rgba(255,255,255,0.025); color: var(--text-sec); }
.table-wrap tr:hover td { background: var(--bg-surface); }
.table-wrap tr:last-child td { border-bottom: none; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   BADGES
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 5px;
  font-size: 10.5px; font-weight: 550; white-space: nowrap;
}
.badge.blue   { background: var(--blue-dim); color: var(--blue); }
.badge.green  { background: var(--green-dim); color: var(--green); }
.badge.red    { background: var(--red-dim); color: var(--red); }
.badge.orange { background: var(--orange-dim); color: var(--orange); }
.badge.purple { background: var(--purple-dim); color: var(--purple); }
.badge.teal   { background: var(--teal-dim); color: var(--teal); }
.badge.gray   { background: var(--bg-surface-h); color: var(--text-sec); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   CHARTS
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.chart-container { position: relative; width: 100%; }
.chart-container canvas { display: block; max-height: none; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   BUTTONS
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 500; font-family: inherit;
  border: 1px solid var(--border); background: transparent; color: var(--text-sec);
  cursor: pointer; transition: all 0.15s var(--ease); text-decoration: none;
}
.btn:hover { background: var(--bg-surface-h); color: var(--text); }
.btn svg { width: 13px; height: 13px; }

.btn-primary { background: var(--blue); border-color: transparent; color: white; }
.btn-primary:hover { background: #7B9AEF; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   EMPTY STATES
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--s12) var(--s6); color: var(--text-muted); text-align: center;
}
.empty-state-icon {
  width: 44px; height: 44px; border-radius: var(--r);
  background: var(--bg-surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--s3);
}
.empty-state-icon svg { width: 20px; height: 20px; color: var(--text-muted); }
.empty-state-title { font-size: 13px; font-weight: 600; color: var(--text-sec); margin-bottom: 2px; }
.empty-state-desc { font-size: 12px; color: var(--text-muted); max-width: 240px; line-height: 1.5; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SKELETON
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.025) 25%, rgba(255,255,255,0.045) 50%, rgba(255,255,255,0.025) 75%);
  background-size: 200% 100%; animation: shimmer 2s ease infinite; border-radius: var(--r);
}
@keyframes shimmer { 0%{background-position:200% 0}100%{background-position:-200% 0} }
.skeleton-kpi { height: 82px; border-radius: var(--r-lg); }
.skeleton-chart { height: 200px; border-radius: var(--r-lg); }
.skeleton-row { height: 38px; border-radius: var(--r-sm); margin-bottom: 6px; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   STATUS GRID (Dashboard)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.status-grid { display: flex; gap: var(--s3); margin-bottom: var(--s5); flex-wrap: wrap; }
.status-widget {
  display: flex; align-items: center; gap: var(--s2);
  padding: 6px 12px; border-radius: var(--r-sm);
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 11.5px;
}
.status-widget-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.status-widget-label { color: var(--text-muted); }
.status-widget-value { font-weight: 600; color: var(--text-sec); margin-left: 4px; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   WHATSAPP VIEW
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.wa-grid {
  display: grid; grid-template-columns: 260px 1fr 240px;
  gap: var(--s3); height: calc(100vh - var(--topbar-h) - var(--dock-pad) - 60px);
}
@media (max-width: 1100px) { .wa-grid { grid-template-columns: 1fr; height: auto; } }

.wa-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
}
.wa-panel-header {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  font-size: 11.5px; font-weight: 600; color: var(--text-sec);
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.wa-panel-header svg { width: 13px; height: 13px; color: var(--text-muted); }
.wa-panel-body { flex: 1; overflow-y: auto; padding: 4px; }

.wa-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: var(--r-sm);
  cursor: pointer; transition: background 0.12s var(--ease);
}
.wa-item:hover { background: var(--bg-surface-h); }

.wa-avatar {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--bg-surface-h);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--text-sec); flex-shrink: 0;
}
.wa-info { flex: 1; min-width: 0; }
.wa-name { font-size: 12px; font-weight: 550; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-preview { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wa-center-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s5);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}

.wa-stat-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.wa-stat-row:last-child { border-bottom: none; }
.wa-stat-label { font-size: 11.5px; color: var(--text-muted); }
.wa-stat-value { font-size: 12px; font-weight: 600; color: var(--text-sec); font-variant-numeric: tabular-nums; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   CONVERSATIONS
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.conv-list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--r-sm);
  cursor: pointer; transition: background 0.12s var(--ease);
}
.conv-list-item:hover { background: var(--bg-surface-h); }

.conv-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.conv-body { flex: 1; min-width: 0; }
.conv-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1px; }
.conv-name { font-size: 12.5px; font-weight: 550; color: var(--text); }
.conv-time { font-size: 10px; color: var(--text-muted); }
.conv-msg { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   KANBAN
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.kanban {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s3); align-items: flex-start;
}
.kanban-col { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.kanban-col-header {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.kanban-col-title { font-size: 12px; font-weight: 600; color: var(--text-sec); display: flex; align-items: center; gap: 6px; }
.kanban-count { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: var(--bg-surface-h); color: var(--text-muted); }
.kanban-body { padding: 6px; max-height: 380px; overflow-y: auto; }

.ticket-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 10px 12px;
  margin-bottom: 4px; cursor: pointer; transition: all 0.15s var(--ease);
}
.ticket-card:hover { background: var(--bg-surface-h); border-color: var(--border-h); }
.ticket-card-cat { font-size: 10px; font-weight: 550; color: var(--blue); margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.3px; }
.ticket-card-msg { font-size: 11.5px; color: var(--text-sec); margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.ticket-card-footer { display: flex; align-items: center; justify-content: space-between; }
.ticket-card-meta { font-size: 10px; color: var(--text-muted); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   AGENDA
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.agenda-item { display: flex; gap: var(--s3); padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.025); }
.agenda-time { flex-shrink: 0; width: 48px; text-align: right; font-size: 12px; font-weight: 600; color: var(--text-sec); font-variant-numeric: tabular-nums; }
.agenda-dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.agenda-content { flex: 1; }
.agenda-title { font-size: 12.5px; font-weight: 550; color: var(--text); margin-bottom: 1px; }
.agenda-desc { font-size: 11.5px; color: var(--text-muted); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   NEIGHBORS
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.neighbor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--s3); }
.neighbor-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); cursor: pointer; transition: all 0.15s var(--ease);
}
.neighbor-card:hover { background: var(--bg-card-h); border-color: var(--border-h); }
.neighbor-avatar { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 650; flex-shrink: 0; }
.neighbor-info { flex: 1; min-width: 0; }
.neighbor-name { font-size: 13px; font-weight: 550; color: var(--text); }
.neighbor-sector { font-size: 11.5px; color: var(--text-muted); }
.neighbor-tags { display: flex; gap: 3px; margin-top: 4px; flex-wrap: wrap; }
.neighbor-summary {
  grid-column: 1 / -1; font-size: 12px; color: var(--text-sec);
  padding: 4px 2px 8px; font-weight: 500;
}
.neighbor-stats {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  margin-top: 4px; font-size: 11px; color: var(--text-sec);
}
.neighbor-stat strong { color: var(--text); font-weight: 650; }
.neighbor-stat-dot { opacity: 0.35; }
.neighbor-meta { font-size: 10px; color: var(--text-muted); margin-top: 3px; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SETTINGS
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.settings-group { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; margin-bottom: var(--s3); }
.settings-group-title {
  padding: 10px 16px; font-size: 12px; font-weight: 600; color: var(--text-sec);
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 6px;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.025);
  transition: background 0.12s var(--ease);
}
.settings-row:hover { background: var(--bg-surface); }
.settings-row:last-child { border-bottom: none; }
.settings-label { font-size: 12.5px; color: var(--text); }
.settings-value { font-size: 12.5px; color: var(--text-sec); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   FILTER BAR
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.filter-bar { display: flex; align-items: center; gap: 6px; margin-bottom: var(--s4); flex-wrap: wrap; }
.filter-bar input, .filter-bar select {
  padding: 5px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--bg-input);
  color: var(--text); font-size: 12px; font-family: inherit; outline: none;
  transition: border-color 0.15s var(--ease);
}
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--border-focus); }
.filter-bar select option { background: var(--bg-raised); color: var(--text); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   UTILITIES
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.mb-sm { margin-bottom: 6px; }
.mb    { margin-bottom: var(--s4); }
.mb-lg { margin-bottom: var(--s5); }
.mb-xl { margin-bottom: var(--s8); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SETTINGS — Admin Center (Apple Settings / Raycast / Linear style)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.stg-layout {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 0; min-height: calc(100vh - var(--topbar-h) - var(--dock-pad) - 80px);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--bg-card); overflow: hidden;
}

.stg-sidebar {
  border-right: 1px solid var(--border);
  padding: 10px 8px; overflow-y: auto;
  background: rgba(255,255,255,0.01);
}

.stg-nav-label {
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 10px 10px 4px; margin-top: 4px;
}
.stg-nav-label:first-child { margin-top: 0; }

.stg-nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 500; color: var(--text-sec);
  cursor: pointer; transition: all 0.12s var(--ease);
  margin-bottom: 1px;
}
.stg-nav-item:hover { background: var(--bg-surface-h); color: var(--text); }
.stg-nav-item.active { background: var(--blue-dim); color: var(--blue); font-weight: 600; }
.stg-nav-item svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.65; }
.stg-nav-item.active svg { opacity: 1; }

.stg-main { padding: 20px 24px; overflow-y: auto; }

.stg-section-title {
  font-size: 14px; font-weight: 650; color: var(--text);
  margin-bottom: 4px; letter-spacing: -0.2px;
}
.stg-section-desc {
  font-size: 11.5px; color: var(--text-muted); margin-bottom: 16px;
}

.stg-card {
  background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  border-radius: var(--r); margin-bottom: 10px; overflow: hidden;
}

.stg-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; border-bottom: 1px solid rgba(255,255,255,0.025);
  transition: background 0.1s var(--ease);
}
.stg-row:last-child { border-bottom: none; }
.stg-row:hover { background: rgba(255,255,255,0.015); }
.stg-row-label { font-size: 12.5px; color: var(--text); display: flex; align-items: center; gap: 6px; }
.stg-row-label svg { width: 13px; height: 13px; color: var(--text-muted); }
.stg-row-value { font-size: 12.5px; color: var(--text-sec); font-variant-numeric: tabular-nums; }

.stg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
@media (max-width: 900px) { .stg-grid { grid-template-columns: 1fr; } .stg-layout { grid-template-columns: 1fr; } .stg-sidebar { border-right: none; border-bottom: 1px solid var(--border); } }

.stg-mini-kpi {
  background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  border-radius: var(--r); padding: 12px 14px;
}
.stg-mini-kpi-label { font-size: 10px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 3px; }
.stg-mini-kpi-value { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.stg-mini-kpi-sub { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }

.stg-export-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border); border-radius: var(--r);
  margin-bottom: 6px; transition: all 0.12s var(--ease);
}
.stg-export-card:hover { background: rgba(255,255,255,0.035); border-color: var(--border-h); }
.stg-export-icon {
  width: 32px; height: 32px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stg-export-icon svg { width: 15px; height: 15px; color: white; }
.stg-export-info { flex: 1; min-width: 0; }
.stg-export-name { font-size: 12.5px; font-weight: 550; color: var(--text); }
.stg-export-desc { font-size: 11px; color: var(--text-muted); }

.stg-log-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.02);
  font-size: 11.5px;
}
.stg-log-item:last-child { border-bottom: none; }
.stg-log-time { color: var(--text-muted); font-variant-numeric: tabular-nums; flex-shrink: 0; width: 42px; }
.stg-log-msg { color: var(--text-sec); }

.stg-toggle {
  width: 36px; height: 20px; border-radius: 10px;
  background: rgba(255,255,255,0.1); border: none;
  cursor: pointer; position: relative; transition: background 0.2s var(--ease);
}
.stg-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: white; transition: transform 0.2s var(--ease);
}
.stg-toggle.on { background: var(--blue); }
.stg-toggle.on::after { transform: translateX(16px); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   CONVERSATIONS — Operational Center (3-column)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.cv-layout {
  display: grid; grid-template-columns: 280px 1fr 240px;
  gap: 0; border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--bg-card); overflow: hidden;
  height: calc(100vh - var(--topbar-h) - var(--dock-pad) - 48px);
}
@media (max-width: 1000px) { .cv-layout { grid-template-columns: 260px 1fr; } .cv-right { display: none; } }

/* â”€â”€ Left: list â”€â”€ */
.cv-left {
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  background: rgba(255,255,255,0.008); overflow: hidden;
}
.cv-left-top { padding: 10px 10px 6px; flex-shrink: 0; border-bottom: 1px solid var(--border); }

.cv-search {
  width: 100%; padding: 6px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--bg-input);
  color: var(--text); font-size: 12px; font-family: inherit; outline: none;
  transition: border-color 0.15s var(--ease); margin-bottom: 6px;
}
.cv-search:focus { border-color: var(--border-focus); }

.cv-filters { display: flex; gap: 4px; }
.cv-filters select {
  flex: 1; padding: 4px 6px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--bg-input);
  color: var(--text-sec); font-size: 10.5px; font-family: inherit; outline: none;
  cursor: pointer;
}
.cv-filters select option { background: var(--bg-raised); }

.cv-list-count {
  font-size: 10px; color: var(--text-muted); padding: 5px 2px 0;
  font-weight: 500; letter-spacing: 0.2px;
}

.cv-list { flex: 1; overflow-y: auto; padding: 4px; }

.cv-item {
  padding: 8px 10px; border-radius: var(--r-sm);
  cursor: pointer; transition: background 0.1s var(--ease);
  border-bottom: 1px solid rgba(255,255,255,0.015); position: relative;
}
.cv-item:hover { background: var(--bg-surface-h); }
.cv-item.selected { background: var(--blue-dim); }

.cv-item-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.cv-item-name { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.cv-item-time { font-size: 10px; color: var(--text-muted); flex-shrink: 0; }

.cv-item-mid { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }

.cv-item-tags { display: flex; gap: 3px; flex-wrap: wrap; }
.cv-chip {
  display: inline-flex; padding: 1px 5px; border-radius: 4px;
  font-size: 9.5px; font-weight: 550; letter-spacing: 0.1px;
}

/* â”€â”€ Center: timeline â”€â”€ */
.cv-center {
  display: flex; flex-direction: column; overflow: hidden;
}

.cv-center-header {
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.cv-center-title { font-size: 13px; font-weight: 650; color: var(--text); }
.cv-center-sub { font-size: 11px; color: var(--text-muted); }

.cv-timeline { flex: 1; overflow-y: auto; padding: 12px 16px; }

.cv-tl-date {
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 8px 0 4px; border-bottom: 1px solid rgba(255,255,255,0.03);
  margin-bottom: 6px; margin-top: 8px;
}
.cv-tl-date:first-child { margin-top: 0; }

.cv-tl-entry {
  display: grid; grid-template-columns: 46px 1fr;
  gap: 8px; padding: 5px 0; font-size: 12px;
}
.cv-tl-time { font-size: 10.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; text-align: right; padding-top: 1px; }
.cv-tl-body { color: var(--text-sec); line-height: 1.5; }
.cv-tl-author { font-weight: 600; color: var(--text); margin-right: 4px; }
.cv-tl-author.ia { color: var(--blue); }
.cv-tl-author.neighbor { color: var(--green); }

.cv-tl-event {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 0; font-size: 11px; color: var(--text-muted); font-style: italic;
}
.cv-tl-event-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }

.cv-empty-msg {
  display: flex; align-items: center; justify-content: center;
  height: 100%; font-size: 12px; color: var(--text-muted); text-align: center;
  padding: 20px;
}

/* â”€â”€ Right: context â”€â”€ */
.cv-right {
  border-left: 1px solid var(--border); overflow-y: auto;
  background: rgba(255,255,255,0.008); padding: 0;
}

.cv-ctx-section {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.cv-ctx-label {
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px;
}
.cv-ctx-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 3px 0; font-size: 11.5px;
}
.cv-ctx-row-label { color: var(--text-sec); }
.cv-ctx-row-value { color: var(--text); font-weight: 550; font-variant-numeric: tabular-nums; }

.cv-ctx-notes {
  width: 100%; min-height: 60px; max-height: 120px; resize: vertical;
  padding: 8px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--bg-input);
  color: var(--text); font-size: 11.5px; font-family: inherit;
  outline: none; line-height: 1.45;
}
.cv-ctx-notes:focus { border-color: var(--border-focus); }
.cv-ctx-notes::placeholder { color: var(--text-muted); }

.cv-ctx-ia-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; padding: 2px 0; color: var(--text-sec);
}
.cv-ctx-ia-dot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   TICKETS — Operational Center (Linear/Jira style)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.tk-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: var(--s3); flex-wrap: wrap;
}
.tk-toolbar-left { display: flex; align-items: center; gap: 5px; flex: 1; flex-wrap: wrap; }
.tk-toolbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.tk-search {
  width: 200px; padding: 5px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--bg-input);
  color: var(--text); font-size: 12px; font-family: inherit; outline: none;
  transition: border-color 0.15s var(--ease);
}
.tk-search:focus { border-color: var(--border-focus); }

.tk-toolbar select {
  padding: 5px 8px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--bg-input);
  color: var(--text-sec); font-size: 11px; font-family: inherit;
  outline: none; cursor: pointer;
}
.tk-toolbar select option { background: var(--bg-raised); }

.tk-count {
  font-size: 11px; color: var(--text-muted); font-weight: 500;
  white-space: nowrap;
}

.tk-view-toggle { display: flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.tk-view-btn {
  width: 30px; height: 26px; border: none; background: transparent;
  color: var(--text-muted); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.12s var(--ease);
}
.tk-view-btn:hover { background: var(--bg-surface); color: var(--text-sec); }
.tk-view-btn.active { background: var(--blue-dim); color: var(--blue); }
.tk-view-btn + .tk-view-btn { border-left: 1px solid var(--border); }

.tk-body {
  display: grid; grid-template-columns: 1fr 280px;
  gap: 0; border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--bg-card); overflow: hidden;
  height: calc(100vh - var(--topbar-h) - var(--dock-pad) - 160px);
  min-height: 300px;
}
@media (max-width: 1000px) { .tk-body { grid-template-columns: 1fr; } .tk-detail { display: none; } }

.tk-main { overflow-y: auto; overflow-x: hidden; }
.tk-detail {
  border-left: 1px solid var(--border); overflow-y: auto;
  background: rgba(255,255,255,0.008);
}

/* â”€â”€ List view â”€â”€ */
.tk-list-header {
  display: grid; grid-template-columns: 50px 1fr 90px 80px 80px 60px 60px;
  gap: 4px; padding: 7px 12px; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.015); position: sticky; top: 0; z-index: 2;
}
.tk-list-th {
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.4px;
}

.tk-list-row {
  display: grid; grid-template-columns: 50px 1fr 90px 80px 80px 60px 60px;
  gap: 4px; padding: 7px 12px; border-bottom: 1px solid rgba(255,255,255,0.02);
  cursor: pointer; transition: background 0.1s var(--ease); align-items: center;
}
.tk-list-row:hover { background: var(--bg-surface-h); }
.tk-list-row.selected { background: var(--blue-dim); }

.tk-list-id { font-size: 11px; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tk-list-main { min-width: 0; }
.tk-list-name { font-size: 12px; font-weight: 550; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-list-msg { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-list-cell { font-size: 11px; color: var(--text-sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-list-time { font-size: 10.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* â”€â”€ Kanban (reuse existing .kanban styles, add refinements) â”€â”€ */
.tk-kanban {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px; padding: 8px; align-items: flex-start;
}
.tk-kan-col {
  background: rgba(255,255,255,0.015); border-radius: var(--r);
  overflow: hidden; border: 1px solid rgba(255,255,255,0.03);
}
.tk-kan-header {
  padding: 8px 10px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.tk-kan-title { font-size: 11px; font-weight: 600; color: var(--text-sec); display: flex; align-items: center; gap: 5px; }
.tk-kan-count { font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 4px; background: rgba(255,255,255,0.05); color: var(--text-muted); }
.tk-kan-body { padding: 4px; max-height: 320px; overflow-y: auto; }

.tk-kan-card {
  padding: 8px 10px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-sm); margin-bottom: 4px; cursor: pointer;
  transition: all 0.12s var(--ease);
}
.tk-kan-card:hover { background: var(--bg-card-h); border-color: var(--border-h); }
.tk-kan-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.tk-kan-card-id { font-size: 10px; font-weight: 600; color: var(--text-muted); }
.tk-kan-card-msg { font-size: 11px; color: var(--text-sec); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; margin-bottom: 4px; }
.tk-kan-card-footer { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   DASHBOARD — Intelligence Center
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.db-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: var(--s4); gap: var(--s3);
}
.db-date {
  padding: 4px 8px; border-radius: 5px; border: 1px solid var(--border);
  background: var(--bg-input); color: var(--text); font-size: 11px; font-family: inherit; outline: none;
}

.db-grid-main {
  display: grid; grid-template-columns: 1fr 300px;
  gap: var(--s3); align-items: flex-start;
}
@media (max-width: 1100px) { .db-grid-main { grid-template-columns: 1fr; } }

.db-col-wide { display: flex; flex-direction: column; gap: var(--s3); }
.db-col-side { display: flex; flex-direction: column; gap: var(--s3); }

.db-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }

.db-card-sm { padding: var(--s3) !important; }
.db-card-sm .card-header { margin-bottom: var(--s2); }
.db-card-sm .chart-container { min-height: 0; }

/* â”€â”€ Feed â”€â”€ */
.db-feed-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.025);
  font-size: 11.5px;
}
.db-feed-item:last-child { border-bottom: none; }
.db-feed-dot { width: 5px; height: 5px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.db-feed-text { color: var(--text-sec); line-height: 1.4; }
.db-feed-time { color: var(--text-muted); font-size: 10px; margin-left: auto; flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* â”€â”€ Insights â”€â”€ */
.db-insight {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.025);
}
.db-insight:last-child { border-bottom: none; }
.db-insight-icon {
  width: 22px; height: 22px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 11px;
}
.db-insight-text { font-size: 11.5px; color: var(--text-sec); line-height: 1.4; }

/* â”€â”€ Territorial â”€â”€ */
.db-terr-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.025);
}
.db-terr-row:last-child { border-bottom: none; }
.db-terr-name { font-size: 11.5px; color: var(--text); font-weight: 550; width: 90px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-terr-bar-wrap { flex: 1; height: 6px; background: rgba(255,255,255,0.04); border-radius: 3px; overflow: hidden; }
.db-terr-bar { height: 100%; border-radius: 3px; transition: width 0.5s var(--ease); }
.db-terr-val { font-size: 10.5px; color: var(--text-muted); width: 26px; text-align: right; font-variant-numeric: tabular-nums; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   ANALYTICS — Intelligence Platform
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.an-heatmap { display: grid; grid-template-columns: 36px repeat(7,1fr); gap: 2px; font-size: 9px; }
.an-hm-label { display: flex; align-items: center; justify-content: flex-end; padding-right: 4px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.an-hm-cell { aspect-ratio: 1; border-radius: 3px; transition: all 0.15s var(--ease); cursor: default; position: relative; }
.an-hm-cell:hover { transform: scale(1.15); z-index: 1; }
.an-hm-head { font-size: 9px; color: var(--text-muted); text-align: center; padding-bottom: 2px; }

.an-metric-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.025);
  font-size: 11.5px;
}
.an-metric-row:last-child { border-bottom: none; }
.an-metric-label { color: var(--text-sec); }
.an-metric-val { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   UX POLISH — Toasts, Onboarding, Transitions, Focus
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Toasts â”€â”€ */
#toast-container {
  position: fixed; top: calc(var(--topbar-h) + 42px); right: 16px;
  z-index: 200; display: flex; flex-direction: column; gap: 6px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: var(--r);
  background: var(--bg-glass); backdrop-filter: blur(20px);
  border: 1px solid var(--border); box-shadow: var(--sh-lg);
  font-size: 12px; color: var(--text); pointer-events: auto;
  animation: toastIn 0.3s var(--ease-out) both;
  max-width: 320px;
}
.toast.out { animation: toastOut 0.25s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(20px); } }

.toast-icon { width: 16px; height: 16px; flex-shrink: 0; }
.toast-icon.success { color: var(--green); }
.toast-icon.error { color: var(--red); }
.toast-icon.warning { color: var(--orange); }
.toast-icon.info { color: var(--blue); }
.toast-msg { flex: 1; line-height: 1.4; }
.toast-close {
  width: 18px; height: 18px; border-radius: 4px; border: none;
  background: transparent; color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 14px; transition: color 0.1s;
}
.toast-close:hover { color: var(--text); }

/* â”€â”€ Onboarding overlay â”€â”€ */
#onboarding-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(8,9,14,0.88); backdrop-filter: blur(12px);
  display: none; align-items: center; justify-content: center;
}
#onboarding-overlay.visible { display: flex; animation: fadeIn 0.35s var(--ease-out); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.ob-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 32px 36px; max-width: 420px;
  width: 90%; text-align: center; box-shadow: var(--sh-lg);
  animation: obSlide 0.4s var(--ease-out) 0.1s both;
}
@keyframes obSlide { from { opacity:0; transform: translateY(16px); } to { opacity:1; transform: translateY(0); } }

.ob-icon { font-size: 32px; margin-bottom: 14px; }
.ob-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px; letter-spacing: -0.3px; }
.ob-desc { font-size: 13px; color: var(--text-sec); line-height: 1.6; margin-bottom: 20px; }
.ob-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
.ob-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.1); transition: all 0.2s var(--ease); }
.ob-dot.active { background: var(--blue); width: 18px; border-radius: 3px; }
.ob-actions { display: flex; gap: 8px; justify-content: center; }

/* â”€â”€ Global transitions â”€â”€ */
.card, .kpi, .badge, .btn, .wa-item, .cv-item, .tk-list-row, .tk-kan-card, .neighbor-card, .stg-nav-item, .settings-row, .stg-row, .stg-export-card {
  transition: all 0.15s var(--ease);
}

/* â”€â”€ Focus rings â”€â”€ */
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid rgba(107,138,235,0.35);
  outline-offset: 1px;
}

/* â”€â”€ Better hover depth â”€â”€ */
.card:hover, .kpi:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.btn:active { transform: scale(0.97); }

/* â”€â”€ Page-level loading â”€â”€ */
.view-loading { opacity: 0.5; pointer-events: none; transition: opacity 0.2s; }

/* â”€â”€ Pulse for live indicators â”€â”€ */
@keyframes soft-pulse { 0%,100%{opacity:1}50%{opacity:0.6} }
.live-pulse { animation: soft-pulse 2.5s ease-in-out infinite; }

/* â”€â”€ View entrance â”€â”€ */
.view.active {
  animation: viewEnter 0.25s var(--ease-out) both;
}
@keyframes viewEnter { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

/* â”€â”€ Dock item tooltip area â”€â”€ */
.dock-item { position: relative; }

/* â”€â”€ Card enter on load (used for card grids) â”€â”€ */
@keyframes cardEnter { from { opacity:0; transform:scale(0.97); } to { opacity:1; transform:scale(1); } }

/* â”€â”€ Status widget enhanced â”€â”€ */
.status-widget-dot { transition: background 0.3s; }

/* â”€â”€ Neighbor card hover lift â”€â”€ */
.neighbor-card:hover { transform: translateY(-1px); box-shadow: 0 3px 12px rgba(0,0,0,0.18); }

/* â”€â”€ Table row hover â”€â”€ */
.tk-list-row:hover, .cv-item:hover { background: var(--bg-surface-h); }

/* â”€â”€ Kanban card drag feel â”€â”€ */
.tk-kan-card { transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.tk-kan-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,0.2); }
.tk-kan-card:active { transform: scale(0.98); }

/* â”€â”€ WA item hover â”€â”€ */
.wa-item { transition: background 0.12s; }
.wa-item:hover { background: var(--bg-surface); }

/* â”€â”€ Settings nav hover â”€â”€ */
.stg-nav-item { transition: background 0.1s, color 0.1s; }

/* â”€â”€ Export card hover â”€â”€ */
.stg-export-card { transition: border-color 0.15s, box-shadow 0.15s; }
.stg-export-card:hover { border-color: var(--border-h); box-shadow: 0 2px 8px rgba(0,0,0,0.15); }

/* â”€â”€ Smooth badge â”€â”€ */
.badge { transition: background 0.1s, color 0.1s; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   REPORTS & EXPORTS CENTER
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.rpt-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.rpt-card {
  padding: 16px; display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.rpt-card:hover { border-color: var(--border-h); box-shadow: 0 3px 12px rgba(0,0,0,0.18); transform: translateY(-1px); }
.rpt-card-top { display: flex; align-items: center; justify-content: space-between; }
.rpt-card-icon { font-size: 22px; }
.rpt-card-title { font-size: 13px; font-weight: 650; color: var(--text); letter-spacing: -0.2px; }
.rpt-card-desc { font-size: 11px; color: var(--text-muted); line-height: 1.5; flex: 1; }
.rpt-card-actions { margin-top: 6px; display: flex; gap: 6px; }
.rpt-dl-btn { display: inline-flex; align-items: center; gap: 4px; }
.rpt-dl-btn svg { width: 12px; height: 12px; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   COMPACT MODE
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
body.compact-mode { font-size: 12px; }
body.compact-mode .kpi { padding: 10px 12px; }
body.compact-mode .kpi-value { font-size: 18px; }
body.compact-mode .section-header { margin-bottom: 8px; }
body.compact-mode .card { padding: 10px 12px; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   NO-ANIMATIONS MODE
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
body.no-animations *, body.no-animations *::before, body.no-animations *::after {
  animation-duration: 0s !important; transition-duration: 0s !important;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SCROLLBAR — premium slim
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SELECTION — brand color
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
::selection { background: rgba(107,138,235,0.25); color: inherit; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SECURITY CENTER — Full Premium Panel (Apple Settings / Linear / Stripe)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.sec-shell {
  display: grid; grid-template-columns: 210px 1fr;
  min-height: calc(100vh - var(--chrome-top) - var(--dock-pad) - 32px);
  gap: 0;
}

.sec-sidebar {
  border-right: 1px solid var(--border); padding: 14px 8px;
  overflow-y: auto;
}
.sec-sidebar .sec-nav-group {
  font-size: 9.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--text-muted); padding: 12px 10px 5px;
}
.sec-sidebar .sec-nav-group:first-child { padding-top: 2px; }
.sec-nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--r-xs); cursor: pointer;
  color: var(--text-sec); font-size: 12.5px; font-weight: 450;
  transition: all 0.12s var(--ease);
}
.sec-nav-item:hover { background: var(--bg-surface-h); color: var(--text); }
.sec-nav-item.active {
  background: var(--blue-dim); color: var(--blue); font-weight: 550;
}
.sec-nav-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.6; }
.sec-nav-item.active svg { opacity: 1; }
.sec-nav-item .sec-nav-badge {
  margin-left: auto; font-size: 9px; font-weight: 600;
  padding: 1px 5px; border-radius: 8px;
  background: var(--green-dim); color: var(--green);
}
.sec-nav-item .sec-nav-badge.warn { background: var(--orange-dim); color: var(--orange); }
.sec-nav-item .sec-nav-badge.err { background: var(--red-dim); color: var(--red); }

.sec-body {
  padding: 22px 28px; overflow-y: auto;
  max-height: calc(100vh - var(--topbar-h) - var(--dock-pad) - 32px);
}

.sec-title {
  font-size: 17px; font-weight: 650; color: var(--text);
  letter-spacing: -0.3px; margin-bottom: 3px;
}
.sec-desc {
  font-size: 12px; color: var(--text-muted); margin-bottom: 18px;
}

.sec-kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 8px; margin-bottom: 16px;
}
.sec-kpi {
  background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  border-radius: var(--r); padding: 13px 14px;
  transition: border-color 0.15s, background 0.15s;
}
.sec-kpi:hover { border-color: var(--border-h); background: rgba(255,255,255,0.03); }
.sec-kpi-label {
  font-size: 10px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.4px; color: var(--text-muted); margin-bottom: 4px;
}
.sec-kpi-value {
  font-size: 17px; font-weight: 700; color: var(--text);
  letter-spacing: -0.5px; font-variant-numeric: tabular-nums;
}
.sec-kpi-value--md { font-size: 14px; }
.sec-kpi-value--sm { font-size: 13px; }
.sec-kpi-value--xs { font-size: 11px; }
.sec-kpi-value--2xs { font-size: 12px; }
.sec-kpi-value--lg { font-size: 16px; }
.sec-kpi-value--ok { color: var(--green); font-size: 14px; }
.sec-kpi-value--warn { color: var(--orange); font-size: 14px; }
.sec-kpi-value--bad { color: var(--red); font-size: 14px; }
.sec-kpi-value--muted { color: var(--text-muted); font-size: 13px; }
.sec-kpi-sub { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }

.sec-card--pad { padding: 16px; margin-bottom: 14px; }
.sec-card--pad-sm { padding: 16px; }
.sec-card--scroll { max-height: 420px; overflow-y: auto; }
.sec-card--empty { padding: 24px; text-align: center; color: var(--text-muted); }
.sec-card--error { padding: 20px; }
.sec-form-grid { display: grid; gap: 8px; max-width: 420px; }
.sec-actions { display: flex; gap: 8px; margin-top: 4px; }
.sec-actions--mb { display: flex; gap: 8px; margin-bottom: 14px; }
.sec-msg { font-size: 12px; min-height: 16px; color: var(--orange); }
.sec-hint { font-size: 11px; color: var(--text-muted); margin-top: 12px; }
.sec-pad-block { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.sec-pad-grid { padding: 12px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sec-pad-grid--foot { padding: 0 16px 12px; }
.sec-timeline--pad { padding: 8px 12px; }
.sec-tl-empty { padding: 20px; text-align: center; color: var(--text-muted); }
.sec-tl-date { font-size: 9.5px; }
.sec-tl-cat { font-size: 9px; margin-left: 4px; }
.sec-row--mono { font-family: monospace; font-size: 11px; }
.sec-row--mono-sm { font-family: monospace; font-size: 10px; }
.sec-row--warn { color: var(--orange); }
.sec-row--flex { display: flex; align-items: center; gap: 6px; }
.sec-user-meta { font-size: 10px; color: var(--text-muted); }
.sec-user-name { margin-left: 8px; color: var(--text-sec); }
.sec-user-handle { font-family: monospace; font-size: 11px; color: var(--blue); }
.sec-tenant-logo { height: 32px; max-width: 100px; object-fit: contain; border-radius: 4px; background: rgba(255,255,255,0.04); }
.sec-tenant-row { flex-wrap: wrap; gap: 10px; align-items: center; }
.sec-tenant-name { flex: 1; min-width: 120px; }
.sec-btn--fit { width: fit-content; }
.sec-btn--disabled { opacity: 0.5; cursor: default; }
.sec-hint-inline { font-size: 11px; color: var(--text-muted); align-self: center; }
.sec-grid-2--mb { margin-bottom: 18px; }
.sec-card-title--bad { color: var(--red); }
.sec-card-title--warn { color: var(--orange); }
.sec-version-current { font-size: 9px; margin-left: 6px; }
.sec-card--xscroll { overflow-x: auto; }
.sec-card--scroll-tall { max-height: 450px; overflow-y: auto; }
.sec-upload-label { cursor: pointer; margin: 0; }
.sec-section-gap { margin-bottom: 10px; }
.sec-audit-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.sec-audit-table thead tr { border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-card); }
.sec-audit-table th {
  text-align: left; padding: 7px 10px; color: var(--text-muted); font-weight: 500;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px;
}
.sec-audit-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.02); }
.sec-audit-table td { padding: 6px 10px; }
.sec-audit-table td.sec-audit-date { color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sec-audit-table td.sec-audit-user { font-family: monospace; color: var(--blue); }
.sec-audit-table td.sec-audit-action { color: var(--text); }
.sec-audit-table td.sec-audit-detail { color: var(--text-muted); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-audit-empty { padding: 30px; text-align: center; color: var(--text-muted); }
.sec-pad-compact { padding: 8px 16px; }
.dash-setup-tour { margin-left: 8px; font-size: 10px; padding: 2px 8px; }

.sec-card {
  background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  border-radius: var(--r); margin-bottom: 12px; overflow: hidden;
}
.sec-card-title {
  font-size: 12px; font-weight: 600; color: var(--text);
  padding: 12px 16px 8px; letter-spacing: -0.1px;
}
.sec-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 16px; border-bottom: 1px solid rgba(255,255,255,0.025);
  transition: background 0.1s;
}
.sec-row:last-child { border-bottom: none; }
.sec-row:hover { background: rgba(255,255,255,0.012); }
.sec-row-label {
  font-size: 12.5px; color: var(--text); display: flex; align-items: center; gap: 7px;
}
.sec-row-label svg { width: 14px; height: 14px; color: var(--text-muted); }
.sec-row-value {
  font-size: 12.5px; color: var(--text-sec); font-variant-numeric: tabular-nums;
}

.sec-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.sec-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }

.sec-input {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 8px 11px;
  color: var(--text); font-size: 12px; font-family: inherit;
  transition: border-color 0.15s;
  width: 100%;
}
.sec-input:focus { outline: none; border-color: var(--border-focus); }
.sec-input::placeholder { color: var(--text-muted); }
.sec-input.mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 11.5px; }

.sec-btn {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 7px 16px;
  color: var(--text-sec); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.12s;
  font-family: inherit;
}
.sec-btn:hover { background: var(--bg-surface-h); color: var(--text); border-color: var(--border-h); }
.sec-btn.primary {
  background: var(--blue-dim); color: var(--blue); border-color: rgba(107,138,235,0.2);
}
.sec-btn.primary:hover { background: rgba(107,138,235,0.18); }
.sec-btn.danger { color: var(--red); border-color: rgba(212,107,107,0.15); }
.sec-btn.danger:hover { background: var(--red-dim); }

.sec-timeline { padding: 0 2px; }
.sec-tl-item {
  display: grid; grid-template-columns: 70px 1fr; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.02);
  font-size: 12px;
}
.sec-tl-time { color: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; padding-top: 1px; }
.sec-tl-content { color: var(--text-sec); }
.sec-tl-action { color: var(--text); font-weight: 500; }
.sec-tl-detail { color: var(--text-muted); font-size: 11px; margin-top: 1px; }
.sec-tl-user { font-family: 'SF Mono', monospace; font-size: 10.5px; color: var(--blue); }

.sec-role-card {
  background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 16px; transition: border-color 0.15s;
}
.sec-role-card:hover { border-color: var(--border-h); }
.sec-role-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.sec-role-desc { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.sec-perm-list { display: flex; flex-wrap: wrap; gap: 4px; }
.sec-perm-tag {
  font-size: 10px; padding: 2px 7px; border-radius: 4px;
  background: var(--green-dim); color: var(--green); font-weight: 500;
}
.sec-perm-tag.off { background: rgba(255,255,255,0.03); color: var(--text-muted); }

.sec-version-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.02);
}
.sec-version-dot {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; flex-shrink: 0;
  background: var(--blue);
}
.sec-version-dot.current { background: var(--green); box-shadow: 0 0 6px rgba(91,196,159,0.3); }
.sec-version-label { font-size: 12.5px; font-weight: 600; color: var(--text); }
.sec-version-date { font-size: 10.5px; color: var(--text-muted); }
.sec-version-notes { font-size: 11.5px; color: var(--text-sec); margin-top: 3px; line-height: 1.5; }

.sec-backup-item {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px;
  align-items: center; padding: 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.025);
  font-size: 12px;
}
.sec-backup-item:hover { background: rgba(255,255,255,0.012); }
.sec-backup-name { font-family: 'SF Mono', monospace; font-size: 11px; color: var(--text); }
.sec-backup-meta { color: var(--text-muted); font-size: 10.5px; }

@media (max-width: 900px) {
  .sec-shell { grid-template-columns: 1fr; }
  .sec-sidebar { border-right: none; border-bottom: 1px solid var(--border); flex-direction: row; overflow-x: auto; padding: 8px; }
  .sec-kpi-grid { grid-template-columns: 1fr 1fr; }
  .sec-grid-2, .sec-grid-3 { grid-template-columns: 1fr; }
}

.badge.red { background: rgba(239,68,68,.12); color: #ef4444; }
.badge.purple { background: rgba(168,85,247,.12); color: #a855f7; }
.badge.teal { background: rgba(90,175,181,.12); color: #5AAFB5; }

/* â”€â”€ Modo DEMO â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.demo-banner {
  position: fixed; top: var(--titlebar-h, 0); left: 0; right: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 6px 12px; font-size: 11px; letter-spacing: 0.02em;
  background: linear-gradient(90deg, #5c3d10, #8a5a18, #5c3d10);
  color: #fff8e8; border-bottom: 1px solid rgba(212,160,84,0.35);
}
body.demo-mode .demo-banner { display: flex !important; }
body.demo-mode { --demo-banner-h: 28px; }
body.demo-mode #topbar { top: calc(var(--shell-top) + var(--demo-banner-h)); }
body.demo-mode #content { top: calc(var(--shell-top) + var(--demo-banner-h) + var(--topbar-h)); }
body.demo-mode .demo-banner { top: var(--shell-top); }
.demo-banner-dot { width: 8px; height: 8px; border-radius: 50%; background: #f0c060; animation: demo-pulse 1.2s ease-in-out infinite; }
@keyframes demo-pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.15)} }
.dock-separator { width: 1px; height: 28px; background: rgba(255,255,255,0.12); margin: 0 4px; align-self: center; }
.dock-item-demo { text-decoration: none; color: inherit; }
.dock-item-demo .dock-icon.i-demo {
  background: linear-gradient(160deg, #d4a054, #8a5a18);
  font-weight: 800; font-size: 14px; color: #1a1208;
  display: flex; align-items: center; justify-content: center;
}
.dock-item-demo:hover .dock-icon { box-shadow: 0 0 12px rgba(212,160,84,0.45); }
body.demo-mode #dock-demo-link,
body.demo-mode #dock-demo-sep { display: none !important; }


/* Botón cerrar aplicación (escritorio) */
body.is-desktop-app { --titlebar-h: 32px; }
body.is-desktop-app #titlebar { display: flex !important; }
body.is-desktop-app.native-window-frame { --titlebar-h: 0px; }
body.is-desktop-app.native-window-frame #titlebar { display: none !important; }
body.is-desktop-app.native-window-frame.demo-mode #content {
  top: calc(var(--shell-top) + var(--demo-banner-h, 28px) + var(--topbar-h)) !important;
}
body.is-desktop-app .topbar-exit-btn { display: inline-flex !important; }
.tb-exit-labeled {
  width: auto !important; padding: 0 12px !important; gap: 6px;
  color: rgba(255,255,255,0.75) !important;
}
.tb-exit-labeled:hover { background: rgba(196,43,28,0.25) !important; color: #fff !important; }
.tb-exit-label { font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.topbar-exit-btn {
  display: none !important; width: auto !important; min-width: 30px;
  padding: 0 10px !important; gap: 5px;
  border-color: rgba(196,43,28,0.35) !important; color: #e8a090 !important;
}
.topbar-exit-btn:hover {
  background: rgba(196,43,28,0.2) !important; color: #fff !important;
  border-color: rgba(196,43,28,0.55) !important;
}
.topbar-exit-text { font-size: 11px; font-weight: 600; }
.btn-danger {
  background: #c42b1c; color: #fff; border: 1px solid rgba(255,255,255,0.1);
}
.btn-danger:hover { background: #a82418; }
.demo-banner { display: none; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
body.demo-mode .demo-banner { display: flex !important; }
.demo-banner-text { flex: 1; text-align: center; min-width: 200px; }
.demo-banner-close {
  flex-shrink: 0; padding: 4px 14px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(196,43,28,0.85); color: #fff; font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.demo-banner-close:hover { background: #a82418; }
body.is-desktop-app.demo-mode .demo-banner-close { display: inline-block !important; }

/* ═══ MAPA COMUNAL EN VIVO ═══ */
.dock-icon.i-livemap { background: linear-gradient(160deg, #3dba6e, #1a7a42); }
.livemap-updated { font-size: 11px; color: var(--text-muted); }
.livemap-layout {
  display: grid; grid-template-columns: 1fr 340px; gap: 14px;
  min-height: calc(100vh - var(--topbar-h) - var(--dock-pad) - 120px);
}
@media (max-width: 960px) { .livemap-layout { grid-template-columns: 1fr; } }
.livemap-map-card { padding: 12px; overflow: hidden; }
.livemap-map-host {
  position: relative;
  min-height: 420px; background: radial-gradient(ellipse at 50% 40%, rgba(61,186,110,0.08), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.15));
  border-radius: var(--r-md); border: 1px solid var(--border);
}
.livemap-svg { width: 100%; height: auto; min-height: 400px; display: block; }
.livemap-outline {
  fill: rgba(91, 138, 235, 0.06); stroke: rgba(91, 138, 235, 0.35); stroke-width: 0.8;
}
.livemap-zone-ring {
  fill: rgba(255,255,255,0.03); stroke: rgba(255,255,255,0.08); stroke-width: 0.4;
}
.livemap-zone-label { fill: rgba(255,255,255,0.35); font-size: 3.2px; text-anchor: middle; font-weight: 600; }
.livemap-zone-count { fill: rgba(255,255,255,0.55); font-size: 4px; text-anchor: middle; font-weight: 700; }
.livemap-pin-pulse {
  fill: rgba(46, 204, 113, 0.35); stroke: none;
  animation: livemap-pulse 1.8s ease-in-out infinite;
}
.livemap-pin-core {
  fill: #2ecc71; stroke: #fff; stroke-width: 0.35;
  filter: url(#liveGlow);
}
.livemap-pin.selected .livemap-pin-core { fill: #58ff9a; stroke-width: 0.6; }
@keyframes livemap-pulse {
  0%, 100% { r: 4; opacity: 0.9; }
  50% { r: 7; opacity: 0.25; }
}
.livemap-legend {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; font-size: 11px; color: var(--text-sec);
}
.livemap-legend-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle;
}
.livemap-legend-dot.live { background: #2ecc71; box-shadow: 0 0 8px rgba(46,204,113,0.6); }
.livemap-map-empty {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 500;
  padding: 10px 14px; font-size: 12px; line-height: 1.4; color: var(--text-sec);
  background: rgba(12, 14, 18, 0.88); border: 1px solid var(--border);
  border-radius: var(--r-sm); pointer-events: none;
}
.badge.green.muted { opacity: 0.65; filter: grayscale(0.35); }

.livemap-feed-card { padding: 0; overflow: hidden; max-height: 520px; display: flex; flex-direction: column; }
.livemap-feed {
  overflow-y: auto; max-height: 460px; padding: 8px;
}
.livemap-feed-item {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px;
  border-radius: var(--r-sm); cursor: pointer; border: 1px solid transparent;
  transition: background 0.15s;
}
.livemap-feed-item:hover, .livemap-feed-item.selected { background: var(--bg-surface-h); border-color: var(--border-h); }
.livemap-feed-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #2ecc71; flex-shrink: 0; margin-top: 4px;
  box-shadow: 0 0 6px rgba(46,204,113,0.7); animation: livemap-pulse-dot 2s infinite;
}
@keyframes livemap-pulse-dot { 0%,100%{opacity:1} 50%{opacity:0.45} }
.livemap-feed-name { font-size: 12px; font-weight: 600; color: var(--text); }
.livemap-feed-time { font-size: 10px; color: var(--text-muted); }
.livemap-feed-sector { font-size: 10px; color: var(--text-sec); margin-top: 2px; }
.livemap-feed-msg { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.35; }
.livemap-feed-top { display: flex; justify-content: space-between; gap: 8px; width: 100%; }
.livemap-feed-body { flex: 1; min-width: 0; }

/* Leaflet mapa vivo */
.livemap-map-host .leaflet-container {
  width: 100%; min-height: 420px; border-radius: var(--r-md);
  background: #1a1d24; font-family: inherit;
}
.livemap-div-icon { background: transparent; border: none; }
.livemap-marker {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(14, 18, 28, 0.92); border: 2px solid #2ecc71;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1; box-shadow: 0 2px 12px rgba(0,0,0,0.5);
  transition: transform 0.15s, border-color 0.15s;
}
.livemap-marker.selected { border-color: #58ff9a; transform: scale(1.15); z-index: 1000 !important; }
.livemap-marker.mini { width: 22px; height: 22px; font-size: 12px; border-width: 1px; display: inline-flex; }
.livemap-marker.mini.feed { margin-top: 2px; flex-shrink: 0; }
.livemap-legend-row { flex-wrap: wrap; gap: 8px; }
.livemap-legend-items { display: flex; flex-wrap: wrap; gap: 10px 14px; flex: 1; }
.livemap-legend-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--text-sec); }

/* Resumen Concejo */
.dock-icon.i-concejo { background: linear-gradient(160deg, #c9a04a, #8a6528); }

/* Modo presentación (video / proyección) */
body.presentation-mode .topbar-search,
body.presentation-mode #btn-notif,
body.presentation-mode .topbar-actions a[href="/excel-avanzado"] {
  display: none !important;
}
body.presentation-mode .demo-banner {
  opacity: 0.55; padding: 4px 12px; font-size: 10px;
}
body.presentation-mode .demo-banner-close { display: none !important; }
body.presentation-mode #dock .dock-item[data-view="whatsapp"],
body.presentation-mode #dock .dock-item[data-view="conversations"],
body.presentation-mode #dock .dock-item[data-view="tickets"],
body.presentation-mode #dock .dock-item[data-view="agenda"],
body.presentation-mode #dock .dock-item[data-view="reports"],
body.presentation-mode #dock .dock-item[data-view="neighbors"],
body.presentation-mode #dock .dock-item[data-view="security"],
body.presentation-mode #dock .dock-item[data-view="settings"] {
  display: none !important;
}
body.presentation-mode .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
body.presentation-mode .kpi-card .kpi-value { font-size: 1.65rem; }
body.presentation-mode .livemap-map-host .leaflet-container { min-height: 480px; }
body.presentation-mode .livemap-layout { min-height: calc(100vh - var(--topbar-h) - var(--dock-pad) - 80px); }
body.presentation-mode #btn-presentation {
  background: rgba(212, 160, 84, 0.2); border-color: rgba(212, 160, 84, 0.45);
  color: var(--text);
}

.platform-bar {
  position: fixed;
  top: var(--titlebar-h);
  left: 0;
  right: 0;
  height: 38px;
  min-height: 38px;
  z-index: 10050;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  box-sizing: border-box;
  background: linear-gradient(90deg, #1b3a5c 0%, #243f5f 55%, #2d4a6e 100%);
  border-bottom: none;
  font-size: 12px;
}
.platform-bar[hidden] { display: none !important; }
body.has-platform-bar,
body.has-impersonation-bar,
body:has(#impersonation-bar:not([hidden])) { --aux-bar-h: 38px; }
body.has-platform-bar #topbar,
body.has-impersonation-bar #topbar,
body:has(#impersonation-bar:not([hidden])) #topbar {
  top: var(--shell-top);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
body.has-platform-bar #content,
body.has-impersonation-bar #content,
body:has(#impersonation-bar:not([hidden])) #content {
  top: var(--chrome-top);
}
/* Impersonación + banner demo: evitar que el contenido tape el topbar */
body.has-impersonation-bar.demo-mode,
body:has(#impersonation-bar:not([hidden])).demo-mode {
  --demo-banner-h: 28px;
}
body.has-impersonation-bar.demo-mode .demo-banner,
body:has(#impersonation-bar:not([hidden])).demo-mode .demo-banner {
  top: var(--shell-top);
}
body.has-impersonation-bar.demo-mode #topbar,
body:has(#impersonation-bar:not([hidden])).demo-mode #topbar {
  top: calc(var(--shell-top) + var(--demo-banner-h, 28px));
}
body.has-impersonation-bar.demo-mode #content,
body:has(#impersonation-bar:not([hidden])).demo-mode #content {
  top: calc(var(--shell-top) + var(--demo-banner-h, 28px) + var(--topbar-h));
}
.platform-bar-start {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}
.platform-bar-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.platform-bar-badge {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d4a054;
  font-size: 10px;
  white-space: nowrap;
}
.platform-bar-vrule {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}
.platform-bar-label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  white-space: nowrap;
}
.platform-wa-hint {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(255, 220, 160, 0.92);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
  border: none;
  background: transparent;
}
.platform-wa-hint > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.platform-wa-hint[hidden] { display: none !important; }
.platform-wa-hint.is-ok {
  color: rgba(140, 230, 180, 0.95);
}
.platform-wa-hint-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid rgba(212, 160, 84, 0.45);
  background: rgba(212, 160, 84, 0.12);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.platform-wa-hint-btn:hover { background: rgba(212, 160, 84, 0.25); }
.platform-tenant-select {
  min-width: 180px;
  max-width: 260px;
  padding: 5px 28px 5px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  font-size: 12px;
}
.platform-bar-btn {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid rgba(212, 160, 84, 0.45);
  background: rgba(212, 160, 84, 0.12);
  color: #f4f7fb;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.platform-bar-btn:hover { background: rgba(212, 160, 84, 0.28); }
.platform-bar-btn--logout {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}
.platform-bar-btn--logout:hover { background: rgba(220, 80, 80, 0.35); border-color: rgba(255, 120, 120, 0.5); }

.impersonation-bar {
  position: fixed;
  top: var(--titlebar-h);
  left: 0;
  right: 0;
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: linear-gradient(90deg, #4a3018 0%, #7a4e24 55%, #8b5a2b 100%);
  color: #fff8ec;
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 220, 160, 0.22);
  z-index: 10051;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}
body.has-impersonation-bar:not(.has-platform-bar) #topbar {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.impersonation-bar[hidden] { display: none !important; }
.impersonation-bar-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a1208;
  background: linear-gradient(180deg, #f0c060, #d4a054);
  border-radius: 999px;
  padding: 3px 10px;
  line-height: 1.2;
}
.impersonation-bar-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff8ec;
  font-weight: 500;
}
.impersonation-bar-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.impersonation-bar-btn:hover { background: rgba(255, 255, 255, 0.15); }

@media (max-width: 900px) {
  .topbar-status { display: none; }
  .topbar-btn-labeled .topbar-btn-label { display: none; }
  .topbar-btn-labeled { max-width: 36px; padding: 0 !important; }
  .topbar-search { max-width: 160px; }
  .topbar-brand { max-width: 220px; }
  .topbar-brand img { height: 32px; max-width: 150px; padding: 3px 8px; }
  .topbar-brand-tenant, .topbar-brand-ver { display: none; }
  .topbar-user-role { display: none; }
  .topbar-user-chip { max-width: 150px; padding-right: 10px; }
}

.mu-users-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mu-users-table th, .mu-users-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.mu-users-table th { color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 10px; }
.mu-pwd-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 200px; }
.mu-pwd-wrap--missing { gap: 6px; }
.mu-pwd-missing { font-size: 11px; color: var(--text-muted); }
.mu-pwd-cell { min-width: 140px; vertical-align: top; }
.mu-pwd { font-size: 11px; color: var(--orange, #d4a054); word-break: break-all; }
.mu-once-password {
  margin-top: 10px;
  padding: 10px;
  background: var(--green-dim);
  border-radius: 8px;
  font-size: 13px;
}
.btn-sm { padding: 4px 10px; font-size: 11px; }

.topbar-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 4px;
  padding: 0 12px 0 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  max-width: 220px;
  flex-shrink: 1;
  min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}
.topbar-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(107,138,235,0.95), rgba(90,175,181,0.92));
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.topbar-user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  gap: 1px;
}
.topbar-user-name {
  font-size: 12px;
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.15;
}
.topbar-user-role {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.46);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.1;
}
.topbar-user-role.is-admin { color: var(--gold, #d4a054); }

.topbar-btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto !important;
  min-width: 36px;
  max-width: none;
  height: 36px;
  padding: 0 11px !important;
  color: var(--text-sec);
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}
.topbar-btn-logout:hover {
  color: #fff;
  background: rgba(200, 70, 70, 0.85);
  border-color: rgba(200, 70, 70, 0.9);
}

body.auth-locked #splash-screen,
body.auth-locked #topbar,
body.auth-locked #content,
body.auth-locked #dock-wrapper,
body.auth-locked #titlebar,
body.auth-locked #demo-banner { visibility: hidden; }

/* Dock — módulo destacado (Cargar información) */
.dock-item--highlight .dock-icon {
  background: linear-gradient(145deg, rgba(212,160,84,0.22), rgba(212,160,84,0.08));
  border: 1px solid rgba(212,160,84,0.45);
  box-shadow: 0 0 14px rgba(212,160,84,0.2);
}
.dock-item--highlight .dock-label {
  color: var(--gold, #d4a054);
  font-weight: 600;
  opacity: 1;
  transform: translateY(0);
}
.dock-label--wide { max-width: 11rem; white-space: nowrap; }

/* Cargar información — base de conocimiento */
.ku-panel { display: flex; flex-direction: column; gap: var(--s4); max-width: none; width: 100%; }
.ku-hero {
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
  padding: var(--s4);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(212,160,84,0.12), rgba(212,160,84,0.02));
  border: 1px solid rgba(212,160,84,0.25);
}
.ku-hero-icon { font-size: 2rem; line-height: 1; }
.ku-hero-title { margin: 0 0 6px; font-size: 1.15rem; font-weight: 600; }
.ku-hero-desc { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.ku-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: var(--s4);
  align-items: start;
}
@media (max-width: 960px) {
  .ku-grid { grid-template-columns: 1fr; }
}
.ku-card-title { font-size: 14px; font-weight: 600; margin: 0 0 var(--s3); }
.ku-card--wide { min-width: 0; }
.ku-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  padding: 0 6px;
  margin-left: 6px;
  font-size: 11px;
  border-radius: 999px;
  background: rgba(212,160,84,0.2);
  color: var(--gold, #d4a054);
}
.ku-table-wrap { overflow-x: auto; }
.ku-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.ku-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.ku-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.ku-td-title { font-weight: 500; max-width: 180px; }
.ku-td-actions { white-space: nowrap; }
.ku-muted { font-size: 10px; color: var(--text-muted); }
.ku-tenant { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--bg); }
.ku-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s4);
}
.ku-modal[hidden] { display: none !important; }
.ku-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}
.ku-modal-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg, 0 20px 50px rgba(0,0,0,0.4));
}
.ku-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border);
}
.ku-modal-head h3 { margin: 0; font-size: 15px; }
.ku-modal-body {
  padding: var(--s4);
  overflow: auto;
  flex: 1;
}
.ku-preview-meta { font-size: 12px; color: var(--text-muted); margin: 0 0 var(--s3); }
.ku-preview-text {
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 50vh;
  overflow: auto;
  margin: 0;
  padding: var(--s3);
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.ku-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s4);
}
.ku-intro { font-size: 13px; color: var(--text-muted); margin: 0 0 var(--s4); line-height: 1.5; }
.ku-form { display: flex; flex-direction: column; gap: var(--s3); }
.ku-field label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.ku-field input[type="text"],
.ku-field input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}
.ku-list-title { font-size: 14px; font-weight: 600; margin: 0 0 var(--s3); }
.ku-list { display: flex; flex-direction: column; gap: 8px; }
.ku-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: 12px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.ku-row-title { font-size: 13px; font-weight: 500; }
.ku-row-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.ku-empty, .ku-loading, .ku-error { font-size: 13px; color: var(--text-muted); }
.ku-error { color: var(--red); }

.mu-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s3);
}
.mu-filter-label {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.mu-filter-label .sec-input { min-width: 180px; }
.mu-users-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mu-users-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.mu-users-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.mu-row-inactive { opacity: 0.72; }
.mu-tenant-tag { font-size: 10px; color: var(--text-muted); }
.mu-acceso-cell { max-width: 220px; line-height: 1.4; color: var(--text-muted); }
.mu-actions-cell { white-space: nowrap; }
.mu-actions-cell .btn { margin: 2px 2px 2px 0; }
.mu-pwd { font-size: 11px; word-break: break-all; }
.mu-once-password {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(212,160,84,0.12);
  border: 1px solid rgba(212,160,84,0.3);
  font-size: 12px;
}
.mu-edit-body { display: flex; flex-direction: column; gap: var(--s3); }
.mu-edit-active-wrap { font-size: 13px; display: flex; align-items: center; gap: 8px; }

.sec-muni-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 560px;
}
.sec-muni-field label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sec-muni-field--full { grid-column: 1 / -1; }
.sec-muni-actions { grid-column: 1 / -1; }
.sec-muni-msg { font-size: 12px; min-height: 18px; margin: 8px 0 0; color: var(--green); }

/* Envíos masivos opt-in */
.bo-panel { display: flex; flex-direction: column; gap: var(--s4); max-width: 960px; }
.bo-alert { padding: 12px 14px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.bo-alert--ok { background: var(--green-dim); border: 1px solid rgba(80, 200, 120, 0.35); }
.bo-alert--warn { background: rgba(200, 120, 60, 0.15); border: 1px solid rgba(220, 140, 60, 0.45); color: var(--text); }
.bo-legal { font-size: 12px; color: var(--text-muted); margin: 0; line-height: 1.45; }
.bo-muted { font-size: 12px; color: var(--text-muted); }
.bo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
@media (max-width: 900px) { .bo-grid { grid-template-columns: 1fr; } }
.bo-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s4);
}
.bo-card-title { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.bo-card-desc { font-size: 12px; color: var(--text-muted); margin: 0 0 12px; }
.bo-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.bo-textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  resize: vertical;
  margin-bottom: 10px;
}
.bo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bo-table { width: 100%; font-size: 12px; border-collapse: collapse; }
.bo-table th, .bo-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.bo-camp-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.bo-camp-row:hover { background: var(--bg-surface-h); }
.bo-stats { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.bo-log-list { max-height: 240px; overflow-y: auto; font-size: 12px; }
.bo-log-item { padding: 4px 0; }
.bo-loading, .bo-error { font-size: 13px; }
.bo-error { color: var(--red); }

/* ── Solicitudes + Ficha del vecino (Fase 1) ─────────────────────────── */
.dock-icon.i-solicitudes { background: linear-gradient(160deg, #6366f1, #4338ca); }
.sol-filter-bar { gap: 10px; flex-wrap: wrap; }
.sol-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sol-table th, .sol-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.sol-table th { color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; }
.sol-table-main tbody tr:hover { background: rgba(255,255,255,0.02); }
.sol-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 600; }
.sol-recibida { background: rgba(59,130,246,0.15); color: #93c5fd; }
.sol-en_revision { background: rgba(245,158,11,0.15); color: #fcd34d; }
.sol-en_gestion { background: rgba(139,92,246,0.15); color: #c4b5fd; }
.sol-resuelta { background: rgba(34,197,94,0.15); color: #86efac; }
.sol-cerrada { background: rgba(148,163,184,0.15); color: #cbd5e1; }
.sol-link { background: none; border: none; color: var(--blue); cursor: pointer; font-size: 12px; }
.sol-label { display: block; margin: 10px 0 4px; font-size: 11px; color: var(--text-muted); }
.sol-select, .sol-input, .sol-textarea {
  width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text); font-size: 13px;
}
.sol-historial { margin: 8px 0 0; padding-left: 18px; color: var(--text-muted); font-size: 12px; }
.ficha-modal-body, .sol-modal-body { padding: 14px 16px 18px; font-size: 13px; }
.ficha-modal--tabs { width: min(620px, 100%); }
.ficha-modal-sub { margin: 2px 0 0; font-size: 11px; color: var(--text-muted); font-weight: 400; }
.ficha-tabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.ficha-tab { background: none; border: none; color: var(--text-muted); padding: 10px 12px; font-size: 12px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ficha-tab.active { color: var(--text); border-bottom-color: var(--blue); font-weight: 600; }
.ficha-resumen-dl { display: grid; gap: 10px; margin: 0 0 12px; }
.ficha-resumen-dl div { display: grid; grid-template-columns: 150px 1fr; gap: 8px; }
.ficha-resumen-dl dt { color: var(--text-muted); font-size: 11.5px; }
.ficha-resumen-dl dd { margin: 0; font-weight: 500; }
.ficha-resumen-phone { margin: 0; font-size: 12px; color: var(--text-muted); }
.ficha-empty-tab { color: var(--text-muted); font-size: 12px; margin: 0; }
.ficha-grupo-placeholder { text-align: center; padding: 28px 16px; color: var(--text-muted); }
.ficha-grupo-icon { font-size: 2rem; margin-bottom: 8px; }
.ficha-grupo-placeholder h4 { margin: 0 0 8px; color: var(--text); }
.ficha-grupo-placeholder p { margin: 0 0 12px; font-size: 12.5px; line-height: 1.5; max-width: 360px; margin-inline: auto; }
.ficha-grupo-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; background: rgba(148,163,184,0.15); color: var(--text-muted); font-size: 10px; font-weight: 600; }
.ficha-link-btn { display: inline-flex; align-items: center; margin-top: 8px; padding: 7px 12px; border-radius: 8px; border: 1px solid rgba(99,102,241,0.35); background: rgba(99,102,241,0.12); color: #c7d2fe; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.ficha-link-btn--compact { margin-top: 6px; padding: 5px 10px; font-size: 11px; }
.ficha-link-btn:hover { background: rgba(99,102,241,0.2); }
.cv-ctx-ficha { padding-top: 4px; }
.cv-ctx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 4px; }
.sol-entry-btn { display: inline-flex; align-items: center; margin-top: 8px; padding: 7px 12px; border-radius: 8px; border: 1px solid rgba(45,212,191,0.35); background: rgba(45,212,191,0.1); color: #99f6e4; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.sol-entry-btn--compact { margin-top: 6px; padding: 5px 10px; font-size: 11px; }
.sol-entry-btn:hover { background: rgba(45,212,191,0.18); }
.cert-entry-btn { display: inline-flex; align-items: center; margin-top: 8px; padding: 7px 12px; border-radius: 8px; border: 1px solid rgba(251,191,36,0.35); background: rgba(251,191,36,0.1); color: #fde68a; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.cert-entry-btn--compact { margin-top: 6px; padding: 5px 10px; font-size: 11px; }
.cert-entry-btn:hover { background: rgba(251,191,36,0.18); }
.ficha-modal-actions { padding: 0 16px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.agenda-item .cert-entry-btn { margin-top: 0; }
.cert-panel-banner { margin-bottom: 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(251,191,36,0.25); background: rgba(251,191,36,0.06); }
.cert-panel-banner-inner { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cert-panel-banner-text p { margin: 4px 0 8px; font-size: 12px; color: var(--text-muted); }
.cert-panel-url { display: block; font-size: 11px; word-break: break-all; color: #fde68a; }
.cert-panel-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sol-ciudadano-banner { border-color: rgba(56,189,248,0.25); background: rgba(56,189,248,0.06); }
.sol-ciudadano-banner .cert-panel-url { color: #7dd3fc; }
.sol-ciudadano-divider { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 12px 0; }
.sol-area-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: rgba(56,189,248,0.12); color: #7dd3fc; font-size: 12px; font-weight: 600; }
.ficha-hilo { margin: 0 0 18px; padding: 14px; border-radius: 12px; border: 1px solid rgba(99,102,241,0.22); background: rgba(99,102,241,0.06); }
.ficha-hilo-title { margin: 0 0 4px; font-size: 14px; font-weight: 650; }
.ficha-hilo-desc { margin: 0 0 12px; font-size: 11.5px; color: var(--text-muted); }
.ficha-hilo-block { margin-bottom: 12px; }
.ficha-hilo-block:last-child { margin-bottom: 0; }
.ficha-hilo-block h5 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.ficha-hilo-item { padding: 10px 12px; border-radius: 8px; background: rgba(0,0,0,0.18); border: 1px solid rgba(255,255,255,0.06); }
.ficha-hilo-item p { margin: 4px 0; font-size: 12px; color: var(--text-muted); }
.ficha-hilo-tag { display: inline-block; margin-bottom: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; color: #93c5fd; }
.ficha-hilo-meta { font-size: 11px; color: var(--text-muted); }
.ficha-hilo-empty { margin: 0; font-size: 12px; color: var(--text-muted); font-style: italic; }
.ficha-hilo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ficha-hilo-gestion { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; background: rgba(0,0,0,0.15); border: 1px solid rgba(255,255,255,0.05); font-size: 12px; }
.ficha-hilo-gestion code { font-size: 12px; }
.ficha-hilo-area { display: inline-block; font-size: 11px; color: #7dd3fc; }
.ficha-hilo-origen { display: inline-block; font-size: 11px; color: var(--text-muted); }
.ficha-hilo-gestion--cert { border-color: rgba(251,191,36,0.15); }
.agenda-actions, .citizen-report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.neighbor-card--ficha { cursor: pointer; }
.neighbor-card--ficha:hover { border-color: rgba(99,102,241,0.35); }
.neighbor-ficha-action { margin-top: 6px; }
.citizen-reports-strip { margin-bottom: 16px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); }
.citizen-reports-list { display: grid; gap: 8px; margin-top: 8px; }
.citizen-report-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.citizen-report-row:last-child { border-bottom: none; }
.citizen-report-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.citizen-report-meta { font-size: 11px; color: var(--text-muted); }
.sol-modal-actions { margin-top: 14px; display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; }
.agenda-item .ficha-link-btn { margin-top: 6px; }
.agenda-item .sol-entry-btn { margin-top: 0; }
.ficha-panel { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.ficha-section-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.ficha-summary { color: var(--text-muted); font-size: 12px; margin-bottom: 12px; }
.ficha-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ficha-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.ficha-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; margin-bottom: 6px; }
.ficha-status { font-size: 10px; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.ficha-status-ok { background: rgba(34,197,94,0.15); color: #86efac; }
.ficha-status-prov { background: rgba(245,158,11,0.15); color: #fcd34d; }
.ficha-card-meta { font-size: 11.5px; color: var(--text-muted); margin-bottom: 4px; }
.ficha-btn { margin-top: 8px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; font-size: 11px; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 1rem; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 22px; cursor: pointer; line-height: 1; }
.ficha-modal-body, .sol-modal-body { padding: 14px 16px 18px; font-size: 13px; }

/* === SAAS POLISH v34 === */
/* Module-wide spacing rhythm */
.grid-2, .grid-3, .grid-sidebar { gap: var(--s4); }
.kpi-grid { gap: var(--s4); }

/* Cards — premium elevation */
.card {
  box-shadow: var(--sh-sm);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.card:hover { box-shadow: var(--sh); }
.card-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  letter-spacing: -0.01em; text-transform: none;
}

/* KPI — executive metrics */
.kpi {
  background: linear-gradient(180deg, var(--bg-card-h) 0%, var(--bg-card) 100%);
  box-shadow: var(--sh-kpi);
  padding: 16px 18px 14px;
  overflow: hidden;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.kpi::before {
  top: 0; left: 0; right: 0; width: auto; height: 2px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.kpi:hover { box-shadow: var(--sh); transform: translateY(-1px); }
.kpi-label {
  font-size: 12px; font-weight: 500; color: var(--text-sec);
  text-transform: none; letter-spacing: -0.01em; margin-bottom: 6px;
}
.kpi-value { font-size: 26px; letter-spacing: -0.03em; line-height: 1.1; }

/* Section headers */
.section-title { font-size: 20px; font-weight: 650; letter-spacing: -0.03em; }
.section-desc { font-size: 13px; color: var(--text-sec); line-height: 1.45; }

/* Topbar — balanced density */
#topbar { padding: 0 20px; gap: 12px; box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 8px 24px rgba(0,0,0,0.24); }
.status-pill { padding: 6px 12px; font-size: 12px; background: var(--bg-widget); gap: 6px; }
.topbar-search input { padding: 8px 12px 8px 34px; font-size: 13px; }

/* Dock — active / hover depth */
#dock { gap: 3px; padding: 5px 10px 4px; border-radius: 16px; border-color: rgba(255,255,255,0.10); }
.dock-item:hover .dock-icon {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35), inset 0 0.5px 0 rgba(255,255,255,0.14);
}
.dock-item.active .dock-icon {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 4px 14px rgba(0,0,0,0.4), 0 0 0 1.5px rgba(255,255,255,0.18), inset 0 0.5px 0 rgba(255,255,255,0.16);
}
.dock-indicator { width: 4px; height: 4px; margin-top: 3px; }
.dock-item.active .dock-indicator { background: rgba(255,255,255,0.85); box-shadow: 0 0 6px rgba(255,255,255,0.35); }

/* Dashboard grid rhythm */
.db-grid-main, .db-col-wide, .db-col-side, .db-grid-2 { gap: var(--s4); }
.db-card-sm { padding: var(--s4) !important; }
.db-card-sm .card-header {
  margin-bottom: var(--s3); padding-bottom: var(--s2);
  border-bottom: 1px solid var(--border);
}

/* Status widgets */
.status-widget {
  padding: 8px 14px; box-shadow: var(--sh-sm); font-size: 12px;
}
.status-widget-label { color: var(--text-sec); font-weight: 500; }
.status-widget-value { font-weight: 650; color: var(--text); margin-left: 6px; }
.status-widget-dot { width: 6px; height: 6px; }

/* Right panel — executive console */
.db-col-side .card.db-card-sm {
  background: linear-gradient(180deg, rgba(20,22,30,0.98) 0%, var(--bg-card) 100%);
  box-shadow: var(--sh);
}
#dash-insights .card-title, #dash-feed .card-title {
  font-size: 13.5px; font-weight: 650; color: var(--text);
}
#dash-feed-body, #dash-insights-body {
  display: flex; flex-direction: column; gap: 8px; padding: 0;
}
.db-insight {
  padding: 11px 12px; gap: 12px;
  border-radius: var(--r-sm); background: var(--bg-widget);
  border: 1px solid rgba(255,255,255,0.04);
  border-bottom: none;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.db-insight:hover { background: var(--bg-surface); border-color: var(--border); }
.db-insight-icon { width: 32px; height: 32px; border-radius: 9px; }
.db-insight-text { font-size: 12.5px; color: var(--text); line-height: 1.55; padding-top: 2px; }
.db-feed-item {
  padding: 10px 12px; gap: 10px; font-size: 12.5px;
  border-radius: var(--r-sm); background: var(--bg-widget);
  border: 1px solid rgba(255,255,255,0.04);
  border-bottom: none;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.db-feed-item:hover { background: var(--bg-surface); border-color: var(--border); }
.db-feed-dot { width: 7px; height: 7px; box-shadow: 0 0 0 2px rgba(255,255,255,0.06); }
.db-feed-text { color: var(--text); line-height: 1.5; flex: 1; min-width: 0; }
.db-feed-time { font-size: 11px; padding-top: 1px; }

/* Charts container breathing room */
.chart-container { padding: 4px 2px 0; }

/* Tables — readable headers */
.table-wrap th {
  padding: 10px var(--s3); font-weight: 550; font-size: 11.5px;
  letter-spacing: 0.01em; color: var(--text-sec); text-transform: none;
}

/* Module panels — WhatsApp, tickets, analytics */
.wa-panel, .cv-sidebar, .tk-kan-col, .an-card {
  box-shadow: var(--sh-sm);
}
.wa-panel-header, .cv-sidebar-header, .tk-kan-col-header {
  font-size: 12.5px; font-weight: 600; color: var(--text);
  text-transform: none; letter-spacing: -0.01em;
}
.tk-list-row, .cv-item, .wa-item, .neighbor-card {
  border-color: rgba(255,255,255,0.05);
}
.an-metric-row, .db-terr-row {
  padding: 8px 0;
}
.an-metric-label { color: var(--text-sec); font-size: 12px; }
.an-metric-val { font-size: 13px; }

/* Settings & reports */
.stg-nav-item.active { background: var(--bg-surface); border-color: var(--border-h); }
.rpt-card { box-shadow: var(--sh-sm); }
.rpt-card-title { font-size: 14px; }

/* Badges — less noise */
.badge { font-size: 10.5px; letter-spacing: 0.01em; }

/* Empty states */
.empty-state { padding: var(--s6) var(--s4); }
.empty-state-title { font-size: 14px; color: var(--text); }
.empty-state-desc { font-size: 12.5px; color: var(--text-sec); line-height: 1.5; }

@media (max-width: 1100px) {
  #topbar { padding: 0 14px; gap: 10px; }
  .kpi-value { font-size: 22px; }
}

/* === SAAS POLISH v35 — charts, topbar, reports === */
/* Chart legend — circular markers, readable labels */
/* Module icons (reports, exports) */
.module-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-widget); border: 1px solid var(--border);
  flex-shrink: 0;
}
.module-icon--blue { background: var(--blue-dim); border-color: rgba(107,138,235,0.22); }
.module-icon--red { background: var(--red-dim); border-color: rgba(212,107,107,0.22); }
.module-icon--green { background: var(--green-dim); border-color: rgba(91,196,159,0.22); }
.module-icon--orange { background: var(--orange-dim); border-color: rgba(212,160,84,0.22); }
.module-icon--purple { background: var(--purple-dim); border-color: rgba(154,138,222,0.22); }
.module-icon--teal { background: var(--teal-dim); border-color: rgba(90,175,181,0.22); }
.module-icon--gold { background: rgba(212,160,84,0.12); border-color: rgba(212,160,84,0.22); }
.module-icon--gray { background: rgba(148,163,184,0.1); border-color: rgba(148,163,184,0.2); }

/* Reports center */
.rpt-grid {
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.rpt-card {
  padding: 18px;
  gap: 10px;
  min-height: 172px;
  display: flex;
  flex-direction: column;
}
.rpt-card-top {
  align-items: flex-start;
  margin-bottom: 2px;
}
.rpt-card-title {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.rpt-card-desc {
  font-size: 12.5px;
  color: var(--text-sec);
  line-height: 1.55;
  flex: 1;
}
.rpt-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-sec);
  background: var(--bg-widget);
  border: 1px solid var(--border);
  letter-spacing: 0.01em;
  text-transform: none;
}
.rpt-card-actions {
  margin-top: auto;
  padding-top: 4px;
}
.rpt-dl-btn {
  font-size: 12px;
  padding: 8px 14px;
  gap: 7px;
  border-radius: var(--r-sm);
}
.rpt-dl-btn .ui-icon { opacity: 0.92; }

.rpt-history-card {
  margin-top: var(--s4);
  padding: var(--s4);
}
.rpt-history-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--s3);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--border);
}
.rpt-history-head .module-icon { width: 34px; height: 34px; border-radius: 9px; }
.rpt-history-title {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.01em;
}
.rpt-history-body { display: flex; flex-direction: column; gap: 8px; }
.rpt-history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--bg-widget);
  border: 1px solid rgba(255,255,255,0.04);
}
.rpt-history-status {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.rpt-history-status.is-ok {
  color: #86efac;
  background: rgba(52,211,153,0.12);
  border: 1px solid rgba(52,211,153,0.22);
}
.rpt-history-status.is-error {
  color: #fca5a5;
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.22);
}
.rpt-history-name {
  font-size: 12.5px;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rpt-history-time {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.rpt-history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 28px 16px;
  border-radius: var(--r-sm);
  background: var(--bg-widget);
  border: 1px dashed rgba(255,255,255,0.08);
}
.rpt-history-empty-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.rpt-history-empty-desc {
  font-size: 12px;
  color: var(--text-sec);
  line-height: 1.5;
  max-width: 320px;
}

/* Topbar — alignment & density */
#topbar {
  padding: 0 18px;
  gap: 10px;
}
.topbar-brand-name {
  letter-spacing: -0.02em;
  font-weight: 700;
  font-size: 13px;
}
.topbar-brand-tenant {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sec);
  letter-spacing: -0.01em;
}
.topbar-user-chip {
  margin-right: 2px;
  max-width: 200px;
}
.topbar-user-role {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.01em;
}
.topbar-actions {
  gap: 6px;
  margin-left: 0;
  flex-shrink: 0;
}
.topbar-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
  min-width: 0;
  max-width: 100%;
}
.topbar-end .topbar-user-chip {
  margin-right: 0;
  flex-shrink: 1;
}
.topbar-divider--end {
  flex-shrink: 0;
}
.topbar-divider {
  height: 24px;
  margin: 0 2px;
  flex-shrink: 0;
  align-self: center;
}
.topbar-btn-labeled {
  max-width: 130px;
  padding: 0 11px !important;
}
.topbar-btn-logout {
  max-width: none;
}
.topbar-btn-logout .topbar-btn-label {
  font-size: 11px;
}
.topbar-time {
  min-width: 52px;
  height: 36px;
  margin-left: 0;
  flex-shrink: 0;
  padding: 0 12px;
}

/* Impersonation bar — enterprise tone */
.impersonation-bar {
  background: linear-gradient(90deg, #1f1810 0%, #2d2418 50%, #3a2e1c 100%);
  border-bottom: 1px solid rgba(212,160,84,0.18);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04);
}
.impersonation-bar-btn {
  border: 1px solid rgba(212,160,84,0.35);
  background: rgba(212,160,84,0.1);
  border-radius: 8px;
  font-size: 11.5px;
  padding: 6px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.impersonation-bar-text {
  font-size: 12.5px;
  font-weight: 500;
}

@media (max-width: 1180px) {
  .topbar-btn-logout .topbar-btn-label,
  .topbar-exit-text { display: none; }
  .topbar-btn-logout {
    width: 36px !important;
    min-width: 36px;
    max-width: 36px;
    padding: 0 !important;
  }
  .topbar-user-chip { max-width: 160px; }
  .topbar-end { gap: 6px; }
}
@media (max-width: 980px) {
  .topbar-btn-labeled .topbar-btn-label { display: none; }
  .topbar-btn-labeled { max-width: 36px; padding: 0 !important; }
}

/* === SAAS POLISH v40 — charts contenidos (sin overflow entre filas) === */

.chart-container {
  position: relative;
  width: 100%;
  height: var(--chart-h-cell);
  min-height: var(--chart-h-cell);
  max-height: var(--chart-h-cell);
  padding: 4px 8px 2px;
  box-sizing: border-box;
  overflow: hidden;
  contain: layout style paint;
}
.chart-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

.chart-container--line {
  height: var(--chart-h-line);
  min-height: var(--chart-h-line);
  max-height: var(--chart-h-line);
}

.chart-container--donut {
  height: var(--chart-h-cell);
  min-height: var(--chart-h-cell);
  max-height: var(--chart-h-cell);
  padding: 2px 6px 0;
}

.db-charts-row {
  align-items: stretch;
  position: relative;
  isolation: isolate;
}
.db-chart-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.db-chart-card .chart-container,
.db-chart-card .chart-container--terr {
  flex: 0 0 var(--chart-h-cell);
  height: var(--chart-h-cell);
  min-height: var(--chart-h-cell);
  max-height: var(--chart-h-cell);
}

.chart-container--terr,
.dash-terr-panel {
  height: var(--chart-h-cell);
  min-height: var(--chart-h-cell);
  max-height: var(--chart-h-cell);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 6px 10px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  box-sizing: border-box;
}

.db-terr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
}
.db-terr-row:last-child { border-bottom: none; }
.db-terr-name {
  width: 118px;
  max-width: 42%;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-terr-bar-wrap {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.db-terr-bar {
  height: 100%;
  border-radius: 999px;
  min-width: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: width 0.45s var(--ease);
}
.db-terr-val {
  width: 32px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.58);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
  .db-terr-name { width: 96px; max-width: 38%; }
}
