:root {
    --primary-blue: #1848a0;
    --light-bg: #e1ecf7;
    --text-dark: #001f65;
    --gradient-btn: linear-gradient(180deg, #001f65 0%, #6895fd 100%);
    --emergency-red: linear-gradient(180deg, #d9534f 0%, #ff4d4d 100%);
    --success-green: #2e7d32;
    /* Font sizes default */
    --fs-h1: 2.2rem;
    --fs-h2: 1.6rem;
    --fs-body: 1rem;
    --fs-small: 0.85rem;
}

/* 1. Base Setup & Responsive Font Root */
html {
    font-size: 16px; /* Saiz asas default */
}

/* Kecilkan fon sikit untuk skrin kecil (Phone) */
@media (max-width: 480px) {
    html { font-size: 14px; }
    :root {
        --fs-h1: 1.8rem;
        --fs-h2: 1.4rem;
    }
}

body, html {
    margin: 0; padding: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--light-bg);
    min-height: 100vh;
    color: var(--text-dark);
}

/* 2. Header (Responsive Height) */
.header { 
    background-color: var(--primary-blue); 
    min-height: 30vh; 
    height: auto;
    padding: 40px 20px;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    color: white; 
}

.header-content { 
    display: flex; 
    flex-direction: column; /* Stack logo & text on mobile */
    align-items: center; 
    gap: 15px; 
    text-align: center;
}

/* Logo saiz ikut skrin */
.logo-img { 
    width: clamp(120px, 40vw, 200px); 
    height: auto; 
}

.header-text h1 { 
    margin: 0; 
    font-size: var(--fs-h1); 
    font-weight: 800;
}

.text-now { color: #bfe5ef; }
.header-text p { opacity: 0.9; font-size: var(--fs-small); margin: 5px 0 0; }

/* Desktop view: Logo sebelah text */
@media (min-width: 768px) {
    .header-content { flex-direction: row; text-align: left; }
    .header { height: 35vh; }
}

/* 3. Card Container */
.login-container { 
    display: flex; 
    justify-content: center; 
    margin-top: -60px; 
    padding: 0 15px 40px; 
}

.login-card { 
    background: white; 
    padding: 2rem; 
    border-radius: 30px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
    width: 100%; 
    max-width: 400px; 
    text-align: center; 
    box-sizing: border-box;
}

.welcome-title { 
    color: var(--text-dark); 
    font-size: var(--fs-h2); 
    margin-bottom: 5px; 
}

.subtitle { 
    color: #666; 
    margin-bottom: 25px; 
    font-size: var(--fs-small); 
}

/* 4. Inputs & Buttons */
.input-group { margin-bottom: 15px; width: 100%; }
.input-group input, .styled-select { 
    width: 100%; 
    padding: 12px 15px; 
    border: 2px solid var(--primary-blue); 
    border-radius: 12px; 
    font-size: var(--fs-body); 
    box-sizing: border-box; 
    outline: none; 
    font-family: inherit; 
}

.login-btn, .emergency-btn { 
    width: 100%; 
    padding: 14px; 
    border: none; 
    border-radius: 30px; 
    font-size: var(--fs-body); 
    font-weight: bold; 
    cursor: pointer; 
    transition: transform 0.2s, opacity 0.2s; 
}

.login-btn { background: var(--gradient-btn); color: white; }
.emergency-btn { background: var(--emergency-red); color: white; }
.login-btn:active, .emergency-btn:active { transform: scale(0.98); }

/* 5. Search Results (Pop-up Modal) */
.results-container-mini { display: none; } 

.vendor-card-modal { 
    background: #f9f9f9; 
    padding: 1rem; 
    border-radius: 15px; 
    display: flex; 
    justify-content: space-between;
    align-items: center;
    text-align: left;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
    border-left: 5px solid var(--primary-blue); 
    margin-bottom: 12px;
}

.vendor-info-modal h3 { margin: 0; font-size: 1rem; color: var(--text-dark); }
.vendor-info-modal p { margin: 3px 0; color: #666; font-size: 0.8rem; }

.book-btn { 
    background: var(--gradient-btn); 
    color: white; 
    padding: 8px 15px; 
    border: none; 
    border-radius: 20px; 
    font-weight: bold; 
    cursor: pointer; 
    font-size: 0.75rem;
    white-space: nowrap;
}

/* 6. Modal Responsive Fix */
.modal { 
    position: fixed; top: 0; left: 0; 
    width: 100%; height: 100%; 
    background: rgba(0,0,0,0.6); 
    display: flex; justify-content: center; align-items: center; 
    z-index: 1000; 
    backdrop-filter: blur(3px); 
    padding: 20px;
    box-sizing: border-box;
}

.status-card { 
    background: white; 
    padding: 2rem; 
    border-radius: 25px; 
    text-align: center; 
    width: 100%;
    max-width: 450px; 
    max-height: 85vh; 
    overflow-y: auto; 
    box-sizing: border-box;
}

.status-icon-circle { 
    width: 60px; height: 60px; 
    border-radius: 50%; 
    display: flex; justify-content: center; align-items: center; 
    margin: 0 auto 15px; 
}

.status-btn { 
    margin-top: 20px; 
    width: 100%; 
    padding: 14px; 
    border: none; 
    border-radius: 30px; 
    background: var(--primary-blue); 
    color: white; 
    font-weight: bold; 
    cursor: pointer; 
}

/* 7. Footer / Extra */
.divider { 
    margin: 25px 0; 
    display: flex; align-items: center; 
    text-align: center; color: #999; 
    font-size: 0.85rem; 
}
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid #ddd; }

.admin-note { font-size: 0.8rem; color: #666; margin-bottom: 15px; line-height: 1.5; }

.secondary-login-btn { 
    display: block; 
    width: 100%; 
    padding: 12px; 
    border: 2px solid var(--primary-blue); 
    border-radius: 30px; 
    background: transparent; 
    color: var(--primary-blue); 
    text-decoration: none; 
    font-weight: bold; 
    text-align: center; 
    box-sizing: border-box;
    transition: 0.3s;
}

.secondary-login-btn:hover { background: #f0f7ff; }