*, *::before, *::after { box-sizing: border-box; }
:root {
    --nmc-blue: #1d4ed8;
    --nmc-indigo: #4f46e5;
    --nmc-purple: #7c3aed;
    --nmc-cyan: #0ea5e9;
    --nmc-green: #16a34a;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f8fafc;
}

.nmc-topbar {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #1e3a8a 100%);
    padding: 0.55rem 0;
    text-align: center;
    color: rgba(255,255,255,.7);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ── Hero ─────────────────────────────────────────── */
.reg-hero {
    background:
        radial-gradient(ellipse 80% 60% at 15% 50%, rgba(99,102,241,.18) 0%, transparent 70%),
        radial-gradient(ellipse 50% 80% at 85% 20%, rgba(14,165,233,.14) 0%, transparent 70%),
        linear-gradient(135deg, #0c1445 0%, #1a2980 40%, #26296e 70%, #1a1a5e 100%);
    padding: 0 0 0 0;
    position: relative;
    overflow: hidden;
}

/* Decorative dot grid */
.reg-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

/* Glow streak */
.reg-hero::after {
    content: '';
    position: absolute;
    top: -80px;
    left: 30%;
    width: 40%;
    height: 200px;
    background: radial-gradient(ellipse, rgba(99,102,241,.3) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Tricolor strip ── */
.reg-hero-tricolor {
    display: flex;
    height: 4px;
    width: 100%;
    position: relative;
    z-index: 2;
}
.tc-saffron { flex: 1; background: #ff9933; }
.tc-white   { flex: 1; background: #ffffff; }
.tc-green   { flex: 1; background: #138808; }

/* ── Inner layout ── */
.reg-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.4rem 1.75rem 2.5rem;
    position: relative;
    z-index: 2;
}

/* ── Left: brand ── */
.reg-hero-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-shrink: 0;
    padding-right: 1.5rem;
    border-right: 1px solid rgba(255,255,255,.15);
}

.reg-hero-logo {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0.4rem;
    box-shadow: 0 0 0 3px rgba(255,255,255,.15), 0 8px 24px rgba(0,0,0,.4);
    overflow: hidden;
}

.reg-hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.reg-hero-org { line-height: 1.3; }

.reg-hero-hindi {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
}

.reg-hero-english {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,.45);
    text-transform: uppercase;
    margin-top: 2px;
}

/* ── Centre: title ── */
.reg-hero-center {
    flex: 1;
    text-align: center;
}

.reg-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 30px;
    padding: 0.18rem 0.8rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255,255,255,.6);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.reg-hero-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0,0,0,.4);
}

.reg-hero-sub {
    font-size: 0.75rem;
    color: rgba(255,255,255,.45);
    margin-top: 0.3rem;
    letter-spacing: 0.01em;
}

/* ── Right: login ── */
.reg-hero-actions { flex-shrink: 0; }

.reg-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(255,255,255,.08);
    border: 1.5px solid rgba(255,255,255,.22);
    color: #fff;
    border-radius: 10px;
    padding: 0.55rem 1.1rem;
    font-size: 0.78rem;
    text-decoration: none;
    line-height: 1.3;
    transition: background .2s, border-color .2s;
}

.reg-login-btn i {
    font-size: 1.15rem;
    opacity: .75;
    flex-shrink: 0;
}

.reg-login-btn span { text-align: left; }
.reg-login-btn strong { font-weight: 700; font-size: 0.82rem; }

.reg-login-btn:hover {
    background: rgba(255,255,255,.16);
    border-color: rgba(255,255,255,.45);
    color: #fff;
}

/* ── Tablet (641px – 900px): collapse to vertical stack ── */
@media (max-width: 900px) and (min-width: 641px) {
    .reg-hero-inner      { flex-wrap: wrap; justify-content: center; gap: 0.85rem; padding: 1.2rem 1.25rem 2.5rem; }
    .reg-hero-brand      { flex: 0 0 auto; padding-right: 1.1rem; }
    .reg-hero-center     { flex: 1 1 100%; order: 3; text-align: center; }
    .reg-hero-actions    { flex: 0 0 auto; }
    .reg-hero-title      { font-size: 1.25rem; }
}

