:root {
    --admin-font: 'Inter', sans-serif;
    --admin-border: #E2E8F0;
    --admin-surface: #FFFFFF;
    --admin-canvas: #F8FAFC;
}

body.theme-dark {
    --admin-border: #334155;
    --admin-surface: #1E293B;
    --admin-canvas: #0F172A;
}

body {
    background: var(--admin-canvas);
    font-family: var(--admin-font);
    min-height: 100dvh;
    display: flex;
    align-items: center;
}

.card-login {
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.2s ease;
    background: var(--admin-surface);
    margin: 1.5rem auto;
    width: 100%;
    max-width: 440px;
}

.card-login:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.03);
}

.card-login .card-header {
    background-color: transparent;
    padding: 1.75rem 1.75rem 0;
    border-bottom: none;
    text-align: center;
}

.card-login .card-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #1E293B;
    margin: 0;
}

body.theme-dark .card-login .card-header h4 {
    color: #F1F5F9;
}

.card-login .card-body {
    padding: 1.25rem 1.75rem 1.75rem;
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.375rem;
}

.form-control {
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    font-family: var(--admin-font);
    font-size: 0.875rem;
    padding: 0.625rem 0.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background: var(--admin-surface);
    color: #1E293B;
}

.form-control::placeholder {
    color: #94A3B8;
}

.form-control:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: none;
}

body.theme-dark .form-control {
    background: #1E293B;
    color: #F1F5F9;
    border-color: #334155;
}

body.theme-dark .form-control:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.btn {
    border-radius: 6px;
    font-family: var(--admin-font);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.625rem 1rem;
    transition: all 0.15s ease;
    cursor: pointer;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: #2563EB;
    border-color: #2563EB;
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: #1D4ED8;
    border-color: #1D4ED8;
}

.btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.btn-primary:active {
    background-color: #1E40AF !important;
    border-color: #1E40AF !important;
}

.btn-outline-primary {
    color: #2563EB;
    border-color: #2563EB;
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: #EFF6FF;
    border-color: #2563EB;
    color: #1D4ED8;
}

.btn-outline-primary:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.btn-outline-primary:active {
    background-color: #DBEAFE !important;
    border-color: #1D4ED8 !important;
    color: #1E40AF !important;
}

body.theme-dark .btn-outline-primary {
    color: #60A5FA;
    border-color: #3B82F6;
}

body.theme-dark .btn-outline-primary:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #93C5FD;
}

a {
    color: #2563EB;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: #1D4ED8;
    text-decoration: underline;
}

body.theme-dark a {
    color: #60A5FA;
}

body.theme-dark a:hover {
    color: #93C5FD;
}

body.theme-dark .form-label {
    color: #CBD5E1;
}

body.theme-dark .form-check-label {
    color: #CBD5E1;
}

body.theme-dark .eye-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #E2E8F0;
}

.text-danger {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.form-check-label {
    font-size: 0.8125rem;
    color: #475569;
}

/* Sembunyikan icon eye bawaan browser pada password field */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-credentials-auto-fill-button {
    display: none !important;
}

.eye-toggle {
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
    color: #94A3B8;
}

.eye-toggle:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: #64748B;
}

/* ── Toast ── */
.alert-toast-container {
    position: fixed;
    top: 70px;
    right: 0;
    z-index: 1060;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: 420px;
    width: 100%;
}

.alert-toast-container > * {
    pointer-events: auto;
}

.alert-toast {
    display: flex !important;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font-family: var(--admin-font);
    font-size: 0.875rem;
    line-height: 1.4;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    transform: translateX(100%);
}

.alert-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.alert-toast-success {
    background: #059669;
    border-color: #047857;
}

.alert-toast-danger {
    background: #DC2626;
    border-color: #B91C1C;
}

.alert-toast-warning {
    background: #D97706;
    border-color: #B45309;
}

.alert-toast-info {
    background: #2563EB;
    border-color: #1D4ED8;
}

.alert-toast-icon {
    font-size: 1.125rem;
    flex-shrink: 0;
    line-height: 1;
}

.alert-toast-body {
    flex: 1;
    min-width: 0;
}

.alert-toast-close {
    flex-shrink: 0;
    font-size: 0.75rem;
    opacity: 0.7;
    padding: 0.25rem;
}

.alert-toast-close:hover {
    opacity: 1;
}

body.theme-dark .alert-toast {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

body.theme-dark .alert-toast-success {
    background: #065F46;
    border-color: #047857;
}

body.theme-dark .alert-toast-danger {
    background: #991B1B;
    border-color: #7F1D1D;
}

body.theme-dark .alert-toast-warning {
    background: #92400E;
    border-color: #78350F;
}

body.theme-dark .alert-toast-info {
    background: #1E40AF;
    border-color: #1E3A8A;
}

@media (max-width: 576px) {
    .card-login {
        margin: 1rem;
        max-width: none;
    }

    .card-login .card-header {
        padding: 1.5rem 1.25rem 0;
    }

    .card-login .card-body {
        padding: 1rem 1.25rem 1.5rem;
    }
}
