/* ============ NCP Youth Registration Portal ============ */
:root {
  --primary: #0b5fa5;          /* NCP blue */
  --primary-light: #1e88d1;
  --accent: #f7941d;           /* saffron */
  --success: #2e7d32;
  --danger: #c62828;
  --whatsapp: #25d366;
  --bg: #f2f7fb;
  --surface: #ffffff;
  --text: #16222e;
  --muted: #5d6b7a;
  --border: #d9e3ec;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(11, 95, 165, .10);
  --font: "Segoe UI", system-ui, -apple-system, "Noto Sans", "Noto Sans Devanagari", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* the hidden attribute must always win, even over display:flex/grid classes */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- header ---------- */
.topbar { background: linear-gradient(120deg, var(--primary), var(--primary-light)); color: #fff; box-shadow: var(--shadow); }
.topbar-inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 14px 20px; }
.logo { font-size: 2rem; }
.topbar h1 { font-size: 1.2rem; font-weight: 600; letter-spacing: .2px; }
.topbar p { font-size: .78rem; opacity: .88; }

/* ---------- layout ---------- */
.container { max-width: 900px; width: 100%; margin: 0 auto; padding: 24px 16px 64px; flex: 1; }
.footer { background: #0a1c2e; color: #9db1c4; text-align: center; font-size: .78rem; padding: 18px 16px; }
.home-link { display: inline-block; color: var(--muted); text-decoration: none; font-size: .85rem; margin-bottom: 12px; }
.home-link:hover { color: var(--primary); }

/* ---------- language switch ---------- */
.lang-switch { margin-left: auto; display: flex; background: rgba(255,255,255,.16); border-radius: 999px; padding: 3px; }
.lang-switch button { border: none; background: transparent; color: #fff; font: inherit; font-size: .8rem; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.lang-switch button.active { background: #fff; color: var(--primary); font-weight: 700; }

/* ---------- landing: hero (campaign banner + overlaid welcome text) ----------
   The banner is finished artwork: portrait on the left, headline on the right,
   with empty space under the headline. On wide screens the welcome copy and the
   CTA buttons sit in exactly that space; below 860px the banner keeps its own
   proportions and the copy flows underneath it. */
.hero-banner { position: relative; background: #eef4fc; overflow: hidden; }
.hero-bg { display: block; width: 100%; height: auto; }
.hero-text { position: absolute; left: 43.5%; width: 47%; top: 63%; text-align: center; }
.hero-kicker { font-size: clamp(.62rem, 1.05vw, .95rem); color: #e65100; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 600; margin-bottom: .3vw; }
.hero-text h2 { font-size: clamp(.95rem, 1.95vw, 1.7rem); line-height: 1.25; margin-bottom: .5vw; color: var(--primary); }
.hero-sub { font-size: clamp(.68rem, 1.1vw, .98rem); color: #2a3158; max-width: 34em; margin: 0 auto; }
.hero-sub strong { color: #e65100; }
.hero-cta { display: flex; gap: 12px; margin-top: 1vw; flex-wrap: wrap; justify-content: center; }
.hero-cta .btn { font-size: clamp(.7rem, 1.02vw, .95rem); padding: .55vw 1.4vw; }
.hero-cta .btn-lg { font-size: clamp(.74rem, 1.12vw, 1.02rem); }

/* ---------- brand marks ---------- */
/* the logo is dark line-art on transparent — a white glow keeps it legible
   against the blue header gradient and the dark footer */
.brand-logo { height: 54px; width: auto; object-fit: contain; filter: drop-shadow(0 0 2px rgba(255,255,255,.95)) drop-shadow(0 0 10px rgba(255,255,255,.5)); }
.footer-logo { height: 46px; width: auto; object-fit: contain; margin-bottom: 8px; filter: drop-shadow(0 0 2px rgba(255,255,255,.9)) drop-shadow(0 0 10px rgba(255,255,255,.4)); }

.section { max-width: 1000px; margin: 0 auto; padding: 48px 20px; }
.section-alt { max-width: none; background: #e6f0f9; }
.section-alt > * { max-width: 1000px; margin-left: auto; margin-right: auto; }
.section-title { text-align: center; color: var(--primary); font-size: 1.55rem; margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 24px; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-top: 26px; }
.why-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 22px; border-top: 4px solid var(--accent); }
.why-icon { font-size: 2.2rem; margin-bottom: 10px; }
.why-card h3 { color: var(--primary); font-size: 1.05rem; margin-bottom: 8px; }
.why-card p { color: var(--muted); font-size: .93rem; }
.how-strip { display: flex; align-items: center; justify-content: center; gap: 32px; padding: 30px 20px 8px; flex-wrap: wrap; }
.how-step { text-align: center; max-width: 220px; }
.how-n { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: 1.4rem; margin-bottom: 12px; box-shadow: 0 4px 14px rgba(11,95,165,.3); }
.how-step p { font-size: 1.02rem; }
.how-arrow { color: var(--accent); font-size: 2rem; font-weight: 700; }
.cta-band { text-align: center; padding-top: 8px; }

/* ---------- panels & form ---------- */
.panel { display: none; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 28px; animation: rise .35s ease; }
.panel.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.panel h2 { font-size: 1.4rem; color: var(--primary); margin-bottom: 6px; }
.muted { color: var(--muted); margin-bottom: 20px; }
.lead { font-size: 1.03rem; margin: 14px 0; }

/* a titled group of fields inside the single-page form */
.form-section { border: none; margin: 0 0 26px; padding: 0; }
.form-section > legend { display: block; width: 100%; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--primary); padding-bottom: 8px; margin-bottom: 16px; border-bottom: 2px solid var(--border); }
.form-section .sec-n { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .74rem; margin-right: 8px; }

.field { margin-bottom: 18px; }
.field > label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 8px; }
.req { color: var(--danger); }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=password], select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font: inherit; background: #fbfcfe; color: inherit; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(30,136,209,.18); background: #fff; }
input[disabled], select[disabled] { background: #eef0f5; color: var(--muted); }
input.invalid, select.invalid { border-color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.error { display: block; color: var(--danger); font-size: .8rem; min-height: 1em; margin-top: 5px; }
.hint { color: var(--muted); font-size: .84rem; margin: -8px 0 12px; }

.check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: .95rem; }
.check:hover { background: #eef5fb; }
.check input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }
.check.small { padding: 4px 0; font-size: .82rem; color: var(--muted); }

/* Yes / No and Gender pickers */
.option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.option { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--border); border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: all .15s; background: #fbfcfe; }
.option:hover { border-color: var(--primary-light); }
.option:has(input:checked) { border-color: var(--primary); background: #e8f2fb; box-shadow: 0 0 0 2px rgba(11,95,165,.12); }
.option input { accent-color: var(--primary); width: 18px; height: 18px; }

/* the declaration the youth must accept */
.disclaimer { background: #fff8ef; border: 1px solid #ffd9a8; border-radius: 12px; padding: 6px 10px; margin-bottom: 8px; }
.disclaimer .check { font-size: .95rem; font-weight: 500; }

/* ---------- buttons ---------- */
.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.actions.center { justify-content: center; }
.btn { border: none; border-radius: 10px; padding: 13px 26px; font: inherit; font-weight: 600; cursor: pointer; transition: transform .12s, box-shadow .12s, background .2s; text-decoration: none; display: inline-block; text-align: center; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-primary { background: linear-gradient(120deg, var(--primary), var(--primary-light)); color: #fff; box-shadow: 0 4px 14px rgba(11,95,165,.3); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(11,95,165,.42); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary-light); }
.btn-outline:hover { background: #e8f2fb; }
.btn-accent { background: linear-gradient(120deg, var(--accent), #ffb04d); color: #fff; box-shadow: 0 6px 20px rgba(247,148,29,.45); }
.btn-accent:hover { box-shadow: 0 8px 26px rgba(247,148,29,.6); }
.btn-ghost { background: rgba(255,255,255,.9); color: var(--primary); border: 1.5px solid #fff; }
.btn-ghost:hover { background: #fff; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; box-shadow: 0 4px 14px rgba(37,211,102,.35); }
.btn-lg { padding: 15px 32px; font-size: 1.03rem; }
.btn-link { background: none; border: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: .85rem; margin-top: 14px; }

/* ---------- confirmation ---------- */
.center-card { text-align: center; padding: 18px 6px; }
.confetti { font-size: 3.6rem; animation: pop .6s ease; }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
.ref-box { display: inline-block; background: #e8f2fb; border: 1px dashed var(--primary-light); border-radius: 12px; padding: 12px 22px; margin: 14px 0 6px; font-size: 1.25rem; font-weight: 700; letter-spacing: 1px; color: var(--primary); }
.small-print { font-size: .8rem; margin-top: 22px; }

/* ---------- toast & loader ---------- */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(80px); background: #22303c; color: #fff; padding: 13px 22px; border-radius: 10px; font-size: .92rem; opacity: 0; transition: all .3s; z-index: 60; max-width: 92vw; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }
.loader-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.65); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 50; }
.spinner { width: 48px; height: 48px; border: 5px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- admin ---------- */
.admin-wrap { max-width: 1240px; margin: 0 auto; padding: 24px 16px 64px; flex: 1; width: 100%; }
.login-card { max-width: 400px; margin: 8vh auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 38px 34px; border-top: 5px solid var(--primary); }
.login-head { text-align: center; margin-bottom: 26px; }
.login-logo { font-size: 2.8rem; display: block; margin-bottom: 8px; }
.login-head h2 { color: var(--primary); font-size: 1.4rem; margin-bottom: 4px; }
.login-head p { color: var(--muted); font-size: .85rem; margin: 0; }
.login-card .btn { width: 100%; margin-top: 8px; padding: 14px; font-size: 1rem; }
.login-card .field { margin-bottom: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 18px; text-align: center; border-top: 4px solid var(--primary-light); transition: transform .15s, box-shadow .15s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(11,95,165,.16); }
.stat-card .ic { font-size: 1.3rem; margin-bottom: 2px; }
.stat-card .num { font-size: 1.9rem; font-weight: 700; color: var(--primary); }
.stat-card .lbl { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.stat-card .sub { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.stat-card.pending { border-top-color: var(--accent); }
.stat-card.completed { border-top-color: var(--success); }
.stat-card.verified { border-top-color: #6a1b9a; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 22px; }
.card h3 { color: var(--primary); margin-bottom: 4px; font-size: 1.05rem; }
.card-desc { color: var(--muted); font-size: .85rem; margin-bottom: 16px; line-height: 1.5; }
.card-split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; }
tbody tr:nth-child(even) td { background: #fafcfe; }
tr:hover td { background: #eef5fb; }
.total-row td { font-weight: 700; background: #e8f2fb !important; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.badge.Submitted { background: #fff3e0; color: #e65100; }
.badge.Verified { background: #e8f5e9; color: var(--success); }
.badge.Rejected { background: #ffebee; color: var(--danger); }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar input, .filter-bar select { flex: 1; min-width: 140px; }
.icon-btn { background: none; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: .85rem; }
.icon-btn:hover { background: #e8f2fb; }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; font-size: .88rem; color: var(--muted); flex-wrap: wrap; }
.pager .icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-size { display: flex; align-items: center; gap: 6px; font-size: .82rem; }
.page-size select { padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.trend { display: flex; align-items: stretch; gap: 6px; height: 170px; padding-top: 8px; }
.trend .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.trend .bar { width: 70%; max-width: 34px; background: linear-gradient(180deg, var(--primary-light), var(--primary)); border-radius: 4px 4px 0 0; }
.trend .bar-val { font-size: .72rem; color: var(--muted); line-height: 1; min-height: .72rem; }
.trend .bar-day { font-size: .68rem; color: var(--muted); border-top: 1px solid var(--border); width: 100%; text-align: center; padding-top: 4px; white-space: nowrap; }

/* record detail drawer */
.drawer { position: fixed; inset: 0; background: rgba(10,28,46,.55); z-index: 70; display: flex; justify-content: flex-end; }
.drawer-box { background: var(--surface); width: min(520px, 100%); height: 100%; overflow-y: auto; padding: 26px 24px; box-shadow: -6px 0 30px rgba(0,0,0,.2); }
.drawer-box h3 { color: var(--primary); margin-bottom: 2px; }
.drawer-close { float: right; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: 16px; }
.detail-grid dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-top: 12px; }
.detail-grid dd { font-size: .95rem; }

/* ---------- responsive ---------- */
/* narrow screens: banner on top, welcome text below it in normal flow */
@media (max-width: 860px) {
  .hero-text { position: static; width: auto; padding: 24px 18px 32px; }
  .hero-kicker { font-size: .9rem; margin-bottom: 6px; }
  .hero-text h2 { font-size: 1.5rem; margin-bottom: 12px; }
  .hero-sub { font-size: .96rem; }
  .hero-cta { margin-top: 20px; }
  .hero-cta .btn { font-size: .95rem; padding: 12px 22px; }
  .hero-cta .btn-lg { font-size: 1rem; }
}

@media (max-width: 640px) {
  .panel { padding: 22px 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .card-split { grid-template-columns: 1fr; }
  .actions { flex-direction: column-reverse; }
  .actions .btn { width: 100%; }
  .btn-lg { width: 100%; padding: 15px 20px; }
  .topbar-inner { flex-wrap: wrap; padding: 12px 14px; }
  .topbar h1 { font-size: 1.02rem; }
  .stat-card .num { font-size: 1.5rem; }
  .section { padding: 34px 16px; }
  .section-title { font-size: 1.3rem; }
  .how-arrow { display: none; }
  .how-strip { gap: 18px; }
  .lang-switch button { padding: 5px 10px; font-size: .74rem; }
  .brand-logo { height: 42px; }
}
