

.ambient-scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: radial-gradient(circle at 10% 20%, rgba(74, 114, 212, 0.08) 0%, transparent 40%), radial-gradient(circle at 90% 80%, rgba(255, 194, 14, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

.lava-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 2;
    opacity: 0.35;
    pointer-events: none;
    animation: rotateBlobs 20s infinite alternate;
    /* animation: blobFloat 20s infinite alternate cubic-bezier(0.45, 0, 0.55, 1); */
}

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes rotateBlobs {
    from {
        transform: translate(0, 0);
    }
    to {
        transform: translate(120px, 120px);
    }
}

#bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: background-image 1.5s ease-in-out;
    z-index: 0;
    filter: brightness(1) contrast(1.1);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.9) 100%);
    z-index: 3;
}

.main-container {
    width: 100%;
    position: relative;
    z-index: 10;
    padding: 20px 15px;
}

.col-design {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
    padding: 10px 0;
}

.image-card {
    width: 100%; 
    height: 270px; 
    margin-bottom: 20px; 
    border-radius: 24px; 
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    position: relative; 
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 1s ease-in-out;
}

.login-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 35px;
    padding: 2.5rem;
    color: var(--text-main);
    box-shadow: 0 25px 50px rgba(0,0,0,0.08);
    animation: fadeIn 1s ease-out;
    width: 100%;
    margin: 0 auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* More Compact Branding */

.brand-logo-svg {
    width: 100%;
    max-width: 240px;
    height: auto;
    margin: 0 auto 15px;
    display: block;
}

.logo-js {
    fill: var(--brand-blue);
    font-weight: 900;
}

.logo-a {
    fill: var(--brand-yellow);
    font-weight: 900;
}

.logo-academy {
    fill: var(--brand-navy);
    font-weight: 800;
    letter-spacing: 2px;
}

.logo-curve {
    fill: none;
    stroke: var(--brand-yellow);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: drawCurveInfinite 4s ease-in-out infinite;
}

@keyframes drawCurveInfinite {
    0% {
        stroke-dashoffset: 600;
    }
    70%,
    100% {
        stroke-dashoffset: 0;
    }
}

.scan-beam {
    fill: url(#scan-grad);
    width: 50px;
    height: 120%;
    opacity: 0;
    animation: scanning 4s infinite linear;
}

@keyframes scanning {
    0% {
        transform: translateX(-150px);
        opacity: 0;
    }
    10%,
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateX(450px);
        opacity: 0;
    }
}

.portal-badge {
    display: inline-block;
    background: rgba(74, 114, 212, 0.1);
    color: var(--brand-blue);
    padding: 4px 15px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    border: 1px solid rgba(74, 114, 212, 0.15);
}

.form-label {
    color: var(--brand-blue);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.forgot-link {
    color: var(--brand-yellow);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
}

/* Form Styling - Fixed Overlaps */

.input-stack {
    margin-bottom: 10px;
    /* Increased margin between stacks */
    position: relative;
    display: flex;
    flex-direction: column;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.floating-label {
    display: block;
    font-weight: 800;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-color);
    margin-bottom: 0;
}

.glass-input-group {
    position: relative;
    margin-bottom: 1rem;
}

.glass-input {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    /* Slightly more visible border */
    border-radius: 20px;
    padding: 16px 24px;
    padding-right: 55px;
    /* Added right padding for eye icon */
    color: var(--text-main);
    width: 100%;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
    /* Avoid 'all' or 'transform' conflict */
}

.glass-input:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.1);
}

/* Fixed Eye Icon Toggle Positioning */

.pass-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    /* Perfectly centered vertically */
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
    z-index: 10;
    font-size: 1.1rem;
}

.pass-toggle:hover {
    color: var(--primary-color);
}

.pass-group {
    position: relative;
}

.pass-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    cursor: pointer;
    font-size: 1.05rem;
    z-index: 10;
}

.btn-signin {
    background: var(--premium-gradient);
    color: white;
    border: none;
    border-radius: 18px;
    padding: 1.1rem;
    width: 100%;
    font-weight: 800;
    font-size: 1.1rem;
    margin-top: 25px;
    box-shadow: 0 15px 35px rgba(79, 172, 254, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-signin:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(79, 172, 254, 0.4);
    background: var(--primary-dark);
}

.btn-signin:active {
    transform: translateY(-1px);
}

/* Premium Loading State */
.btn-signin.loading {
    pointer-events: none;
    opacity: 0.95;
}

.btn-signin.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: premium-shimmer 1.5s infinite;
}