/* ── Mobile (≤640px): full vertical stack ── */
@media (max-width: 640px) {
    .reg-hero-inner  { flex-wrap: wrap; justify-content: center; gap: 0.75rem; padding: 1rem 1rem 2.5rem; }
    .reg-hero-brand  { width: 100%; justify-content: center; padding-right: 0; border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 0.75rem; }
    .reg-hero-center { width: 100%; }
    .reg-hero-actions { width: 100%; display: flex; justify-content: center; }
    .reg-hero-title  { font-size: 1.05rem; }
    .reg-hero-logo   { width: 48px; height: 48px; }
    .reg-hero-hindi  { font-size: 0.9rem; }
}

.reg-card {
    max-width: 860px;
    margin: 1.5rem auto 2rem;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,.12);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.reg-card-body { padding: 2rem 2rem 2.5rem; }

.reg-section {
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.reg-section-head { display: flex; align-items: center; gap: 0.85rem; padding: 0.9rem 1.25rem; border-bottom: 1px solid #f1f5f9; }

/* Send OTP button inside section header (light background) */
.otp-section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 1.25rem;
}

.otp-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.reg-section-head .otp-send-btn {
    background: #16a34a;
    border: 1px solid #15803d;
    color: #fff;
    box-shadow: 0 2px 8px rgba(22,163,74,.35);
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 0.5rem 1.2rem;
}
.reg-section-head .otp-send-btn:hover    { background: #15803d; }
.reg-section-head .otp-send-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Status banner — shown by JS when OTP is sent */
.otp-send-status-bar {
    display: none;
    margin-top: 0.75rem;
    padding: 0.6rem 0.9rem;
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 8px;
    color: #166534;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.4;
}
.otp-send-status-bar:not(:empty) { display: block; }

/* Test OTP badge */
.otp-test-bar {
    display: none;
    margin-top: 0.4rem;
    padding: 0.35rem 0.9rem;
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 8px;
    color: #854d0e;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.otp-test-bar:not(:empty) { display: block; }

.reg-section-head--blue { background: linear-gradient(90deg, #eff6ff, #f8faff); }
.reg-section-head--purple { background: linear-gradient(90deg, #f5f3ff, #fdf8ff); }
.reg-section-head--green { background: linear-gradient(90deg, #f0fdf4, #f8fffa); }

.reg-section-num {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
}

.reg-section-num--blue { background: linear-gradient(135deg,#3b82f6,#1d4ed8); box-shadow: 0 3px 10px rgba(59,130,246,.4); }
.reg-section-num--purple { background: linear-gradient(135deg,#7c3aed,#4f46e5); box-shadow: 0 3px 10px rgba(124,58,237,.4); }
.reg-section-num--green { background: linear-gradient(135deg,#22c55e,#16a34a); box-shadow: 0 3px 10px rgba(34,197,94,.4); }
.reg-section-title { font-weight: 700; font-size: 0.9rem; color: #1e293b; }
.reg-section-sub { font-size: 0.75rem; color: #64748b; margin-top: 1px; }
.reg-section-body { padding: 1.25rem; }

.reg-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.35rem;
}

.reg-field { position: relative; }

.reg-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    line-height: 1;
    color: #9ca3af;
    font-size: 0.82rem;
    pointer-events: none;
    z-index: 2;
    transition: color .2s;
}

.reg-icon--top { top: 0.7rem; transform: none; }

.reg-input {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.875rem;
    min-height: 2.55rem;
    background: #fafafa;
    transition: border-color .2s, box-shadow .2s, background .2s;
    position: relative;
    z-index: 1;
}

input.reg-input,
textarea.reg-input {
    padding: 0.45rem 0.85rem 0.45rem 2.3rem;
}

select.reg-input {
    padding: 0.45rem 0.85rem;
    cursor: pointer;
    appearance: auto;
}

.reg-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
    background: #fff;
    outline: none;
}

.reg-field:focus-within .reg-icon { color: #6366f1; }
.reg-input.is-invalid { border-color: #ef4444 !important; }
.reg-input.is-valid { border-color: #22c55e !important; }
.error-message { font-size: 0.75rem; color: #ef4444; margin-top: 0.2rem; }

.otp-step-wrap {
    border-color: #f1f5f9;
}

.otp-step-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    flex-wrap: wrap;
}

.otp-step-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #fff;
}

.otp-send-btn {
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all .2s ease;
    white-space: nowrap;
}

.otp-send-btn--primary {
    background: #16a34a;
    border: 1px solid #15803d;
    color: #fff;
    box-shadow: 0 3px 10px rgba(22,163,74,.22);
}

.otp-send-btn--primary:hover {
    background: #15803d;
}

.otp-send-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.otp-send-status-bar {
    display: none;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.84rem;
    font-weight: 500;
}

.otp-send-status-bar:not(:empty) {
    display: block;
}

.otp-test-bar {
    display: none;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.8rem;
    font-weight: 600;
}

.otp-test-bar:not(:empty) {
    display: block;
}

.otp-post-send-hint {
    font-size: 0.8rem;
    color: #64748b;
}

.otp-divider {
    border-top: 1px solid #e5e7eb;
}

.otp-col {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    transition: all .2s ease;
}

.otp-col.otp-col--active {
    background: #eff6ff;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.otp-label {
    margin-bottom: 8px;
}

.otp-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.otp-input {
    flex: 1;
    min-height: 48px;
}

.reg-input--plain {
    padding-left: 12px !important;
}

.otp-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

.otp-verify-btn {
    height: 48px;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    background: #fafafa;
    color: #475569;
    padding: 0 16px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .2s, background .2s;
}

.otp-verify-btn:hover:not(:disabled) {
    border-color: #6366f1;
    color: #4f46e5;
    background: #fff;
}

.otp-verify-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.otp-badge-verified {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf3;
    border: 1px solid #86efac;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #166534;
}

.otp-status {
    font-size: 0.78rem;
    margin-top: 6px;
    border-radius: 8px;
}

.otp-status.ok {
    background: #ecfdf3;
    border: 1px solid #86efac;
    color: #166534;
    padding: 10px;
}

.otp-status.err {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
    padding: 10px;
}

#resend_otp_inline_btn {
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
}

#resend_otp_inline_btn:hover {
    color: #1e40af;
    text-decoration: underline;
}

#resend_otp_inline_btn[disabled],
#resend_otp_inline_btn.otp-resend-disabled {
    color: #94a3b8;
    opacity: .8;
    text-decoration: none;
    pointer-events: none;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .otp-input-group {
        flex-direction: column;
    }

    .otp-verify-btn,
    .otp-send-btn {
        width: 100%;
    }
}

.captcha-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.captcha-wrap input.reg-input { flex: 1; min-width: 140px; }

.captcha-box {
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    height: 2.55rem;
    overflow: hidden;
}

.captcha-box img { max-height: 100%; width: auto; object-fit: contain; }

.btn-captcha-refresh {
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
    color: #6366f1;
    padding: 0 0.85rem;
    height: 2.55rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    white-space: nowrap;
}

.btn-captcha-refresh:hover {
    border-color: #6366f1;
    background: #f5f3ff;
}

.reg-submit-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    border-radius: 0 0 20px 20px;
}

.reg-submit-note { font-size: 0.78rem; color: #64748b; }

.btn-reg-submit {
    background: linear-gradient(135deg, #1d4ed8 0%, #4f46e5 60%, #7c3aed 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    padding: 0.6rem 2.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(79,70,229,.4);
    transition: opacity .2s, transform .2s, box-shadow .2s;
}

.btn-reg-submit:hover:not(:disabled) {
    opacity: .92;
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(79,70,229,.45);
}

.btn-reg-submit:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

.reg-alert {
    border-radius: 12px;
    border: none;
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.reg-alert-error { background: #fef2f2; color: #991b1b; }
.reg-alert-success { background: #f0fdf4; color: #166534; }

.select2-container { width: 100% !important; }

.select2-container--default .select2-selection--single {
    min-height: 2.55rem;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 10px !important;
    display: flex;
    align-items: center;
    padding: 0 0.85rem !important;
    background: #fafafa !important;
    transition: border-color .2s, box-shadow .2s;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12) !important;
    background: #fff !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
    line-height: 1.5;
    font-size: 0.875rem;
    color: #111827;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 2.55rem;
}

.select2-dropdown {
    border: 1.5px solid #e5e7eb !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.1) !important;
    overflow: hidden;
}

.select2-container--default .select2-results__option--highlighted {
    background: #4f46e5 !important;
}

.reg-footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

@media (max-width: 576px) {
    .reg-card-body { padding: 1.25rem; }
    .reg-section-body { padding: 1rem; }
}
