/* Project: Fuel Pass Tracker (Final Premium UI)
   Developer: Cruzz 
   Year: 2026
*/

:root {
    /* --- Premium Light Theme --- */
    --bg-page: #f4f7fb;
    --bg-card: #ffffff;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --input-bg: #f8fafc;
    
    --logo-bg: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    --logo-color: #2563eb;

    --success-bg: #ecfdf5; --success-border: #a7f3d0; --success-text: #059669;
    --error-bg: #fef2f2; --error-border: #fecaca; --error-text: #dc2626;
    --warning-bg: #fffbeb; --warning-border: #fde68a; --warning-text: #d97706;
}

body.dark-theme {
    /* --- Premium Dark Theme --- */
    --bg-page: #0f172a;
    --bg-card: #1e293b;
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --input-bg: #0f172a;

    --logo-bg: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
    --logo-color: #60a5fa;

    --success-bg: rgba(16, 185, 129, 0.1); --success-border: rgba(16, 185, 129, 0.2); --success-text: #34d399;
    --error-bg: rgba(239, 68, 68, 0.1); --error-border: rgba(239, 68, 68, 0.2); --error-text: #f87171;
    --warning-bg: rgba(245, 158, 11, 0.1); --warning-border: rgba(245, 158, 11, 0.2); --warning-text: #fbbf24;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Hind Colombo', 'Inter', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    background-color: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    color: var(--text-main);
}

.app-container {
    background: var(--bg-card);
    width: 100%;
    max-width: 420px;
    border-radius: 32px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
    position: relative;
}

/* --- Top Bar (Theme & Language) --- */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.icon-btn, .lang-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-dropdown { position: relative; }
.lang-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: var(--bg-card);
    min-width: 120px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 10;
    overflow: hidden;
}

.lang-menu.show { display: block; animation: fadeIn 0.2s ease; }
.lang-menu a {
    display: block;
    padding: 12px 15px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.lang-menu a:hover { background: var(--input-bg); }
.lang-menu a.active { color: var(--primary); font-weight: 700; background: var(--input-bg); }

/* --- Header Section --- */
.header { text-align: center; margin-bottom: 35px; }

.logo-box {
    background: var(--logo-bg);
    color: var(--logo-color);
    width: 84px;
    height: 84px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    margin: 0 auto 20px auto;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.15);
}

.header h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.header p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
    font-weight: 500;
}

/* --- Input Group & Validation --- */
.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    text-align: center;
}

input[type="text"] {
    width: 100%;
    background: var(--input-bg);
    border: 2px solid var(--border);
    padding: 18px;
    font-size: 28px;
    font-weight: 700;
    border-radius: 16px;
    color: var(--text-main);
    outline: none;
    text-align: center;
    letter-spacing: 6px;
}

input[type="text"]:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.submit-btn {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 18px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
    margin-top: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.submit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* --- Alerts & Calendar --- */
.alert-box {
    margin-top: 30px;
    padding: 20px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    animation: slideUp 0.4s ease;
}

.success-msg { background: var(--success-bg); border: 1px solid var(--success-border); color: var(--success-text); }
.error-msg { background: var(--error-bg); border: 1px solid var(--error-border); color: var(--error-text); }
.warning-msg { background: var(--warning-bg); border: 1px solid var(--warning-border); color: var(--warning-text); }

.calendar-section { margin-top: 30px; animation: slideUp 0.5s ease; }
.section-title { font-size: 14px; font-weight: 700; color: var(--text-muted); margin-bottom: 15px; text-align: center; }

.dates-grid { display: flex; gap: 12px; }
.date-card {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 15px 0;
    text-align: center;
}

.date-card .month { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 5px; }
.date-card .day { font-size: 24px; font-weight: 700; color: var(--text-main); }

/* --- CENTERED WHATSAPP SECTION --- */
.app-footer {
    margin-top: 40px;
    text-align: center;
}

.wa-group-wrapper {
    display: flex;
    flex-direction: column; /* Icon and text vertically stacked */
    align-items: center;    /* Center horizontally */
    justify-content: center;
    text-decoration: none;
    gap: 12px;
    padding: 20px;
    background: rgba(37, 211, 102, 0.08); /* Transparent Green */
    border: 1px solid rgba(37, 211, 102, 0.2);
    border-radius: 24px;
    transition: all 0.3s ease;
    width: 100%;
}

.wa-main-icon {
    color: #25D366;
    font-size: 40px;
}

.wa-text-content {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #25D366;
    line-height: 1.4;
}

.wa-group-wrapper:hover {
    background: rgba(37, 211, 102, 0.12);
    transform: translateY(-3px);
    border-color: #25D366;
}

.footer-divider {
    height: 1px;
    background: var(--border);
    width: 60px;
    margin: 25px auto;
    opacity: 0.5;
}

.copyright {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.copyright b { color: var(--text-main); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* Chrome number input fix */
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }