:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbfd;
  --text: #102033;
  --muted: #5d6b7e;
  --line: #dce5ef;
  --primary: #1f5eff;
  --primary-strong: #1947c2;
  --accent: #0e9f6e;
  --warning: #c68600;
  --danger: #c03c3c;
  --shadow: 0 18px 50px rgba(17, 38, 64, 0.08);
  --radius: 16px;
}

html, body {
  background:
    radial-gradient(circle at top left, rgba(31, 94, 255, 0.08), transparent 28%),
    radial-gradient(circle at right top, rgba(14, 159, 110, 0.08), transparent 24%),
    var(--bg);
  color: var(--text);
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(244, 247, 251, 0.84);
  border-bottom: 1px solid rgba(220, 229, 239, 0.9);
}

.eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.app-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-link-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(220, 229, 239, 0.95);
  box-shadow: 0 6px 18px rgba(17, 38, 64, 0.04);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.nav-link-item:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 94, 255, 0.28);
  background: #fff;
  color: var(--text);
}

.nav-link-item.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  border-color: transparent;
}

.nav-link-item.danger {
  color: var(--danger);
}

.surface {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(220, 229, 239, 0.96);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  padding: 1.4rem;
}

.hero-title {
  font-size: clamp(1.5rem, 2vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.hero-subtitle {
  color: var(--muted);
  max-width: 70ch;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.metric {
  grid-column: span 3;
  padding: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.metric-label {
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 0.35rem;
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.metric-meta {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.panel {
  padding: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel + .panel {
  margin-top: 1rem;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  text-decoration: none;
  color: var(--text);
  font-size: 0.92rem;
}

.filter-chip.active {
  background: rgba(31, 94, 255, 0.12);
  border-color: rgba(31, 94, 255, 0.25);
  color: var(--primary-strong);
  font-weight: 600;
}

.soft-table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
}

.soft-table thead th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
}

.soft-table tbody tr:hover {
  background: rgba(31, 94, 255, 0.035);
}

.status-select {
  min-width: 180px;
}

.badge-soft {
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-weight: 600;
}

.chart-wrap {
  min-height: 320px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-card {
  width: min(440px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(220, 229, 239, 0.96);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border-color: transparent;
}

.btn-outline-primary {
  border-color: rgba(31, 94, 255, 0.28);
  color: var(--primary-strong);
}

.btn-outline-primary:hover {
  background: rgba(31, 94, 255, 0.08);
  color: var(--primary-strong);
}

.table-responsive {
  border-radius: 14px;
}

@media (max-width: 992px) {
  .metric {
    grid-column: span 6;
  }
}

@media (max-width: 576px) {
  .metric {
    grid-column: span 12;
  }

  .app-nav {
    width: 100%;
  }

  .nav-link-item {
    flex: 1 1 auto;
    justify-content: center;
  }
}
