* {
  box-sizing: border-box;
}


html, body {
  margin: 0;
  padding: 0;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 125, 48, 0.26), transparent 35%),
    radial-gradient(circle at 90% 18%, rgba(45, 173, 184, 0.22), transparent 28%),
    linear-gradient(160deg, #0b0f17 0%, #090c12 45%, #070a10 100%);
  padding: 28px clamp(14px, 3vw, 36px) 48px;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

body.modal-open {
  overflow: hidden;
}

:root.light-theme body {
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 125, 48, 0.08), transparent 35%),
    radial-gradient(circle at 90% 18%, rgba(45, 173, 184, 0.08), transparent 28%),
    linear-gradient(160deg, #f9fbfd 0%, #f5f7fa 45%, #f0f3f7 100%);
}

.bg-orb {
  position: fixed;
  z-index: 0;
  width: min(38vw, 430px);
  height: min(38vw, 430px);
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.3;
  pointer-events: none;
}

.bg-orb-a {
  top: -12%;
  right: -6%;
  background: #d9662a;
  animation: drift-a 16s ease-in-out infinite alternate;
}

.bg-orb-b {
  bottom: -16%;
  left: -5%;
  background: #1d7688;
  animation: drift-b 18s ease-in-out infinite alternate;
}

.topbar,
main {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.topbar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  color: var(--ink);
  background: rgba(9, 12, 18, 0.45);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.topbar-nav-link:hover {
  background: var(--line);
  border-color: rgba(148, 163, 184, 0.45);
}

.topbar-nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.topbar-nav-link[aria-current="page"] {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: linear-gradient(135deg, rgba(255, 122, 47, 0.18), rgba(42, 183, 191, 0.1));
  font-weight: 600;
}

:root.light-theme .topbar-nav-link {
  background: rgba(255, 255, 255, 0.8);
}

:root.light-theme .topbar-nav-link[aria-current="page"] {
  background: linear-gradient(135deg, rgba(255, 122, 47, 0.14), rgba(42, 183, 191, 0.08));
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 6px;
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3.8vw, 2.85rem);
  line-height: 1.1;
}

.meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background:
    linear-gradient(135deg, rgba(255, 122, 47, 0.14), rgba(42, 183, 191, 0.10)),
    var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 8px 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  font-size: 0.88rem;
  line-height: 1.1;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.meta.status-jump-enabled {
  cursor: pointer;
  user-select: none;
}

.meta.status-jump-enabled:hover {
  border-color: rgba(38, 185, 109, 0.5);
  transform: translateY(-1px);
}

.meta.status-jump-enabled:focus-visible {
  outline: 2px solid rgba(38, 185, 109, 0.65);
  outline-offset: 2px;
}

#meta {
  gap: 10px;
}

.meta-icon {
  opacity: 0.9;
  filter: saturate(0.95);
}

.meta-label {
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.meta-value {
  color: var(--ink);
  font-weight: 600;
}

.meta-value--mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(229, 120, 61, 0.18);
}

.status-dot.warn {
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(229, 120, 61, 0.18);
}

.status-dot.ok {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(32, 154, 94, 0.2);
  animation: breathe 2.5s ease-in-out infinite;
}

.status-dot.error {
  background: var(--error);
  box-shadow: 0 0 0 4px rgba(255, 77, 79, 0.22);
  animation: none;
}

.controls-row {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 14px;
  justify-content: space-between;
}

.search-row {
  margin-bottom: 12px;
  display: flex;
  width: 100%;
}

.main-search-group {
  width: min(460px, 100%);
}

.main-search-group .search-input-wrap,
.main-search-group .search-input-wrap input {
  width: 100%;
}

/* Dashboard utility: Back to top */
.back-to-top {
  position: fixed;
  right: clamp(12px, 2vw, 18px);
  bottom: clamp(12px, 2vw, 18px);
  z-index: 900;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  backdrop-filter: blur(10px);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, opacity 140ms ease;
  opacity: 0.92;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(255, 203, 72, 0.55);
  opacity: 1;
}

body.filters-open .back-to-top {
  display: none;
}

