/* ═══════════════════════════════════════════════════════════
   KP-RIISP GRM Portal — Master Stylesheet v2
   Government of Khyber Pakhtunkhwa · World Bank LGCD-KP
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Nastaliq+Urdu:wght@400;700&family=Merriweather:wght@300;400;700&family=Source+Sans+3:wght@300;400;600;700&display=swap');

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --kp-green:       #006633;
  --kp-green-dk:    #004d26;
  --kp-green-lt:    #008040;
  --kp-green-pale:  #e8f5ee;
  --kp-gold:        #c8a951;
  --kp-gold-lt:     #f0d98a;
  --wb-blue:        #009FDA;
  --wb-dark:        #002244;
  --cream:          #f9f7f2;
  --white:          #ffffff;
  --dark:           #1a1a1a;
  --mid:            #555;
  --light:          #888;
  --border:         #d5cfc4;
  --red:            #c0392b;
  --shadow-sm:      0 2px 10px rgba(0,0,0,0.07);
  --shadow-md:      0 6px 24px rgba(0,0,0,0.11);
  --radius:         10px;
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 15px; line-height: 1.65;
  color: var(--dark); background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--kp-green); text-decoration: none; }
a:hover { color: var(--kp-green-lt); text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── LAYOUT ─────────────────────────────────────────────── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
.section-light { background: var(--white); }
.section-green { background: var(--kp-green); color: var(--white); }

/* ── TYPOGRAPHY ─────────────────────────────────────────── */
h1,h2,h3,h4 { font-family: 'Merriweather', Georgia, serif; line-height: 1.3; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 26px; color: var(--kp-green); margin-bottom: 8px; }
.section-header p  { color: var(--mid); font-size: 15px; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 24px; border-radius: 8px; border: 2px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.22s; text-decoration: none; white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--kp-gold); outline-offset: 2px; }
.btn-green  { background: var(--kp-green); color: white; border-color: var(--kp-green); }
.btn-green:hover { background: var(--kp-green-lt); border-color: var(--kp-green-lt); color: white; text-decoration: none; }
.btn-gold   { background: var(--kp-gold); color: var(--dark); border-color: var(--kp-gold); }
.btn-gold:hover { background: var(--kp-gold-lt); }
.btn-outline { background: transparent; color: var(--kp-green); border-color: var(--kp-green); }
.btn-outline:hover { background: var(--kp-green); color: white; text-decoration: none; }
.btn-outline-white { background: transparent; color: white; border-color: rgba(255,255,255,0.7); }
.btn-outline-white:hover { background: rgba(255,255,255,0.15); text-decoration: none; }
.btn-danger { background: var(--red); color: white; border-color: var(--red); }
.btn-danger:hover { background: #a93226; }
.btn-blue   { background: var(--wb-blue); color: white; border-color: var(--wb-blue); }
.btn-sm     { padding: 6px 14px; font-size: 12px; }
.btn-block  { width: 100%; justify-content: center; padding: 13px; }

/* ── HEADER ─────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-md); }
.header-top-band {
  background: var(--kp-green-dk); color: rgba(255,255,255,0.75);
  font-size: 11.5px; padding: 5px 0;
}
.header-top-inner { display: flex; justify-content: space-between; align-items: center; }
.header-main {
  background: linear-gradient(135deg, #005229 0%, var(--kp-green-dk) 100%);
  padding: 12px 0;
}
.header-inner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.logo-block { flex-shrink: 0; }
.kp-riisp-logo {
  height: 52px; width: auto; max-width: 280px;
  object-fit: contain;
  filter: brightness(1.05);
}
.header-title {
  flex: 1; text-align: center; color: white; min-width: 200px;
}
.header-title h1 {
  font-size: 17px; font-weight: 700; color: white;
  line-height: 1.25; font-family: 'Merriweather', serif;
}
.header-urdu {
  font-size: 13px; color: var(--kp-gold);
  font-family: 'Noto Nastaliq Urdu', serif;
  direction: rtl; margin-top: 3px;
}
.header-right {
  display: flex; align-items: center; gap: 14px; flex-shrink: 0;
}
.wb-logo { flex-shrink: 0; }
.session-info { color: rgba(255,255,255,0.8); font-size: 12px; }

/* ── NAV ─────────────────────────────────────────────────── */
.header-nav { background: var(--kp-green-dk); border-top: 1px solid rgba(200,169,81,0.25); }
.nav-inner { display: flex; flex-wrap: wrap; }
.nav-link {
  display: inline-block; padding: 10px 14px;
  color: rgba(255,255,255,0.72); font-size: 13px; font-weight: 600;
  transition: all 0.18s; border-bottom: 3px solid transparent;
  text-decoration: none; white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--kp-gold); border-bottom-color: var(--kp-gold);
  background: rgba(255,255,255,0.05); text-decoration: none;
}
.hero-band {
  background: var(--kp-gold); color: var(--dark);
  text-align: center; padding: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #004d26 0%, #002d16 100%);
  padding: 72px 0; text-align: center; color: white;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: rgba(200,169,81,0.18); border: 1px solid var(--kp-gold);
  color: var(--kp-gold); padding: 5px 18px; border-radius: 20px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-title { font-size: 34px; color: white; margin-bottom: 14px; }
.hero-sub { color: rgba(255,255,255,0.8); max-width: 570px; margin: 0 auto 28px; font-size: 16px; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── HOW IT WORKS ────────────────────────────────────────── */
.steps-row { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; justify-content: center; }
.step-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px 20px;
  text-align: center; flex: 1; min-width: 180px; max-width: 240px;
  box-shadow: var(--shadow-sm); position: relative; margin-top: 14px;
}
.step-num {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--kp-green); color: white;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.step-icon { font-size: 34px; margin-bottom: 10px; margin-top: 4px; }
.step-card h3 { color: var(--kp-green); font-size: 15px; margin-bottom: 7px; }
.step-card p  { font-size: 13px; color: var(--mid); }
.step-arrow   { font-size: 22px; color: var(--kp-gold); flex-shrink: 0; margin-top: 60px; }
@media(max-width:640px){ .step-arrow { display: none; } }

/* ── PORTAL CARDS ─────────────────────────────────────────── */
.portals-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
@media(max-width:680px){ .portals-grid { grid-template-columns: 1fr; } }
.portal-card {
  background: var(--white); border: 2px solid var(--border);
  border-radius: 12px; padding: 28px 20px; text-align: center;
  transition: all 0.25s; display: block; color: var(--dark);
  text-decoration: none;
}
.portal-card:hover { border-color: var(--kp-green); transform: translateY(-4px); box-shadow: var(--shadow-md); text-decoration: none; color: var(--dark); }
.portal-card .pc-icon  { font-size: 38px; margin-bottom: 12px; }
.portal-card h3 { font-family: 'Merriweather', serif; font-size: 16px; color: var(--kp-green); margin-bottom: 8px; }
.portal-card p  { font-size: 13px; color: var(--mid); margin-bottom: 12px; }
.pc-link { color: var(--kp-green); font-size: 13px; font-weight: 700; }

/* ── STATS BAR ───────────────────────────────────────────── */
.stats-row { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-num { font-family: 'Merriweather', serif; font-size: 38px; font-weight: 700; color: var(--kp-gold); line-height: 1; }
.stat-lbl { font-size: 12px; color: rgba(255,255,255,0.72); margin-top: 5px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-sep { color: rgba(255,255,255,0.25); font-size: 32px; }

/* ── DEPT GRID ───────────────────────────────────────────── */
.dept-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; }
@media(max-width:580px){ .dept-grid { grid-template-columns: 1fr 1fr; } }
.dept-card {
  background: var(--kp-green-pale); border: 1px solid #b8dfc9;
  border-radius: 8px; padding: 18px; display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 14px; color: var(--kp-green);
}
.dc-icon { font-size: 26px; flex-shrink: 0; }

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer { background: var(--kp-green-dk); color: rgba(255,255,255,0.68); }
.footer-inner { display: grid; grid-template-columns: repeat(3,1fr); gap: 32px; padding: 40px 0 32px; }
@media(max-width:640px){ .footer-inner { grid-template-columns: 1fr; } }
.footer-col h4 { color: var(--kp-gold); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; font-family: 'Source Sans 3', sans-serif; font-weight: 700; }
.footer-col ul li { margin-bottom: 5px; }
.footer-col ul li a { color: rgba(255,255,255,0.62); font-size: 13px; }
.footer-col ul li a:hover { color: var(--kp-gold); }
.footer-col p { font-size: 13px; margin-bottom: 4px; }
.footer-brand { font-family: 'Merriweather', serif; font-size: 17px; color: white; margin-bottom: 8px; }
.footer-note { font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 13px 0; text-align: center; font-size: 11.5px; color: rgba(255,255,255,0.4); }

/* ── CARDS ───────────────────────────────────────────────── */
.card { background: white; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 20px; }
.card-head {
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  background: var(--kp-green-pale);
}
.card-head h2 { font-family: 'Merriweather', serif; font-size: 16px; color: var(--kp-green); }
.card-icon { font-size: 20px; }
.card-body { padding: 22px; }

/* ── FORMS ───────────────────────────────────────────────── */
.form-section { margin-bottom: 26px; }
.form-section h3 {
  font-family: 'Merriweather', serif; font-size: 13px; color: var(--kp-green);
  margin-bottom: 14px; padding-bottom: 7px; border-bottom: 1px solid var(--border);
  text-transform: uppercase; letter-spacing: 0.6px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media(max-width:580px){ .form-row { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 15px; }
.form-group label {
  display: block; font-size: 11.5px; font-weight: 700; color: var(--mid);
  margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.5px;
}
.form-group label .req { color: var(--red); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 14px; background: var(--cream); color: var(--dark);
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--kp-green); background: white;
  box-shadow: 0 0 0 3px rgba(0,102,51,0.09);
}
.form-group input.valid   { border-color: #27ae60; }
.form-group input.invalid { border-color: var(--red); }
.form-group textarea { resize: vertical; min-height: 90px; }
.field-hint { font-size: 11px; color: var(--light); margin-top: 3px; }
.field-error { color: var(--red); font-size: 11.5px; margin-top: 4px; display: none; }
.field-error.show { display: block; }
/* Honeypot — visually hidden but accessible to bots */
.grm-hp { opacity: 0; position: absolute; top: 0; left: 0; height: 0; width: 0; z-index: -1; }

/* ── CHAR COUNTER ────────────────────────────────────────── */
.char-counter { font-size: 11px; color: var(--light); text-align: right; margin-top: 2px; }
.char-counter.warn { color: #e67e22; }
.char-counter.over { color: var(--red); }

/* ── TABLE ───────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--kp-green); color: white; padding: 11px 13px;
  text-align: left; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap;
}
tbody td { padding: 11px 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) td { background: #fafaf8; }
tbody tr:hover td { background: var(--kp-green-pale); }

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
}
.badge-submitted    { background: #fdf3e3; color: #e67e22; }
.badge-under_review { background: #e8f4fd; color: #2471a3; }
.badge-in_progress  { background: #f5eef8; color: #8e44ad; }
.badge-resolved     { background: #eafaf1; color: #27ae60; }
.badge-rejected     { background: #fdedec; color: #c0392b; }

.priority-high   { color: #c0392b; font-weight: 700; font-size: 11.5px; text-transform: uppercase; }
.priority-medium { color: #e67e22; font-weight: 700; font-size: 11.5px; text-transform: uppercase; }
.priority-low    { color: #27ae60; font-weight: 700; font-size: 11.5px; text-transform: uppercase; }

.dept-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--kp-green-pale); border: 1px solid #b8dfc9;
  padding: 3px 9px; border-radius: 20px; font-size: 12px; color: var(--kp-green); font-weight: 600;
}

/* ── TIMELINE ────────────────────────────────────────────── */
.timeline { list-style: none; }
.timeline li { position: relative; padding: 0 0 20px 28px; }
.timeline li::before {
  content: ''; position: absolute; left: 7px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--kp-gold); border: 2px solid var(--kp-green);
}
.timeline li::after {
  content: ''; position: absolute; left: 10.5px; top: 14px;
  width: 2px; bottom: 0; background: var(--border);
}
.timeline li:last-child::after { display: none; }
.tl-date { font-size: 11px; color: var(--light); margin-bottom: 2px; }
.tl-note { font-size: 13.5px; color: var(--dark); }
.tl-by   { font-size: 11px; color: var(--kp-green-lt); font-weight: 600; margin-top: 2px; }

/* ── ALERTS ─────────────────────────────────────────────── */
.alert {
  padding: 12px 17px; border-radius: 8px; font-size: 13.5px;
  margin-bottom: 16px; border-left: 4px solid;
}
.alert-success { background: #eafaf1; border-color: #27ae60; color: #1e8449; }
.alert-error   { background: #fdedec; border-color: #c0392b; color: #922b21; }
.alert-info    { background: #e8f4fd; border-color: #2471a3; color: #1a5276; }
.alert-warning { background: #fef9e7; border-color: #f1c40f; color: #7d6608; }

/* ── PAGE LAYOUT ─────────────────────────────────────────── */
.page-wrap      { max-width: 860px;  margin: 36px auto; padding: 0 24px 60px; }
.page-wrap-wide { max-width: 1100px; margin: 36px auto; padding: 0 24px 60px; }
.page-title { font-family: 'Merriweather', serif; font-size: 22px; color: var(--kp-green); margin-bottom: 6px; }
.page-sub   { color: var(--mid); font-size: 14px; margin-bottom: 26px; }
.back-link  { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; font-size: 13px; color: var(--mid); }
.back-link:hover { color: var(--kp-green); }

/* ── DASHBOARD STATS ─────────────────────────────────────── */
.dash-stats { display: grid; grid-template-columns: repeat(5,1fr); gap: 13px; margin-bottom: 26px; }
@media(max-width:760px){ .dash-stats { grid-template-columns: repeat(2,1fr); } }
.ds-card { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 15px; text-align: center; }
.ds-card .ds-num { font-family: 'Merriweather', serif; font-size: 26px; font-weight: 700; color: var(--kp-green); }
.ds-card .ds-lbl { font-size: 10.5px; color: var(--mid); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 4px; }

/* ── FILTER BAR ─────────────────────────────────────────── */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.filter-bar select, .filter-bar input {
  padding: 8px 11px; border: 1.5px solid var(--border);
  border-radius: 7px; font-size: 13px; background: white; color: var(--dark); outline: none;
}
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--kp-green); }
.filter-bar input { flex: 1; min-width: 180px; }
.filter-count { font-size: 13px; color: var(--mid); }

/* ── INFO GRID ───────────────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 16px; }
@media(max-width:500px){ .info-grid { grid-template-columns: 1fr; } }
.info-item label { font-size: 10.5px; color: var(--mid); text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; display: block; margin-bottom: 2px; }
.info-item span  { font-size: 13.5px; color: var(--dark); }

/* ── COMPLAINT ID ─────────────────────────────────────────── */
.cid { font-family: 'Courier New', monospace; font-size: 12.5px; font-weight: 700; color: var(--kp-green); }

/* ── SUCCESS BOX ─────────────────────────────────────────── */
.success-box { text-align: center; padding: 40px 24px; }
.success-icon { font-size: 54px; margin-bottom: 14px; }
.success-box h2 { font-family: 'Merriweather', serif; font-size: 22px; color: var(--kp-green); margin-bottom: 8px; }
.tracking-code {
  display: inline-block; font-size: 20px; font-weight: 700;
  color: var(--kp-green); background: var(--kp-green-pale);
  padding: 10px 30px; border-radius: 8px; border: 2px dashed var(--kp-green);
  margin: 14px 0; letter-spacing: 3px; font-family: 'Courier New', monospace;
  user-select: all;
}

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.52); z-index: 999;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: white; border-radius: 14px;
  width: 100%; max-width: 600px; max-height: 90vh;
  overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.28);
  animation: modalIn 0.22s ease;
}
@keyframes modalIn { from { transform: scale(0.96) translateY(10px); opacity:0; } to { transform: scale(1) translateY(0); opacity:1; } }
.modal-head {
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--kp-green-pale); position: sticky; top: 0; z-index: 1;
}
.modal-head h2 { font-family: 'Merriweather', serif; font-size: 16px; color: var(--kp-green); }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--mid); line-height: 1; padding: 0 4px; }
.modal-close:hover { color: var(--red); }
.modal-body { padding: 22px; }

