/* ══════════════════════════════════════════════════════════
   SIMANTIK — LOGIN STYLESHEET (login.css)
   Sistem Informasi Manajemen Target & Indikator Kinerja
   Prinsip: modern, clean, whitespace lega, satu warna aksen.
   ══════════════════════════════════════════════════════════ */

:root {
    --sm-navy-900: #0f172a;
    --sm-navy-700: #1e3a5f;
    --sm-blue-800: #1e40af;
    --sm-blue-600: #2563eb;
    --sm-blue-700: #1d4ed8;
    --sm-blue-500: #3b82f6;
    --sm-slate-700: #334155;
    --sm-slate-500: #64748b;
    --sm-slate-400: #94a3b8;
    --sm-slate-300: #cbd5e1;
    --sm-slate-200: #e2e8f0;
    --sm-slate-100: #f1f5f9;
    --sm-slate-50: #f8fafc;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--sm-navy-900);
    background: var(--sm-slate-50);
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* Latar lembut: dua cahaya biru samar, tanpa pola ramai */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(10px);
}

body::before {
    top: -180px;
    right: -120px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.14) 0%, transparent 70%);
}

body::after {
    bottom: -200px;
    left: -140px;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(30, 64, 175, 0.10) 0%, transparent 70%);
}

/* ── WRAPPER & CARD ── */
.login-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 960px;
    min-height: 580px;
    background: #fff;
    border: 1px solid var(--sm-slate-200);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 24px 60px -12px rgba(15, 23, 42, 0.18);
    animation: cardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ══════════ PANEL KIRI ══════════ */
.brand-side {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 2.25rem;
    color: #fff;
    background: linear-gradient(155deg, var(--sm-navy-900) 0%, var(--sm-navy-700) 55%, var(--sm-blue-800) 100%);
    overflow: hidden;
}

.brand-side::before {
    content: '';
    position: absolute;
    top: -90px;
    right: -110px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.28) 0%, transparent 70%);
    pointer-events: none;
}

.brand-side::after {
    content: '';
    position: absolute;
    bottom: -120px;
    left: -90px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(147, 197, 253, 0.14) 0%, transparent 70%);
    pointer-events: none;
}

.brand-side>* {
    position: relative;
    z-index: 1;
}

.brand-institution {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 50rem;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: #dbeafe;
    backdrop-filter: blur(4px);
}

.brand-institution .bi {
    color: #93c5fd !important;
    font-size: 0.9rem;
}

.brand-logo-box {
    width: 100px;
    height: 100px;
    padding: 11px;
    margin: 2rem 0 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-title {
    margin: 0;
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.1;
}

.brand-subtitle {
    margin-top: 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
    color: #bfdbfe;
}

.brand-desc {
    margin: 1.1rem 0 0;
    max-width: 340px;
    font-size: 0.82rem;
    line-height: 1.75;
    color: rgba(191, 219, 254, 0.78);
}

.brand-points {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.point-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #e0ecff;
}

.point-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.16);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #86efac;
    font-size: 0.8rem;
}

.brand-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(191, 219, 254, 0.55);
}

/* ══════════ PANEL KANAN ══════════ */
.form-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 3.25rem 2rem;
    background: #fff;
}

.form-title {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--sm-navy-900);
}

.form-subtitle {
    margin: 0.4rem 0 1.9rem;
    font-size: 0.86rem;
    color: var(--sm-slate-500);
}

/* ── ALERT ── */
.alert-clean {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
    font-size: 0.82rem;
    line-height: 1.5;
    border: 1px solid transparent;
    animation: alertIn 0.35s ease both;
}

.alert-clean .bi {
    margin-top: 2px;
}

.alert-clean-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.alert-clean-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

@keyframes alertIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── INPUT ── */
.input-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--sm-slate-700);
}

.input-box-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    font-size: 1.05rem;
    color: var(--sm-slate-400);
    pointer-events: none;
    transition: color 0.18s ease;
}

