:root {
    /* Logo-inspired: flame yellow → orange → red-orange */
    --reg-bg: #fffdf7;
    --reg-bg-soft: #fff5eb;
    --reg-bg-warm: #ffedd5;
    --reg-card: #ffffff;
    --reg-text: #422006;
    --reg-muted: #92400e;
    --reg-border: #fed7aa;
    --reg-math: #f59e0b;
    --reg-physics: #f97316;
    --reg-chem: #ea580c;
    --reg-bio: #fb923c;
    --reg-practical: #f57c00;
    --reg-accent: #f57c00;
    --reg-accent-dark: #e65100;
    --reg-accent-bright: #ffb300;
    --reg-flame: #ff6d00;
    --reg-radius: 16px;
    --reg-shadow: 0 4px 20px rgba(245, 124, 0, 0.1);
    --reg-shadow-lg: 0 16px 48px rgba(230, 81, 0, 0.14);
}

.reg-page,
.reg-page * {
    box-sizing: border-box;
}

body.reg-page {
    margin: 0;
    min-height: 100vh;
    position: relative;
    background:
        radial-gradient(ellipse 90% 60% at 10% -5%, rgba(255, 213, 79, 0.5) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 95% 10%, rgba(255, 152, 0, 0.35) 0%, transparent 50%),
        radial-gradient(ellipse 80% 45% at 50% 105%, rgba(255, 109, 0, 0.2) 0%, transparent 55%),
        linear-gradient(165deg, #fffdf7 0%, #fff8f0 30%, #fff0e0 65%, #ffe8cc 100%);
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    color: var(--reg-text);
    line-height: 1.5;
}

body.reg-page::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
    background:
        radial-gradient(circle 120px at 8% 75%, rgba(255, 179, 0, 0.2) 0%, transparent 100%),
        radial-gradient(circle 100px at 92% 60%, rgba(255, 109, 0, 0.15) 0%, transparent 100%),
        radial-gradient(circle 80px at 50% 40%, rgba(255, 213, 79, 0.12) 0%, transparent 100%);
}

.reg-page .top_note {
    text-align: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: #fff;
    margin: 0;
    padding: 10px 16px;
    background: linear-gradient(90deg, var(--reg-accent-dark), var(--reg-accent), var(--reg-accent-bright));
    box-shadow: 0 2px 12px rgba(245, 124, 0, 0.25);
}

.reg-page #error_notify_div {
    margin: 0;
    max-width: none;
    padding: 0;
}

.reg-shell {
    position: relative;
    z-index: 1;
    max-width: 1040px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

/* Hero */
.reg-hero {
    text-align: center;
    color: var(--reg-text);
    margin-bottom: 28px;
}

.reg-hero .logo_image {
    height: 88px;
    width: auto;
    margin-bottom: 12px;
    filter: drop-shadow(0 6px 16px rgba(245, 124, 0, 0.35));
}

.reg-hero__org {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--reg-muted);
    margin: 0 0 6px;
}

.reg-hero__title {
    font-size: clamp(1.35rem, 4vw, 1.85rem);
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 8px;
    text-transform: none;
    background: linear-gradient(135deg, #bf360c 0%, #e65100 35%, #f57c00 65%, #ffb300 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reg-hero__subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: #78350f;
    margin: 0 0 20px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.reg-badge-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.reg-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #9a3412;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--reg-border);
    box-shadow: 0 2px 8px rgba(245, 124, 0, 0.12);
    backdrop-filter: blur(8px);
    transition: transform 0.2s, box-shadow 0.2s;
}

.reg-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(245, 124, 0, 0.2);
}

.reg-badge i {
    font-size: 0.75rem;
}

/* Subject showcase */
.reg-subjects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (min-width: 640px) {
    .reg-subjects {
        grid-template-columns: repeat(4, 1fr);
    }
}

.reg-subject-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--reg-border);
    border-radius: var(--reg-radius);
    padding: 16px 12px;
    text-align: center;
    box-shadow: var(--reg-shadow);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.reg-subject-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--reg-accent);
    box-shadow: 0 8px 24px rgba(245, 124, 0, 0.18);
}

