/* ICE Reports Dashboard — internal tooling styles */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ice-blue:    #003087;
  --ice-blue-lt: #0056b3;
  --accent:      #00a3e0;
  --bg:          #f4f6f9;
  --surface:     #ffffff;
  --border:      #dce3ec;
  --text:        #1a2332;
  --text-muted:  #5a6a7e;
  --success:     #2ecc71;
  --warning:     #f39c12;
  --danger:      #e74c3c;
  --radius:      8px;
  --shadow:      0 2px 8px rgba(0,0,0,.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--ice-blue);
  color: #fff;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: .5rem; font-size: 1rem; }
.logo-ice  { font-weight: 800; font-size: 1.2rem; letter-spacing: .04em; }
.logo-sep  { opacity: .4; }
.logo-title { font-weight: 400; opacity: .9; }

.controls {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.controls label { font-size: .8rem; opacity: .8; }
.controls input {
  padding: .35rem .6rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 4px;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: .9rem;
  width: 90px;
}
.controls input::placeholder { color: rgba(255,255,255,.5); }
.controls button {
  padding: .35rem .9rem;
  border: none;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.controls button:hover { background: #008ec4; }

/* ── Dashboard ───────────────────────────────────────────────────────────── */
.dashboard {
  flex: 1;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ── KPI Cards ───────────────────────────────────────────────────────────── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--ice-blue);
}
.kpi-label  { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .4rem; }
.kpi-value  { font-size: 2.4rem; font-weight: 800; color: var(--ice-blue); line-height: 1; }
.kpi-sub    { font-size: .8rem; color: var(--text-muted); margin-top: .3rem; }

/* ── Charts ──────────────────────────────────────────────────────────────── */
.charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.4rem;
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.chart-card h2 {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.chart-wrap {
  position: relative;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chart-wrap canvas { max-height: 100%; }

.chart-error {
  margin-top: .6rem;
  font-size: .8rem;
  color: var(--danger);
  text-align: center;
}
.hidden { display: none; }

/* Loading shimmer */
.loading { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 1rem;
  font-size: .75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ── Version dropdown in dashboard header ─────────────────────────────────── */
.controls select {
  padding: .35rem .6rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 4px;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: .9rem;
  cursor: pointer;
}
.controls select option { background: var(--ice-blue); color: #fff; }
.controls-sep { font-size: .75rem; opacity: .55; }
