﻿*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --blue-deep: #0a4a8a;
    --blue-mid: #1a6dc8;
    --blue-light: #2e90e8;
    --blue-pale: #d6eaf8;
    --red-accent: #d42b2b;
    --white: #ffffff;
    --off-white: #f0f7ff;
}

html, body {
    height: 100%;
    font-family: 'Nunito', sans-serif;
}

body {
    display: flex;
    min-height: 100vh;
    background: var(--off-white);
    overflow: hidden;
}

/* ── LEFT PANEL ── */
.left-panel {
    width: 48%;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #0a3a72 0%, #1460b8 40%, #2684d8 70%, #47aaee 100%);
    overflow: hidden;
    animation: panelReveal 1s ease forwards;
}

@keyframes panelReveal {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* animated background rings */
.ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.12);
    animation: pulse 6s ease-in-out infinite;
}

    .ring:nth-child(1) {
        width: 320px;
        height: 320px;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        animation-delay: 0s;
    }

    .ring:nth-child(2) {
        width: 500px;
        height: 500px;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        animation-delay: 1s;
    }

    .ring:nth-child(3) {
        width: 680px;
        height: 680px;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        animation-delay: 2s;
    }

@keyframes pulse {
    0%, 100% {
        opacity: 0.15;
        transform: translate(-50%,-50%) scale(1);
    }

    50% {
        opacity: 0.35;
        transform: translate(-50%,-50%) scale(1.04);
    }
}

/* floating particles */
.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(110vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-10vh) scale(1.5);
        opacity: 0;
    }
}

.left-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 40px 32px;
    text-align: center;
}

.logo-wrap {
    animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.logo-wrap img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 8px 32px rgba(0,0,0,0.35));
    border-radius: 50%;
    background: white;
    padding: 8px;
}

.school-name {
    font-family: 'Cinzel', serif;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    line-height: 1.25;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
    animation: fadeUp 1.2s ease 0.4s both;
}

.school-location {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255,255,255,0.8);
    letter-spacing: 4px;
    text-transform: uppercase;
    animation: fadeUp 1.2s ease 0.6s both;
}

.divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: fadeUp 1.2s ease 0.7s both;
}

.tagline {
    font-size: 15px;
    color: rgba(255,255,255,0.75);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.5px;
    animation: fadeUp 1.2s ease 0.8s both;
}

.flame-icon {
    font-size: 28px;
    animation: flamePulse 2s ease-in-out infinite, fadeUp 1s ease 1s both;
}

@keyframes flamePulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.15);
        filter: brightness(1.3);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── RIGHT PANEL ── */
.right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: var(--off-white);
    position: relative;
    overflow: hidden;
    animation: rightReveal 1s ease 0.2s both;
}

@keyframes rightReveal {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* subtle decorative bg element */
.right-panel::before {
    content: '';
    position: absolute;
    bottom: -120px;
    right: -120px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30,100,200,0.07) 0%, transparent 70%);
    pointer-events: none;
}

.right-panel::after {
    content: '';
    position: absolute;
    top: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212,43,43,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.form-card {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.form-header {
    margin-bottom: 36px;
    animation: fadeUp 1s ease 0.5s both;
}

.welcome-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--blue-mid);
    margin-bottom: 8px;
}

.form-title {
    font-family: 'Cinzel', serif;
    font-size: 32px;
    font-weight: 600;
    color: #0a2a4a;
    line-height: 1.2;
}

.form-subtitle {
    margin-top: 8px;
    font-size: 14px;
    color: #6b7f96;
    font-weight: 400;
}

.field-group {
    margin-bottom: 20px;
    animation: fadeUp 1s ease var(--delay, 0.7s) both;
}

.field-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #4a607a;
    margin-bottom: 8px;
}

.field-wrap {
    position: relative;
}

.field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #90aac8;
    width: 18px;
    height: 18px;
    transition: color 0.3s;
    pointer-events: none;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 48px;
    border: 1.5px solid #c8d8ea;
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    color: #1a3050;
    background: #fff;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

input:focus {
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 4px rgba(26,109,200,0.12);
    background: #fafcff;
}

    input:focus + .field-icon, .field-wrap:focus-within .field-icon {
        color: var(--blue-mid);
    }

.field-wrap .field-icon {
    left: 16px;
}

.toggle-pw {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #90aac8;
    padding: 4px;
    transition: color 0.2s;
    line-height: 1;
}

    .toggle-pw:hover {
        color: var(--blue-mid);
    }

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    animation: fadeUp 1s ease 0.9s both;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #5a7090;
    cursor: pointer;
    user-select: none;
}

    .remember-me input {
        display: none;
    }

.custom-check {
    width: 18px;
    height: 18px;
    border: 1.5px solid #b0c8e0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: #fff;
    flex-shrink: 0;
}

.remember-me input:checked ~ .custom-check {
    background: var(--blue-mid);
    border-color: var(--blue-mid);
}

.check-mark {
    display: none;
    width: 10px;
    height: 7px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg) translateY(-1px);
}

.remember-me input:checked ~ .custom-check .check-mark {
    display: block;
}

.forgot-link {
    font-size: 13px;
    color: var(--blue-mid);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

    .forgot-link:hover {
        color: var(--blue-deep);
    }

.login-btn {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    background: linear-gradient(135deg, #0e56a8 0%, #1a7ad4 50%, #2a96ee 100%);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 8px 24px rgba(14,86,168,0.35);
    animation: fadeUp 1s ease 1s both;
}

    .login-btn::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
        opacity: 0;
        transition: opacity 0.3s;
    }

    .login-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 32px rgba(14,86,168,0.45);
    }

        .login-btn:hover::before {
            opacity: 1;
        }

    .login-btn:active {
        transform: translateY(0);
    }

    /* ripple */
    .login-btn .ripple {
        position: absolute;
        border-radius: 50%;
        background: rgba(255,255,255,0.3);
        transform: scale(0);
        animation: ripple 0.6s linear;
        pointer-events: none;
    }

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.register-hint {
    text-align: center;
    margin-top: 24px;
    font-size: 13.5px;
    color: #6b7f96;
    animation: fadeUp 1s ease 1.1s both;
}

    .register-hint a {
        color: var(--blue-mid);
        font-weight: 700;
        text-decoration: none;
        transition: color 0.2s;
    }

        .register-hint a:hover {
            color: var(--blue-deep);
        }

.bottom-badge {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    letter-spacing: 1px;
    white-space: nowrap;
}

/* ── INPUT ICON SVGs ── */
.icon-user, .icon-lock, .icon-eye, .icon-eye-off {
    display: block;
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.3s;
}