.input-box-wrap:focus-within .input-icon {
    color: var(--sm-blue-600);
}

.form-control-clean {
    width: 100%;
    height: 50px;
    padding: 0 46px 0 44px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--sm-navy-900);
    background: var(--sm-slate-50);
    border: 1.5px solid var(--sm-slate-200);
    border-radius: 0.8rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.form-control-clean::placeholder {
    color: var(--sm-slate-400);
    font-weight: 400;
}

.form-control-clean:hover {
    border-color: var(--sm-slate-300);
}

.form-control-clean:focus {
    background: #fff;
    border-color: var(--sm-blue-500);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.13);
}

.btn-toggle-password {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    color: var(--sm-slate-400);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-toggle-password:hover {
    background: var(--sm-slate-100);
    color: var(--sm-blue-600);
}

.btn-toggle-password:focus-visible {
    outline: 2px solid var(--sm-blue-500);
    outline-offset: 1px;
}

.caps-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 0.5rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: #b45309;
}

/* ── TOMBOL MASUK ── */
.btn-submit-clean {
    width: 100%;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    border: 0;
    border-radius: 0.8rem;
    cursor: pointer;
    background: linear-gradient(135deg, var(--sm-blue-600) 0%, var(--sm-blue-700) 100%);
    box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.55);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-submit-clean .bi {
    transition: transform 0.2s ease;
}

.btn-submit-clean:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px -6px rgba(37, 99, 235, 0.6);
    filter: brightness(1.04);
}

.btn-submit-clean:hover .bi {
    transform: translateX(3px);
}

.btn-submit-clean:active {
    transform: translateY(0);
}

.btn-submit-clean:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.4);
    outline-offset: 2px;
}

.btn-submit-clean.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

.btn-submit-clean .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── AKSES CEPAT PENGUJIAN ── */
.demo-section {
    margin-top: 1.6rem;
    padding: 0.95rem 1rem;
    background: var(--sm-slate-50);
    border: 1px dashed var(--sm-slate-300);
    border-radius: 0.85rem;
}

.demo-label {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--sm-slate-400);
}

.demo-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.demo-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--sm-slate-700);
    background: #fff;
    border: 1px solid var(--sm-slate-200);
    border-radius: 50rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.demo-pill:hover {
    border-color: #93c5fd;
    color: var(--sm-blue-600);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.1);
}

.input-flash {
    animation: inputFlash 0.9s ease;
}

@keyframes inputFlash {
    0% {
        background-color: #dbeafe;
        border-color: var(--sm-blue-500);
    }

    100% {
        background-color: var(--sm-slate-50);
    }
}

/* ── FOOTER FORM ── */
.form-footer {
    margin-top: auto;
    padding-top: 1.75rem;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.6;
    color: var(--sm-slate-400);
}

.form-footer strong {
    color: var(--sm-slate-500);
    font-weight: 700;
}

/* ══════════ RESPONSIVE ══════════ */
@media (max-width: 767.98px) {
    .login-wrapper {
        padding: 0.75rem;
        align-items: flex-start;
    }

    .login-card {
        min-height: auto;
        border-radius: 1.15rem;
    }

    .brand-side {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 1rem;
        padding: 1.25rem 1.35rem;
    }

    .brand-side>div:first-child {
        display: flex;
        align-items: center;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .brand-institution,
    .brand-subtitle,
    .brand-desc,
    .brand-points,
    .brand-footer {
        display: none;
    }

    .brand-logo-box {
        width: 52px;
        height: 52px;
        padding: 8px;
        margin: 0;
        border-radius: 0.85rem;
    }

    .brand-title {
        font-size: 1.4rem;
    }

    .form-side {
        padding: 1.75rem 1.4rem 1.25rem;
    }

    .form-title {
        font-size: 1.4rem;
    }

    .form-subtitle {
        margin-bottom: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}