@keyframes premium-shimmer {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.btn-signin.loading .loading-spinner {
    display: inline-block;
}

.btn-signin.loading i {
    display: none;
}

/* Single spinner: login uses .loading-spinner; global style.css .loading::after would duplicate it */
.btn-signin.loading::after {
    content: none !important;
    display: none !important;
}

/* Global .loading sets color: transparent; keep status label readable on sign-in */
.btn-signin.loading .btn-text {
    color: rgba(255, 255, 255, 0.98) !important;
}

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

/* Modal Styling */

.premium-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    opacity: 0;
}

.premium-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    width: 95%;
    max-width: 440px;
    border-radius: 40px;
    padding: 50px 40px;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transform: scale(0.8);
    opacity: 0;
    z-index: 9001;
}

.modal-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.2));
    color: var(--brand-blue);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 1.8rem;
}

.contact-card {
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    color: var(--text-main);
    font-weight: 600;
}

.contact-item i {
    width: 35px;
    height: 35px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-blue);
}

.btn-modal-close {
    background: var(--text-main);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 18px;
    width: 100%;
    font-weight: 700;
}

.footer-text a {
    color: #4a72d4;
    font-weight: 600;
    text-decoration: none;
}

.footer-text {
    margin-top: 30px;
}

/* --- AUTHENTICATION & ONBOARDING STYLES --- */
.auth-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.portal-badge {
    display: inline-block; 
    background: rgba(79, 172, 254, 0.1);
    color: var(--primary); 
    padding: 6px 18px; 
    border-radius: 20px;
    font-size: 0.75rem; 
    font-weight: 800; 
    text-transform: uppercase;
    letter-spacing: 2px; 
    margin-bottom: 2rem; 
    border: 1px solid rgba(79, 172, 254, 0.15);
}

/* Auth Branding Animations */
.logo-curve { 
    fill: none; stroke: var(--secondary); stroke-width: 6; stroke-linecap: round;
    stroke-dasharray: 600; stroke-dashoffset: 600;
    animation: drawCurveInfinite 4s ease-in-out infinite;
}

@keyframes drawCurveInfinite {
    0% { stroke-dashoffset: 600; }
    70%, 100% { stroke-dashoffset: 0; }
}

.scan-beam {
    fill: url(#scan-grad); width: 50px; height: 120%; opacity: 0;
    animation: scanning 4s infinite linear;
}

@keyframes scanning {
    0% { transform: translateX(-150px); opacity: 0; }
    10%, 90% { opacity: 0.3; }
    100% { transform: translateX(450px); opacity: 0; }
}

/* Gateway / Select Role */
.gateway-card {
    max-width: 500px;
    width: 100%;
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    padding: 3rem;
    margin: 2rem auto;
}

.role-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    border: 2px solid #e2e8f0;
    background: #fff;
    transition: var(--transition);
    cursor: pointer;
    width: 100%;
    text-align: left;
    margin-bottom: 1rem;
}

.role-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.1);
}

.role-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.role-info h5 {
    margin: 0;
    font-weight: 700;
    color: var(--text-main);
}

.role-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 3px;
}

.color-Admin { background: var(--danger-gradient); }
.color-Teacher { background: var(--primary-gradient); }
.color-Student { background: var(--success-gradient); }
.color-Parent { background: var(--warning-gradient); }
.color-Staff { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.color-Default { background: linear-gradient(135deg, #64748b, #475569); }

.glass-input {
    width: 100%;
    padding: 1.1rem 1.4rem;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-main);
}

.glass-input:focus {
    outline: none;
    background: white;
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(79, 172, 254, 0.1);
}

/* Buttons already handled above */

/* Institutional Modals */
.premium-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.premium-modal {
    background: white;
    border-radius: 40px;
    padding: 3.5rem;
    width: 90%;
    max-width: 550px;
    box-shadow: 0 50px 100px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.05);
}

/* Auth Responsive */
/* Media Queries - Refined for compatibility */

@media (max-width: 1199px) {
    .lava-blob {
        display: none;
    }
}

@media (max-width: 991px) {
    .col-design {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .main-container {
        padding: 0;
    }
}

@media (max-width: 575px) {
    .auth-section {
        align-items: flex-end;
    }
    /* Bottom align on small mobile */
    .main-container {
        padding-bottom: 30px;
    }
    .login-card {
        border-radius: 40px 40px 0 0;
    }
    .auth-section .login-card a {
        display: block;
    }
}
@media (max-width: 1199px) { .lava-blob { display: none; } }

@media (max-width: 991.98px) {
    .auth-section { align-items: flex-end; padding-bottom: 20px; }
    .login-card { padding: 2rem; border-radius: 30px; }
}



