/* login.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #ffffff;
    overflow-x: hidden;
}

.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* Left Panel - School Banner */
.left-panel {
    flex: 0 0 40%;
    background: #183153;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(30, 27, 75, 0.8) 0%, rgba(15, 10, 50, 0.95) 90%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.015) 0px, rgba(255, 255, 255, 0.015) 2px, transparent 2px, transparent 10px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3.5rem 2.8rem;
    color: #ffffff;
    position: relative;
    transition: background 0.3s ease;
}

/* Theme Variations for Left Panel */
.left-panel.theme-elementary {
    background: #064e3b;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(6, 95, 70, 0.85) 0%, rgba(4, 47, 38, 0.98) 90%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.015) 0px, rgba(255, 255, 255, 0.015) 2px, transparent 2px, transparent 10px);
}

.left-panel.theme-jhs {
    background: #080670;

    background-image:
        radial-gradient(circle at 15% 20%,
            rgba(37, 44, 170, 0.90) 0%,
            rgba(13, 14, 76, 0.98) 75%),
        linear-gradient(135deg,
            rgba(245, 180, 29, 0.08) 0%,
            transparent 45%),
        repeating-linear-gradient(45deg,
            rgba(255, 255, 255, 0.018) 0px,
            rgba(255, 255, 255, 0.018) 2px,
            transparent 2px,
            transparent 10px);
}

.left-panel.theme-shs {
    background: #450a0a;

    background-image:
        radial-gradient(circle at 15% 20%,
            rgba(127, 29, 29, 0.92) 0%,
            rgba(69, 10, 10, 0.98) 75%),
        linear-gradient(135deg,
            rgba(245, 158, 11, 0.12) 0%,
            transparent 45%),
        repeating-linear-gradient(45deg,
            rgba(255, 255, 255, 0.018) 0px,
            rgba(255, 255, 255, 0.018) 2px,
            transparent 2px,
            transparent 10px);
}

.left-panel.theme-college {
    background: #183153;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(30, 27, 75, 0.85) 0%, rgba(15, 10, 50, 0.98) 90%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.015) 0px, rgba(255, 255, 255, 0.015) 2px, transparent 2px, transparent 10px);
}

.left-panel.theme-admin {
    background: #0f172a;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.98) 90%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.015) 0px, rgba(255, 255, 255, 0.015) 2px, transparent 2px, transparent 10px);
}

.left-panel.theme-superadmin {
    background: #111827;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(31, 41, 55, 0.85) 0%, rgba(3, 7, 18, 0.98) 90%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.015) 0px, rgba(255, 255, 255, 0.015) 2px, transparent 2px, transparent 10px);
}

.left-top {
    display: flex;
    align-items: flex-start;
}

.school-logo {
    max-height: 75px;
    width: auto;
    object-fit: contain;
}

.left-center {
    margin: auto 0;
    padding: 2rem 0;
}

.level-badge {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 1rem;
}

.school-title {
    font-size: 2.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.6rem;
    letter-spacing: -0.5px;
    line-height: 1.25;
}

.school-subtitle {
    font-size: 0.82rem;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    font-weight: 400;
    line-height: 1.5;
}

.school-subtitle strong {
    font-weight: 800;
    color: #ffffff;
}

.left-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
}

.privacy-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.privacy-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Right Panel - Login Form */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
    position: relative;
    background-color: #ffffff;
}

.home-btn {
    position: absolute;
    top: 25px;
    right: 30px;
    color: #1e293b;
    font-size: 1.25rem;
    text-decoration: none;
    transition: transform 0.2s, color 0.2s, background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    z-index: 10;
}

.home-btn:hover {
    color: #3b82f6;
    background-color: #f1f5f9;
    transform: scale(1.05);
}

.home-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.form-container {
    width: 100%;
    max-width: 400px;
}

.form-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    margin-bottom: 0.3rem;
}

.form-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 2.2rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.4rem;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.45rem;
}

.form-label .required {
    color: #ef4444;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    outline: none;
    color: #1e293b;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #ffffff;
}

.form-control::placeholder {
    color: #cbd5e1;
}

.form-control:focus {
    border-color: #183153;
    box-shadow: 0 0 0 3px rgba(24, 49, 83, 0.15);
}

.form-help {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.4rem;
}

.btn-login {
    width: 100%;
    padding: 0.78rem;
    background-color: #183153;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 1.6rem;
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(24, 49, 83, 0.25);
    min-height: 44px;
}

.btn-login:hover {
    background-color: #0f2139;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(24, 49, 83, 0.35);
}

.btn-login svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.form-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.2rem;
    font-size: 0.84rem;
}

.link-muted {
    color: #183153;
    text-decoration: none;
    transition: color 0.2s;
}

.link-muted:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Tablets & Small Laptops (769px to 1024px) */
@media (max-width: 1024px) {
    .left-panel {
        flex: 0 0 42%;
        padding: 2.5rem 2rem;
    }

    .school-title {
        font-size: 1.85rem;
    }

    .right-panel {
        padding: 2rem;
    }
}

/* Mobile Devices & Small Tablets (< 768px) */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
        min-height: 100vh;
    }

    .left-panel {
        flex: none;
        width: 100%;
        padding: 2rem 1.5rem 1.8rem;
        align-items: center;
        text-align: center;
        border-radius: 0 0 20px 20px;
    }

    .left-top {
        justify-content: center;
        margin-bottom: 0.8rem;
    }

    .school-logo {
        max-height: 65px;
    }

    .left-center {
        margin: 0;
        padding: 0.5rem 0;
    }

    .school-title {
        font-size: 1.45rem;
        margin-bottom: 0.4rem;
    }

    .school-subtitle {
        font-size: 0.75rem;
    }

    .left-footer {
        display: none;
    }

    .right-panel {
        flex: 1;
        width: 100%;
        padding: 2rem 1.25rem 3rem;
        justify-content: flex-start;
        padding-top: 2.5rem;
    }

    .home-btn {
        top: 15px;
        right: 15px;
        color: #ffffff;
        background: rgba(255, 255, 255, 0.15);
    }

    .home-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        color: #ffffff;
    }

    .form-container {
        max-width: 100%;
    }

    .form-title {
        font-size: 1.45rem;
    }

    .form-control {
        font-size: 16px;
        /* Prevents auto-zoom on mobile browsers */
        padding: 0.8rem 1rem;
    }

    .btn-login {
        padding: 0.85rem;
        font-size: 1rem;
    }
}

/* Small Mobile Screens (< 480px) */
@media (max-width: 480px) {
    .left-panel {
        padding: 1.6rem 1rem 1.4rem;
    }

    .school-logo {
        max-height: 55px;
    }

    .school-title {
        font-size: 1.25rem;
    }

    .school-subtitle {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }

    .right-panel {
        padding: 1.8rem 1rem 2rem;
    }
}