/* ==========================================================================
   STUDENT & PARENT PORTAL - COMPACT ENTERPRISE LOGIN CSS
   Intelligent Responsive: Zero-Scroll on Desktop, Smooth-Scroll on Small Screens
   ========================================================================== */

:root {
    --primary-teal: #00695C;
    --primary-teal-hover: #004D40;
    --primary-teal-light: #E0F2F1;
    --accent-teal: #00BFA5;
    
    --slate-900: #0F172A;
    --slate-800: #1E293B;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748B;
    --slate-400: #94A3B8;
    --slate-200: #E2E8F0;
    --slate-100: #F1F5F9;
    --slate-50:  #F8FAFC;
    
    /* Authentic Semantic Icon Colors */
    --icon-blue: #2563EB;
    --icon-blue-bg: #EFF6FF;
    --icon-blue-border: #DBEAFE;
    
    --icon-amber: #D97706;
    --icon-amber-bg: #FEF3C7;
    --icon-amber-border: #FDE68A;
    
    --icon-emerald: #059669;
    --icon-emerald-bg: #ECFDF5;
    --icon-emerald-border: #A7F3D0;
    
    --icon-purple: #7C3AED;
    --icon-purple-bg: #F5F3FF;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    min-height: 100%;
    min-height: 100vh;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* Clean, bright, enterprise slate canvas */
    background: #F8FAFC;
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 50%, #E2E8F0 100%);
    color: var(--slate-900);
    overflow-x: hidden;
    overflow-y: auto; /* Natural scrolling whenever viewport is small */
    -webkit-overflow-scrolling: touch;
}

/* Subtle, Barely-Visible Ambient Glow */
.login-bg-decor {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.login-bg-decor::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(15, 23, 42, 0.035) 1.2px, transparent 1.2px);
    background-size: 24px 24px;
}

.decor-glow-1 {
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 191, 165, 0.06) 0%, transparent 70%);
    top: -100px;
    right: -60px;
}

.decor-glow-2 {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    bottom: -80px;
    left: -60px;
}

/* Main Centered Container */
.login-container {
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    position: relative;
    z-index: 1;
}

/* Compact Split Card */
.login-card {
    display: flex;
    width: 100%;
    max-width: 860px;
    background: #FFFFFF;
    border-radius: 18px;
    box-shadow: 0 15px 35px -8px rgba(15, 23, 42, 0.1),
                0 0 0 1px rgba(226, 232, 240, 0.9);
    overflow: hidden;
    animation: cardFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Left Side: Visual Pane */
.login-image {
    flex: 0 0 42%;
    background: url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?auto=format&fit=crop&w=800&q=80') no-repeat center center / cover;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 1.75rem;
    color: #FFFFFF;
}

.login-image .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(0, 77, 64, 0.85) 0%, rgba(15, 23, 42, 0.9) 100%);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
}

.image-content-top {
    position: relative;
    z-index: 2;
}

.status-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #E0F2F1;
    margin-bottom: 1.25rem;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #10B981;
    box-shadow: 0 0 6px #10B981;
}

.school-brand-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.school-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #FFFFFF;
    flex-shrink: 0;
}

.school-brand-text h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.3px;
    color: #FFFFFF;
    line-height: 1.2;
}

.school-brand-text span {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.image-content-bottom {
    position: relative;
    z-index: 2;
}

.welcome-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.35rem 0;
    letter-spacing: -0.3px;
    color: #FFFFFF;
}

.welcome-subtitle {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.sibling-feature-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.sibling-feature-card i {
    font-size: 1.1rem;
    color: #6EE7B7;
    flex-shrink: 0;
}

.sibling-feature-card span {
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.25;
}

/* Right Side: Compact Form Pane */
.login-form-pane {
    flex: 1;
    padding: 2.25rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #FFFFFF;
}

.form-header {
    margin-bottom: 1.25rem;
}

.form-header h3 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--slate-900);
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.3px;
}

.form-header p {
    font-size: 0.84rem;
    color: var(--slate-500);
    margin: 0;
    line-height: 1.35;
}

