/* MAPTRIUM Admin Control · shell styles · V6 Luminous Slate */

[x-cloak] { display: none !important; }
* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--font-sans);
  font-size: var(--fz-base);
  font-weight: 450;
  line-height: 1.5;
  color: var(--text-1);
  background: var(--canvas);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--cyan-light); }

code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface-3);
  padding: 2px 6px; border-radius: 4px;
  color: var(--text-1);
}

.muted { color: var(--text-3); }
.small { font-size: 12px; }
.mono { font-family: var(--font-mono); font-size: 12px; }

/* ============ Header ============ */
.ac-header {
  height: var(--header-height);
  background:
    linear-gradient(180deg, rgba(233,188,97,0.015) 0%, transparent 100%),
    var(--header);
  border-bottom: 1px solid var(--stroke);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 10;
  position: relative;
}
.ac-header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(233,188,97,0.55) 50%, transparent 100%);
}
.ac-brand { display: flex; align-items: center; gap: 14px; }
.ac-logo { width: 38px; height: 38px; display: grid; place-items: center; background: transparent; }
.ac-logo img { display: block; width: 34px; height: 34px; object-fit: contain;
               filter: drop-shadow(0 2px 8px rgba(233,188,97,0.28)); }

.ac-title { display: flex; flex-direction: column; line-height: 1.1; gap: 3px; }
.ac-title-top { font-size: 10px; color: var(--gold); font-weight: 700;
                letter-spacing: 2px; text-transform: uppercase; }
.ac-title-bot { font-size: var(--fz-lg); color: var(--text-1); font-weight: 700;
                letter-spacing: 0.1px; }

.ac-header-right { display: flex; align-items: center; gap: 12px; }
.ac-env-pill { font-size: 10px; font-weight: 700; padding: 4px 11px;
               border-radius: var(--radius-pill); letter-spacing: 0.8px; text-transform: uppercase; }
.ac-env-pill.env-prod  { background: rgba(56,213,155,0.14); color: var(--emerald);
                         border: 1px solid rgba(56,213,155,0.4); }
.ac-env-pill.env-stage { background: rgba(245,184,92,0.14); color: var(--amber);
                         border: 1px solid rgba(245,184,92,0.4); }
.ac-env-pill.env-local { background: var(--surface-3); color: var(--text-3);
                         border: 1px solid var(--stroke); }
.ac-env-pill.env-demo  {
  background: linear-gradient(120deg, rgba(249,215,141,0.22), rgba(233,188,97,0.12));
  color: var(--gold-light);
  border: 1px solid rgba(233,188,97,0.5);
  box-shadow: 0 0 12px rgba(233,188,97,0.18);
}

.ac-user { font-size: 13px; color: var(--text-2); font-weight: 600; }
.ac-icon-btn { background: transparent; border: 1px solid var(--stroke-soft);
               color: var(--text-2);
               width: 34px; height: 34px; border-radius: var(--radius-control);
               cursor: pointer; font-size: 15px;
               display: grid; place-items: center;
               transition: all 180ms ease; }
.ac-icon-btn:hover { background: var(--surface-hover); color: var(--text-1);
                     border-color: var(--stroke); }
.ac-icon-btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

.ac-header-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  background: transparent;
  border: 1px solid var(--stroke-soft);
  color: var(--text-2);
  border-radius: var(--radius-control);
  font-size: 13px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: all 180ms ease;
}
.ac-header-btn:hover { background: var(--surface-hover); color: var(--text-1);
                       border-color: var(--stroke); }
.ac-header-btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.ac-header-btn-icon { font-size: 15px; line-height: 1; }
.ac-header-btn-label { letter-spacing: 0.2px; }
@media (max-width: 720px) {
  .ac-header-btn-label { display: none; }
  .ac-header-btn { padding: 0 10px; }
}

/* ============ Shell ============ */
.ac-shell { display: grid; grid-template-columns: var(--sidebar-width) 1fr;
            min-height: calc(100vh - var(--header-height)); }

