* { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    display: grid;
    place-items: center;
    overflow: hidden;
    position: relative;
    color: #fff;
    background: #0f1a2e;
    font-family: "Segoe UI", Arial, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(31,91,138,.25), transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(0,51,102,.3), transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(110,168,254,.1), transparent 50%);
}

.floating-shapes { position: fixed; inset: 0; pointer-events: none; }
.shape { position: absolute; border-radius: 50%; opacity: .06; animation: float 20s linear infinite; }
.shape:nth-child(1) { width: 300px; height: 300px; background: #6ea8fe; top: -80px; left: -80px; }
.shape:nth-child(2) { width: 200px; height: 200px; background: #1f5b8a; bottom: -60px; right: -60px; animation-duration: 25s; }
.shape:nth-child(3) { width: 150px; height: 150px; background: #6ea8fe; top: 50%; left: 70%; animation-duration: 18s; }
@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.login-wrapper { position: relative; z-index: 1; width: 100%; max-width: 440px; }
.school-brand { text-align: center; margin-bottom: 24px; }
.school-icon {
    width: 72px; height: 72px; margin: 0 auto 12px; display: grid; place-items: center;
    border-radius: 20px; background: linear-gradient(135deg, #1f5b8a, #036);
    font-size: 34px; box-shadow: 0 8px 32px rgba(31,91,138,.4);
}
.school-brand h1 { margin: 0; font-size: 26px; letter-spacing: 1px; }
.school-brand p, .card-subtitle { color: #8aaccc; }
.school-brand p { margin: 4px 0 0; font-size: 13px; }
.login-card {
    padding: 40px 36px; border: 1px solid rgba(255,255,255,.1); border-radius: 24px;
    background: rgba(255,255,255,.04); backdrop-filter: blur(20px);
    box-shadow: 0 24px 64px rgba(0,0,0,.4);
}
.card-title { margin: 0 0 8px; font-size: 18px; }
.card-subtitle { margin: 0 0 28px; font-size: 13px; }
.alert { margin-bottom: 20px; padding: 12px 16px; border-radius: 12px; font-size: 14px; }
.alert-danger { color: #ff8091; border: 1px solid rgba(220,53,69,.3); background: rgba(220,53,69,.15); }
.alert-warning { color: #ffd666; border: 1px solid rgba(255,193,7,.25); background: rgba(255,193,7,.12); }
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; margin-bottom: 8px; color: #a8c4e0; font-size: 13px;
    font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
}
.input-wrap { position: relative; }
.input-wrap input {
    width: 100%; padding: 13px 70px 13px 44px; outline: none; border: 1.5px solid rgba(255,255,255,.1);
    border-radius: 12px; color: #fff; background: rgba(255,255,255,.06); font-size: 15px;
}
.input-wrap input:focus { border-color: #6ea8fe; box-shadow: 0 0 0 4px rgba(110,168,254,.12); }
.input-wrap input::placeholder { color: #4a6a85; }
.input-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); }
.toggle-pass {
    position: absolute; top: 50%; right: 10px; transform: translateY(-50%); border: 0;
    padding: 6px; color: #8aaccc; background: transparent; cursor: pointer;
}
.remember-row { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; color: #8aaccc; font-size: 13px; }
.remember-row input { accent-color: #6ea8fe; }
.btn-login {
    width: 100%; padding: 14px; border: 0; border-radius: 12px; color: #fff;
    background: linear-gradient(135deg, #1f5b8a, #036); font-size: 15px; font-weight: 700;
    cursor: pointer; box-shadow: 0 4px 20px rgba(0,51,102,.4);
}
.btn-login:hover { filter: brightness(1.15); }
.btn-login:disabled { cursor: not-allowed; opacity: .55; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.08); }
.divider span { color: #4a6a85; font-size: 12px; white-space: nowrap; }
.card-footer { color: #8aaccc; text-align: center; font-size: 12px; }
@media (max-width: 480px) { .login-card { padding: 28px 20px; } .school-brand h1 { font-size: 22px; } }


/* ── Other-portal login links (Teacher / Student / Cyber Cafe) ── */
.portal-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 4px 0 18px;
}
.portal-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    color: #fff;
    text-decoration: none;
    transition: background .15s, border-color .15s, transform .1s;
}
.portal-link:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(110, 168, 254, .5);
    transform: translateY(-1px);
}
.portal-icon {
    font-size: 24px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    flex-shrink: 0;
}
.portal-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.portal-text strong { font-size: 14px; font-weight: 650; }
.portal-text small { font-size: 11.5px; color: rgba(255, 255, 255, .6); }

.portal-link--soon {
    opacity: .45;
    cursor: not-allowed;
}
.portal-link--soon:hover {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(255, 255, 255, .18);
    transform: none;
}
