/* ================================================================
   GOV LEDGER — Blue & Gold Design System
   Shashemene City Administration | Herrega Mootummaa
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700;900&family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --navy:         #0d2b55;
  --navy-mid:     #1a3a6b;
  --navy-light:   #24508f;
  --gold:         #c8a84b;
  --gold-bright:  #e0ba5a;
  --gold-pale:    #f5ecc8;
  --gold-border:  #a8883a;
  --bg:           #eef1f8;
  --bg-card:      #ffffff;
  --text:         #111827;
  --text-muted:   #546080;
  --border:       #cdd5e0;
  --success-bg:   #edf7f0;
  --success-text: #145a2e;
  --danger-bg:    #fceded;
  --danger-text:  #7a1a1a;
  --row-hover:    #f0f5ff;
}

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

body {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── MASTHEAD ─────────────────────────────────────────────── */
.gov-masthead {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, var(--navy-light) 100%);
  border-top: 4px solid var(--gold);
  border-bottom: 2px solid var(--gold-border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 3px 16px rgba(13,43,85,.35);
}
.gov-masthead .brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.gov-masthead .brand .seal {
  width: 48px; height: 48px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(200,168,75,.3);
}
.gov-masthead .brand-text h1 {
  font-family: 'Merriweather', serif;
  font-size: 16px;
  font-weight: 900;
  color: var(--gold-bright);
  line-height: 1.2;
  letter-spacing: .02em;
}
.gov-masthead .brand-text p {
  font-size: 11px;
  color: rgba(255,255,255,.65);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.gov-masthead .masthead-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  border-radius: 4px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all .18s ease;
  white-space: nowrap;
}
.btn-navy {
  background: var(--navy);
  color: var(--gold-bright);
  border: 1.5px solid var(--navy-mid);
}
.btn-navy:hover { background: var(--navy-mid); color: var(--gold-bright); text-decoration: none; }

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  border: 1.5px solid var(--gold-border);
}
.btn-gold:hover { background: var(--gold-bright); color: var(--navy); text-decoration: none; }

.btn-outline {
  background: transparent;
  color: rgba(255,255,255,.85);
  border: 1.5px solid rgba(255,255,255,.35);
}
.btn-outline:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }

.btn-danger {
  background: #8b1a1a;
  color: #fff;
  border: 1.5px solid #6a1212;
}
.btn-danger:hover { background: #7a1212; color: #fff; text-decoration: none; }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-w100 { width: 100%; justify-content: center; }

/* ── LAYOUT ───────────────────────────────────────────────── */
.gov-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 40px;
}
.gov-wrap-narrow {
  max-width: 520px;
  margin: 60px auto;
  padding: 0 20px;
}

/* ── BREADCRUMB ───────────────────────────────────────────── */
.gov-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
  margin-bottom: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.gov-breadcrumb a { color: var(--navy-light); text-decoration: none; font-weight: 600; }
.gov-breadcrumb a:hover { text-decoration: underline; }
.gov-breadcrumb .sep { color: var(--border); }

/* ── PAGE TITLE ───────────────────────────────────────────── */
.gov-page-title {
  font-family: 'Merriweather', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
  display: flex; align-items: center; gap: 10px;
}

/* ── ALERTS ───────────────────────────────────────────────── */
.gov-alert {
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
  border-left: 4px solid;
}
.gov-alert-success {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: #2a8a4e;
}
.gov-alert-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-color: #c0392b;
}
.gov-alert-warning {
  background: #fff8e6;
  color: #7a5a00;
  border-color: var(--gold);
}

/* ── STAT CARDS ───────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 4px solid var(--navy-mid);
  border-radius: 6px;
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.stat-card.accent { border-top-color: var(--gold); }
.stat-card .stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.stat-card .stat-value {
  font-family: 'Merriweather', serif;
  font-size: 24px;
  font-weight: 900;
  color: var(--navy);
  line-height: 1;
}
.stat-card .stat-unit {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── CARDS ────────────────────────────────────────────────── */
.gov-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  margin-bottom: 24px;
  overflow: hidden;
}
.gov-card-header {
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 2px solid var(--gold-border);
}
.gov-card-header h3, .gov-card-header h4 {
  font-family: 'Merriweather', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-bright);
  display: flex; align-items: center; gap: 8px;
}
.gov-card-body { padding: 20px; }
.gov-card-body-tight { padding: 0; }

/* ── TABLES ───────────────────────────────────────────────── */
.gov-table-wrap { overflow-x: auto; }
.gov-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.gov-table thead tr {
  background: var(--navy);
  color: var(--gold-bright);
}
.gov-table thead th {
  padding: 11px 14px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  border: none;
  white-space: nowrap;
}
.gov-table tbody tr {
  border-bottom: 1px solid #e8ecf4;
  transition: background .12s;
}
.gov-table tbody tr:last-child { border-bottom: none; }
.gov-table tbody tr:hover { background: var(--row-hover); }
.gov-table tbody tr:nth-child(even) { background: #f8fafd; }
.gov-table tbody tr:nth-child(even):hover { background: var(--row-hover); }
.gov-table td {
  padding: 10px 14px;
  color: var(--text);
  vertical-align: middle;
}
.gov-table .num { font-variant-numeric: tabular-nums; font-weight: 600; }
.gov-table .num-debit { color: #1a6b3a; }
.gov-table .num-credit { color: #8b1a1a; }
.gov-table .num-neg { color: #8b1a1a; }

/* ── FORMS ────────────────────────────────────────────────── */
.gov-form .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.gov-form .form-group { display: flex; flex-direction: column; }
.gov-form label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 6px;
}
.gov-form input[type="text"],
.gov-form input[type="date"],
.gov-form input[type="number"],
.gov-form input[type="password"],
.gov-form textarea,
.gov-form select {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13.5px;
  color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.gov-form input:focus,
.gov-form textarea:focus,
.gov-form select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,168,75,.18);
}
.gov-form .form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.gov-form .form-actions {
  display: flex; gap: 10px;
  margin-top: 8px;
}

/* ── LOGIN PAGE ───────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  background: #fff;
  border-radius: 8px;
  width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  overflow: hidden;
}
.login-header {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
  padding: 28px 28px 24px;
  text-align: center;
}
.login-header .login-seal {
  width: 60px; height: 60px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 14px;
}
.login-header h2 {
  font-family: 'Merriweather', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--gold-bright);
}
.login-header p {
  font-size: 11px;
  color: rgba(255,255,255,.55);
  margin-top: 4px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.login-body { padding: 28px; }

/* ── FOOTER ───────────────────────────────────────────────── */
.gov-footer {
  background: var(--navy);
  border-top: 2px solid var(--gold-border);
  color: rgba(255,255,255,.45);
  font-size: 11px;
  text-align: center;
  padding: 14px;
  letter-spacing: .04em;
  margin-top: 40px;
}
.gov-footer span { color: var(--gold); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .gov-masthead { flex-direction: column; align-items: flex-start; gap: 10px; }
  .gov-masthead .masthead-actions { flex-wrap: wrap; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .gov-form .form-row { grid-template-columns: 1fr; }
}