/* ============ Sidebar ============ */
.ac-sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--stroke-soft);
  padding: 20px 10px 0;
  display: flex; flex-direction: column;
  position: sticky; top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
}
.ac-nav-group { margin-bottom: 18px; }
.ac-nav-group-title {
  font-size: 11px; font-weight: 700; letter-spacing: 1.6px;
  color: var(--text-3);
  padding: 0 14px 10px;
  text-transform: uppercase;
}
.ac-nav-item {
  display: flex; align-items: center; gap: 12px;
  height: 40px; padding: 0 14px;
  margin-bottom: 2px;
  color: var(--text-2); text-decoration: none;
  font-size: 14px; font-weight: 550;
  border-radius: var(--radius-control);
  border-left: 2px solid transparent;
  transition: background 180ms ease, color 180ms ease, box-shadow 200ms ease;
  position: relative;
}
.ac-nav-item:hover { background: var(--surface-hover); color: var(--text-1);
                     text-decoration: none; }
.ac-nav-item.active {
  background:
    radial-gradient(ellipse at 0% 50%, rgba(233,188,97,0.22) 0%, transparent 60%),
    linear-gradient(90deg, rgba(233,188,97,0.18) 0%, rgba(233,188,97,0.03) 100%);
  color: var(--gold-light);
  border-left-color: var(--gold);
  font-weight: 650;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 0 20px rgba(233,188,97,0.10);
}
.ac-nav-item.active .ac-nav-icon {
  color: var(--gold);
  text-shadow: 0 0 10px rgba(233,188,97,0.65);
}
.ac-nav-icon { width: 22px; height: 22px; display: inline-flex;
                align-items: center; justify-content: center;
                font-size: 17px; opacity: 1; flex-shrink: 0; }
.ac-nav-icon svg { width: 18px; height: 18px; }
.ac-header-btn-icon svg { width: 16px; height: 16px; display: block; }

.ac-sidebar-foot { margin-top: auto; padding: 18px 10px 20px;
                   border-top: 1px solid var(--stroke-soft); }
.ac-sidebar-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ac-sidebar-logo {
  width: 62px; height: 62px; object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(233,188,97,0.32));
  animation: ac-spin-logo 22s linear infinite;
}
@keyframes ac-spin-logo {
  0%   { transform: perspective(620px) rotateY(0deg); }
  100% { transform: perspective(620px) rotateY(360deg); }
}
.ac-sidebar-wordmark {
  font-size: 10px; letter-spacing: 1.4px; font-weight: 700;
  color: var(--gold); text-transform: uppercase;
  text-align: center;
}

/* ============ Main ============ */
.ac-main { padding: var(--space-page) 28px; max-width: 1840px; width: 100%; }
.ac-main h1 { font-size: 27px; font-weight: 700; color: var(--text-1);
              margin: 0 0 20px; letter-spacing: -0.35px; line-height: 1.2; }
.ac-main h2 { font-size: 17px; font-weight: 650; color: var(--text-1);
              margin: 0 0 12px; padding: 0 0 0 14px;
              border: 0; letter-spacing: -0.1px;
              position: relative; }
.ac-main h2::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(233,188,97,0.45);
}

