/* ─── GoCab Pro — Mobile-First Design ──────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --success: #0d904f;
    --success-light: #e6f4ea;
    --warning: #e37400;
    --warning-light: #fef7e0;
    --danger: #d93025;
    --danger-light: #fce8e6;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f4;
    --gray-200: #e8eaed;
    --gray-300: #dadce0;
    --gray-500: #5f6368;
    --gray-700: #3c4043;
    --gray-900: #202124;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    font-size: 15px;
    line-height: 1.5;
    -webkit-tap-highlight-color: transparent;
    padding-bottom: 70px;
}

/* ─── Top Bar ──────────────────────────────────── */
.topbar {
    position: sticky; top:0; z-index:50;
    background: var(--primary);
    color: white;
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px;
    height: 52px;
    box-shadow: 0 2px 4px rgba(0,0,0,.15);
}
.topbar-left { display:flex; align-items:center; gap:12px; }
.menu-toggle { font-size:22px; cursor:pointer; }
.topbar-title { font-size:17px; font-weight:700; }
.topbar-right { display:flex; align-items:center; }
.notif-badge { position:relative; color:white; text-decoration:none; font-size:20px; }
.badge-count {
    position:absolute; top:-6px; right:-8px;
    background:var(--danger); color:white;
    font-size:11px; font-weight:700;
    min-width:18px; height:18px; border-radius:9px;
    display:flex; align-items:center; justify-content:center;
}

/* ─── Side Menu ────────────────────────────────── */
.sidemenu {
    position:fixed; top:0; left:-280px; width:280px; height:100%;
    background:white; z-index:100;
    transition: left .25s ease;
    overflow-y:auto;
    box-shadow: 2px 0 8px rgba(0,0,0,.1);
}
.sidemenu.open { left:0; }
.sidemenu-overlay {
    position:fixed; top:0; left:0; width:100%; height:100%;
    background:rgba(0,0,0,.4); z-index:99;
    display:none;
}
.sidemenu-overlay.open { display:block; }
.sidemenu-header {
    background: var(--primary);
    color: white;
    padding: 24px 16px 16px;
    text-align: center;
}
.sidemenu-avatar { font-size:48px; margin-bottom:8px; }
.sidemenu-name { font-size:18px; font-weight:700; }
.sidemenu-plaque { font-size:13px; opacity:.8; margin-top:2px; }
.sidemenu-item {
    display:flex; align-items:center; gap:12px;
    padding: 14px 20px;
    text-decoration:none; color:var(--gray-700);
    font-size:15px; font-weight:500;
    border-bottom:1px solid var(--gray-100);
    transition: background .15s;
}
.sidemenu-item:hover, .sidemenu-item.active { background:var(--primary-light); color:var(--primary); }
.sidemenu-logout { color:var(--danger) !important; margin-top:8px; border-top:2px solid var(--gray-200); }

/* ─── Bottom Nav ────────────────────────────────── */
.bottom-nav {
    position:fixed; bottom:0; left:0; right:0;
    background:white;
    display:flex;
    border-top:1px solid var(--gray-200);
    z-index:50;
    box-shadow: 0 -1px 3px rgba(0,0,0,.05);
}
.bottom-nav-item {
    flex:1; display:flex; flex-direction:column; align-items:center;
    padding:8px 0 6px;
    text-decoration:none; color:var(--gray-500);
    font-size:11px; font-weight:500;
    transition: color .15s;
}
.bottom-nav-item span { font-size:10px; margin-top:2px; }
.bottom-nav-item.active { color:var(--primary); }

/* ─── Mobile Content ───────────────────────────── */
.mobile-content { padding:16px; max-width:500px; margin:0 auto; }
.page-header { margin-bottom:16px; }
.page-header h1 { font-size:22px; font-weight:700; }

/* ─── Cards ────────────────────────────────────── */
.card {
    background:white;
    border-radius:var(--radius);
    padding:16px;
    margin-bottom:14px;
    box-shadow:var(--shadow);
}
.card-title {
    font-size:15px; font-weight:600;
    color:var(--gray-700);
    margin-bottom:12px;
    padding-bottom:8px;
    border-bottom:1px solid var(--gray-100);
}

/* ─── Vehicle Card ─────────────────────────────── */
.vehicle-card {
    background: linear-gradient(135deg, var(--primary) 0%, #4285f4 100%);
    color:white;
    border-radius:var(--radius);
    padding:20px;
    margin-bottom:14px;
    box-shadow: 0 4px 12px rgba(26,115,232,.3);
}
.vehicle-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:16px; }
.vehicle-model { font-size:20px; font-weight:700; }
.vehicle-plate { font-size:14px; opacity:.85; margin-top:2px; }
.vehicle-status {
    padding:4px 12px; border-radius:20px;
    font-size:12px; font-weight:700; text-transform:uppercase;
}
.status-actif { background:rgba(255,255,255,.2); }
.status-bloque { background:var(--danger); }
.status-suspendu { background:var(--warning); }

