/* NPIC Water Management Website — main.css */
/* Color palette: deep blue (#1a3a5c), water blue (#2c6fad), light blue (#d6e8f7), green (#2d6a2d) */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #222;
  background: #f7f9fc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: #2c6fad; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ──────────────────────────────────────────────────────── */
.site-header {
  background: #1a3a5c;
  color: #fff;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo-link { color: #fff; text-decoration: none; }
.logo-block { display: flex; align-items: baseline; gap: 10px; }
.logo-abbr { font-size: 22px; font-weight: 800; letter-spacing: 2px; color: #7fc8f8; }
.logo-full  { font-size: 13px; color: #b8d4e8; display: none; }
@media (min-width: 700px) { .logo-full { display: inline; } }

.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  color: #cde;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  transition: background 0.15s;
}
.main-nav a:hover { background: rgba(255,255,255,0.15); color: #fff; text-decoration: none; }
.main-nav .nav-highlight {
  background: #2c6fad;
  color: #fff;
  font-weight: 600;
}
.main-nav .nav-active {
  background: #d6e8f7;
  color: #1a3a5c;
  font-weight: 600;
}
.nav-logout {
  background: transparent;
  border: 1px solid #7fc8f8;
  color: #7fc8f8;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
}
.nav-logout:hover { background: rgba(255,255,255,0.1); }

/* ── Main ────────────────────────────────────────────────────────── */
.site-main { flex: 1; max-width: 1200px; margin: 0 auto; width: 100%; padding: 24px 16px; }

/* ── Flash messages ──────────────────────────────────────────────── */
.flash-container { margin-bottom: 16px; }
.flash { padding: 10px 16px; border-radius: 6px; margin-bottom: 8px; font-size: 14px; }
.flash-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.flash-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ── Page header ─────────────────────────────────────────────────── */
.page-header { margin-bottom: 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-size: 26px; color: #1a3a5c; flex: 1; }
.page-sub { color: #666; font-size: 14px; width: 100%; margin-top: -8px; }
.stale-warning { background: #fff3cd; color: #856404; border: 1px solid #ffc107; padding: 8px 14px; border-radius: 6px; font-size: 13px; }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1a3a5c 0%, #2c6fad 100%);
  color: #fff;
  padding: 56px 32px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 32px;
}
.hero h1 { font-size: 32px; margin-bottom: 10px; }
.hero-sub { font-size: 16px; color: #b8d4e8; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #ccc;
  background: #fff;
  color: #333;
  text-decoration: none;
  transition: all 0.15s;
}
.btn:hover { background: #f0f0f0; text-decoration: none; }
.btn-primary { background: #2c6fad; color: #fff; border-color: #2c6fad; }
.btn-primary:hover { background: #1a5a96; }
.btn-danger { background: #c82333; color: #fff; border-color: #c82333; }
.btn-danger:hover { background: #a71d2a; }
.btn-secondary { background: rgba(255,255,255,0.2); color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-secondary:hover { background: rgba(255,255,255,0.3); }
.btn-sm { padding: 4px 12px; font-size: 13px; }
.btn-full { width: 100%; text-align: center; }

/* ── Cards ───────────────────────────────────────────────────────── */
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-bottom: 32px; }
.card { background: #fff; border-radius: 10px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.card h2 { font-size: 18px; color: #1a3a5c; margin-bottom: 10px; }
.card-link { font-weight: 600; color: #2c6fad; }

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 24px; }
.dash-card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.dash-card h2 { font-size: 16px; color: #1a3a5c; margin-bottom: 12px; }
/* ── Water running pane ──────────────────────────────────────────── */
.running-block { margin-bottom: 8px; }
.running-header { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 8px; }
.active-dot { display: inline-block; width: 10px; height: 10px; background: #2e7d32; border-radius: 50%; flex-shrink: 0; animation: pulse 1.5s infinite; }
.running-note { font-size: 12px; color: #666; margin-top: 8px; line-height: 1.5; }
.card-divider { border: none; border-top: 1px solid #eee; margin: 12px 0; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
/* ── Announcements strip ─────────────────────────────────────────── */
.announcements-strip { background: #fff8e1; border: 1px solid #ffe082; border-radius: 8px; padding: 14px 18px; margin-bottom: 20px; }
.announcements-strip strong { font-size: 13px; color: #5d4037; display: block; margin-bottom: 8px; }
.ann-item { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; border-bottom: 1px solid #fff3cd; font-size: 14px; }
.ann-item:last-child { border-bottom: none; }
.ann-subject { color: #3e2723; }
.ann-date { font-size: 12px; color: #8d6e63; }

.balance-inline { margin-bottom: 12px; }
.bi-row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.bi-row:last-child { border-bottom: none; }
.bi-sub { color: #888; font-size: 13px; }
.bi-total { font-size: 15px; border-top: 2px solid #e0e0e0; border-bottom: 2px solid #e0e0e0; padding: 6px 0; margin: 2px 0; }
.bi-remaining { font-size: 15px; margin-top: 4px; border-top: 2px solid #e0e0e0; border-bottom: none; padding-top: 8px; }
.bi-green strong { color: #2e7d32; }
.bi-yellow strong { color: #e65100; }
.bi-red strong { color: #c62828; }

/* ── Stats ───────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: #fff; border-radius: 10px; padding: 20px 16px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.stat-num { font-size: 36px; font-weight: 700; color: #2c6fad; }
.stat-label { font-size: 13px; color: #666; margin-top: 4px; }
.stat-alert .stat-num { color: #c82333; }

.admin-nav-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 28px; }
.admin-nav-card { background: #fff; border: 2px solid #d6e8f7; border-radius: 8px; padding: 16px; text-align: center; font-weight: 600; color: #1a3a5c; font-size: 15px; transition: all 0.15s; }
.admin-nav-card:hover { background: #d6e8f7; text-decoration: none; }

/* ── Tables ──────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 20px; }
.data-table th { background: #1a3a5c; color: #fff; padding: 10px 14px; text-align: left; font-size: 13px; font-weight: 600; }
.data-table td { padding: 9px 14px; border-bottom: 1px solid #eef; font-size: 14px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: #f8faff; }
.data-table tr:hover td { background: #eef4ff; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-table th { background: #f0f4f8; color: #333; padding: 6px 10px; font-size: 12px; }
.mini-table td { padding: 6px 10px; border-bottom: 1px solid #eee; }
.stale-row td { color: #856404; }
.empty-state { color: #999; font-style: italic; padding: 16px; text-align: center; }

/* ── Status badges ───────────────────────────────────────────────── */
.status-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.status-pending   { background: #fff3cd; color: #856404; }
.status-approved  { background: #d4edda; color: #155724; }
.status-active    { background: #cce5ff; color: #004085; }
.status-delivered { background: #d1ecf1; color: #0c5460; }
.status-cancelled { background: #f8d7da; color: #721c24; }
.badge-ok    { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; background: #d4edda; color: #155724; font-weight: 600; }
.badge-stale { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; background: #fff3cd; color: #856404; font-weight: 600; }
.role-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: #d6e8f7; color: #1a3a5c; }
.role-superadmin { background: #1a3a5c; color: #fff; }
.role-admin { background: #2c6fad; color: #fff; }

/* ── Tab bar ─────────────────────────────────────────────────────── */
.tab-bar { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { padding: 6px 14px; border-radius: 6px; font-size: 13px; background: #eef; color: #333; cursor: pointer; }
.tab-active { background: #2c6fad; color: #fff; font-weight: 600; }
.tab:hover { background: #d6e8f7; }

/* ── Reservoir cards ─────────────────────────────────────────────── */
.status-section { margin-bottom: 36px; }
.status-section h2 { color: #1a3a5c; font-size: 20px; margin-bottom: 14px; }
.reservoir-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.reservoir-card { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 2px 6px rgba(0,0,0,0.07); }
.reservoir-card h3 { font-size: 13px; color: #555; margin-bottom: 8px; }
.fill-bar-wrap { background: #e8f0f8; border-radius: 4px; height: 10px; margin-bottom: 8px; overflow: hidden; }
.fill-bar { background: linear-gradient(90deg, #2c6fad, #7fc8f8); height: 100%; border-radius: 4px; transition: width 0.5s; }
.res-stats { display: flex; justify-content: space-between; font-size: 13px; }
.res-fill { font-weight: 700; color: #2c6fad; }
.res-storage { color: #666; }
.res-date { font-size: 11px; color: #999; margin-top: 4px; }
.reservoir-admin-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.07); margin-bottom: 16px; }
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.inline-form input { padding: 5px 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; }

/* ── Feed/gauge cards (system-status) ───────────────────────────── */
.gauge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.gauge-card, .reservoir-card.card-stale { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 2px 6px rgba(0,0,0,0.07); }
.card-stale { opacity: 0.85; border-left: 4px solid #ffc107; }
.card-status-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.card-label { font-size: 14px; font-weight: 700; color: #1a3a5c; }
.card-sublabel { font-size: 12px; color: #666; margin: 0 0 10px; line-height: 1.4; }
.gauge-value { font-size: 22px; font-weight: 300; margin: 10px 0 8px; color: #1a3a5c; }
.gauge-num { font-weight: 700; }
.gauge-unit { font-size: 14px; color: #555; }
.gauge-max { font-size: 13px; color: #888; }
/* Range bar — shows where current CFS falls between seasonal low and high */
.range-bar-wrap { margin: 6px 0 4px; }
.range-bar-track { position: relative; background: linear-gradient(90deg, #d4edda, #fff3cd, #f8d7da); border-radius: 4px; height: 10px; }
.range-needle { position: absolute; top: -3px; width: 4px; height: 16px; background: #1a3a5c; border-radius: 2px; transform: translateX(-50%); }
.range-labels { display: flex; justify-content: space-between; font-size: 10px; color: #888; margin-top: 3px; }
.range-context { font-size: 12px; color: #555; margin: 4px 0 0; }
.range-below { color: #856404; }
.range-above { color: #155724; font-weight: 600; }
/* Fill bar color variants */
.fill-bar-low  { background: linear-gradient(90deg, #c82333, #f06050) !important; }
.fill-bar-mid  { background: linear-gradient(90deg, #e0a000, #ffd060) !important; }
.fill-bar-high { background: linear-gradient(90deg, #28a745, #7fc87f) !important; }
.no-data { color: #aaa; font-style: italic; font-size: 13px; }
.feed-note { font-size: 11px; color: #888; margin: 6px 0 0; border-top: 1px solid #f0f0f0; padding-top: 6px; line-height: 1.4; }

/* ── Water Sources page ──────────────────────────────────────────── */
/* Season banner */
.ws-season-banner { background: linear-gradient(135deg, #1a3a5c 0%, #2c6fad 100%); color: #fff; border-radius: 10px; padding: 20px 24px; margin-bottom: 28px; }
.ws-banner-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.7); margin-bottom: 12px; }
.ws-banner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.ws-banner-item { text-align: center; }
.ws-banner-num { font-size: 28px; font-weight: 700; color: #fff; line-height: 1.1; }
.ws-banner-label { font-size: 11px; color: rgba(255,255,255,0.8); margin-top: 4px; line-height: 1.4; }
.ws-banner-date .ws-banner-num { font-size: 22px; }
.ws-banner-warn { color: #fca5a5 !important; }
/* Callout boxes */
.ws-callout { background: #eef5fb; border-left: 4px solid #2c6fad; padding: 14px 16px; border-radius: 0 6px 6px 0; margin: 0 0 18px; font-size: 13px; line-height: 1.6; color: #222; }
.ws-callout-rights { background: #f0f7f0; border-left-color: #2d6a2d; }
.ws-callout-note { background: #fff8ec; border-left-color: #c25a00; color: #333; }
.ws-callout-inline { background: #fff3cd; border: 1px solid #ffc107; border-radius: 4px; padding: 6px 10px; font-size: 11px; color: #856404; margin: 6px 0; }
/* Sub-headings within sections */
.ws-sub-heading { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #2c6fad; margin: 20px 0 8px; border-bottom: 1px solid #d6e8f7; padding-bottom: 4px; }
.ws-group-note { font-size: 12px; color: #666; margin: 0 0 12px; line-height: 1.5; }
/* NPIC allocation card */
.ws-allocation-card { background: #1a3a5c; color: #fff; border-radius: 8px; padding: 16px 20px; margin: 16px 0; }
.ws-alloc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; text-align: center; }
.ws-alloc-num { font-size: 24px; font-weight: 700; color: #7fc8f8; }
.ws-alloc-label { font-size: 11px; color: rgba(255,255,255,0.8); margin-top: 4px; line-height: 1.4; }
/* C-BT water path flow diagram */
.water-path { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 12px 0 20px; overflow-x: auto; }
.wp-node { background: #fff; border: 2px solid #d6e8f7; border-radius: 8px; padding: 8px 12px; text-align: center; min-width: 90px; flex-shrink: 0; }
.wp-node-title { font-size: 11px; font-weight: 700; color: #1a3a5c; }
.wp-node-sub { font-size: 9px; color: #888; margin-top: 2px; line-height: 1.3; }
.wp-west { border-color: #7fc8f8; background: #eef8ff; }
.wp-tunnel { background: #1a3a5c; border-color: #1a3a5c; }
.wp-tunnel .wp-node-title { color: #fff; }
.wp-tunnel .wp-node-sub { color: rgba(255,255,255,0.7); }
.wp-east { border-color: #2c6fad; background: #f0f6fb; }
.wp-npic { background: #2d6a2d; border-color: #2d6a2d; }
.wp-npic .wp-node-title { color: #fff; }
.wp-npic .wp-node-sub { color: rgba(255,255,255,0.7); }
.wp-arrow { font-size: 18px; color: #2c6fad; flex-shrink: 0; padding: 0 2px; }
/* Quota table highlight */
.ws-quota-table { margin-top: 8px; }
.ws-quota-current td { background: #fff3cd !important; font-weight: 600; }
/* Outlook section */
.ws-outlook-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 20px; }
.ws-outlook-card { background: #fff; border-radius: 8px; padding: 16px 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.07); }
.ws-outlook-card h3 { font-size: 13px; color: #1a3a5c; margin-bottom: 10px; }
.ws-outlook-card ul { list-style: disc; padding-left: 18px; font-size: 13px; line-height: 1.6; color: #333; }
.ws-outlook-card li { margin-bottom: 4px; }
.ws-link { display: inline-block; margin-top: 10px; font-size: 12px; color: #2c6fad; text-decoration: none; border-bottom: 1px solid #2c6fad; }
.ws-link:hover { color: #1a3a5c; }

/* ── Feed cards ──────────────────────────────────────────────────── */
.feed-card { background: #fff; border-radius: 8px; padding: 16px 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.06); margin-bottom: 12px; }
.feed-live { border-left: 4px solid #28a745; }
.feed-stale { border-left: 4px solid #ffc107; }
.feed-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.feed-header h3 { font-size: 15px; color: #1a3a5c; flex: 1; }
.feed-source-badge { background: #eef; color: #1a3a5c; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; }
.feed-stat { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; font-size: 14px; }
.feed-stat label { color: #888; font-size: 12px; min-width: 90px; }
.feed-error { color: #c82333; font-size: 13px; }

/* ── Auth forms ──────────────────────────────────────────────────── */
.auth-page { display: flex; justify-content: center; align-items: center; min-height: 60vh; }
.auth-card { background: #fff; border-radius: 12px; padding: 40px; box-shadow: 0 4px 20px rgba(0,0,0,0.12); width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 24px; color: #1a3a5c; margin-bottom: 6px; }
.auth-sub { color: #888; font-size: 13px; margin-bottom: 24px; }
.auth-form label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 4px; margin-top: 16px; }
.auth-form input { width: 100%; padding: 10px 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 15px; transition: border-color 0.15s; }
.auth-form input:focus { outline: none; border-color: #2c6fad; box-shadow: 0 0 0 3px rgba(44,111,173,0.15); }
.auth-form button { margin-top: 24px; }
.auth-help { text-align: center; font-size: 12px; color: #888; margin-top: 16px; }
.pw-field { position: relative; display: flex; align-items: center; }
.pw-field input { flex: 1; padding-right: 60px; }
.pw-toggle { position: absolute; right: 8px; background: none; border: none; color: #2c6fad; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 6px; margin-top: 0; }

/* ── Data forms ──────────────────────────────────────────────────── */
.form-page { background: #fff; border-radius: 10px; padding: 28px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); max-width: 800px; margin-bottom: 24px; }
.form-page h2 { font-size: 18px; color: #1a3a5c; margin-bottom: 20px; }
.data-form .form-group { margin-bottom: 16px; }
.data-form label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 5px; }
.data-form input, .data-form select, .data-form textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; font-family: inherit;
}
.data-form input:focus, .data-form select:focus, .data-form textarea:focus {
  outline: none; border-color: #2c6fad; box-shadow: 0 0 0 3px rgba(44,111,173,0.1);
}
.data-form small { display: block; color: #888; font-size: 12px; margin-top: 3px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: normal; cursor: pointer; margin-bottom: 6px; }
.checkbox-label input { width: auto; }
.card-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ── Balance display ─────────────────────────────────────────────── */
.balance-display { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-bottom: 24px; }
.balance-card { background: #fff; border-radius: 10px; padding: 24px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.balance-card label { display: block; font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.balance-number { font-size: 40px; font-weight: 700; color: #2c6fad; }
.balance-unit { font-size: 18px; font-weight: 400; color: #888; }
.balance-note { color: #888; font-size: 13px; margin-bottom: 20px; }
.page-actions { display: flex; gap: 12px; margin-top: 8px; }

/* ── Content body ────────────────────────────────────────────────── */
.content-body { background: #fff; border-radius: 10px; padding: 28px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.content-body h2 { color: #1a3a5c; font-size: 20px; margin: 24px 0 10px; }
.content-body h2:first-child { margin-top: 0; }
.content-body p, .content-body ul, .content-body address { margin-bottom: 14px; }
.content-body ul { padding-left: 24px; }
.content-body li { margin-bottom: 4px; }

/* ── Announcements ───────────────────────────────────────────────── */
.announcements-home { margin-top: 32px; }
.announcements-home h2 { color: #1a3a5c; margin-bottom: 16px; }
.announcement-item { background: #fff; border-radius: 8px; padding: 16px 20px; margin-bottom: 12px; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.announcement-item h3 { font-size: 16px; color: #1a3a5c; margin-bottom: 4px; }
.announcement-full { margin-bottom: 20px; }
.announcement-full h2 { color: #1a3a5c; margin-bottom: 6px; }
.ann-meta { color: #888; font-size: 12px; margin-bottom: 12px; }
.ann-body { white-space: pre-line; font-size: 15px; }

/* ── Detail grid ─────────────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.detail-card { background: #fff; border-radius: 10px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.detail-card h2 { font-size: 18px; color: #1a3a5c; margin-bottom: 16px; }
@media (max-width: 720px) { .detail-grid { grid-template-columns: 1fr; } }

/* ── Error page ──────────────────────────────────────────────────── */
.error-page { text-align: center; padding: 80px 20px; }
.error-page h1 { font-size: 36px; color: #1a3a5c; margin-bottom: 16px; }
.error-page p { color: #666; margin-bottom: 24px; }

/* ── Dashboard help ──────────────────────────────────────────────── */
.dash-help { font-size: 13px; color: #888; margin-top: 16px; }

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer { background: #1a3a5c; color: #b8d4e8; padding: 24px; margin-top: auto; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; font-size: 13px; }
.footer-col a { color: #7fc8f8; display: block; margin-bottom: 4px; }
.footer-right { text-align: right; }
@media (max-width: 600px) { .footer-inner { grid-template-columns: 1fr; } .footer-right { text-align: left; } }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero h1 { font-size: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .data-table { font-size: 13px; }
  .data-table th, .data-table td { padding: 7px 8px; }
}

/* ── Big link ────────────────────────────────────────────────────── */
.big-link { display: block; font-size: 18px; font-weight: 700; color: #2c6fad; margin: 12px 0; }

/* ── About page ──────────────────────────────────────────────────── */
.about-hero { margin-bottom: 28px; border-radius: 12px; overflow: hidden; position: relative; }
.about-hero-img { width: 100%; max-height: 340px; object-fit: cover; object-position: center 40%; display: block; }
.about-hero-caption { background: rgba(26,58,92,0.85); color: #b8d4e8; font-size: 12px; padding: 8px 16px; margin: 0; }

.about-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 32px; }
.about-stat { background: #fff; border-radius: 8px; padding: 16px 12px; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,0.07); }
.about-stat-num { font-size: 22px; font-weight: 700; color: #2c6fad; line-height: 1.2; }
.about-stat-label { font-size: 11px; color: #666; margin-top: 4px; }

.about-section { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 40px; align-items: start; }
.about-section-reverse { direction: rtl; }
.about-section-reverse > * { direction: ltr; }
.about-section-text h2 { color: #1a3a5c; font-size: 22px; margin-bottom: 12px; border-bottom: 2px solid #d6e8f7; padding-bottom: 6px; }
.about-section-text h3 { color: #2c6fad; font-size: 16px; margin: 14px 0 8px; }
.about-section-text p { margin-bottom: 10px; }
.about-section-text ul { margin: 8px 0 10px 20px; }
.about-section-text li { margin-bottom: 4px; }
.about-section-img img { width: 100%; border-radius: 8px; box-shadow: 0 3px 10px rgba(0,0,0,0.12); }
.about-section-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.about-section-imgs img { width: 100%; border-radius: 6px; }
.about-img-caption { font-size: 12px; color: #666; margin-top: 6px; font-style: italic; }

.about-infra-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 8px; }
.about-infra-gallery figure { margin: 0; }
.about-infra-gallery img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; }
.about-infra-gallery figcaption { font-size: 11px; color: #666; margin-top: 4px; text-align: center; }

.about-docs-section { background: #fff; border-radius: 10px; padding: 24px; margin-bottom: 32px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.about-docs-section h2 { color: #1a3a5c; font-size: 20px; margin-bottom: 16px; }
.doc-downloads { display: flex; flex-direction: column; gap: 12px; }
.doc-link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid #d6e8f7; border-radius: 8px; color: #222; transition: background 0.15s; text-decoration: none; }
.doc-link:hover { background: #f0f7ff; text-decoration: none; }
.doc-icon { font-size: 28px; flex-shrink: 0; }
.doc-info { display: flex; flex-direction: column; gap: 2px; }
.doc-info strong { color: #1a3a5c; font-size: 14px; }
.doc-info span { color: #666; font-size: 13px; }

.about-contact-section { background: #1a3a5c; color: #b8d4e8; border-radius: 10px; padding: 24px; margin-bottom: 24px; }
.about-contact-section h2 { color: #fff; font-size: 20px; margin-bottom: 16px; }
.about-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.about-contact-block { font-size: 14px; line-height: 1.7; }
.about-contact-block strong { color: #7fc8f8; display: block; margin-bottom: 2px; }
.about-contact-block a { color: #7fc8f8; }

@media (max-width: 700px) {
  .about-section, .about-section-reverse { grid-template-columns: 1fr; }
  .about-section-reverse { direction: ltr; }
  .about-section-imgs { grid-template-columns: 1fr; }
}

/* ── History page ────────────────────────────────────────────────── */
.history-intro { background: #fff; border-radius: 10px; padding: 20px 24px; margin-bottom: 32px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.history-intro p { margin-bottom: 8px; }
.history-source-note { font-size: 12px; color: #888; font-style: italic; margin-top: 8px; }

.history-era { margin-bottom: 48px; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.era-header { padding: 18px 24px; color: #fff; }
.era-header-1 { background: linear-gradient(135deg, #5a3a1a 0%, #8b5e2a 100%); }
.era-header-2 { background: linear-gradient(135deg, #1a3a5c 0%, #2c6fad 100%); }
.era-header-3 { background: linear-gradient(135deg, #2d5a2d 0%, #4a8a4a 100%); }
.era-header-4 { background: linear-gradient(135deg, #1a4a5c 0%, #2c8fad 100%); }
.era-header-5 { background: linear-gradient(135deg, #5c1a3a 0%, #8a2a5c 100%); }
.era-header-6 { background: linear-gradient(135deg, #3a1a5c 0%, #6a2cad 100%); }
.era-years { font-size: 13px; font-weight: 600; opacity: 0.85; display: block; margin-bottom: 2px; letter-spacing: 1px; text-transform: uppercase; }
.era-header h2 { font-size: 24px; margin: 0; }

.era-body { padding: 24px; }
.era-text p { margin-bottom: 12px; }
.era-text h3 { color: #1a3a5c; font-size: 17px; margin: 20px 0 8px; }
.era-text ul { margin: 8px 0 12px 20px; }
.era-text li { margin-bottom: 4px; }

.era-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #eee; }
.era-gallery figure { margin: 0; }
.era-gallery img { width: 100%; height: 160px; object-fit: cover; border-radius: 6px; transition: opacity 0.2s; }
.era-gallery img:hover { opacity: 0.9; }
.era-gallery figcaption { font-size: 11px; color: #555; margin-top: 5px; line-height: 1.4; }
.fc-credit { display: block; font-size: 10px; color: #999; font-style: italic; margin-top: 2px; }

.history-closing { background: #1a3a5c; color: #b8d4e8; border-radius: 12px; padding: 32px; margin-bottom: 24px; }
.history-closing h2 { color: #fff; font-size: 22px; margin-bottom: 16px; }
.history-closing p { margin-bottom: 12px; }
.history-mission { border-left: 4px solid #7fc8f8; margin: 20px 0; padding: 12px 20px; font-size: 16px; font-style: italic; color: #d6e8f7; background: rgba(255,255,255,0.05); border-radius: 0 6px 6px 0; }

@media (max-width: 600px) {
  .era-gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .era-gallery img { height: 120px; }
}

/* ── Home banner image ───────────────────────────────────────────── */
.home-banner-img { border-radius: 12px 12px 0 0; overflow: hidden; margin-bottom: 0; }
.home-banner-img img { width: 100%; height: 360px; object-fit: cover; object-position: center 60%; display: block; }
