:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-alt: #f1efe7;
  --border: #e5e1d6;
  --text: #1f2a28;
  --text-muted: #64716d;
  --primary: #1f6f66;
  --primary-dark: #164f48;
  --primary-soft: #e3f1ee;
  --accent: #d98e4a;
  --danger: #b3454b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 28, 0.04), 0 4px 16px rgba(20, 30, 28, 0.06);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, #245e56 0%, #16403a 55%, #102e2a 100%);
}
.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  padding: 40px 32px;
}
.login-brand { font-size: 13px; letter-spacing: 0.08em; color: var(--primary); font-weight: 700; margin-bottom: 4px; text-transform: uppercase; }
.login-title { font-size: 22px; font-weight: 700; margin: 0 0 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 15px; background: var(--surface); color: var(--text);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 10px; border: none; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--primary); border: 1.5px solid var(--primary-soft); }
.error-text { color: var(--danger); font-size: 13px; margin-top: 10px; }

.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex-shrink: 0; color: #eef6f4; padding: 24px 20px;
  background: linear-gradient(180deg, #1a4d46 0%, #123833 100%);
}
.sidebar-brand { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.sidebar-sub { font-size: 12px; color: #a9c9c3; margin-bottom: 32px; }
.sidebar-logout {
  margin-top: 40px; background: transparent; border: 1px solid rgba(255,255,255,0.25);
  color: #dcece8; border-radius: 8px; padding: 8px 12px; font-size: 13px; cursor: pointer;
}
.sort-group { margin-top: 8px; }
.sort-label { font-size: 11px; color: #a9c9c3; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.sort-option {
  display: block; width: 100%; text-align: left; background: transparent; border: none;
  color: #dcece8; padding: 8px 10px; border-radius: 8px; font-size: 13px; cursor: pointer; margin-bottom: 2px;
}
.sort-option.active { background: rgba(255,255,255,0.12); color: #fff; font-weight: 700; }

.main { flex: 1; padding: 32px 40px; max-width: 1000px; }
.page-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.page-desc { color: var(--text-muted); margin: 0 0 28px; font-size: 13px; }

.facility-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; margin-bottom: 20px;
}
.facility-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.facility-card-name { font-size: 17px; font-weight: 700; }
.facility-card-code { font-size: 12px; color: var(--text-muted); }

.overall-block { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.score-badge {
  width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary-dark); font-weight: 700;
}
.score-badge .num { font-size: 24px; line-height: 1; }
.score-badge .unit { font-size: 10px; margin-top: 2px; }
.score-badge.muted { background: var(--surface-alt); color: var(--text-muted); }

.overall-breakdown { display: flex; gap: 16px; flex-wrap: wrap; }
.mini-score { font-size: 12px; color: var(--text-muted); }
.mini-score .val { font-weight: 700; color: var(--text); }
.mini-score .val.suppressed { color: var(--text-muted); font-weight: 400; }

.track-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .track-grid { grid-template-columns: 1fr; } }

.track-block { background: var(--surface-alt); border-radius: 10px; padding: 14px 16px; }
.track-block-title { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.track-block-score { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.track-block-score.suppressed { font-size: 13px; font-weight: 400; color: var(--text-muted); }

.category-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; }
.category-row .name { width: 100px; flex-shrink: 0; color: var(--text-muted); }
.category-row .bar-track { flex: 1; height: 6px; background: #e5e1d6; border-radius: 4px; overflow: hidden; }
.category-row .bar-fill { height: 100%; background: var(--primary); border-radius: 4px; }
.category-row .score-num { width: 32px; text-align: right; flex-shrink: 0; }
.category-row .suppressed-text { color: var(--text-muted); flex: 1; }

.empty-state { padding: 40px 24px; text-align: center; color: var(--text-muted); font-size: 14px; }
