/* RESET & VARIABLE THEME (Selaras dengan Kedai Kuning) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

:root {
    --primary: #FFC700;       /* Kuning khas */
    --primary-dark: #E6B200;
    --secondary: #E11D48;     /* Merah cabai */
    --bg-dark: #0F172A;       /* Gelap elegan */
    --bg-card: #1E293B;
    --text-white: #F8FAFC;
    --text-muted: #94A3B8;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    
    /* 1. Pasang Gambar Latar Belakang */
    background-image: 
        linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.85)), /* Lapisan gelap (overlay) agar form tetap kontras */
        url('/assets/kedai-2.png'); /* Gambar mie/ramen estetik */
    
    /* 2. Pengaturan Posisi Gambar agar Pas di Semua Layar */
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efek background diam saat di-scroll di HP */
    
    color: var(--text-white);
    padding: 1.5rem;
}

/* CONTAINER (Gaya Glassmorphism Beraksen Kuning) */
.login-container {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem 2rem;
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 199, 0, 0.1); /* Border tipis kuning transparan */
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* LOGO & HEADER */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 0.8rem;
}

.brand-logo span {
    color: var(--primary);
}

.login-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
}

.login-header p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* FORM ELEMENTS */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.2rem; /* Diubah dari 1rem agar ikon tidak terlalu mepet ke border kiri */
    color: var(--text-muted);
    width: 20px;
    height: 20px;
    pointer-events: none;
    transition: color 0.3s;
}

.input-group input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3.2rem; /* Sisi kiri dinaikkan ke 3.2rem agar teks punya ruang dari ikon */
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    outline: none;
    color: var(--text-white);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

/* Interaktivitas Fokus (Berubah Kuning Emas) */
.input-group input:focus {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(255, 199, 0, 0.15);
}

.input-group input:focus ~ .input-icon {
    color: var(--primary);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    color: var(--text-muted);
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ACTIONS */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.remember-me input {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* BUTTON WITH LOADING SPINNER */
.btn-login {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 14px;
    color: #000;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 199, 0, 0.3);
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 199, 0, 0.4);
}

.btn-login:disabled {
    background: #475569;
    cursor: not-allowed;
    box-shadow: none;
}

.spinner {
    display: none;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #000;
    position: absolute;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================================
   MODIFIKASI SELEKTOR GUEST MODE (BARIS BARU)
   ======================================================== */

/* Pembatas Garis Tipis "atau" */
.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0.4rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.login-divider:not(:empty)::before {
    margin-right: .75em;
}

.login-divider:not(:empty)::after {
    margin-left: .75em;
}

/* Tombol Masuk Tanpa Akun (Gaya Outlined Berongga) */
.btn-guest {
    width: 100%;
    padding: 0.9rem; /* Sudah disinkronkan agar seimbang tinggi layarnya dengan .btn-login */
    background: transparent;
    border: 1px solid rgba(255, 199, 0, 0.3); /* Border kuning tipis transparan */
    border-radius: 14px; /* Disamakan dengan btn-login milikmu */
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}

/* Efek Hover & Interaksi Tombol Tamu */
.btn-guest:hover:not(:disabled) {
    background: rgba(255, 199, 0, 0.06);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 199, 0, 0.1);
}

.btn-guest:disabled {
    border-color: #475569;
    color: #475569;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Penyelarasan Khusus Loading Spinner untuk Tombol Tamu */
#guestSpinner {
    border: 3px solid rgba(255, 199, 0, 0.1);
    border-top-color: var(--primary); /* Putaran loading berwarna kuning */
}

/* ======================================================== */

/* FOOTER REGISTER */
.login-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem; /* Dinaikkan sedikit dari 0.85rem */
    color: #cbd5e1; /* Menggunakan warna slate-300 yang kontrasnya lebih kuat di atas gambar */
    font-weight: 500; /* Ditambahkan ketebalan agar tulisan tidak tenggelam */
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ALERT NOTIFICATION BOX */
.alert-message {
    display: none;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.alert-message.danger {
    background: rgba(225, 29, 72, 0.15);
    color: #FDA4AF;
    border: 1px solid rgba(225, 29, 72, 0.3);
}

.alert-message.success {
    background: rgba(34, 197, 94, 0.15);
    color: #BBF7D0;
    border: 1px solid rgba(34, 197, 94, 0.3);
}