/* Compact Alerts */
.alert-box {
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-box-danger {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #991B1B;
}

.alert-box-danger i {
    color: #DC2626;
    font-size: 1rem;
}

.alert-box-success {
    background: #ECFDF5;
    border-color: #A7F3D0;
    color: #065F46;
}

.alert-box-success i {
    color: #059669;
    font-size: 1rem;
}

/* Compact Inputs with Dedicated Semantic Icon Colors */
.input-block {
    margin-bottom: 1rem;
}

.input-block-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--slate-700);
    margin-bottom: 0.35rem;
}

.input-group-custom {
    position: relative;
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 1.5px solid var(--slate-200);
    border-radius: 10px;
    padding: 0.2rem 0.35rem;
    transition: all 0.2s ease-in-out;
}

.input-group-custom:hover {
    border-color: var(--slate-400);
}

.input-group-custom:focus-within {
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px rgba(0, 105, 92, 0.12);
}

/* Semantic Icon Badges */
.semantic-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

/* 1. Royal Blue for Student ID */
.icon-student-id {
    background: var(--icon-blue-bg);
    color: var(--icon-blue);
    border: 1px solid var(--icon-blue-border);
}

/* 2. Golden Amber for Password */
.icon-password {
    background: var(--icon-amber-bg);
    color: var(--icon-amber);
    border: 1px solid var(--icon-amber-border);
}

.input-custom-control {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 0.5rem 0.65rem;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--slate-900);
    width: 100%;
}

.input-custom-control::placeholder {
    color: var(--slate-400);
    font-weight: 400;
}

/* Password Eye Toggle */
.toggle-pw-btn {
    background: none;
    border: none;
    padding: 0.35rem 0.55rem;
    color: var(--slate-500);
    cursor: pointer;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.toggle-pw-btn:hover {
    color: var(--slate-900);
    background: var(--slate-100);
}

.dob-hint-text {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--slate-500);
    margin-top: 0.3rem;
}

.dob-hint-text i {
    color: var(--icon-purple);
    font-size: 0.8rem;
}

/* Compact Submit Button */
.btn-submit-login {
    background: var(--primary-teal);
    border: none;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 0.68rem 1.25rem;
    border-radius: 10px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 105, 92, 0.22);
    transition: all 0.2s ease;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
}

.btn-submit-login:hover {
    background: var(--primary-teal-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 105, 92, 0.3);
    color: #FFFFFF;
}

.btn-submit-login:active {
    transform: translateY(0);
}

.btn-submit-login:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

/* Streamlined Footer Links */
.portal-switch-wrapper {
    border-top: 1px solid var(--slate-200);
    padding-top: 0.85rem;
    text-align: center;
    font-size: 0.82rem;
}

.portal-switch-wrapper a {
    color: var(--primary-teal);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.portal-switch-wrapper a:hover {
    color: var(--primary-teal-hover);
    text-decoration: underline;
}

.portal-switch-divider {
    color: var(--slate-400);
    margin: 0 0.5rem;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVENESS (PERFECT SMOOTH SCROLL)
   ========================================================================== */
@media (max-width: 768px) {
    .login-container {
        padding: 1.5rem 1rem;
        min-height: 100vh;
        min-height: 100dvh;
        align-items: flex-start; /* Clean top alignment with natural scroll */
    }

    .login-card {
        flex-direction: column;
        border-radius: 18px;
        width: 100%;
        max-width: 440px;
        margin: auto 0;
    }

    .login-image {
        min-height: 150px;
        padding: 1.25rem 1.25rem 1rem;
        flex: none;
    }

    .welcome-title {
        font-size: 1.25rem;
        margin-bottom: 0.15rem;
    }

    .welcome-subtitle,
    .sibling-feature-card {
        display: none;
    }

    .login-form-pane {
        padding: 1.5rem 1.25rem;
    }

    .form-header {
        margin-bottom: 1rem;
    }

    .form-header h3 {
        font-size: 1.3rem;
    }
}
