/* Premium login — scoped to body.login-page only */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

body.login-page {
    margin: 0;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background: #0a1610;
    color: #0f172a;
    overflow-x: hidden;
}

.login-scene {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
}

.login-scene::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(74, 143, 95, 0.45) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 80%, rgba(45, 95, 63, 0.35) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(107, 159, 120, 0.12) 0%, transparent 60%),
        linear-gradient(145deg, #0d1f14 0%, #1a3d28 42%, #0f2418 100%);
    z-index: 0;
}

.login-scene::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.6;
    z-index: 0;
    pointer-events: none;
}

.login-brand {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(32px, 6vw, 72px);
    color: #fff;
}

.login-brand-inner {
    max-width: 440px;
}

.login-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 28px;
    backdrop-filter: blur(8px);
}

.login-brand-badge i {
    color: #86efac;
}

.login-brand h1,
.login-brand-school-name {
    font-size: clamp(1.65rem, 3.2vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
    background: linear-gradient(135deg, #ffffff 0%, #bbf7d0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.login-brand-tagline {
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 36px;
    max-width: 420px;
}

.login-brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-brand-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
}

.login-brand-features li i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: #86efac;
    font-size: 14px;
    flex-shrink: 0;
}

.login-panel {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vw, 48px);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 24px;
    padding: clamp(28px, 4vw, 40px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.5),
        0 25px 50px -12px rgba(0, 0, 0, 0.35),
        0 0 80px rgba(45, 95, 63, 0.15);
    animation: loginCardIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes loginCardIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo-wrap {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 0 auto 18px;
}

.login-logo-wrap::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d5f3f, #6b9f78, #2d5f3f);
    animation: loginRingSpin 8s linear infinite;
    opacity: 0.85;
}

@keyframes loginRingSpin {
    to { transform: rotate(360deg); }
}

.login-logo-wrap img {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 8px 24px rgba(45, 95, 63, 0.25);
}

.login-card-header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #14532d;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.login-card-header .login-sub {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    margin: 0;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%);
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.45;
    animation: loginShake 0.4s ease;
}

@keyframes loginShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.login-alert i {
    margin-top: 2px;
    flex-shrink: 0;
}

.login-field {
    margin-bottom: 18px;
}

.login-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    margin-bottom: 8px;
}

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-wrap > i.field-icon {
    position: absolute;
    left: 16px;
    color: #2d5f3f;
    font-size: 15px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.75;
}

.login-input-wrap input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 500;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-input-wrap input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.login-input-wrap input:focus {
    outline: none;
    border-color: #2d5f3f;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(45, 95, 63, 0.12);
}

.login-input-wrap.has-toggle input {
    padding-right: 48px;
}

.login-toggle-pw {
    position: absolute;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.login-toggle-pw:hover {
    background: #e2e8f0;
    color: #2d5f3f;
}

.login-hint {
    margin-top: 8px;
    font-size: 11.5px;
    color: #94a3b8;
    line-height: 1.45;
    padding-left: 2px;
}

.login-hint strong {
    color: #64748b;
    font-weight: 600;
}

.login-submit {
    width: 100%;
    margin-top: 8px;
    padding: 15px 20px;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #1e4d32 0%, #2d5f3f 40%, #3d7c47 100%);
    box-shadow:
        0 4px 14px rgba(45, 95, 63, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    position: relative;
    overflow: hidden;
}

.login-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.12) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 95, 63, 0.45);
    filter: brightness(1.05);
}

.login-submit:hover::before {
    transform: translateX(100%);
}

.login-submit:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
}

.login-footer i {
    color: #2d5f3f;
    margin-right: 4px;
}

/* Mobile: stack, hide brand panel text partially */
@media (max-width: 900px) {
    .login-scene {
        grid-template-columns: 1fr;
    }

    .login-brand {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        background: transparent;
    }

    .login-card {
        max-width: 440px;
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.4),
            0 20px 40px rgba(0, 0, 0, 0.25);
    }
}

@media (max-width: 420px) {
    .login-card {
        padding: 24px 20px;
        border-radius: 20px;
    }

    .login-logo-wrap {
        width: 76px;
        height: 76px;
    }
}