.reg-subject-card__icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
}

.reg-subject-card--math .reg-subject-card__icon { background: var(--reg-math); }
.reg-subject-card--science .reg-subject-card__icon { background: var(--reg-physics); }
.reg-subject-card--chem .reg-subject-card__icon { background: var(--reg-chem); }
.reg-subject-card--bio .reg-subject-card__icon { background: var(--reg-bio); }

.reg-subject-card__name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--reg-text);
    margin: 0 0 4px;
    text-transform: none;
}

.reg-subject-card__tag {
    font-size: 0.7rem;
    color: var(--reg-muted);
    margin: 0;
    text-transform: none;
}

/* Pathways */
.reg-pathways {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .reg-pathways {
        grid-template-columns: 1fr 1fr;
    }
}

.reg-pathway {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--reg-radius);
    padding: 16px 18px;
    text-align: left;
}

.reg-pathway__title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: none;
}

.reg-pathway__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.reg-pathway__chip {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.reg-practical-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(95deg, #fff8e7 0%, #ffe4c4 50%, #ffd9a8 100%);
    border: 1px solid var(--reg-border);
    border-radius: var(--reg-radius);
    padding: 14px 18px;
    margin-bottom: 28px;
    text-align: left;
    box-shadow: var(--reg-shadow);
}

.reg-practical-banner__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(145deg, var(--reg-accent-bright), var(--reg-flame));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 124, 0, 0.35);
}

.reg-practical-banner__text strong {
    display: block;
    color: var(--reg-text);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.reg-practical-banner__text span {
    font-size: 0.8rem;
    color: #78350f;
}

.reg-login-prompt {
    text-align: center;
    margin-bottom: 20px;
}

.reg-login-prompt p {
    color: var(--reg-muted);
    margin: 0 0 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

.reg-login-prompt .btn-success {
    font-weight: 700;
    padding: 10px 28px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--reg-accent-bright), var(--reg-accent), var(--reg-accent-dark));
    box-shadow: 0 6px 20px rgba(245, 124, 0, 0.4);
    transition: transform 0.15s, box-shadow 0.15s;
}

.reg-login-prompt .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 124, 0, 0.45);
    background: linear-gradient(135deg, #ffc107, var(--reg-accent), var(--reg-accent-dark));
}

/* Form card */
.reg-page #appl_form {
    background: var(--reg-card);
    border-radius: 22px;
    border: 1px solid rgba(254, 215, 170, 0.8);
    box-shadow: var(--reg-shadow-lg);
    padding: 0;
    max-width: none;
    margin: 0;
    overflow: hidden;
}

.reg-form-header {
    background: linear-gradient(135deg, #fffbeb 0%, #ffedd5 50%, #ffe4c4 100%);
    border-bottom: 1px solid var(--reg-border);
    padding: 20px 24px;
    text-align: center;
}

.reg-form-header a {
    color: var(--reg-accent-dark);
    font-weight: 700;
}

.reg-form-header h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--reg-text);
    margin: 0;
    text-transform: none;
}

.reg-form-header p {
    font-size: 0.85rem;
    color: var(--reg-muted);
    margin: 6px 0 0;
}

.reg-page .form-control {
    text-transform: none;
}

.reg-form-body {
    padding: 24px;
}

@media (min-width: 768px) {
    .reg-form-body {
        padding: 32px;
    }
}

/* Sections */
.reg-section {
    margin-bottom: 32px;
}

.reg-section:last-child {
    margin-bottom: 0;
}

.reg-section__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--reg-border);
}

.reg-section__num {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--reg-accent-bright), var(--reg-accent), var(--reg-accent-dark));
    color: #fff;
    box-shadow: 0 3px 10px rgba(245, 124, 0, 0.35);
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reg-section__title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--reg-text);
    margin: 0;
    text-transform: none;
}

.reg-section__hint {
    font-size: 0.8rem;
    color: var(--reg-muted);
    margin: 0;
}

/* Fields */
.reg-field {
    margin-bottom: 18px;
}