/* ============ Cards (3 surface levels) ============ */
.card {
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(155deg, var(--surface-2), var(--surface-1) 82%);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}
.card--graphite {
  background: linear-gradient(155deg, var(--surface-graphite) 0%, #1A2834 90%);
}
.card--slate {
  background: linear-gradient(155deg, var(--surface-2), var(--surface-1) 82%);
}
.card--primary {
  background: linear-gradient(160deg, var(--surface-1), #0E1F35 90%);
}
.card--gold-accent { position: relative; }
.card--gold-accent::before {
  content: ''; position: absolute; left: 22px; right: 22px; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 0 0 2px 2px; z-index: 1;
}

.card-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
            gap: var(--space-grid); margin-bottom: 18px; }

/* ============ KPI cards · illuminated with per-tile radial glow ============ */
.kpi {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(circle at 14% 0%, rgba(var(--glow-rgb, 52,190,244), 0.19), transparent 61%),
    linear-gradient(145deg, #183654 0%, #10263F 82%);
  border: 1px solid rgba(var(--glow-rgb, 52,190,244), 0.30);
  border-top: 2px solid rgba(var(--glow-rgb, 52,190,244), 0.85);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  box-shadow: var(--shadow-kpi);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 200ms ease, border-color 200ms ease;
}
.kpi:hover { transform: translateY(-1px); }
.kpi-head { display: flex; align-items: center; gap: 12px; }
.kpi-icon {
  width: 44px; height: 44px; border-radius: 11px;
  display: grid; place-items: center;
  font-size: 18px; font-weight: 700;
  background: rgba(var(--glow-rgb, 52,190,244), 0.13);
  color: rgb(var(--glow-rgb, 52,190,244));
  border: 1px solid rgba(var(--glow-rgb, 52,190,244), 0.5);
  box-shadow: 0 0 17px rgba(var(--glow-rgb, 52,190,244), 0.18);
}
.kpi-label { font-size: 11px; font-weight: 600; color: var(--text-3);
             text-transform: uppercase; letter-spacing: 1.1px; }
.kpi-value { font-size: var(--fz-kpi); font-weight: 700; color: var(--text-1);
             line-height: 1.05; letter-spacing: -0.8px;
             text-shadow: 0 0 20px rgba(var(--glow-rgb, 52,190,244), 0.25); }
.kpi-sub { font-size: 12px; color: var(--text-2);
           display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kpi-sub .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.kpi-sub .dot.ok { background: var(--emerald); box-shadow: 0 0 6px rgba(56,213,155,0.6); }
.kpi-sub .dot.warn { background: var(--amber); box-shadow: 0 0 6px rgba(245,184,92,0.6); }
.kpi-sub .dot.err { background: var(--coral); box-shadow: 0 0 6px rgba(255,114,128,0.6); }
.kpi-sub.trend-up    { color: var(--emerald); }
.kpi-sub.trend-down  { color: var(--coral); }
.kpi-sub.trend-up::before   { content: '▲'; font-size: 9px; }
.kpi-sub.trend-down::before { content: '▼'; font-size: 9px; }

/* 4 glow variants */
.card-row > .kpi:nth-child(4n+1) { --glow-rgb: 52, 190, 244; }   /* cyan — Licenses */
.card-row > .kpi:nth-child(4n+2) { --glow-rgb: 165, 139, 255; }  /* violet — Seats */
.card-row > .kpi:nth-child(4n+3) { --glow-rgb: 56, 213, 155; }   /* emerald — Audit */
.card-row > .kpi:nth-child(4n+4) { --glow-rgb: 233, 188, 97; }   /* gold — Products */

/* Gold utilization bar on Seats in Use */
.kpi-bar { width: 100%; height: 5px; background: rgba(0,0,0,0.3);
           border-radius: var(--radius-pill); overflow: hidden; }
.kpi-bar-fill { height: 100%; border-radius: var(--radius-pill);
                background: linear-gradient(90deg, var(--gold-light) 0%, var(--gold) 100%);
                box-shadow: 0 0 10px rgba(233,188,97,0.4);
                transition: width 500ms ease; }

/* ============ Forms ============ */
label { display: block; font-weight: 600; margin: 12px 0 6px;
        color: var(--text-2); font-size: 12px; }
input, select, textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--stroke);
  background: var(--surface-1);
  color: var(--text-1);
  border-radius: var(--radius-control);
  font-size: 14px; font-family: inherit;
  transition: border-color 160ms, box-shadow 160ms;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: var(--shadow-focus);
}
textarea { font-family: var(--font-mono); font-size: 12px; min-height: 90px; }

button {
  background: var(--surface-3); color: var(--text-1);
  border: 1px solid var(--stroke);
  padding: 9px 18px; border-radius: var(--radius-control);
  font-weight: 650; cursor: pointer; font-size: 13px;
  font-family: inherit; letter-spacing: 0.1px;
  transition: background 160ms ease, border-color 160ms ease, transform 100ms ease;
}
button:hover:not(:disabled) { background: var(--surface-hover);
                                border-color: rgba(126,176,214,0.4); }
button:active:not(:disabled) { transform: translateY(1px); }
button:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary, button.gold {
  background: linear-gradient(120deg, var(--gold-light), var(--gold));
  color: #122337;
  border: 1px solid var(--gold-light);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 4px 16px rgba(233,188,97,0.18);
}
button.primary:hover:not(:disabled), button.gold:hover:not(:disabled) {
  background: linear-gradient(120deg, #FCE2A0, var(--gold-light));
  border-color: #FCE2A0;
}
button.red { background: linear-gradient(120deg, #FF8891, var(--coral)); color: #241012;
             border-color: rgba(255,114,128,0.6);
             box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 4px 16px rgba(255,114,128,0.15); }
button.red:hover:not(:disabled) { background: linear-gradient(120deg, #FF9CA6, #FF8690); }
button.ghost { background: transparent; }

/* ============ Tables ============ */
table { width: 100%; border-collapse: separate; border-spacing: 0;
        font-size: 13px; font-weight: 500; }
th, td { padding: 11px 14px; text-align: left;
         border-bottom: 1px solid var(--stroke-soft); }
th { background: var(--surface-3); color: var(--text-3);
     font-weight: 700; font-size: 11px; text-transform: uppercase;
     letter-spacing: 1px; }
th:first-child { border-top-left-radius: 10px; }
th:last-child { border-top-right-radius: 10px; }
tbody tr { transition: background 120ms ease; }
tbody tr:nth-child(even) td { background: rgba(255,255,255,0.015); }
tbody tr:hover td { background: var(--surface-hover); }
.card table { margin-top: 2px; }

/* ============ Pills / status ============ */
.pill { display: inline-flex; align-items: center; gap: 5px;
        padding: 3px 10px; border-radius: var(--radius-pill);
        font-size: 11px; font-weight: 650; letter-spacing: 0.3px; }
.pill.ok    { background: rgba(56,213,155,0.14); color: var(--emerald);
              border: 1px solid rgba(56,213,155,0.4); }
.pill.warn  { background: rgba(245,184,92,0.14); color: var(--amber);
              border: 1px solid rgba(245,184,92,0.4); }
.pill.err   { background: rgba(255,114,128,0.14); color: var(--coral);
              border: 1px solid rgba(255,114,128,0.4); }
.pill.info  { background: rgba(52,190,244,0.14); color: var(--cyan);
              border: 1px solid rgba(52,190,244,0.4); }
.pill.muted { background: var(--surface-3); color: var(--text-3);
              border: 1px solid var(--stroke-soft); }
.pill.gold  { background: rgba(233,188,97,0.14); color: var(--gold-light);
              border: 1px solid rgba(233,188,97,0.4); }

/* ============ Banners ============ */
.banner { padding: 11px 15px; border-radius: var(--radius-control);
          margin: 0 0 var(--space-grid); font-size: 12px; }
.banner.err { background: rgba(255,114,128,0.10); color: var(--coral);
              border: 1px solid rgba(255,114,128,0.30); }
.banner.ok  { background: rgba(56,213,155,0.10); color: var(--emerald);
              border: 1px solid rgba(56,213,155,0.30); }
.banner.warn{ background: rgba(245,184,92,0.10); color: var(--amber);
              border: 1px solid rgba(245,184,92,0.30); }
.banner.warn button { margin-left: 10px; padding: 2px 10px; font-size: 11px; }

/* ============ Auth gate ============ */
.ac-auth-gate { display: grid; place-items: center;
                min-height: calc(100vh - var(--header-height));
                padding: 24px; }
.ac-auth-card { width: 100%; max-width: 440px;
                background: linear-gradient(155deg, var(--surface-2), var(--surface-1) 82%);
                border: 1px solid var(--stroke);
                border-radius: var(--radius-card);
                padding: 24px;
                box-shadow: var(--shadow-lifted); }
.ac-auth-card h2 { margin: 0 0 8px; color: var(--text-1);
                   font-size: 17px; font-weight: 650; }
.ac-auth-card button { width: 100%; margin-top: 16px; }

/* ============ Code block ============ */
.code-block { background: var(--code-bg); color: var(--code-fg);
              padding: 14px 16px; border-radius: var(--radius-control);
              font-family: var(--font-mono); font-size: 12px;
              word-break: break-all; border: 1px solid var(--stroke); }

/* ============ Toolbar / filters ============ */
.toolbar { display: flex; justify-content: space-between; align-items: center;
           gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters input, .filters select { width: auto; padding: 7px 11px; font-size: 12px; }

/* ============ Seat utilization bar ============ */
.seat-bar { display: inline-block; vertical-align: middle;
            width: 80px; height: 6px; background: rgba(0,0,0,0.3);
            border-radius: var(--radius-pill); overflow: hidden; margin-right: 6px; }
.seat-bar-fill { height: 100%; transition: width 220ms ease;
                 border-radius: var(--radius-pill); }

/* ============ System Health panel ============ */
.sys-health-panel { display: flex; flex-direction: column; gap: 10px; }
.sys-row {
  display: grid; grid-template-columns: 44px 1fr auto auto;
  gap: 14px; align-items: center;
  padding: 13px 16px;
  background: var(--surface-3);
  border: 1px solid var(--stroke-soft);
  border-radius: 10px;
  transition: background 180ms ease, border-color 180ms ease, transform 100ms ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.sys-row:hover { background: var(--surface-hover); border-color: var(--stroke); }
.sys-row-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(233,188,97,0.13);
  border: 1px solid rgba(233,188,97,0.4);
  box-shadow: 0 0 12px rgba(233,188,97,0.18);
  display: grid; place-items: center; font-size: 17px; color: var(--gold);
}
.sys-row-body { display: flex; flex-direction: column; gap: 3px; }
.sys-row-name { font-size: 14px; font-weight: 650; color: var(--text-1); }
.sys-row-desc { font-size: 12px; color: var(--text-3); }
.sys-row-meta { font-size: 12px; color: var(--text-3);
                text-align: right; display: flex; flex-direction: column; gap: 2px; }

/* ============ Scrim + mobile ============ */
.ac-scrim { display: none; position: fixed;
            top: var(--header-height); left: 0; right: 0; bottom: 0;
            background: rgba(0, 0, 0, 0.5); z-index: 5; }
.ac-menu-btn { display: none; }

@media (max-width: 960px) {
  .ac-shell { grid-template-columns: 1fr; }
  .ac-sidebar { position: fixed;
                top: var(--header-height); left: -100%;
                width: var(--sidebar-width); z-index: 6;
                transition: left 180ms ease; }
  .ac-shell.sidebar-open .ac-sidebar { left: 0; }
  .ac-shell.sidebar-open .ac-scrim { display: block; }
  .ac-menu-btn { display: grid; }
  .ac-main { padding: 16px; }
  .ac-main h1 { font-size: 22px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .filters { width: 100%; }
}

/* ============ Row utility ============ */
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
       gap: 12px; }

/* ============ Loading skeletons ============ */
.skeleton {
  background: linear-gradient(90deg,
    var(--surface-2) 0%,
    var(--surface-hover) 50%,
    var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.4s ease-in-out infinite;
  border-radius: 6px;
  display: inline-block;
  color: transparent !important;
  pointer-events: none;
}
.skeleton-line { height: 14px; width: 100%; margin: 4px 0; }
.skeleton-value { height: 28px; width: 60%; margin-top: 8px; }
.skeleton-label { height: 10px; width: 40%; }
.skeleton-bar { height: 5px; width: 100%; margin-top: 4px; }
.skeleton-row td { height: 32px; }
.skeleton-row td::before { content: ''; display: block; height: 14px;
                           background: var(--surface-hover); border-radius: 4px;
                           animation: skeleton-wave 1.4s ease-in-out infinite;
                           background-size: 200% 100%;
                           background-image: linear-gradient(90deg,
                             var(--surface-2) 0%, var(--surface-hover) 50%, var(--surface-2) 100%); }
@keyframes skeleton-wave {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton, .skeleton-row td::before { animation: none; }
}

/* ============ Toast notifications ============ */
.toast-stack {
  position: fixed; top: 80px; right: 20px; z-index: 100;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
  max-width: 420px;
}
.toast {
  pointer-events: auto;
  background: linear-gradient(155deg, var(--surface-2), var(--surface-1) 82%);
  border: 1px solid var(--stroke);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius-card);
  padding: 14px 16px 14px 18px;
  box-shadow: var(--shadow-lifted);
  display: grid; grid-template-columns: 28px 1fr auto; gap: 12px;
  align-items: start;
  min-width: 280px;
  animation: toast-in 240ms cubic-bezier(.2,.9,.3,1.2);
  transform-origin: right center;
}
.toast.leaving { animation: toast-out 220ms ease-in forwards; }
.toast.success { border-left-color: var(--emerald); }
.toast.warn    { border-left-color: var(--amber); }
.toast.error   { border-left-color: var(--coral); }
.toast.info    { border-left-color: var(--cyan); }
.toast-icon {
  width: 24px; height: 24px; border-radius: 6px;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 700;
  background: rgba(52,190,244,0.14); color: var(--cyan);
}
.toast.success .toast-icon { background: rgba(56,213,155,0.14); color: var(--emerald); }
.toast.warn    .toast-icon { background: rgba(245,184,92,0.14); color: var(--amber); }
.toast.error   .toast-icon { background: rgba(255,114,128,0.14); color: var(--coral); }
.toast-body { min-width: 0; }
.toast-title { font-size: 13px; font-weight: 700; color: var(--text-1); margin: 0 0 2px; }
.toast-msg { font-size: 12px; color: var(--text-2); word-wrap: break-word; line-height: 1.4; }
.toast-close {
  background: transparent; border: 0; color: var(--text-3);
  font-size: 18px; cursor: pointer; line-height: 1;
  padding: 0 4px; align-self: start;
}
.toast-close:hover { color: var(--text-1); }
@keyframes toast-in {
  0% { transform: translateX(120%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes toast-out {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}

/* ============ Command palette (Ctrl/⌘+K) ============ */
.cmd-palette-overlay {
  position: fixed; inset: 0; background: rgba(5, 13, 25, 0.65);
  backdrop-filter: blur(4px); z-index: 90;
  display: grid; place-items: start center; padding-top: 12vh;
}
.cmd-palette {
  width: 100%; max-width: 560px;
  background: linear-gradient(155deg, var(--surface-2), var(--surface-1) 82%);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  box-shadow: var(--shadow-lifted);
  overflow: hidden;
}
.cmd-input { width: 100%; padding: 16px 18px; font-size: 15px;
             background: transparent; border: 0; border-bottom: 1px solid var(--stroke-soft);
             color: var(--text-1); outline: none; font-family: inherit; }
.cmd-list { max-height: 360px; overflow-y: auto; padding: 6px; }
.cmd-row {
  display: grid; grid-template-columns: 28px 1fr auto;
  gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  font-size: 13px; color: var(--text-2);
}
.cmd-row:hover, .cmd-row.cmd-selected {
  background: rgba(233,188,97,0.10); color: var(--gold-light);
}
.cmd-row.cmd-selected .cmd-icon { color: var(--gold); }
.cmd-icon { width: 22px; height: 22px; display: inline-flex;
            align-items: center; justify-content: center; }
.cmd-icon svg { width: 16px; height: 16px; }
.cmd-group { font-size: 10px; letter-spacing: 1px; color: var(--text-3);
             font-weight: 700; padding: 10px 14px 4px; text-transform: uppercase; }
.cmd-hint { font-size: 11px; color: var(--text-3); }
.cmd-foot { padding: 10px 16px; border-top: 1px solid var(--stroke-soft);
            display: flex; justify-content: space-between; font-size: 11px;
            color: var(--text-3); font-family: var(--font-mono); }
kbd.kbd {
  font-family: var(--font-mono); font-size: 10px;
  background: var(--surface-3); color: var(--text-2);
  border: 1px solid var(--stroke); border-bottom-width: 2px;
  padding: 1px 6px; border-radius: 4px; margin: 0 2px;
}

/* ============ Leaflet theming ============ */
.leaflet-container { background: var(--canvas) !important; font-family: var(--font-sans); }
.leaflet-control-attribution {
  background: rgba(7,21,39,0.85) !important; color: var(--text-3) !important;
  padding: 2px 6px !important; font-size: 10px !important;
  border-top-left-radius: 4px !important;
}
.leaflet-control-attribution a { color: var(--cyan) !important; }
.leaflet-control-zoom a {
  background: var(--surface-2) !important;
  color: var(--text-1) !important;
  border: 1px solid var(--stroke) !important;
}
.leaflet-control-zoom a:hover { background: var(--surface-hover) !important; }
.leaflet-popup-content-wrapper {
  background: #F7FAFF !important; color: #0A1728 !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 32px rgba(0,0,0,0.5) !important;
}
.leaflet-popup-tip { background: #F7FAFF !important; }
.leaflet-popup-close-button { color: #4A5A74 !important; }
