/* =====================================================
   Neri Excellence Award — red / green / black theme
   ===================================================== */
:root {
  --red: #EB0029;
  --green: #3CB371;
  --black: #1A1A1A;
  --bg: #ffffff;
  --grey-50: #f7f7f8;
  --grey-100: #eeeef0;
  --grey-200: #e2e2e6;
  --grey-400: #9a9aa2;
  --grey-600: #55555e;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(26, 26, 26, .08);
  --shadow-sm: 0 2px 10px rgba(26, 26, 26, .07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* This site is a fixed LIGHT theme (white content, dark brand bands only).
   Declaring it prevents OS/browser dark mode and "dark reader" extensions
   from auto-darkening and dimming the pages. */
html {
  color-scheme: light;
  background: #fff;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--black);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p  { color: var(--grey-600); }

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- Header ---------------- */
.site-header { background: var(--black); color: #fff; position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none !important; }
.brand-logo {
  width: 42px; height: 42px; object-fit: contain;
  background: #fff; border-radius: 10px; padding: 3px; flex: none;
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--red), #ff5a75);
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.3rem; color: #fff;
}
.brand-text strong { display: block; font-size: .95rem; line-height: 1.15; }
.brand-text small { color: #b9b9c0; font-size: .72rem; }

.main-nav { display: flex; gap: 4px; }
.main-nav a {
  color: #d8d8de; padding: 8px 14px; border-radius: 8px;
  font-size: .92rem; font-weight: 500; text-decoration: none !important;
}
.main-nav a:hover { background: rgba(255,255,255,.09); color: #fff; }
.main-nav a.nav-admin {
  background: var(--red); color: #fff; margin-left: 6px;
}
.main-nav a.nav-admin:hover { background: #c5001f; }

.nav-toggle {
  display: none; background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
  border: 1px solid rgba(255,255,255,.25); border-radius: 9px; padding: 8px 12px;
  font-size: 1.05rem; line-height: 1; min-width: 44px; min-height: 44px;
  align-items: center; justify-content: center;
}
.nav-toggle:hover { background: rgba(255,255,255,.16); }

/* ---------------- Deadline countdown bar ---------------- */
.deadline-bar { background: linear-gradient(90deg, var(--red), #b00020); color: #fff; }
.deadline-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 20px; padding: 8px 20px; font-size: .88rem;
}
.deadline-label { font-weight: 600; white-space: nowrap; }
.deadline-date { opacity: .9; white-space: nowrap; }
.countdown { display: flex; gap: 8px; }
.cd-box {
  background: rgba(255,255,255,.16); border-radius: 8px;
  padding: 3px 10px; text-align: center; min-width: 52px;
}
.cd-box b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.cd-box small { font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.countdown.ended { display: none; }

/* ---------------- Hero ---------------- */
.hero {
  background:
    radial-gradient(1000px 400px at 85% -10%, rgba(60,179,113,.18), transparent 60%),
    radial-gradient(800px 420px at 0% 0%, rgba(235,0,41,.14), transparent 55%),
    var(--black);
  color: #fff;
  padding: 64px 0 72px;
}
.hero .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.hero-kicker {
  display: inline-block; background: rgba(60,179,113,.18); color: #7ee0ac;
  border: 1px solid rgba(60,179,113,.4); padding: 4px 12px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 16px;
}
.hero h1 { font-size: 2.6rem; margin-bottom: 14px; color: #fff; }
.hero h1 em { font-style: normal; color: #ff5a75; }
.hero p.lead { color: #c9c9d2; font-size: 1.05rem; max-width: 34rem; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

.hero-card {
  background: #fff; color: var(--black); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; font-size: .92rem;
}
.hero-card h3 { margin-bottom: 10px; color: var(--red); }
.hero-card ul { list-style: none; }
.hero-card li { padding: 7px 0 7px 26px; position: relative; border-bottom: 1px dashed var(--grey-200); }
.hero-card li:last-child { border-bottom: 0; }
.hero-card li::before { content: '✓'; position: absolute; left: 4px; color: var(--green); font-weight: 700; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px; border: 0; cursor: pointer;
  font-weight: 600; font-size: .95rem; text-decoration: none !important;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(235,0,41,.35); }
.btn-primary:hover { background: #c5001f; }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 6px 18px rgba(60,179,113,.3); }
.btn-green:hover { background: #2f9660; }
.btn-dark { background: var(--black); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--black); border: 1.5px solid var(--grey-200); }
.btn-ghost:hover { border-color: var(--black); }
.btn-ghost-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.4); }
.btn-ghost-light:hover { border-color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .85rem; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* ---------------- Sections & cards ---------------- */
.section { padding: 48px 0; }
.section-alt { background: var(--grey-50); }
.section-head { text-align: center; max-width: 40rem; margin: 0 auto 32px; }
.section-head .kicker {
  color: var(--green); font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; font-size: .75rem;
}
.section-head h2 { margin: 6px 0 10px; }
.section-head p { color: var(--grey-600); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }

.card {
  background: #fff; border: 1px solid var(--grey-200); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: 8px; }
.card .icon { font-size: 1.6rem; margin-bottom: 10px; display: block; }

.scholarship-card { position: relative; overflow: hidden; }
.scholarship-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--red), var(--green));
}
.scholarship-card .meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.achievers-card { border-top-width: 4px; border-top-color: var(--green); }
.ach-points { display: grid; grid-template-columns: 1fr; gap: 7px; font-size: .9rem; color: var(--grey-600); }
.ach-point { padding-left: 24px; position: relative; }
.ach-point::before { content: '★'; position: absolute; left: 2px; color: var(--green); }
@media (min-width: 861px) {
  .ach-points { grid-template-columns: 1fr 1fr; }
}
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .74rem; font-weight: 600;
  background: var(--grey-100); color: var(--grey-600);
}
.badge-green { background: rgba(60,179,113,.14); color: #2f9660; }
.badge-red { background: rgba(235,0,41,.1); color: var(--red); }
.badge-black { background: var(--black); color: #fff; }

/* ---------------- Footer CTA band ---------------- */
.footer-cta {
  background:
    radial-gradient(700px 300px at 90% -20%, rgba(60,179,113,.35), transparent 60%),
    radial-gradient(600px 280px at 0% 120%, rgba(235,0,41,.3), transparent 55%),
    var(--black);
  color: #fff;
  padding: 46px 0;
  margin-top: 40px;
}
.footer-cta-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.footer-cta h3 { font-size: 1.45rem; margin-bottom: 6px; }
.footer-cta p { color: #c9c9d2; font-size: .95rem; max-width: 34rem; }
.footer-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--black); color: #c9c9d2; border-top: 1px solid rgba(255,255,255,.08); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr .8fr .8fr 1fr;
  gap: 36px; padding-top: 52px; padding-bottom: 40px;
}

.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: #9a9aa2; font-size: .9rem; max-width: 26rem; }
.footer-brand p strong { color: #e8e8ec; }

.footer-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.footer-badge {
  font-size: .74rem; font-weight: 600; padding: 4px 11px; border-radius: 999px;
  background: rgba(255,255,255,.07); color: #d8d8de; border: 1px solid rgba(255,255,255,.12);
}
.footer-badge.green {
  background: rgba(60,179,113,.16); color: #7ee0ac; border-color: rgba(60,179,113,.4);
}

.footer-col h4 {
  color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: 14px; padding-bottom: 8px; position: relative;
}
.footer-col h4::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 26px; height: 3px;
  border-radius: 3px; background: linear-gradient(90deg, var(--red), var(--green));
}
.footer-col a {
  display: block; color: #9a9aa2; text-decoration: none !important;
  padding: 5px 0; font-size: .9rem; transition: color .12s ease, padding-left .12s ease;
}
.footer-col a:hover { color: #fff; padding-left: 4px; }
.footer-note {
  display: inline-block; margin-top: 10px; font-size: .8rem; color: #ff8ba0;
  background: rgba(235,0,41,.1); border: 1px solid rgba(235,0,41,.3);
  padding: 4px 11px; border-radius: 999px;
}

.footer-contact .fc-name { color: #e8e8ec; font-weight: 600; font-size: .95rem; }
.footer-contact .fc-mail {
  display: inline-block; color: #7ee0ac; font-weight: 600; font-size: .92rem;
  margin: 6px 0 10px; text-decoration: none !important;
}
.footer-contact .fc-mail:hover { text-decoration: underline !important; }
.footer-contact .fc-muted { color: #77777f; font-size: .82rem; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 0; }
.footer-bottom-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; font-size: .8rem; color: #77777f;
}
.footer-bottom-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-bottom a { color: #9a9aa2; text-decoration: none !important; }
.footer-bottom a:hover { color: #fff; }
.footer-pill {
  background: rgba(60,179,113,.14); color: #7ee0ac; font-weight: 600;
  padding: 3px 11px; border-radius: 999px; font-size: .74rem;
  border: 1px solid rgba(60,179,113,.35);
}

/* ---------------- Application wizard ---------------- */
.wizard-progress {
  background: var(--black); color: #fff; padding: 14px 0;
}
.wizard-progress .wrap { display: flex; align-items: center; gap: 4px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.wizard-progress .wrap::-webkit-scrollbar { display: none; }
.wp-step {
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: .8rem; color: #b9b9c0; padding: 4px 8px; border-radius: 8px;
}
.wp-step .dot {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: .72rem; font-weight: 700;
  background: rgba(255,255,255,.12); color: #c9c9d2;
  border: 1.5px solid transparent;
}
.wp-step.active { color: #fff; font-weight: 600; }
.wp-step.active .dot { background: var(--red); color: #fff; }
.wp-step.done { color: #7ee0ac; }
.wp-step.done .dot { background: rgba(60,179,113,.25); color: #7ee0ac; }
.wp-sep { color: rgba(255,255,255,.25); font-size: .7rem; }

.form-panel {
  background: #fff; border: 1px solid var(--grey-200); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px; margin: 26px auto;
}
.form-panel h2 { margin-bottom: 4px; }
.form-panel .sub { color: var(--grey-600); margin-bottom: 20px; font-size: .95rem; }

.form-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.form-actions .right { display: flex; gap: 10px; margin-left: auto; }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--grey-400); font-size: .8rem; }
.req::after { content: ' *'; color: var(--red); }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 13px; border: 1.5px solid var(--grey-200);
  border-radius: 10px; font: inherit; font-size: .95rem; background: #fff; color: var(--black);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(235,0,41,.12); }
textarea.input { min-height: 90px; resize: vertical; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.field-row.two-up { grid-template-columns: 1fr 1fr; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.choice-card {
  border: 1.5px solid var(--grey-200); border-radius: 12px; padding: 16px;
  cursor: pointer; display: block; transition: border-color .12s ease, box-shadow .12s ease;
  background: #fff;
}
.choice-card:hover { border-color: var(--grey-400); }
.choice-card input { position: absolute; opacity: 0; }
.choice-card.selected { border-color: var(--red); box-shadow: 0 0 0 3px rgba(235,0,41,.1); background: #fff7f8; }
.choice-card .cc-title { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.choice-card .cc-desc { font-size: .83rem; color: var(--grey-600); margin-top: 4px; }
.choice-card .cc-dot {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--grey-200);
  display: inline-block; flex: none;
}
.choice-card.selected .cc-dot { border-color: var(--red); background: var(--red); box-shadow: inset 0 0 0 3px #fff; }

.check-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.check-row input { width: 18px; height: 18px; accent-color: var(--red); }
.check-row label { font-size: .95rem; }

/* Upload boxes */
.upload-box { border: 2px dashed var(--grey-200); border-radius: 12px; padding: 16px; text-align: center; background: var(--grey-50); }
.upload-box.has-file { border-color: var(--green); background: rgba(60,179,113,.06); }
.upload-box input[type=file] { display: none; }
.upload-box .ub-btn { margin-top: 8px; }
.upload-box .ub-name { margin-top: 8px; font-size: .84rem; color: var(--green); font-weight: 600; word-break: break-all; }

/* Checklist */
.doc-checklist { border: 1px solid var(--grey-200); border-radius: 12px; overflow: hidden; margin-top: 10px; }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--grey-200); flex-wrap: wrap; }
.doc-row:last-child { border-bottom: 0; }
.doc-row .dc-status { font-size: .78rem; font-weight: 700; white-space: nowrap; }
.dc-uploaded { color: var(--green); }
.dc-required { color: var(--red); }
.doc-row .dc-body { flex: 1; min-width: 200px; }
.doc-row .dc-title { font-weight: 600; font-size: .92rem; }
.doc-row .dc-desc { font-size: .8rem; color: var(--grey-400); }

/* Upload progress */
.upload-progress {
  margin-top: 20px; padding: 16px 18px;
  border: 1.5px solid rgba(60,179,113,.4); border-radius: 12px;
  background: rgba(60,179,113,.06);
}
.upload-progress.up-error {
  border-color: rgba(235,0,41,.4); background: rgba(235,0,41,.05);
}
.up-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.up-label { font-weight: 600; font-size: .92rem; }
.up-pct { font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }
.up-track {
  height: 10px; border-radius: 6px; background: var(--grey-100);
  overflow: hidden; margin-top: 10px;
}
.up-fill {
  height: 100%; width: 0%; border-radius: 6px;
  background: linear-gradient(90deg, var(--green), #6fd39b);
  transition: width .25s ease;
}
.upload-progress.up-error .up-fill { background: var(--red); }
.up-note { font-size: .82rem; color: var(--grey-600); margin-top: 10px; }
.up-static-note { font-size: .82rem; color: var(--grey-400); margin-top: 14px; }

/* Dynamic sub-blocks */
.toggle-block { display: none; }
.toggle-block.open { display: block; animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.subsection {
  border: 1px solid var(--grey-200); border-radius: 12px; padding: 18px; margin-bottom: 16px;
  background: var(--grey-50);
}
.subsection > h3 { font-size: 1rem; margin-bottom: 12px; color: var(--red); }

/* Sibling / achievement repeater rows */
.repeater-row { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; align-items: start; margin-bottom: 10px; }
.repeater-row .input { margin: 0; }
.remove-row {
  background: rgba(235,0,41,.08); color: var(--red); border: 0; border-radius: 8px;
  width: 36px; height: 36px; cursor: pointer; font-size: 1rem; flex: none; margin-top: 1px;
}
.remove-row:hover { background: rgba(235,0,41,.18); }

/* ---------------- Alerts ---------------- */
.alert { padding: 13px 16px; border-radius: 10px; margin-bottom: 16px; font-size: .92rem; border: 1px solid transparent; }
.alert-success { background: rgba(60,179,113,.1); border-color: rgba(60,179,113,.35); color: #1d7a4c; }
.alert-error { background: rgba(235,0,41,.07); border-color: rgba(235,0,41,.3); color: #b00020; }
.alert-info { background: rgba(37,99,235,.07); border-color: rgba(37,99,235,.25); color: #1e50a0; }
.alert ul { margin: 6px 0 0 18px; }

/* ---------------- Review summary ---------------- */
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.review-card h3 {
  font-size: .95rem; color: var(--red); text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid var(--grey-100);
}
.review-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: .88rem; }
.review-card dt { color: var(--grey-400); font-weight: 500; white-space: nowrap; }
.review-card dd { color: var(--black); font-weight: 500; text-align: right; }
.review-photo { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; border: 2px solid var(--grey-200); }

/* ---------------- Success page ---------------- */
.success-hero { text-align: center; padding: 60px 20px 30px; }
.success-icon {
  width: 88px; height: 88px; margin: 0 auto 20px; border-radius: 50%;
  background: rgba(60,179,113,.12); display: grid; place-items: center; font-size: 2.6rem; color: var(--green);
}
.success-hero h1 { margin-bottom: 10px; }
.app-number-box {
  display: inline-block; background: var(--black); color: #fff; font-family: ui-monospace, monospace;
  font-size: 1.4rem; letter-spacing: .06em; padding: 14px 30px; border-radius: 12px; margin: 14px 0;
}
.success-details { max-width: 34rem; margin: 0 auto; text-align: left; }

/* ---------------- Status page ---------------- */
.status-pill {
  display: inline-block; padding: 5px 14px; border-radius: 999px; color: #fff;
  font-size: .82rem; font-weight: 700; background: var(--grey-400);
}

/* ---------------- Admin layout ---------------- */
.admin-shell { display: flex; min-height: 100vh; background: var(--grey-50); }
.admin-side {
  width: 240px; background: var(--black); color: #fff; padding: 20px 14px; flex: none;
  display: flex; flex-direction: column; gap: 4px;
}
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.admin-side .brand-logo { width: 36px; height: 36px; padding: 2px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-foot { margin-top: auto; padding-top: 20px; }
.side-toggle {
  display: none; align-items: center; gap: 7px; background: rgba(255,255,255,.08); color: #fff;
  border: 1px solid rgba(255,255,255,.18); border-radius: 9px; padding: 9px 13px;
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.side-toggle:hover { background: rgba(255,255,255,.16); }
.admin-side a.side-link {
  color: #c9c9d2; padding: 10px 12px; border-radius: 9px; font-size: .9rem;
  font-weight: 500; text-decoration: none !important; display: flex; gap: 10px; align-items: center;
}
.admin-side a.side-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-side a.side-link.active { background: var(--red); color: #fff; }
.admin-side .side-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: #6d6d76; margin: 14px 8px 4px; }
.admin-main { flex: 1; padding: 26px 30px 60px; min-width: 0; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-topbar h1 { font-size: 1.4rem; }
.admin-user { display: flex; align-items: center; gap: 12px; font-size: .88rem; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--green); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat-card { background: #fff; border: 1px solid var(--grey-200); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.stat-card .sc-label { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--grey-400); }
.stat-card .sc-value { font-size: 1.9rem; font-weight: 800; margin-top: 4px; }
.stat-card .sc-bar { height: 4px; border-radius: 4px; margin-top: 10px; background: var(--grey-100); overflow: hidden; }
.stat-card .sc-bar span { display: block; height: 100%; border-radius: 4px; }

/* Tables */
.table-wrap {
  background: #fff; border: 1px solid var(--grey-200); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch;
}
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 720px; }
table.table.table-docs { min-width: 540px; }
.table th {
  text-align: left; padding: 12px 16px; font-size: .74rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--grey-400); border-bottom: 1px solid var(--grey-200);
  background: var(--grey-50); white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--grey-100); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--grey-50); }
.table .mono { font-family: ui-monospace, monospace; font-weight: 600; }

/* Filters bar */
.filters-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: end; }
.filters-bar .field { margin: 0; }
.filters-bar .input, .filters-bar select.input { width: auto; min-width: 150px; padding: 8px 11px; font-size: .88rem; }

/* Two-column admin layouts (collapse on smaller screens) */
.admin-split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.admin-split > * { min-width: 0; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.detail-grid > * { min-width: 0; }

/* Admin detail view */
.detail-section { margin-bottom: 22px; }
.detail-section h2 { font-size: 1.05rem; color: var(--red); margin-bottom: 12px; padding-bottom: 6px; border-bottom: 2px solid var(--grey-100); }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 24px; }
.kv { padding: 6px 0; }
.kv .k { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--grey-400); font-weight: 600; }
.kv .v { font-size: .95rem; font-weight: 500; margin-top: 1px; word-break: break-word; }

/* Timeline */
.timeline { list-style: none; }
.timeline li { position: relative; padding: 0 0 18px 26px; border-left: 2px solid var(--grey-200); margin-left: 8px; }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before {
  content: ''; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--green); border: 2.5px solid #fff; box-shadow: 0 0 0 2px var(--green);
}
.timeline .tl-when { font-size: .75rem; color: var(--grey-400); }
.timeline .tl-what { font-size: .9rem; font-weight: 600; }

/* Login page */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--black); padding: 20px; }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 18px; padding: 34px; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.auth-card .brand { color: var(--black); margin-bottom: 22px; }
.auth-card .brand-text strong { color: var(--black); }
.auth-card .brand-text small { color: var(--grey-400); }

/* Print stylesheet */
@media print {
  .site-header, .footer-cta, .site-footer, .no-print, .wizard-progress, .form-actions,
  .admin-side, .nav-toggle, .deadline-bar, .filters-bar { display: none !important; }
  body { background: #fff; }
  .admin-main { padding: 0; }
  .form-panel, .card, .table-wrap { box-shadow: none; border: 1px solid #ccc; }
  .app-number-box { background: #fff; color: #000; border: 2px solid #000; }
  a { color: #000 !important; text-decoration: none !important; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1080px) {
  .admin-split, .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .hero h1 { font-size: 2rem; }
  .header-inner { gap: 8px; }
  .brand-text small { display: none; }
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--black); flex-direction: column; padding: 10px 14px 14px; gap: 3px;
    box-shadow: 0 18px 30px rgba(0,0,0,.35);
    border-top: 1px solid rgba(255,255,255,.08);
    z-index: 60;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 14px; font-size: 1rem; border-radius: 9px; }
  .main-nav a.nav-admin { margin-left: 0; text-align: center; }
  .deadline-inner { padding: 6px 14px; gap: 4px 10px; }
  .deadline-label { font-size: .78rem; }
  .deadline-date { display: none; }
  .cd-box { min-width: 40px; padding: 2px 7px; border-radius: 7px; }
  .cd-box b { font-size: .92rem; }
  .cd-box small { font-size: .55rem; }
  .admin-shell { flex-direction: column; }
  .admin-side {
    position: sticky; top: 0; z-index: 50; width: 100%; flex-direction: column;
    align-items: stretch; gap: 0; padding: 8px 12px;
  }
  .side-head { margin-bottom: 0; }
  .admin-side .brand { margin: 0; }
  .admin-side .brand-text { display: none; }
  .side-toggle { display: inline-flex; }
  .side-nav { display: none; }
  .admin-side.nav-open .side-nav {
    display: flex; padding-top: 10px; max-height: calc(100vh - 90px);
    overflow-y: auto; overscroll-behavior: contain;
  }
  .admin-side a.side-link { padding: 11px 12px; font-size: .92rem; min-height: 44px; }
  .admin-side .side-section { display: block; margin: 12px 8px 4px; }
  .side-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12); }
  .admin-main { padding: 18px 16px 50px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-cta-inner { flex-direction: column; align-items: flex-start; }

  .repeater-row { grid-template-columns: 1fr 1fr; }
  .repeater-row .remove-row { grid-column: span 2; justify-self: end; }
}
@media (max-width: 700px) {
  /* Wide admin tables become stacked cards so nothing scrolls sideways */
  table.table { font-size: .86rem; min-width: 540px; }
  .table th, .table td { padding: 10px 12px; }
  table.table.stack { min-width: 0; }
  table.table.stack thead { display: none; }
  table.table.stack tbody, table.table.stack tr, table.table.stack td { display: block; width: auto; }
  table.table.stack tr { border-bottom: 1px solid var(--grey-200); }
  table.table.stack tr:last-child { border-bottom: 0; }
  table.table.stack tr:hover td { background: transparent; }
  table.table.stack td {
    display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
    padding: 7px 14px; border-bottom: 0; text-align: right;
  }
  table.table.stack td::before {
    content: attr(data-label); flex: none; font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; color: var(--grey-400); text-align: left;
  }
  table.table.stack td[data-label=""]::before { display: none; }
  table.table.stack td[data-label=""] { justify-content: flex-end; padding-top: 10px; }
  table.table.stack td[colspan] { display: block; text-align: center; padding: 26px 14px; }
  table.table.stack td[colspan]::before { display: none; }
}
@media (max-width: 520px) {
  h1 { font-size: 1.6rem; }
  .hero { padding: 44px 0 50px; }
  .hero h1 { font-size: 1.7rem; }
  .form-panel { padding: 20px 16px; }
  .field-row { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: 1fr; }
  .review-card dl { grid-template-columns: 1fr; }
  .review-card dd { text-align: left; }
  .cd-box { min-width: 40px; padding: 2px 7px; }
  .deadline-label { white-space: normal; }
  /* Wizard: give the form maximum room on phones */
  .section { padding: 30px 0 40px; }
  .form-panel { padding: 16px 13px; border-radius: 14px; }
  .wrap { padding: 0 13px; }
  .wizard-progress { padding: 8px 0; }
  .wizard-progress .wrap { gap: 2px; padding-bottom: 0; }
  .wp-step { font-size: .68rem; padding: 3px 5px; gap: 5px; }
  .wp-step .dot { width: 19px; height: 19px; font-size: .62rem; }
  .wp-sep { display: none; }
  .form-actions { flex-direction: column-reverse; gap: 10px; }
  .form-actions .right, .form-actions .right .btn { width: 100%; }
  .app-number-box { font-size: 1.1rem; padding: 12px 18px; }
  .brand-text strong {
    font-size: .84rem; max-width: 170px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
  }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom-inner { justify-content: center; }

  /* Admin: tighter chrome on phones */
  .admin-main { padding: 14px 12px 44px; }
  .admin-topbar { gap: 8px; margin-bottom: 16px; }
  .admin-topbar h1 { font-size: 1.15rem; }
  .admin-user { font-size: .8rem; }
  .admin-user .avatar { width: 32px; height: 32px; font-size: .88rem; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
  .stat-card { padding: 13px; }
  .stat-card .sc-label { font-size: .7rem; }
  .stat-card .sc-value { font-size: 1.45rem; }
  .kv-grid { grid-template-columns: 1fr; }
  .detail-section h2 { font-size: .98rem; }
  .card { padding: 16px; }
  .filters-bar .field { flex: 1 1 100%; }
  .filters-bar .input, .filters-bar select.input { width: 100%; min-width: 0; }
  .filters-bar .btn { width: 100%; justify-content: center; }
  .field-row.two-up { grid-template-columns: 1fr; }
}