/* ── LOGIN ───────────────────────────────────────────────── */
.login-wrap { max-width: 440px; margin: 56px auto; padding: 0 24px; }
.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand .login-icon { font-size: 44px; margin-bottom: 10px; }
.login-brand h2 { font-family: 'Merriweather', serif; font-size: 19px; color: var(--kp-green); margin-top: 10px; }
.login-brand p { font-size: 13px; color: var(--mid); }

/* ── TABS ────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; background: var(--border); border-radius: 10px; padding: 4px; margin-bottom: 22px; }
.tab-btn {
  flex: 1; padding: 8px; border: none; border-radius: 7px;
  cursor: pointer; font-size: 13px; font-weight: 600;
  background: transparent; color: var(--mid); transition: all 0.18s;
}
.tab-btn.active { background: white; color: var(--kp-green); box-shadow: 0 1px 5px rgba(0,0,0,0.1); }

/* ── WP NOTE ─────────────────────────────────────────────── */
.wp-note {
  background: #f0f0f1; border: 1px dashed #a0a5aa;
  border-radius: 8px; padding: 18px; font-size: 13px;
  color: #3c434a; line-height: 1.85;
}
.wp-note strong { color: #1d2327; display: block; margin-top: 10px; margin-bottom: 1px; }
.wp-note strong:first-child { margin-top: 0; }
.wp-note code {
  background: #dde; padding: 2px 7px; border-radius: 4px;
  font-family: 'Courier New', monospace; font-size: 11.5px;
}
pre {
  background: #1e1e1e; color: #d4d4d4; padding: 18px;
  border-radius: 8px; font-size: 12px; overflow-x: auto; line-height: 1.75;
  margin-top: 12px;
}

/* ── UPDATE PANEL ─────────────────────────────────────────── */
.update-panel {
  background: var(--kp-green-pale); border: 1px solid #b8dfc9;
  border-radius: 10px; padding: 18px; margin-top: 22px;
}
.update-panel h3 { font-family: 'Merriweather', serif; font-size: 14px; color: var(--kp-green); margin-bottom: 14px; }

/* ── LOCKOUT NOTICE ──────────────────────────────────────── */
.lockout-msg {
  background: #fdedec; border: 1.5px solid var(--red);
  border-radius: 8px; padding: 14px 17px; color: #922b21;
  font-size: 13.5px; margin-bottom: 16px; text-align: center;
}
.lockout-msg strong { display: block; font-size: 15px; margin-bottom: 4px; }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 50px 24px; color: var(--mid); }
.empty-state .es-icon { font-size: 46px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ── BREADCRUMB (SEO) ─────────────────────────────────────── */
.breadcrumb { font-size: 12px; color: var(--light); margin-bottom: 14px; }
.breadcrumb a { color: var(--light); }
.breadcrumb a:hover { color: var(--kp-green); }
.breadcrumb span { margin: 0 5px; }

/* ── PROGRESS BAR ─────────────────────────────────────────── */
.prog-bar-wrap { display:flex; align-items:center; gap:8px; }
.prog-bar { flex:1; height:6px; background:#e8e8e8; border-radius:3px; overflow:hidden; }
.prog-fill { height:100%; border-radius:3px; transition: width 0.4s; }
.prog-lbl  { font-size:11.5px; font-weight:600; color:var(--mid); min-width:30px; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media(max-width:768px) {
  .header-inner { flex-direction: column; text-align: center; gap: 10px; }
  .header-right { justify-content: center; }
  .logo-block { text-align: center; }
  .header-title h1 { font-size: 13px; }
  .hero-title { font-size: 22px; }
  .dash-stats { grid-template-columns: repeat(2,1fr); }
  .info-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .kp-riisp-logo { height: 42px; }
}
@media(max-width:480px){
  .hero-title { font-size: 19px; }
  .hero-sub   { font-size: 14px; }
  .portals-grid { grid-template-columns: 1fr; }
}

/* ── SKIP LINK (Accessibility) ───────────────────────────── */
.skip-link {
  position: absolute; top: -40px; left: 10px;
  background: var(--kp-green); color: white;
  padding: 8px 14px; border-radius: 0 0 6px 6px; z-index: 9999;
  font-size: 13px; font-weight: 700; text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── PRINT ───────────────────────────────────────────────── */
@media print {
  .site-header, .hero-btns, .site-footer, .btn,
  .update-panel, .filter-bar, .header-nav, .hero-band { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .tracking-code { border: 2px solid #333; }
}

/* ══════════════════════════════════════════════════════════
   ADMIN LAYOUT — Sidebar + Main Panel
══════════════════════════════════════════════════════════ */
.admin-layout {
  display: flex; min-height: 100vh;
}
.admin-sidebar {
  width: 240px; flex-shrink: 0;
  background: linear-gradient(180deg, #004d26 0%, #003a1c 100%);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand {
  padding: 20px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}
.sidebar-nav {
  display: flex; flex-direction: column;
  padding: 12px 10px; flex: 1;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  color: rgba(255,255,255,0.7); font-size: 13.5px; font-weight: 600;
  text-decoration: none; transition: all 0.18s; margin-bottom: 2px;
}
.sidebar-link:hover { background: rgba(255,255,255,0.08); color: white; text-decoration: none; }
.sidebar-link.active { background: var(--kp-green); color: white; }
.sidebar-user {
  padding: 14px 18px; border-top: 1px solid rgba(255,255,255,0.08);
}
.admin-main {
  flex: 1; background: var(--cream); min-width: 0;
  display: flex; flex-direction: column;
}
.admin-topbar {
  background: white; padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; position: sticky; top: 0; z-index: 10;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.admin-page-title {
  font-family: 'Merriweather', serif; font-size: 18px;
  color: var(--kp-green); margin: 0;
}
.admin-main > .dash-stats,
.admin-main > .card,
.admin-main > .tbl-wrap,
.admin-main > .filter-bar,
.admin-main > .alert,
.admin-main > .pagination,
.admin-main > div:not(.admin-topbar):not(.admin-layout) {
  padding-left: 28px; padding-right: 28px;
}
.admin-main > .card { margin: 20px 28px 0; }
.admin-main > .dash-stats { margin: 20px 28px 0; }
.admin-main > .filter-bar { margin: 16px 28px 0; }
.admin-main > .tbl-wrap { margin: 0 28px; }
.admin-main > .alert { margin: 16px 28px 0; }

/* Pagination */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 28px; }
.pagination a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 7px; border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--kp-green); text-decoration: none;
  transition: all 0.18s;
}
.pagination a:hover { background: var(--kp-green); color: white; border-color: var(--kp-green); }
.pagination a.active { background: var(--kp-green); color: white; border-color: var(--kp-green); }

/* Code tags */
code { background: #e8e8e8; padding: 2px 7px; border-radius: 4px; font-family: 'Courier New', monospace; font-size: 12px; }

/* Password strength */
#strength-bar { transition: width 0.3s, background 0.3s; }

@media(max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; }
  .admin-topbar { padding: 12px 16px; }
  .admin-main > .card { margin: 14px 16px 0; }
  .admin-main > .dash-stats { margin: 14px 16px 0; }
  .admin-main > .filter-bar { margin: 12px 16px 0; }
  .admin-main > .tbl-wrap { margin: 0 16px; }
  .admin-main > .alert { margin: 12px 16px 0; }
  .pagination { margin: 12px 16px; }
}
