.login-container {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 380px;
    /* Glassmorphism: panel putih transparan + blur, biar ambient di belakang nembus
       ke tepi kartu. Putih 0.78 di atas backdrop gelap tetap jadi panel terang →
       teks gelap tetap kebaca, tanpa perlu varian dark. */
    background: rgba(255, 255, 255, 0.78);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 10px 16px -12px rgba(0, 0, 0, 0.14);
    animation: login-card-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.brand-section {
    text-align: center;
    margin-bottom: 35px;
}

.brand-section__logo {
    width: 84px;
    height: 84px;
    object-fit: cover;
    display: block;
    margin: 0 auto 14px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: none;
    padding: 10px;
    animation: login-logo-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

.brand-section__icon {
    background: linear-gradient(135deg, #4158D0 0%, #6366f1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.brand-section h2 {
    font-weight: 800;
    color: #1a1a1a;
    margin: 10px 0 5px 0;
    letter-spacing: -1px;
    font-size: 1.75rem;
}

.brand-section p {
    color: #71717a;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
}

.login-card .form-label,
.login-card label.form-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #3f3f46;
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    height: 54px;
    border-radius: 14px;
    border: 1.5px solid #e4e4e7;
    background-color: #f8fafc;
    padding: 0 18px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #18181b;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #6366f1;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.login-field-group { margin-bottom: 18px; }
.login-field-group > label {
    display: block;
    margin: 0 0 8px;
    color: #34433e;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .01em;
}
.login-input-shell { position: relative; }
.login-input-shell .form-control { width: 100%; padding-left: 50px; }
.login-input-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 16px;
    display: inline-flex;
    width: 21px;
    height: 21px;
    align-items: center;
    justify-content: center;
    color: #71817b;
    transform: translateY(-50%);
    pointer-events: none;
}
.login-input-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-input-shell:focus-within .login-input-icon { color: #0f9f6e; }
.login-form-options { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -2px 0 20px; }
.remember-username-row { display: inline-flex; min-width: 0; align-items: center; gap: 10px; margin: 0; color: #586963; font-size: 12px; font-weight: 650; cursor: pointer; user-select: none; }
.remember-username-row > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.remember-username-switch { position: relative; flex: 0 0 auto; width: 34px; height: 20px; border-radius: 999px; background: #cad5d1; transition: background .18s ease; }
.remember-username-switch i { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.25); transition: transform .18s ease; }
.remember-username-row > input:checked + .remember-username-switch { background: #0f9f6e; }
.remember-username-row > input:checked + .remember-username-switch i { transform: translateX(14px); }
.remember-username-row > input:focus-visible + .remember-username-switch { outline: 3px solid rgba(15,159,110,.2); outline-offset: 2px; }
.login-success-msg { background:#f0fdf4; color:#15803d; border-color:#bbf7d0; }

.login-credential-field {
    position: relative;
}

.login-credential-field .form-control {
    padding-right: 86px;
}

.login-field-affix {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.remember-username-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.remember-username-inline input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: #6366f1;
    cursor: pointer;
}

.remember-username-inline input:focus-visible {
    outline: 2px solid rgba(99, 102, 241, 0.35);
    outline-offset: 2px;
    border-radius: 4px;
}

.remember-username-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: #64748b;
    padding: 0;
    cursor: help;
}

.remember-username-tooltip:hover,
.remember-username-tooltip:focus-visible {
    color: #6366f1;
    outline: none;
}

.remember-username-tooltip::before,
.remember-username-tooltip::after {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.remember-username-tooltip::before {
    content: attr(data-tooltip);
    right: 0;
    bottom: calc(100% + 10px);
    width: min(220px, calc(100vw - 72px));
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(24, 24, 27, 0.96);
    color: #f8fafc;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.45;
    text-align: left;
    box-shadow: 0 10px 16px rgba(15, 23, 42, 0.14);
    transform: translateY(6px);
    z-index: 5;
}

.remember-username-tooltip::after {
    content: '';
    right: 6px;
    bottom: calc(100% + 4px);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(24, 24, 27, 0.96) transparent transparent transparent;
    transform: translateY(6px);
    z-index: 5;
}

.remember-username-tooltip:hover::before,
.remember-username-tooltip:hover::after,
.remember-username-tooltip:focus-visible::before,
.remember-username-tooltip:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.btn-login {
    height: 54px;
    background: #18181b;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    width: 100%;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-login:active {
    transform: scale(0.98);
    background: #000000;
}

.error-msg {
    background-color: #fef2f2;
    color: #dc2626;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #fee2e2;
}

.login-submit-notice {
    min-height: 0;
    margin-top: 12px;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
}

.login-submit-notice:empty {
    display: none;
}

.footer-text {
    text-align: center;
    margin-top: 30px;
    color: #a1a1aa;
    font-size: 0.75rem;
    font-weight: 500;
}

.login-card select.form-control {
    cursor: pointer;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Animasi masuk (card + logo) ───────────────────────────────────────── */
@keyframes login-card-in {
    from { opacity: 0; transform: translateY(18px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes login-logo-in {
    from { opacity: 0; transform: translateY(8px) scale(0.9); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Toggle lihat/sembunyi password ────────────────────────────────────── */
.login-password-field {
    position: relative;
}
.login-password-field .form-control {
    padding-right: 52px;
}
.login-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    border-radius: 9px;
    transition: color 0.18s ease, background 0.18s ease;
}
.login-password-toggle:hover,
.login-password-toggle:focus-visible {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.10);
    outline: none;
}
.login-password-eye { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-password-eye__slash { display: none; }
.login-password-toggle[aria-pressed="true"] .login-password-eye__slash { display: block; }

/* ── Tombol login: loading state + anti double-submit ──────────────────── */
.btn-login {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-login__spin {
    display: none;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: login-spin 0.7s linear infinite;
}
.btn-login__loading { display: none; align-items: center; justify-content: center; gap: 9px; }
.btn-login.is-loading {
    pointer-events: none;
    opacity: 0.9;
}
.btn-login.is-loading .btn-login__label {
    display: none;
}
.btn-login.is-loading .btn-login__spin {
    display: inline-block;
}
.btn-login.is-loading .btn-login__loading { display: inline-flex; }
@keyframes login-spin {
    to { transform: rotate(360deg); }
}