.progress-section { margin-top:8px; }
.progress-label { font-size:12px; opacity:.8; margin-bottom:6px; }
.progress-bar {
    height:8px; background:rgba(255,255,255,.25);
    border-radius:4px; overflow:hidden;
}
.progress-fill {
    height:100%; background:white;
    border-radius:4px; transition: width .5s;
}
.progress-stats {
    display:flex; justify-content:space-between;
    font-size:13px; margin-top:6px; opacity:.9;
}

/* ─── Alert Banner ─────────────────────────────── */
.alert-banner {
    padding:12px 16px; border-radius:var(--radius);
    font-size:14px; font-weight:600; margin-bottom:14px;
    display:flex; align-items:center; gap:8px;
}
.alert-danger { background:var(--danger-light); color:var(--danger); border-left:4px solid var(--danger); }
.alert-warning { background:var(--warning-light); color:var(--warning); border-left:4px solid var(--warning); }

/* ─── Payment Card ─────────────────────────────── */
.payment-card { text-align:center; }
.payment-amount { font-size:36px; font-weight:800; color:var(--gray-900); margin:8px 0; }
.payment-status { font-size:14px; margin-bottom:12px; }
.payment-form, .depot-form { margin-top:8px; }
.payment-input {
    padding:10px 12px; border:1px solid var(--gray-300);
    border-radius:8px; font-size:15px; width:100%;
}
.payment-input:focus { outline:none; border-color:var(--primary); }

/* ─── Quick Stats ──────────────────────────────── */
.quick-stats { display:flex; gap:8px; margin-bottom:14px; }
.stat-chip {
    flex:1; padding:12px; border-radius:var(--radius);
    text-decoration:none; font-size:13px; font-weight:600;
    text-align:center; box-shadow:var(--shadow);
}
.stat-danger { background:var(--danger-light); color:var(--danger); }
.stat-warning { background:var(--warning-light); color:var(--warning); }

/* ─── Notifications ────────────────────────────── */
.notif-item {
    padding:12px 0; border-bottom:1px solid var(--gray-100);
}
.notif-item:last-child { border-bottom:none; }
.notif-unread { background:var(--primary-light); margin:0 -16px; padding:12px 16px; border-radius:8px; }
.notif-type { font-size:13px; font-weight:700; margin-bottom:4px; }
.notif-type-paiement { color:var(--success); }
.notif-type-depot { color:var(--primary); }
.notif-type-amende { color:var(--danger); }
.notif-type-systeme { color:var(--gray-500); }
.notif-type-alerte { color:var(--warning); }
.notif-msg { font-size:14px; color:var(--gray-700); }
.notif-time { font-size:11px; color:var(--gray-500); margin-top:4px; }

/* ─── Amendes ──────────────────────────────────── */
.amende-item {
    padding:14px 0; border-bottom:1px solid var(--gray-100);
}
.amende-item:last-child { border-bottom:none; }
.amende-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.amende-ref { font-weight:700; font-size:14px; color:var(--primary); }
.amende-body { font-size:14px; }
.amende-meta { font-size:12px; color:var(--gray-500); margin:4px 0; display:flex; gap:6px; }
.amende-montant { display:flex; gap:12px; font-size:13px; font-weight:600; margin:6px 0; }
.amende-payer { margin-top:8px; }
.amende-payer input { width:120px; }

/* ─── List Items ───────────────────────────────── */
.list-item {
    display:flex; justify-content:space-between; align-items:center;
    padding:12px 0; border-bottom:1px solid var(--gray-100);
}
.list-item:last-child { border-bottom:none; }
.list-item-title { font-weight:600; font-size:14px; }
.list-item-sub { font-size:13px; color:var(--gray-500); }
.list-item-meta { font-size:12px; color:var(--gray-500); margin-top:2px; }
.list-item-amount { font-weight:700; font-size:15px; }
.list-item-right { text-align:right; }

/* ─── Badges ───────────────────────────────────── */
.badge {
    display:inline-block; padding:3px 10px; border-radius:12px;
    font-size:11px; font-weight:700; text-transform:uppercase;
}
.badge-payee, .badge-effectue, .badge-resolu { background:var(--success-light); color:var(--success); }
.badge-impayee, .badge-retard, .badge-signale { background:var(--danger-light); color:var(--danger); }
.badge-partiel, .badge-planifie, .badge-en_cours { background:var(--warning-light); color:var(--warning); }
.badge-envoyee { background:var(--primary-light); color:var(--primary); }

/* ─── Profile ──────────────────────────────────── */
.profile-card { text-align:center; padding:24px; }
.profile-avatar { font-size:64px; margin-bottom:8px; }
.profile-name { font-size:20px; font-weight:700; }
.profile-plaque { font-size:14px; color:var(--gray-500); margin:4px 0; }
.profile-status { display:inline-block; margin-top:8px; }

.detail-row {
    display:flex; justify-content:space-between;
    padding:8px 0; font-size:14px;
    border-bottom:1px solid var(--gray-100);
}
.detail-row:last-child { border-bottom:none; }
.detail-row span:first-child { color:var(--gray-500); }
.detail-row span:last-child { font-weight:500; }