.reg-field label.field-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--reg-text);
    margin-bottom: 6px;
    text-transform: none;
    letter-spacing: 0.02em;
}

.reg-field label.field-label .req {
    color: #dc2626;
}

.reg-field .form-control {
    margin: 0;
    border: 1.5px solid var(--reg-border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.9rem;
    text-transform: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    height: auto;
}

.reg-field .form-control:focus {
    border-color: var(--reg-accent);
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.22);
}

.reg-field .form-text {
    font-size: 0.75rem;
    color: var(--reg-muted);
    margin-top: 4px;
}

.reg-field .bg-danger {
    border-radius: 8px;
    padding: 6px 10px;
    margin-top: 6px;
    font-size: 0.8rem;
}

/* Class picker */
.class-picker {
    margin-bottom: 18px;
}

.class-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.class-card {
    margin: 0;
    cursor: pointer;
}

.class-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.class-card__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    border: 2px solid var(--reg-border);
    border-radius: 14px;
    background: #fffbf5;
    transition: all 0.2s;
    text-align: center;
}

.class-card__grade {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--reg-flame);
    line-height: 1;
}

.class-card__label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--reg-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.class-card input:checked + .class-card__inner,
.class-card__inner.is-selected {
    border-color: var(--reg-accent);
    background: linear-gradient(180deg, #fff8e7 0%, #ffe4c4 100%);
    box-shadow: 0 6px 16px rgba(245, 124, 0, 0.28);
}

.class-card:hover .class-card__inner {
    border-color: var(--reg-accent-bright);
    transform: translateY(-2px);
}

/* DOB row */
.reg-dob-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 10px;
}

/* Upload zone */
.reg-upload {
    border: 2px dashed var(--reg-border);
    border-radius: 14px;
    padding: 16px;
    background: #fffbf5;
    transition: border-color 0.2s, background 0.2s;
}

.reg-upload:hover {
    border-color: var(--reg-accent);
}

.reg-upload .label1 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: none;
    margin: 0 0 10px;
    display: block;
    line-height: 1.4;
}

.reg-upload input[type="file"] {
    font-size: 0.85rem;
}

.reg-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 16px;
    background: #fff8f0;
    border: 1px solid var(--reg-border);
    border-radius: 14px;
    margin-bottom: 20px;
}

.reg-tools a {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--reg-accent-dark);
    text-decoration: none;
}

.reg-tools a:hover {
    text-decoration: underline;
}

/* Terms */
.reg-terms {
    background: #fffbf5;
    border: 1px solid var(--reg-border);
    border-radius: 12px;
    padding: 20px;
    font-size: 0.875rem;
    text-align: left;
}

.reg-terms__title {
    text-align: center;
    font-size: 1rem;
    font-weight: 800;
    color: var(--reg-text);
    margin: 0 0 14px;
    text-transform: none;
}

.reg-terms__intro {
    display: block;
    text-align: left;
    font-weight: 500;
    margin-bottom: 12px;
    line-height: 1.5;
}

.reg-terms__list {
    padding-left: 1.25rem;
    margin: 0 0 16px;
    text-align: left;
}

.reg-terms li {
    margin-bottom: 8px;
    text-align: left;
}

.reg-terms .form-group {
    text-align: left;
    margin-bottom: 0;
}

.reg-terms .form-group label,
.reg-terms .form-group b {
    font-weight: 600;
}

/* Submit */
.reg-submit-wrap {
    text-align: center;
    padding-top: 8px;
}

.reg-page #my_btn {
    margin: 20px auto 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 260px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, var(--reg-accent-bright) 0%, var(--reg-accent) 45%, var(--reg-accent-dark) 100%);
    border: none;
    border-radius: 999px;
    box-shadow: 0 8px 28px rgba(245, 124, 0, 0.4);
    color: #fff;
    text-transform: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.reg-page #my_btn:hover,
.reg-page #my_btn:focus {
    background: linear-gradient(135deg, #ffc107 0%, var(--reg-flame) 50%, var(--reg-accent-dark) 100%);
    box-shadow: 0 12px 32px rgba(245, 124, 0, 0.45);
    transform: translateY(-2px);
    color: #fff;
}

