/* Admin top bar. Tokens come from base.css; only --topbar-h is admin-specific. */
:root {
  --topbar-h: 60px;
}

/* Console scrolls; the override page keeps base.css's locked map shell. */
html {
  height: auto;
}

body:not(.override-body) {
  height: auto;
  overflow: auto;
}

/* base.css sizes buttons to 100%; admin buttons size to content. */
button {
  width: auto;
}

/* base.css .btn-subtle is a full-width dashed panel action; admin uses it inline. */
.btn-subtle {
  width: auto;
  margin-top: 0;
  border-style: solid;
  color: var(--ink);
}

.auth-form button {
  width: 100%;
}

/* Login card panel (admin-override has no .card rule of its own). */
.auth-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 18px;
}

/* Action row shared by both admin pages. */
.override-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.override-actions .btn,
.override-actions button {
  flex: 1 1 auto;
  font-size: 13px;
}

/* ---------- Top bar (matches the app's desktop chrome) ---------- */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 var(--sp-4);
  background: var(--topbar-bg);
  color: var(--topbar-fg);
  border-bottom: 1px solid var(--topbar-border);
  position: sticky;
  top: 0;
  z-index: 30;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Console buttons are monospace; the top bar uses Inter. */
.topbar .btn,
.topbar .topbar-nav-btn {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--topbar-fg);
  margin-right: 4px;
  min-width: 0;
}

.topbar-logo {
  width: auto;
  height: 26px;
}

.topbar-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.05;
}

.topbar-name {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--topbar-fg);
}

.topbar-tagline {
  font-size: 11px;
  color: var(--topbar-fg);
  opacity: 0.78;
  letter-spacing: 0.015em;
  margin-top: 1px;
  white-space: nowrap;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: var(--sp-3);
}

.topbar-nav-btn {
  height: 34px;
  padding: 0 var(--sp-3);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 8px;
  background: var(--topbar-btn-bg);
  color: var(--topbar-fg);
  border: 1px solid transparent;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-nav-btn:hover {
  background: var(--topbar-btn-hover);
}

.topbar-nav-btn.is-active {
  background: var(--topbar-btn-hover);
  font-weight: 600;
}

.topbar .header-icon,
.topbar svg {
  stroke: currentColor;
}

.topbar .btn,
.topbar .header-icon-btn {
  background: var(--topbar-btn-bg);
  border-color: transparent;
  color: var(--topbar-fg);
  box-shadow: none;
}

.topbar .btn:hover {
  background: var(--topbar-btn-hover);
  border-color: transparent;
}

.topbar .theme-toggle-btn {
  width: 34px;
  height: 34px;
  padding: 0;
}

/* Hidden while the login screen is showing (body.admin-locked). */
body.admin-locked .admin-topbar .admin-topbar-session {
  display: none;
}

/* Status colors (tokens, so they work in both themes). */
.status.is-ok {
  color: var(--ok);
}

.status.is-warn {
  color: #b26a00;
}

.status.is-error {
  color: var(--warn);
}

/* Theme anchors/placeholders (browser default blue is low-contrast in dark). */
a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-strong);
}

::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* Override map shell handles its own topbar offset. */
@media (max-width: 720px) {
  .topbar-tagline {
    display: none;
  }
}
