/* ============================
   AUTH — PROFESSIONAL CLEAN UI
   + SOFT GLOW BACKGROUND (D)
=============================*/

/* Warna dasar */
:root {
    --primary: #3b82f6; /* biru profesional */
    --primary-dark: #2563eb;
    --danger: #dc2626;
    --success: #16a34a;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --bg-light: #f3f4f6;
    --card-bg: #ffffff;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body + soft glow background */
body {
    font-family: "Inter", system-ui, sans-serif;
    min-height: 100vh;
    background: radial-gradient(
        circle at top left,
        #e0e7ff 0,
        #f3f4f6 45%,
        #f9fafb 100%
    );
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

/* Glow blur: kiri atas & kanan bawah */
body::before,
body::after {
    content: "";
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 999px;
    filter: blur(70px);
    opacity: 0.7;
    z-index: -1;
}

body::before {
    top: -80px;
    left: -40px;
    background: radial-gradient(
        circle at center,
        rgba(59, 130, 246, 0.25) 0,
        transparent 60%
    );
}

body::after {
    bottom: -80px;
    right: -40px;
    background: radial-gradient(
        circle at center,
        rgba(96, 165, 250, 0.2) 0,
        transparent 60%
    );
}

/* Matikan background elemen lama (kalau ada di Blade) */
.auth-bg-elements {
    display: none;
}

/* ===== Card Container ===== */
.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding-bottom: 2rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08),
        0 1px 3px rgba(15, 23, 42, 0.12);
    animation: fadeIn 0.35s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Header ===== */
.auth-card-header {
    padding: 1.75rem 1.75rem 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    text-align: center;
}

.auth-card-header h4 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* ===== Body ===== */
.auth-card-body {
    padding: 1.75rem 1.75rem 1.75rem;
}

/* ===== Form ===== */
.auth-form-group {
    margin-bottom: 1.4rem;
}

.auth-form-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
    font-weight: 500;
}

.auth-input-with-icon {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.95rem;
}

.auth-form-control {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.6rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: #ffffff;
    transition: border-color 0.16s ease, box-shadow 0.16s ease,
        background 0.16s ease;
}

.auth-form-control::placeholder {
    color: #9ca3af;
}

.auth-form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18);
    background: #ffffff;
}

.auth-form-control.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

/* ===== Button ===== */
.auth-btn {
    width: 100%;
    padding: 0.85rem;
    border-radius: 10px;
    border: none;
    font-size: 0.98rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--primary-dark) 100%
    );
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.15s ease;
    position: relative;
}

.auth-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1d4ed8 100%);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.auth-btn:active {
    transform: scale(0.985);
}

/* Loading spinner */
.auth-btn-loading {
    pointer-events: none;
    opacity: 0.9;
}

.auth-btn-loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Link ===== */
.auth-links-container {
    margin-top: 1.1rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-link {
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-link:hover {
    text-decoration: underline;
}

/* ===== Alert ===== */
.auth-alert {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.auth-alert-success {
    background: #ecfdf5;
    color: #047857;
    border-left: 4px solid #10b981;
}

.auth-alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border-left: 4px solid #ef4444;
}

/* Fade-out untuk auto hide */
.fade-out {
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-5px);
    }
}

/* ===== Toggle Password ===== */
.password-toggle {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    font-size: 0.95rem;
}

.password-toggle:hover {
    color: var(--primary);
}

/* ===== Social login section (disembunyikan karena belum dipakai) ===== */
.auth-social-buttons,
.auth-social-divider {
    display: none;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .auth-card {
        border-radius: 14px;
    }

    .auth-card-body,
    .auth-card-header {
        padding: 1.5rem 1.35rem;
    }
}