.reg-page #my_btn:active {
    transform: translateY(0);
}

.reg-page .footer {
    position: relative;
    z-index: 1;
    text-align: center;
    color: rgba(120, 53, 15, 0.65);
    padding: 24px 16px;
    font-size: 0.85rem;
}

.reg-page .error {
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 600;
}

.reg-page .label1 {
    font-weight: 600;
    text-transform: none;
}

/* Toggle switch (EWS) */
.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--reg-accent);
}

input:checked + .slider:before {
    transform: translateX(14px);
}

/* Loaders */
.loader,
.submit_loader {
    border: 3px solid #e2e8f0;
    border-top-color: var(--reg-accent);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: reg-spin 0.8s linear infinite;
    margin: 12px auto;
}

@keyframes reg-spin {
    to { transform: rotate(360deg); }
}

/* Compact hero (registration) */
.reg-hero--compact {
    margin-bottom: 20px;
}

.reg-hero--compact .logo_image {
    height: 72px;
    margin-bottom: 10px;
}

.reg-hero--compact .reg-hero__title {
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
    margin-bottom: 0;
}

.reg-hero--compact .reg-hero__org {
    margin-bottom: 4px;
}

/* Login page */
.reg-page .login-card {
    max-width: 520px;
    margin: 0 auto;
}

.reg-page .reg-field .req {
    color: #dc2626;
}

.reg-notice {
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 24px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.reg-notice--warning {
    background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
    border: 1px solid #fecaca;
    color: #991b1b;
}

.reg-notice--warning p {
    margin: 0 0 8px;
}

.reg-notice--warning p:last-child {
    margin-bottom: 0;
}

.reg-notice__mr {
    font-size: 0.8rem;
    opacity: 0.9;
}

.reg-notice--info {
    background: linear-gradient(135deg, #fffbeb 0%, #ffedd5 100%);
    border: 1px solid var(--reg-border);
    color: #9a3412;
    text-align: center;
}

.reg-login-actions {
    text-align: center;
    margin-top: 8px;
}

.reg-login-btn-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}

.reg-page .loginbtn,
.reg-page #registration_btn,
.reg-page #resend_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 200px;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 12px;
    text-transform: none;
}

.reg-page #registration_btn {
    background: linear-gradient(135deg, var(--reg-accent-bright), var(--reg-accent), var(--reg-accent-dark));
    border: none;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(245, 124, 0, 0.35);
    color: #fff;
}

.reg-page #registration_btn:hover {
    background: linear-gradient(135deg, #ffc107, var(--reg-flame), var(--reg-accent-dark));
    transform: translateY(-2px);
}

.reg-page #resend_btn {
    border-width: 2px;
    border-color: var(--reg-accent);
    color: var(--reg-accent-dark);
    border-radius: 999px;
}

.reg-page #login_div .loginbtn#my_btn {
    background: linear-gradient(135deg, var(--reg-accent-bright), var(--reg-accent), var(--reg-accent-dark));
    border: none;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(245, 124, 0, 0.35);
    color: #fff;
}

.reg-page #login_div .loginbtn#my_btn:hover {
    background: linear-gradient(135deg, #ffc107, var(--reg-flame), var(--reg-accent-dark));
    transform: translateY(-2px);
    color: #fff;
}

.reg-countdown {
    margin: 12px 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--reg-muted);
    min-height: 1.25em;
}

.reg-login-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--reg-border);
}

.reg-login-links--register {
    margin-top: 12px;
    padding-top: 12px;
    border-top: none;
}

.reg-login-links .btn-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--reg-accent-dark);
    text-transform: none;
    padding: 4px 8px;
}

.reg-login-links__sep {
    color: var(--reg-muted);
    margin: 0 4px;
}

.reg-page .modal-content {
    border-radius: 14px;
    border: none;
    box-shadow: var(--reg-shadow-lg);
}

.reg-page .modal-header {
    border-bottom: 1px solid var(--reg-border);
}

.reg-page .modal-title {
    font-weight: 800;
    text-transform: none;
}
