/**
 * Nipun India — School / College registration (sign-up)
 * Replaces Tailwind CDN — gov-style portal + layout utilities
 */

:root {
    --fr-navy: #002443;
    --fr-navy-mid: #0f4c81;
    --fr-saffron: #ff9933;
    --fr-green: #138808;
    --fr-white: #ffffff;
    --fr-gold: #f59e0b;
    --fr-text: #1e293b;
    --fr-muted: #64748b;
    --fr-border: #e2e8f0;
    --fr-max: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }

body.fr-reg {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Nunito Sans', 'Inter', system-ui, sans-serif;
    background: #f8fafc;
    color: var(--fr-text);
    line-height: 1.5;
}

.font-heading { font-family: 'Nunito Sans', sans-serif; }

/* Layout utilities (formerly Tailwind) */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.max-w-6xl { max-width: var(--fr-max); }
.mx-auto { margin-left: auto; margin-right: auto; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-1\.5 { margin-right: 0.375rem; }
.text-right { text-align: right; }
.text-white { color: #fff; }
.text-sm { font-size: 0.875rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }
.font-semibold { font-weight: 600; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.opacity-80 { opacity: 0.8; }
.opacity-95 { opacity: 0.95; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.border { border-width: 1px; border-style: solid; }
.border-gray-200 { border-color: var(--fr-border); }
.list-disc { list-style-type: disc; }
.pl-6 { padding-left: 1.5rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.min-h-screen { min-height: 100vh; }
.min-h-\[120px\] { min-height: 120px; }
.text-\[11px\] { font-size: 11px; }
.text-\[11\.5px\] { font-size: 11.5px; }
.text-\[12px\] { font-size: 12px; }
.text-\[12\.5px\] { font-size: 12.5px; }
.text-\[13px\] { font-size: 13px; }
.text-\[15px\] { font-size: 15px; }
.text-\[20px\] { font-size: 20px; }
.max-w-2xl { max-width: 42rem; }

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .md\:block { display: block; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
    .md\:py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
    .md\:text-\[22px\] { font-size: 22px; }
    .md\:text-4xl { font-size: 2.25rem; }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

a.hover\:underline:hover { text-decoration: underline; }

/* Tricolour */
.tricolor-strip {
    height: 4px;
    background: linear-gradient(90deg, var(--fr-saffron) 33.33%, var(--fr-white) 33.33% 66.66%, var(--fr-green) 66.66%);
}

/* Utility ribbon */
.gov-utility {
    background: var(--fr-navy);
    color: rgba(255, 255, 255, 0.92);
    font-size: 11.5px;
    font-weight: 600;
}

.gov-utility a {
    color: inherit;
    text-decoration: none;
}

.gov-utility a:hover { text-decoration: underline; }

/* Header */
.gov-header {
    background: #fff;
    border-bottom: 1px solid var(--fr-border);
    box-shadow: 0 2px 12px rgba(0, 36, 67, 0.06);
}

.gov-emblem {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--fr-navy), var(--fr-navy-mid));
    color: var(--fr-gold);
    font-weight: 800;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gov-title { color: var(--fr-navy); margin: 0; }
.gov-sub { color: var(--fr-muted); margin: 0; }

/* Hero */
.gov-hero {
    background: linear-gradient(135deg, var(--fr-navy) 0%, var(--fr-navy-mid) 100%);
    color: #fff;
}

.gov-hero h1 { margin: 0 0 0.75rem; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
}

/* Cards */
.gov-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--fr-border);
    box-shadow: 0 4px 20px rgba(0, 36, 67, 0.06);
    overflow: hidden;
}

.gov-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(180deg, #f8fafc, #fff);
    border-bottom: 1px solid var(--fr-border);
}

.gov-step {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--fr-gold), #fde68a);
    color: var(--fr-navy);
    font-weight: 800;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-title {
    margin: 0;
    font-weight: 800;
    font-size: 1.0625rem;
    color: var(--fr-navy);
}

.section-sub {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    color: var(--fr-muted);
}

.gov-card-body { padding: 1.5rem; }

/* Form controls */
.gov-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--fr-navy);
    margin-bottom: 0.4rem;
}

.gov-label .req { color: #dc2626; }

.gov-input,
.gov-select,
.gov-textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gov-input:focus,
.gov-select:focus,
.gov-textarea:focus {
    outline: none;
    border-color: var(--fr-navy-mid);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.12);
}

.gov-textarea { resize: vertical; min-height: 80px; }

.gov-help {
    font-size: 0.75rem;
    color: var(--fr-muted);
    margin: 0.35rem 0 0;
}

/* Type chips */
.type-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--fr-border);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: border-color 0.2s, background 0.2s;
}

.type-chip:hover { border-color: var(--fr-navy-mid); }

.type-chip.is-active {
    border-color: var(--fr-navy);
    background: #eff6ff;
    color: var(--fr-navy);
}

/* Branding panel */
.branding-panel {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px dashed #cbd5e1;
}

.panel-title {
    font-weight: 800;
    color: var(--fr-navy);
    margin: 0 0 1rem;
    font-size: 0.9375rem;
}

.gov-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    background: #fff;
    transition: border-color 0.2s;
}

.gov-dropzone:hover { border-color: var(--fr-navy-mid); }

.gov-dropzone input[type="file"] {
    width: 100%;
    font-size: 0.8125rem;
}

/* Fee callout */
.fee-callout {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #93c5fd;
    border-radius: 12px;
    padding: 1.25rem;
    color: var(--fr-navy);
}

.fee-callout i { color: var(--fr-gold); }

/* Declaration */
.declaration-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
}

.declaration-box label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
}

/* Submit */
.gov-submit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--fr-border);
}

.gov-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: linear-gradient(135deg, var(--fr-navy), var(--fr-navy-mid));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.gov-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 36, 67, 0.2);
}

.gov-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    background: #64748b;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
}

.gov-btn-secondary:hover {
    background: #475569;
}

/* Errors */
.error-banner {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    color: #991b1b;
}

.pay-note {
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--fr-muted);
    text-align: center;
}

#payFrame {
    width: 100%;
    min-height: 540px;
    border: 1px solid var(--fr-border);
    border-radius: 12px;
}

/* Footer */
.gov-footer {
    background: var(--fr-navy);
    color: rgba(255, 255, 255, 0.85);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.8125rem;
    margin-top: auto;
}

.gov-footer a { color: var(--fr-gold); }

.reg-type-block.hidden { display: none !important; }
