/* =====================================================================
   SDO Lapu-Lapu City — Learning Resources Inventory System
   Design tokens: deep DepEd blue + Lapu-Lapu heritage gold/bronze accent,
   referencing the archipelago's seal colors without copying it.
   ===================================================================== */
:root {
  /* Brand palette sampled directly from ictinventory.depedlapulapu.net.ph */
  --navy: #00338d;
  --navy-dark: #002569;
  --navy-darker: #001b4d;
  --navy-light: #e8f0fa;
  --gold: #fdb827;
  --gold-dark: #e0a01a;
  --ph-red: #ce1126;
  --ph-red-light: #fbe4e6;
  --green: #198754;
  --green-light: #e3f3ea;
  --blue: #0d6efd;
  --purple: #6f42c1;
  --orange: #fd7e14;
  --teal: #20c997;
  --pink: #e83e8c;
  --gray: #6c757d;

  /* legacy aliases kept so existing rules below keep working */
  --navy-950: var(--navy-darker);
  --navy-900: var(--navy-dark);
  --navy-800: var(--navy);
  --navy-700: var(--navy);
  --navy-100: var(--navy-light);
  --gold-500: var(--gold);
  --gold-600: var(--gold-dark);
  --gold-100: #fff6e2;
  --sea-500: var(--teal);
  --ink-900: #10151c;
  --ink-600: #4a5566;
  --paper: #f4f7fc;
  --white: #ffffff;
  --red-600: var(--ph-red);
  --red-100: var(--ph-red-light);
  --yellow-600: var(--gold-dark);
  --yellow-100: #fff6e2;
  --green-600: var(--green);
  --green-100: var(--green-light);
  --radius: 12px;
  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

/* Fixed 10-color qualitative palette — one slot per district (1-10),
   matching the "DCP Units by District" bar chart exactly. */
.district-color-1 { color: #00338d; } .district-bg-1 { background: #00338d; }
.district-color-2 { color: #fdb827; } .district-bg-2 { background: #fdb827; }
.district-color-3 { color: #ce1126; } .district-bg-3 { background: #ce1126; }
.district-color-4 { color: #198754; } .district-bg-4 { background: #198754; }
.district-color-5 { color: #0d6efd; } .district-bg-5 { background: #0d6efd; }
.district-color-6 { color: #6f42c1; } .district-bg-6 { background: #6f42c1; }
.district-color-7 { color: #fd7e14; } .district-bg-7 { background: #fd7e14; }
.district-color-8 { color: #20c997; } .district-bg-8 { background: #20c997; }
.district-color-9 { color: #e83e8c; } .district-bg-9 { background: #e83e8c; }
.district-color-10 { color: #6c757d; } .district-bg-10 { background: #6c757d; }

* { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink-900);
}

h1, h2, h3, h4, h5, .brand-mark {
  font-family: var(--font-display);
}

/* ---------- Navbar ---------- */
.lris-navbar {
  background: var(--navy);
  padding: .65rem 0;
  box-shadow: 0 2px 10px rgba(0,51,141,.18);
}
.lris-navbar .navbar-brand {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  color: var(--white);
}
.brand-mark {
  font-weight: 800;
  letter-spacing: .06em;
  font-size: 1.25rem;
  color: var(--white);
}
.brand-sub { color: rgba(255,255,255,.7); font-size: .8rem; font-weight: 500; }
.lris-navbar .nav-link {
  color: rgba(255,255,255,.85);
  font-weight: 500;
  font-size: .92rem;
  padding: .5rem .85rem;
  border-radius: 8px;
  transition: background .15s;
}
.lris-navbar .nav-link:hover,
.lris-navbar .nav-link.active { background: rgba(255,255,255,.14); color: var(--white); }
.user-pill { display: flex; align-items: center; }

/* ---------- Layout ---------- */
.lris-main { min-height: calc(100vh - 140px); }
.lris-footer { color: var(--ink-600); background: var(--white); border-top: 1px solid #e5e8ee; }

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--navy-light);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,51,141,.05);
}
.card-header {
  background: var(--white);
  border-bottom: 1px solid var(--navy-light);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
}

/* ---------- KPI stat tiles ---------- */
.stat-tile {
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--navy-light);
  position: relative;
  overflow: hidden;
}
.stat-tile::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--navy);
}
.stat-tile.accent-gold::before { background: var(--gold); }
.stat-tile.accent-sea::before { background: var(--teal); }
.stat-tile.accent-red::before { background: var(--ph-red); }
.stat-tile .stat-value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--navy-darker);
  line-height: 1;
}
.stat-tile .stat-label {
  color: var(--ink-600);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
  margin-top: .35rem;
}

/* ---------- Status badges (Red/Yellow/Green signal) ---------- */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .32rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
}
.badge-status::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
}
.badge-status.red { background: var(--ph-red-light); color: var(--ph-red); }
.badge-status.red::before { background: var(--ph-red); }
.badge-status.yellow { background: #fff6e2; color: var(--gold-dark); }
.badge-status.yellow::before { background: var(--gold); }
.badge-status.green { background: var(--green-light); color: var(--green); }
.badge-status.green::before { background: var(--green); }

/* ---------- Class / school-level pill (ES / JHS / SHS) ---------- */
.badge-class {
  display: inline-block;
  padding: .28rem .65rem;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  background: var(--green);
  color: var(--white);
}

/* ---------- District cards on admin dashboard ---------- */
.district-card {
  border-radius: var(--radius);
  border: 1px solid var(--navy-light);
  background: var(--white);
  padding: 1rem 1.1rem;
  height: 100%;
}
.district-card h6 {
  font-family: var(--font-display);
  color: var(--navy);
  font-weight: 700;
  margin-bottom: .65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.district-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--navy-light);
  overflow: hidden;
  margin: .5rem 0;
}
.district-progress > span {
  display: block; height: 100%;
  background: var(--green);
}

/* ---------- Login page ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--navy-darker), var(--navy) 65%);
  padding: 1.5rem;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: 16px;
  padding: 2.25rem 2rem;
  box-shadow: 0 20px 60px rgba(0,27,77,.35);
}
.login-badge {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.login-title { font-family: var(--font-display); font-weight: 700; color: var(--navy-darker); }

/* ---------- Tables ---------- */
.table-lris thead th {
  background: var(--navy);
  color: var(--white);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
  border-bottom: none;
  white-space: nowrap;
  padding-top: .75rem;
  padding-bottom: .75rem;
}
.table-lris tbody tr:hover { background: var(--navy-light); }

/* ---------- Buttons ---------- */
.btn-lris-primary {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.btn-lris-primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: var(--white); }
.btn-lris-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-darker);
  font-weight: 600;
}
.btn-lris-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: var(--navy-darker); }

/* ---------- Misc ---------- */
.page-title { font-family: var(--font-display); font-weight: 700; color: var(--navy-darker); }
.section-eyebrow {
  text-transform: uppercase; letter-spacing: .08em; font-size: .74rem;
  color: var(--gold-dark); font-weight: 700;
}
.form-label { font-weight: 600; color: var(--ink-900); font-size: .88rem; }
code.email-hint { background: var(--gold-100); color: var(--gold-dark); padding: .1rem .4rem; border-radius: 6px; }
