:root {
  color-scheme: light;
  --bg: #eef8fb;
  --ink: #0f172a;
  --muted: #64748b;
  --card: rgba(255, 255, 255, 0.9);
  --line: rgba(15, 23, 42, 0.12);
  --cyan: #06b6d4;
  --blue: #2563eb;
  --violet: #7c3aed;
  --green: #059669;
  --amber: #d97706;
  --rose: #e11d48;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.24), transparent 30rem),
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.16), transparent 34rem),
    linear-gradient(180deg, #f8fdff 0%, var(--bg) 100%);
}

a {
  color: inherit;
}

.page {
  width: min(1480px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: 0;
  line-height: 1.05;
}

.subtle {
  color: var(--muted);
  line-height: 1.6;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.report-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.report-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 16px;
  color: var(--muted);
  font-weight: 850;
  text-decoration: none;
}

.report-menu a.active {
  color: #075985;
  background: rgba(6, 182, 212, 0.16);
  box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.22);
}

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
button {
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font: inherit;
}

input {
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.82);
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  color: white;
  font-weight: 800;
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  cursor: pointer;
  text-decoration: none;
}

.grid {
  display: grid;
  gap: 16px;
}

.kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0;
}

.two {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  background: var(--card);
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(16px);
}

.metric {
  min-height: 138px;
}

.metric strong {
  display: block;
  margin: 12px 0 6px;
  font-size: 34px;
  line-height: 1;
}

.metric span,
.card-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status.ok {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(5, 150, 105, 0.22);
}

.status.warn {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(217, 119, 6, 0.24);
}

.status.bad {
  color: #be123c;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(225, 29, 72, 0.22);
}

.chart-card {
  min-height: 360px;
}

.chart-wrap {
  position: relative;
  height: 280px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.09);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.right {
  text-align: right;
}

.login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login .card {
  width: min(430px, 100%);
}

.error {
  margin: 14px 0;
  color: var(--rose);
  font-weight: 700;
}

.note {
  padding: 14px 16px;
  border-radius: 18px;
  color: #075985;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.18);
}

@media (max-width: 980px) {
  .topbar,
  .two,
  .three,
  .kpis {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }
}

@media print {
  .filters,
  .button {
    display: none;
  }

  body {
    background: white;
  }

  .card,
  .topbar {
    box-shadow: none;
  }
}
