/* ============================================================
   School Codex — Login  (redesign, teacher-portal design system)
   Split auth card: navy brand panel + white-glass form, floating
   pastel glow blobs over a soft light gradient.
   ============================================================ */

html { height: 100%; }
body {
    height: 100%;
    margin: 0;
    font-family: 'Poppins', system-ui, sans-serif;
    color: #1B1B1F;
    background: linear-gradient(135deg, #EEF1FB 0%, #F5EEFB 46%, #E9F5FF 100%);
    -webkit-font-smoothing: antialiased;
}
body a { text-decoration: none !important; }

/* Keep autofilled inputs legible on the light fields */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #1B1B1F;
    -webkit-box-shadow: 0 0 0 40px #ffffff inset;
    font-size: 15px !important;
}

/* ── Stage ─────────────────────────────────────────────────── */
.scx-login-bg {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px 16px;
    overflow: hidden;
}

/* Floating pastel shapes canvas (collision physics) */
.scx-login-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ── Auth card ─────────────────────────────────────────────── */
.scx-login-card {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 960px;
    min-height: 566px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 32px;
    box-shadow: 0 34px 84px rgba(20, 20, 40, 0.24),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

/* ── Brand panel (navy) ── */
.scx-login-aside {
    position: relative;
    width: 43%;
    flex-shrink: 0;
    padding: 42px 38px;
    display: flex;
    flex-direction: column;
    color: #fff;
    background: #1C274C;
    overflow: hidden;
}
.scx-login-aside::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -70px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 199, 247, 0.42), transparent 70%);
    pointer-events: none;
}
.scx-login-aside::after {
    content: '';
    position: absolute;
    bottom: -90px;
    left: -70px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(161, 220, 255, 0.30), transparent 70%);
    pointer-events: none;
}

.scx-aside-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}
.scx-aside-logo { width: 40px; height: 40px; }
.scx-aside-brand {
    font-family: 'Outfit', 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.02em;
    color: #fff;
}

.scx-aside-mid {
    position: relative;
    z-index: 1;
    margin-top: auto;
}
.scx-aside-title {
    font-family: 'Outfit', 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 42px;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin: 0 0 16px;
    color: #fff;
}
.scx-aside-sub {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.72);
    margin: 0;
    max-width: 330px;
}

.scx-aside-feats {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}
.scx-feat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #1C274C;
    background: rgba(255, 255, 255, 0.92);
    padding: 7px 14px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(10, 12, 25, 0.18);
}
.scx-feat i { font-size: 11px; }
.scx-feat:nth-child(1) i { color: #b45309; }
.scx-feat:nth-child(2) i { color: #1766b3; }
.scx-feat:nth-child(3) i { color: #d1004a; }

/* ── Form panel (frosted glass) ── */
.scx-login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 46px 46px;
    background: rgba(255, 255, 255, 0.90);
    -webkit-backdrop-filter: blur(26px) saturate(185%);
            backdrop-filter: blur(26px) saturate(185%);
}
.scx-main-inner { width: 100%; max-width: 342px; }

.scx-main-brand-sm {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
}
.scx-main-brand-sm img { width: 34px; height: 34px; }
.scx-main-brand-sm span {
    font-family: 'Outfit', 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 18px;
    color: #1C274C;
}

.scx-main-title {
    font-family: 'Outfit', 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 30px;
    letter-spacing: -0.02em;
    color: #1C274C;
    margin: 0 0 5px;
}
.scx-main-sub {
    font-size: 13.5px;
    font-weight: 500;
    color: #6b7280;
    margin: 0 0 28px;
}

/* Error alert (only rendered when {{ message }} is set) */
.scx-login-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FFE1E8;
    border: 1px solid #FFC9D6;
    color: #c2334f;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 20px;
}
.scx-login-alert i { font-size: 14px; flex-shrink: 0; }

/* ── Fields ── */
.scx-field-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #1C274C;
    margin-bottom: 7px;
}
.scx-field {
    position: relative;
    margin-bottom: 18px;
}
.scx-field-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa1b4;
    font-size: 14px;
    pointer-events: none;
    transition: color 0.18s;
}
.scx-input {
    width: 100%;
    box-sizing: border-box;
    background: #F4F5FB;
    border: 1.5px solid #E6E8F0;
    border-radius: 14px;
    padding: 14px 16px 14px 42px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #1B1B1F;
    outline: none;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.scx-input::placeholder { color: #aab0c0; font-weight: 500; }
.scx-input:focus {
    background: #ffffff;
    border-color: #1C274C;
    box-shadow: 0 0 0 4px rgba(28, 39, 76, 0.10);
}
.scx-field:focus-within .scx-field-icon { color: #1C274C; }
.scx-field-pwd .scx-input { padding-right: 48px; }

/* Show / hide password */
.scx-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: #9aa1b4;
    cursor: pointer;
    border-radius: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}
.scx-eye:hover { color: #1C274C; background: rgba(28, 39, 76, 0.06); }

/* ── Submit ── */
.scx-login-btn {
    width: 100%;
    border: none;
    cursor: pointer;
    background: #1C274C;
    color: #fff;
    border-radius: 14px;
    padding: 15px 18px;
    margin-top: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 12px 26px rgba(28, 39, 76, 0.28);
    transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}
.scx-login-btn:hover {
    background: #2a3868;
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(28, 39, 76, 0.34);
}
.scx-login-btn:active { transform: translateY(0); }

.scx-main-foot {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #aab0c0;
    margin: 26px 0 0;
}

/* ── Responsive ── */
@media (max-width: 820px) {
    .scx-login-aside { display: none; }
    .scx-login-card {
        max-width: 440px;
        min-height: auto;
    }
    .scx-main-brand-sm { display: flex; }
    .scx-login-main { padding: 40px 34px; }
}
@media (max-width: 480px) {
    .scx-login-bg { padding: 20px 12px; }
    .scx-login-card { border-radius: 26px; }
    .scx-login-main { padding: 34px 24px; }
    .scx-main-title { font-size: 27px; }
}
