@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;800&display=swap');

:root {
  --bg: #0b1524;
  --surface: #132238;
  --text: #ebf4ff;
  --muted: #9fb4cb;
  --border: rgba(187, 212, 239, 0.2);
  --measure: rgba(86, 180, 233, 1);
  --measure-fill: rgba(86, 180, 233, 0.12);
  --avg: rgba(230, 159, 0, 1);
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f4f7fb;
  --text: #333333;
  --muted: #4b5d73;
  --border: rgba(42, 107, 164, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Roboto', Inter, Segoe UI, Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, #17365f 0%, transparent 32%),
    radial-gradient(circle at 90% 10%, #164d48 0%, transparent 28%),
    linear-gradient(180deg, #0c1421 0%, var(--bg) 100%);
  color: var(--text);
  scrollbar-width: none;
}

:root[data-theme="light"] body {
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
}

body::-webkit-scrollbar {
  display: none;
}

.target-layout {
  max-width: 1200px;
  margin: 0 auto 84px;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.target-head {
  background: linear-gradient(180deg, rgba(19, 34, 56, 0.88), rgba(12, 24, 40, 0.88));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

:root[data-theme="light"] .target-head,
:root[data-theme="light"] .target-kpi-card,
:root[data-theme="light"] .target-chart-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 252, 0.98));
}

.target-head h1 {
  margin: 6px 0;
}

.target-head p {
  margin: 0;
  color: var(--muted);
}

.target-kpi-card,
.target-chart-card {
  background: linear-gradient(180deg, rgba(19, 34, 56, 0.88), rgba(12, 24, 40, 0.88));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.target-kpi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.kpi-label {
  margin: 0;
  color: var(--muted);
}

.kpi {
  margin: 6px 0 2px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hidden {
  display: none !important;
}

.updated {
  margin: 0;
  color: var(--muted);
}

.target-chart-card h2 {
  margin: 0 0 8px;
}

.target-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.target-chart-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.target-range-select {
  border: 1px solid rgba(148, 188, 226, 0.35);
  background: rgba(18, 35, 55, 0.92);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.9rem;
}

:root[data-theme="light"] .target-range-select {
  background: #ffffff;
  color: var(--text);
  border-color: rgba(42, 107, 164, 0.4);
}

.target-chart-wrap {
  height: clamp(220px, 40vh, 420px);
}

body.has-occupancy-chart .target-chart-wrap {
  height: clamp(170px, 24vh, 280px);
}

.target-chart {
  width: 100%;
  height: 100% !important;
  display: block;
}

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 14, 25, 0.96);
  color: #deebf8;
  padding: 8px 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.92rem;
}

:root[data-theme="light"] .site-footer {
  background: #333333;
  color: #ffffff;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #deebf8;
}

:root[data-theme="light"] .site-footer a {
  color: #ffffff;
}

@media (min-width: 760px) {
  body.has-occupancy-kpi .target-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
