:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --text: #172033;
  --muted: #667085;
  --border: #d9e0ea;
  --grid: rgba(23, 32, 51, .08);
  --brand: #2563eb;
  --brand-2: #16a34a;
  --shadow: 0 12px 30px rgba(31, 41, 55, .08);
}

[data-theme="dark"] {
  --bg: #111318;
  --surface: #181c23;
  --surface-2: #222833;
  --text: #edf2f7;
  --muted: #9aa4b2;
  --border: #2b3340;
  --grid: rgba(237, 242, 247, .08);
  --brand: #60a5fa;
  --brand-2: #22c55e;
  --shadow: 0 18px 40px rgba(0, 0, 0, .28);
}

html, body {
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
}

.app-navbar {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px);
}

.navbar-brand,
.nav-link,
h1,
h2,
h3,
.table {
  color: var(--text);
}

.nav-link.active {
  color: var(--brand) !important;
  font-weight: 700;
}

.form-control,
.form-select {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--brand);
  box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand) 20%, transparent);
}

.panel,
.metric,
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.dashboard-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.filters {
  display: flex;
  gap: 12px;
  min-width: min(520px, 100%);
}

.metric {
  padding: 20px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric span {
  color: var(--muted);
  font-size: .9rem;
}

.metric strong {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.metric.wide strong {
  color: var(--brand-2);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title h2 {
  font-size: 1rem;
  margin: 0;
}

.live-dot {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, .14);
}

.table > :not(caption) > * > * {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.table-heading {
  padding: 14px 16px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.metric-table {
  max-height: 292px;
}

.snippet {
  white-space: normal;
  word-break: break-all;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(130deg, rgba(37, 99, 235, .18), transparent 45%),
    linear-gradient(320deg, rgba(22, 163, 74, .16), transparent 42%),
    var(--bg);
}

.login-shell {
  width: min(1060px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1.2fr 420px;
  gap: 32px;
  align-items: center;
}

.login-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: .98;
  max-width: 760px;
}

.login-copy p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 620px;
}

.eyebrow {
  display: inline-block;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 14px;
}

.login-card {
  padding: 28px;
}

@media (max-width: 900px) {
  .login-shell,
  .dashboard-header {
    grid-template-columns: 1fr;
    display: grid;
  }

  .filters {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .filters {
    flex-direction: column;
  }

  main.container-fluid,
  .container-fluid {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}
