:root{
    --primary:#2448b8;
    --primary-dark:#1d3da5;
    --primary-soft:#edf3ff;
    --primary-ring:rgba(36,72,184,.14);

    --bg:#f4f7fb;
    --card:#ffffff;
    --text:#1f2937;
    --muted:#718096;
    --line:#dfe7f1;

    --danger:#dc2626;
    --danger-bg:#fef2f2;

    --shadow:0 22px 64px rgba(30,64,175,.12);
}

*{box-sizing:border-box}

html,body{
    margin:0;
    min-height:100%;
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
    color:var(--text);
    background:
        radial-gradient(circle at 20% 10%,rgba(36,72,184,.08),transparent 26%),
        linear-gradient(180deg,#f8faff 0%,var(--bg) 100%);
}

body{
    min-height:100vh;
}

.auth-shell{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:28px;
}

.auth-main{
    width:100%;
    display:flex;
    justify-content:center;
}

.login-stage{
    width:min(100%,460px);
    position:relative;
}

/* Tulisan SIKAP Digital di atas card dihilangkan */
.product-brand{
    display:none !important;
}

.login-card{
    position:relative;
    overflow:hidden;
    background:var(--card);
    border:1px solid #e8eef6;
    border-radius:22px;
    box-shadow:var(--shadow);
    padding:30px 30px 22px;
}

.card-accent{
    position:absolute;
    inset:0 0 auto 0;
    height:5px;
    background:linear-gradient(90deg,var(--primary),#4f74e8,var(--primary-dark));
}

.school-identity{
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    margin-bottom:22px;
}

.logo-wrap{
    width:82px;
    height:82px;
    border-radius:20px;
    display:grid;
    place-items:center;
    background:#fff;
    border:1px solid #e7edf5;
    box-shadow:0 12px 28px rgba(36,72,184,.10);
    margin-bottom:12px;
}

.school-logo{
    width:70px;
    height:70px;
    object-fit:contain;
}

.school-name{
    max-width:100%;
    font-size:14px;
    font-weight:800;
    color:#334155;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.login-heading{
    text-align:center;
    margin-bottom:22px;
}

.login-heading h1{
    margin:0 0 6px;
    font-size:26px;
    line-height:1.15;
    letter-spacing:-.03em;
}

.login-heading p{
    margin:0;
    color:var(--muted);
    font-size:13px;
}

.alert{
    display:flex;
    align-items:flex-start;
    gap:10px;
    border-radius:10px;
    padding:11px 12px;
    margin-bottom:16px;
    font-size:12px;
}

.alert.danger{
    color:#991b1b;
    background:var(--danger-bg);
    border:1px solid #fecaca;
}

.alert-icon{
    width:22px;
    height:22px;
    flex:0 0 22px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:#fee2e2;
    color:#b91c1c;
    font-weight:800;
}

.alert b{display:block;margin-bottom:2px}
.alert p{margin:0;line-height:1.45}

.form-field{
    margin-bottom:15px;
}

.form-field label{
    display:block;
    margin:0 0 7px;
    font-size:12px;
    font-weight:700;
    color:#475569;
}

.input-shell,
.password-wrap{
    position:relative;
}

.field-icon{
    position:absolute;
    left:13px;
    top:50%;
    transform:translateY(-50%);
    width:18px;
    height:18px;
    color:#8ca0b5;
    pointer-events:none;
}

.field-icon svg,
.password-toggle svg,
.login-button svg{
    width:100%;
    height:100%;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.input-shell input,
.password-wrap input{
    width:100%;
    height:46px;
    border:1px solid var(--line);
    border-radius:10px;
    padding:0 44px 0 42px;
    outline:none;
    background:#fff;
    color:var(--text);
    transition:.18s ease;
}

.input-shell input:focus,
.password-wrap input:focus{
    border-color:#7593e5;
    box-shadow:0 0 0 4px var(--primary-ring);
}

.input-shell input::placeholder,
.password-wrap input::placeholder{
    color:#9aabbb;
}

.password-toggle{
    position:absolute;
    right:8px;
    top:50%;
    transform:translateY(-50%);
    width:34px;
    height:34px;
    border:0;
    border-radius:8px;
    background:transparent;
    color:#8ca0b5;
    cursor:pointer;
    padding:8px;
}

.password-toggle:hover{
    background:var(--primary-soft);
    color:var(--primary);
}

.password-toggle .eye-off{display:none}
.password-toggle.showing .eye-open{display:none}
.password-toggle.showing .eye-off{display:block}

.form-options{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin:2px 0 17px;
}

.remember{
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:#64748b;
    font-size:12px;
    cursor:pointer;
}

.remember input{
    width:15px;
    height:15px;
    accent-color:var(--primary);
}

.login-button{
    width:100%;
    min-height:46px;
    border:0;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    background:linear-gradient(135deg,var(--primary),var(--primary-dark));
    color:#fff;
    font-size:13px;
    font-weight:800;
    cursor:pointer;
    box-shadow:0 10px 24px rgba(36,72,184,.19);
    transition:.18s ease;
}

.login-button:hover{
    transform:translateY(-1px);
    box-shadow:0 14px 28px rgba(36,72,184,.24);
}

.login-button svg{
    width:18px;
    height:18px;
}

.card-footer{
    margin-top:20px;
    padding-top:16px;
    border-top:1px solid #edf1f6;
    text-align:center;
    color:#94a3b8;
    font-size:10px;
}

@media(max-width:640px){
    .auth-shell{
        padding:16px;
        align-items:center;
    }

    .login-stage{
        width:100%;
        max-width:420px;
    }

    .login-card{
        padding:25px 20px 20px;
        border-radius:18px;
    }

    .logo-wrap{
        width:72px;
        height:72px;
        border-radius:18px;
    }

    .school-logo{
        width:62px;
        height:62px;
    }

    .school-name{
        white-space:normal;
        line-height:1.35;
    }

    .login-heading h1{
        font-size:23px;
    }
}

@media(prefers-color-scheme:dark){
    :root{
        --bg:#0f172a;
        --card:#182235;
        --text:#e5edf7;
        --muted:#94a3b8;
        --line:#334155;
        --primary-soft:rgba(99,102,241,.10);
        --primary-ring:rgba(99,102,241,.16);
        --shadow:0 22px 64px rgba(0,0,0,.28);
    }

    html,body{
        background:
            radial-gradient(circle at 20% 10%,rgba(99,102,241,.13),transparent 26%),
            linear-gradient(180deg,#0e1627 0%,#0b1220 100%);
    }

    .login-card{
        border-color:#263248;
    }

    .school-name,
    .form-field label{
        color:#dbe5f0;
    }

    .logo-wrap{
        background:#fff;
        border-color:rgba(255,255,255,.08);
    }

    .input-shell input,
    .password-wrap input{
        background:#111827;
        color:#e5edf7;
        border-color:#334155;
    }

    .input-shell input::placeholder,
    .password-wrap input::placeholder{
        color:#64748b;
    }

    .card-footer{
        border-top-color:#2b364d;
    }
}