/* ─── Classement ───────────────────────────────── */
.rank-card { text-align:center; padding:20px; }
.rank-big { font-size:48px; font-weight:800; color:var(--primary); }
.rank-info { font-size:14px; color:var(--gray-700); margin-top:8px; }
.rank-info div { margin:2px 0; }

.rank-item {
    display:flex; align-items:center; gap:12px;
    padding:10px 0; border-bottom:1px solid var(--gray-100);
}
.rank-item:last-child { border-bottom:none; }
.rank-me { background:var(--primary-light); margin:0 -16px; padding:10px 16px; border-radius:8px; }
.rank-pos { font-size:18px; font-weight:800; color:var(--primary); width:36px; }
.rank-driver { flex:1; }
.rank-name { font-weight:600; font-size:14px; }
.rank-plate { font-size:12px; color:var(--gray-500); }
.rank-score { text-align:right; font-weight:600; font-size:14px; }
.rank-note { font-size:12px; color:var(--warning); }

/* ─── Support ──────────────────────────────────── */
.support-contact { display:flex; flex-direction:column; gap:12px; }
.support-item { font-size:14px; color:var(--gray-700); }
.faq-item { padding:12px 0; border-bottom:1px solid var(--gray-100); }
.faq-item:last-child { border-bottom:none; }
.faq-q { font-weight:600; font-size:14px; margin-bottom:4px; }
.faq-a { font-size:13px; color:var(--gray-500); }

/* ─── Documents ────────────────────────────────── */
.doc-item {
    display:flex; align-items:center; gap:12px;
    padding:14px 0; border-bottom:1px solid var(--gray-100);
    text-decoration:none; color:inherit;
}
.doc-item:last-child { border-bottom:none; }
.doc-title { font-weight:600; font-size:14px; }
.doc-sub { font-size:12px; color:var(--gray-500); }

/* ─── Forms ────────────────────────────────────── */
.form-group { margin-bottom:14px; }
.form-group label { display:block; font-size:13px; font-weight:500; color:var(--gray-700); margin-bottom:4px; }
.form-group input, .form-group select, .form-group textarea {
    width:100%; padding:12px 14px;
    border:1px solid var(--gray-300); border-radius:8px;
    font-size:15px; font-family:inherit;
    background:white; transition:border-color .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline:none; border-color:var(--primary);
    box-shadow:0 0 0 3px var(--primary-light);
}
.form-row { display:flex; gap:10px; }
.form-row .form-group { flex:1; }

/* ─── Buttons ──────────────────────────────────── */
.btn-primary {
    display:inline-block; padding:12px 20px;
    background:var(--primary); color:white;
    border:none; border-radius:8px;
    font-size:15px; font-weight:600;
    cursor:pointer; text-decoration:none;
    transition:background .15s;
}
.btn-primary:hover { background:var(--primary-dark); }
.btn-secondary {
    display:inline-block; padding:12px 20px;
    background:white; color:var(--gray-700);
    border:1px solid var(--gray-300); border-radius:8px;
    font-size:15px; font-weight:500;
    cursor:pointer; text-decoration:none;
}
.btn-full { width:100%; text-align:center; }
.btn-text { color:var(--primary); font-weight:500; text-decoration:none; font-size:14px; display:block; margin-top:8px; }

/* ─── Flash ────────────────────────────────────── */
.flash-messages { margin-bottom:14px; }
.flash {
    padding:10px 14px; border-radius:8px; font-size:13px; font-weight:500;
    margin-bottom:8px; border-left:4px solid;
}
.flash-success { background:var(--success-light); color:var(--success); border-color:var(--success); }
.flash-error { background:var(--danger-light); color:var(--danger); border-color:var(--danger); }
.flash-warning { background:var(--warning-light); color:var(--warning); border-color:var(--warning); }
.flash-info { background:var(--primary-light); color:var(--primary); border-color:var(--primary); }

/* ─── Auth ─────────────────────────────────────── */
.auth-page {
    background:linear-gradient(135deg, #e8f0fe 0%, #d2e3fc 100%);
    min-height:100vh; display:flex; align-items:center; justify-content:center;
}
.auth-container { width:100%; max-width:400px; padding:20px; }
.auth-card {
    background:white; border-radius:16px; padding:32px 24px;
    box-shadow:0 8px 30px rgba(0,0,0,.1);
}
.auth-header { text-align:center; margin-bottom:24px; }
.auth-logo { font-size:48px; margin-bottom:8px; }
.auth-header h1 { font-size:24px; margin-bottom:4px; }
.auth-header p { color:var(--gray-500); font-size:14px; }
.auth-footer {
    text-align:center; margin-top:20px; padding-top:16px;
    border-top:1px solid var(--gray-100); font-size:14px; color:var(--gray-500);
}
.auth-footer a { color:var(--primary); font-weight:600; text-decoration:none; }

/* ─── Utilities ────────────────────────────────── */
.text-success { color:var(--success); }
.text-warning { color:var(--warning); }
.text-danger { color:var(--danger); }
.text-muted { color:var(--gray-500); font-size:14px; }
.empty-state { text-align:center; padding:30px 0; color:var(--gray-500); }
