/* ============================================================
   evote.ng — Global Stylesheet
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

:root {
  --green:       #008751;
  --green-dark:  #005c37;
  --green-light: #00b368;
  --gold:        #e8a020;
  --gold-light:  #ffc84a;
  --white:       #f8f7f2;
  --off:         #eceae0;
  --ink:         #111510;
  --muted:       #6b7163;
  --danger:      #c0392b;
  --warn:        #e87720;
  --surface:     #141714;
  --card:        #1d211b;
  --card2:       #232820;
  --border:      #2c312a;
  --radius:      10px;
  --shadow:      0 4px 24px rgba(0,0,0,.35);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--surface);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 {
  font-family: 'Syne', sans-serif;
  line-height: 1.15;
  font-weight: 700;
}
.muted { color: var(--muted); }
.green { color: var(--green-light); }
.gold  { color: var(--gold); }
.danger{ color: #e57368; }

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(20,23,20,.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: .35rem 2rem;
  min-height: 62px;
}
.nav-logo {
  display: flex; align-items: center;
}
.nav-logo img {
  width: 150px;
  height: 60px;
  object-fit: contain;
  display: block;
}
.nav-links { display: flex; gap: .3rem; align-items: center; }
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--white);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1.05rem;
  line-height: 1;
  align-items: center;
  justify-content: center;
}

/* ── MANDATE SCORECARD PREMIUM ── */
.promise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}
.promise-card {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  position: relative;
  transition: all .2s;
}
.promise-card:hover {
  border-color: var(--green-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.promise-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .8rem;
}
.promise-icon {
  font-size: 1.2rem;
}
.promise-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .4rem;
  line-height: 1.4;
  color: var(--white);
}
.promise-meta {
  font-size: .72rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.promise-progress-wrap {
  margin-bottom: 1rem;
}
.promise-link {
  display: block;
  font-size: .75rem;
  color: var(--green-light);
  font-weight: 600;
  text-decoration: underline;
  margin-top: auto;
}
.ai-box {
  background: rgba(0,179,104,.06);
  border: 1px dashed rgba(0,179,104,.3);
  padding: 1.2rem;
  border-radius: 12px;
}
.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  border: 1px solid currentColor;
}
.s-pending { color: var(--muted); background: rgba(107,113,99,.1); }
.s-unrated { color: var(--muted); background: rgba(255,255,255,.08); }
.s-in_progress { color: #e8a020; background: rgba(232,160,32,.1); }
.s-fulfilled { color: var(--green-light); background: rgba(0,179,104,.1); }
.s-broken { color: #e57368; background: rgba(229,115,104,.1); }
.s-disputed { color: #e87720; background: rgba(232,119,32,.1); }

.nav-link {
  color: var(--muted); font-size: .88rem; padding: .4rem .9rem;
  border-radius: 6px; transition: all .2s; background: none; border: none;
}
.nav-link:hover, .nav-link.active { color: var(--white); background: rgba(255,255,255,.06); }
.nav-link.active { color: var(--green-light); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.2rem; border-radius: 7px;
  font-family: 'DM Sans', sans-serif; font-size: .88rem; font-weight: 500;
  border: none; transition: all .2s; white-space: nowrap;
}
.btn-green  { background: var(--green); color: #fff; }
.btn-green:hover  { background: var(--green-light); transform: translateY(-1px); }
.btn-gold   { background: var(--gold); color: #111; }
.btn-gold:hover   { background: var(--gold-light); }
.btn-ghost  { background: none; border: 1px solid var(--border); color: var(--white); }
.btn-ghost:hover  { border-color: var(--green-light); color: var(--green-light); }
.btn-danger { background: rgba(192,57,43,.15); border: 1px solid rgba(192,57,43,.35); color: #e57368; }
.btn-danger:hover { background: rgba(192,57,43,.3); }
.btn-sm { padding: .35rem .85rem; font-size: .8rem; }
.btn-lg { padding: .75rem 2rem; font-size: 1rem; }

/* ── LAYOUT ── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 2.5rem 0; }
.page-header { padding: 2rem 0 1rem; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.page-title { font-size: 1.6rem; margin-bottom: .3rem; }
.page-sub { color: var(--muted); font-size: .9rem; }

/* ── CARDS ── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
.card-hover {
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card-hover:hover {
  border-color: var(--green); transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,135,81,.12);
}

/* ── OFFICIAL CARD ── */
.official-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem;
  cursor: pointer; transition: all .2s; position: relative; overflow: hidden;
}
.official-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transform: scaleX(0); transition: transform .25s; transform-origin: left;
}
.official-card:hover { border-color: var(--green); transform: translateY(-2px); }
.official-card:hover::after { transform: scaleX(1); }

.card-head { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1rem; }
.avatar {
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--green-dark); display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem;
  color: #fff; flex-shrink: 0; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; }

.card-name { font-family: 'Syne', sans-serif; font-weight: 700; font-size: .98rem; margin-bottom: .15rem; }
.card-role { font-size: .77rem; color: var(--muted); margin-bottom: .3rem; line-height: 1.4; }

/* ── TIER BADGE ── */
.tier-badge {
  display: inline-block; font-size: .62rem; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: .05em;
  border: 1px solid currentColor;
}

/* ── STARS ── */
.stars { display: flex; gap: 1px; }
.star { font-size: .95rem; color: #3a3f36; }
.star.on { color: var(--gold); }
.star.half { color: var(--gold); opacity: .6; }

.stars-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.rating-num { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem; }
.rating-count { font-size: .74rem; color: var(--muted); }

/* ── PERFORMANCE BARS ── */
.perf-bars { display: flex; flex-direction: column; gap: .38rem; margin-bottom: 1rem; }
.perf-row { display: flex; align-items: center; gap: .5rem; }
.perf-label { font-size: .68rem; color: var(--muted); width: 84px; flex-shrink: 0; }
.perf-track { flex: 1; height: 4px; background: rgba(255,255,255,.07); border-radius: 2px; overflow: hidden; }
.perf-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--green), var(--green-light));
  transition: width .8s cubic-bezier(.4,0,.2,1);
}
.perf-pct { font-size: .68rem; color: var(--muted); width: 30px; text-align: right; }

/* ── CARD FOOTER ── */
.card-footer { display: flex; gap: .5rem; }
.btn-rate   { flex:1; background: var(--green); color:#fff; border:none; padding:.4rem; border-radius:6px; font-size:.78rem; font-weight:500; transition:background .2s; }
.btn-rate:hover { background: var(--green-light); }
.btn-report { flex:1; background: rgba(192,57,43,.12); color:#e57368; border:1px solid rgba(192,57,43,.3); padding:.4rem; border-radius:6px; font-size:.78rem; font-weight:500; transition:all .2s; }
.btn-report:hover { background: rgba(192,57,43,.28); }

/* ── GRID ── */
.officials-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.1rem;
}

/* ── TABS ── */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.tab {
  background: var(--card); border: 1px solid var(--border); color: var(--muted);
  padding: .38rem 1rem; border-radius: 100px; font-size: .82rem;
  transition: all .2s; font-family: 'DM Sans', sans-serif;
}
.tab:hover, .tab.active { background: var(--green); border-color: var(--green); color: #fff; }

/* ── SEARCH ── */
.search-wrap { position: relative; margin-bottom: 1.8rem; }
.search-wrap input {
  width: 100%; background: var(--card); border: 1px solid var(--border);
  color: var(--white); padding: .75rem 1rem .75rem 2.8rem;
  border-radius: 8px; font-size: .92rem; font-family: 'DM Sans', sans-serif;
  outline: none; transition: border .2s;
}
.search-wrap input:focus { border-color: var(--green-light); }
.search-wrap input::placeholder { color: var(--muted); }
.search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 1.2rem; }
.form-label {
  display: block; font-size: .75rem; font-weight: 600; color: var(--muted);
  margin-bottom: .45rem; text-transform: uppercase; letter-spacing: .05em;
}
.form-control {
  width: 100%; background: rgba(255,255,255,.05); border: 1px solid var(--border);
  color: var(--white); border-radius: 8px; font-family: 'DM Sans', sans-serif;
  font-size: .9rem; outline: none; transition: border .2s; padding: .7rem 1rem;
}
.form-control:focus { border-color: var(--green-light); }
.form-control::placeholder { color: var(--muted); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; }
select.form-control option { background: var(--card); }

/* ── TOGGLE ── */
.toggle-row {
  display: flex; align-items: center; gap: .8rem;
  background: rgba(255,255,255,.04); border-radius: 8px;
  padding: .75rem 1rem; cursor: pointer; margin-bottom: 1.1rem;
}
.toggle {
  width: 38px; height: 20px; background: var(--border);
  border-radius: 100px; position: relative; transition: background .2s; flex-shrink: 0;
}
.toggle.on { background: var(--green); }
.toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; background: #fff; border-radius: 50%;
  transition: transform .2s;
}
.toggle.on::after { transform: translateX(18px); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.75); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; width: 100%; max-width: 520px;
  max-height: 92vh; overflow-y: auto;
  transform: translateY(24px); transition: transform .25s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 1.5rem .5rem; border-bottom: 1px solid var(--border); margin-bottom: 1.2rem;
}
.modal-header h2 { font-size: 1.15rem; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 1.4rem; line-height: 1; transition: color .2s; }
.modal-close:hover { color: var(--white); }
.modal-body { padding: 0 1.5rem 1.5rem; }
.modal-official {
  display: flex; align-items: center; gap: .9rem;
  background: rgba(255,255,255,.04); border-radius: 8px; padding: .9rem; margin-bottom: 1.4rem;
}

/* ── INTERACTIVE STAR RATING ── */
.star-picker { display: flex; gap: .4rem; justify-content: center; margin: .8rem 0; }
.star-pick {
  font-size: 2rem; color: #3a3f36; cursor: pointer;
  transition: color .15s, transform .15s;
}
.star-pick.on { color: var(--gold); transform: scale(1.12); }
.star-pick:hover { color: var(--gold-light); }
.star-label { text-align: center; font-size: .82rem; color: var(--muted); min-height: 1.2em; margin-bottom: .5rem; }

/* ── CAT STARS ── */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1.2rem; }
.cat-item .cat-label { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .3rem; }
.cat-stars { display: flex; gap: 2px; }
.cat-star { font-size: .88rem; color: #3a3f36; cursor: pointer; transition: color .15s; }
.cat-star.on { color: var(--gold); }

/* ── REPORT TAGS ── */
.report-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.report-tag {
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  color: var(--muted); padding: .32rem .8rem; border-radius: 100px;
  font-size: .76rem; cursor: pointer; transition: all .2s;
}
.report-tag.on { background: rgba(192,57,43,.18); border-color: #c0392b; color: #e57368; }

/* ── SUBMIT BTN ── */
.submit-btn {
  width: 100%; padding: .82rem; background: var(--green); color: #fff;
  border: none; border-radius: 8px; font-family: 'Syne', sans-serif;
  font-size: .98rem; font-weight: 700; transition: background .2s; margin-top: .4rem;
}
.submit-btn:hover:not(:disabled) { background: var(--green-light); }
.submit-btn:disabled { background: var(--border); color: var(--muted); cursor: default; }
.submit-btn.danger-btn { background: var(--danger); }
.submit-btn.danger-btn:hover:not(:disabled) { background: #e84040; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(16px);
  background: var(--green); color: #fff; padding: .75rem 1.6rem;
  border-radius: 8px; font-size: .88rem; font-weight: 500;
  z-index: 999; opacity: 0; transition: all .3s; pointer-events: none; white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── LOADING / EMPTY ── */
.loading { text-align: center; color: var(--muted); padding: 4rem 1rem; }
.spinner { display: inline-block; width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; margin-bottom: 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); padding: 3rem 1rem; font-size: .92rem; }

/* ── LEADERBOARD ── */
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th { text-align: left; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: .6rem 1rem; border-bottom: 1px solid var(--border); }
.lb-table td { padding: .82rem 1rem; border-bottom: 1px solid rgba(255,255,255,.04); font-size: .86rem; vertical-align: middle; }
.lb-table tr:hover td { background: rgba(255,255,255,.025); }
.lb-rank { font-family: 'Syne', sans-serif; font-weight: 700; color: var(--muted); }
.lb-rank.gold { color: var(--gold); }
.lb-rank.silver { color: #b0c0cc; }
.lb-rank.bronze { color: #cd7f32; }
.lb-name-cell { display: flex; align-items: center; gap: .7rem; }
.score-pill {
  display: inline-flex; align-items: center; gap: .2rem;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: .92rem;
}

/* ── POLL ── */
.poll-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.1rem; }
.poll-q { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.02rem; margin-bottom: 1rem; line-height: 1.4; }
.poll-options { display: flex; flex-direction: column; gap: .55rem; }
.poll-opt {
  position: relative; background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: 8px; padding: .65rem 1rem; overflow: hidden; transition: border .2s;
}
.poll-opt:not(.voted):hover { border-color: var(--green); cursor: pointer; }
.poll-opt.voted { border-color: var(--green); }
.poll-fill { position: absolute; top:0; left:0; bottom:0; background: rgba(0,135,81,.13); border-radius: 8px; transition: width .55s ease; }
.poll-inner { position: relative; display: flex; justify-content: space-between; align-items: center; }
.poll-opt-text { font-size: .88rem; }
.poll-pct { font-family: 'Syne', sans-serif; font-weight: 700; font-size: .82rem; color: var(--green-light); }
.poll-footer { display: flex; justify-content: space-between; align-items: center; margin-top: .9rem; font-size: .74rem; color: var(--muted); }

/* ── STATS BAR ── */
.stats-bar { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; padding: 2rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat { text-align: center; }
.stat-n { font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 800; color: var(--green-light); line-height: 1; }
.stat-l { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: .25rem; }

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--border); padding: 2rem 1.5rem; text-align: center;
  color: var(--muted); font-size: .78rem; margin-top: 4rem;
}
.site-footer strong { color: var(--green-light); }

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }
.fade-up { animation: fadeUp .4s ease both; }
.fade-up-1 { animation-delay: .05s; }
.fade-up-2 { animation-delay: .10s; }
.fade-up-3 { animation-delay: .15s; }
.fade-up-4 { animation-delay: .20s; }
.fade-up-5 { animation-delay: .25s; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .nav { padding: .35rem 1rem; }
  .nav-logo img { width: 108px; height: 43px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: .7rem 1rem 1rem;
    background: rgba(20,23,20,.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: .3rem;
    z-index: 220;
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: .62rem .85rem;
  }
  .container { padding: 0 1rem; }
  .stats-bar { gap: 1.5rem; padding: 1.5rem 1rem; }
  .officials-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .lb-table th:nth-child(3), .lb-table td:nth-child(3) { display: none; }
  .lb-table th:nth-child(6), .lb-table td:nth-child(6) { display: none; }
}

/* ── MANDATE SCORECARD PREMIUM ── */
.promise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}
.promise-card {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  position: relative;
  transition: all .2s;
  display: flex;
  flex-direction: column;
}
.promise-card:hover {
  border-color: var(--green-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.promise-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .8rem;
}
.promise-icon {
  font-size: 1.2rem;
}
.promise-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .4rem;
  line-height: 1.4;
  color: var(--white);
}
.promise-meta {
  font-size: .72rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.promise-progress-wrap {
  margin-bottom: 1rem;
  margin-top: auto;
}
.promise-link {
  display: block;
  font-size: .75rem;
  color: var(--green-light);
  font-weight: 600;
  text-decoration: underline;
  margin-top: .5rem;
}
.ai-box {
  background: rgba(0,179,104,.06);
  border: 1px dashed rgba(0,179,104,.3);
  padding: 1.2rem;
  border-radius: 12px;
}
.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  border: 1px solid currentColor;
}
.s-pending { color: var(--muted); background: rgba(107,113,99,.1); }
.s-in_progress { color: #e8a020; background: rgba(232,160,32,.1); }
.s-fulfilled { color: var(--green-light); background: rgba(0,179,104,.1); }
.s-broken { color: #e57368; background: rgba(229,115,104,.1); }
.s-disputed { color: #e87720; background: rgba(232,119,32,.1); }
