/*
 * STFBE - halaman "kartu tunggal" (Login Admin, Cek Token). Diadaptasi dari
 * auth.css Portal SBIM (devsbim) supaya tampilan form, tombol & kartu identik.
 */

:root {
    --navy: #24456B;
    --navy-dark: #1B3656;
    --yellow: #F9B900;
    --yellow-dark: #DDA400;
    --bg: #F5F8FC;
    --card: #FFFFFF;
    --text-primary: #172B4D;
    --text-secondary: #64748B;
    --border: #E2E8F0;
    --success: #16A34A;
    --danger: #DC2626;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 2.5rem 1rem;
}

.auth-card {
    background: var(--card);
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 1px 2px rgba(23, 43, 77, 0.04), 0 24px 48px -24px rgba(36, 69, 107, 0.22);
    animation: mbkmFadeIn 0.45s ease-out;
    text-align: center;
}

@keyframes mbkmFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.brand {
    text-align: center;
    margin-bottom: 18px;
}
.brand img {
    width: 100px;
    height: auto;
    margin-bottom: 6px;
}
.brand .brand-name {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--navy);
    background: rgba(249, 185, 0, 0.15);
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 8px;
}
.brand h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
    line-height: 1.25;
}
.brand p.tagline {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.alert-mbkm {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    text-align: left;
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.alert-mbkm.success {
    background: rgba(22, 163, 74, 0.06);
    border-color: rgba(22, 163, 74, 0.25);
}
.alert-mbkm i { color: var(--danger); font-size: 1.1rem; margin-top: 1px; }
.alert-mbkm.success i { color: var(--success); }
.alert-mbkm ul { margin: 0; padding-left: 18px; }
.alert-mbkm li { font-size: 13.5px; color: var(--danger); line-height: 1.4; }
.alert-mbkm p { margin: 0; font-size: 13.5px; color: var(--text-primary); line-height: 1.5; }

.field-group { margin-bottom: 14px; text-align: left; }

.field-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.field-group .field-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    line-height: 1.3;
}

.mbkm-input {
    width: 100%;
    height: 48px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mbkm-input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3.5px rgba(36, 69, 107, 0.14);
}
.mbkm-input.is-valid { border-color: var(--success); }
.mbkm-input.is-valid:focus { box-shadow: 0 0 0 3.5px rgba(22, 163, 74, 0.14); }
.mbkm-input.is-invalid { border-color: var(--danger); }
.mbkm-input.is-invalid:focus { box-shadow: 0 0 0 3.5px rgba(220, 38, 38, 0.14); }

.mbkm-input[readonly] {
    background: var(--bg);
    color: var(--text-secondary);
    border-style: dashed;
}

.input-with-icon { position: relative; }
.input-with-icon .mbkm-input { padding-right: 46px; }
.input-icon-btn {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
}
.input-icon-btn:hover { background: var(--bg); color: var(--navy); }
.input-icon-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(36, 69, 107, 0.2);
}

.field-feedback {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    margin-top: 4px;
    min-height: 15px;
    line-height: 1.2;
    transition: color 0.15s ease;
}
.field-feedback.state-neutral { color: var(--text-secondary); }
.field-feedback.state-valid { color: var(--success); }
.field-feedback.state-invalid { color: var(--danger); }

.strength-meter {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}
.strength-meter span {
    height: 4px;
    flex: 1;
    border-radius: 3px;
    background: var(--border);
    transition: background-color 0.2s ease;
}
.strength-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 3px;
    text-align: left;
}
.strength-label b { font-weight: 600; }

.helper-note {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin: -4px 0 14px;
    line-height: 1.4;
    text-align: left;
}

.btn-mbkm-submit {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: var(--yellow);
    color: var(--navy-dark);
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.btn-mbkm-submit:hover { background: var(--yellow-dark); box-shadow: 0 8px 16px -6px rgba(221, 164, 0, 0.5); transform: translateY(-1px); color: var(--navy-dark); }
.btn-mbkm-submit:active { transform: translateY(0); }
.btn-mbkm-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3.5px rgba(36, 69, 107, 0.25);
}

.login-link {
    text-align: center;
    margin-top: 14px;
    font-size: 14px;
    color: var(--text-secondary);
}
.login-link a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}
.login-link a:hover { color: var(--navy-dark); text-decoration: underline; }

.card-footer-note {
    text-align: center;
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .auth-card { max-width: 90%; padding: 26px; }
}

@media (max-width: 576px) {
    body { padding: 0; align-items: flex-start; }
    .auth-card {
        max-width: 100%;
        width: calc(100% - 32px);
        margin: 16px;
        padding: 20px;
        border-radius: 16px;
    }
    .brand h1 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-card { animation: none; }
    * { transition: none !important; }
}
