:root {
    --primary: #FDB813;
    --primary-dark: #E09400;
    --primary-light: #FFE466;
    --secondary: #1f2937;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --bg-primary: #f9fafb;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #484d56;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

* { box-sizing: border-box; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg-primary); color: var(--text-primary); line-height: 1.5; }

/* Sidebar */
.tb-sidebar {
    width: 260px; min-height: 100vh; background: #ffffff;
    border-right: 1px solid var(--border-color); display: flex;
    flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0;
    z-index: 30; overflow-y: auto;
}
.tb-sidebar-logo {
    padding: 13px 20px; display: flex; align-items: center; gap: 12px;
    border-bottom: 1px solid var(--border-color);
}
.tb-sidebar-logo-text { font-size: 16px; font-weight: 800; color: var(--secondary); }
.tb-sidebar-logo-text span { color: var(--primary-dark); }

.tb-sidebar-search {
    display: flex; align-items: center; gap: 8px; margin: 0;
    padding: 13px 20px; cursor: pointer;
    background: none; border: none; border-bottom: 1px solid var(--border-color);
    transition: all 0.15s; font-size: 17px; color: #64748B;
}
.tb-sidebar-search:hover { background: rgba(0,0,0,0.03); }

.sidebar-nav {
    flex: 1; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 2px; background: #fff;
}
.sidebar-divider { height: 1px; background: var(--border-color); margin: 8px 0; }
.sidebar-item {
    display: flex; align-items: center; padding: 0.15rem 0.10rem;
    border-radius: 0.75rem; cursor: pointer; transition: all 0.2s;
    font-weight: 500; color: #64748B; text-decoration: none; font-size: 17px;
}
.sidebar-item:hover { background: rgba(253, 184, 19, 0.1); color: var(--primary-dark); }
.sidebar-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(253, 184, 19, 0.3);
}
.sidebar-icon { width: 1.5rem; margin-right: 0.75rem; text-align: center; font-size: 14px; flex-shrink: 0; }
.module-card {
    background: #fff; border: 1px solid #f3f4f6; border-radius: 1rem;
    padding: 20px; cursor: pointer; transition: all 0.2s;
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
}
.module-card:hover {
    border-color: var(--primary); box-shadow: 0 4px 16px rgba(253,184,19,0.15);
    transform: translateY(-2px);
}
.module-card-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.module-card-label { font-size: 17px; font-weight: 600; color: #1f2937; }
.module-card-desc { font-size: 13px; color: #6b7280; line-height: 1.4; }

.tb-sidebar-footer {
    border-top: 1px solid var(--border-color); padding: 16px; margin-top: 16px;
}

/* Main content area */
.tb-main { margin-left: 260px; min-height: 100vh; width: calc(100% - 260px); display: flex; flex-direction: column; transition: margin-left 0.25s, width 0.25s; }

/* Fullscreen mode (sidebar hidden) */
body.sidebar-hidden .tb-sidebar { display: none; }
body.sidebar-hidden .tb-main { margin-left: 0; width: 100%; }
body.sidebar-hidden .fw-topbar { left: 0; }
.tb-content { padding: 24px; padding-top: 72px; width: 100%; flex: 1; background: #edf2f9; }

/* Page header */
.tb-page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.tb-page-title { font-size: 22px; font-weight: 800; color: var(--secondary); }

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; padding: 0.6rem 1.25rem; border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.2s; border: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: 0.5rem; font-size: 13px;
    font-family: inherit;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-secondary {
    background: #F3F4F6; color: var(--secondary); padding: 0.6rem 1.25rem;
    border-radius: var(--radius-lg); transition: all 0.2s; border: none;
    cursor: pointer; font-weight: 500; display: inline-flex;
    align-items: center; gap: 0.5rem; font-size: 16px; font-family: inherit;
}
.btn-secondary:hover { background: #E5E7EB; }
.btn-danger {
    background: var(--danger); color: white; padding: 0.6rem 1.25rem;
    border-radius: var(--radius-lg); transition: all 0.2s; border: none;
    cursor: pointer; font-weight: 500; font-size: 13px; font-family: inherit;
}
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 12px; }
.btn-icon {
    width: 36px; height: 36px; border-radius: var(--radius-lg); border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.15s; font-size: 14px; background: #f3f4f6; color: #6b7280;
}
.btn-icon:hover { background: #e5e7eb; color: #374151; }

/* Cards */
.card {
    background: var(--bg-card); border-radius: var(--radius-xl);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}
.card-header {
    padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-color); font-weight: 600;
}
.card-header > i, .card-header .fas, .card-header .far, .card-header .fab {
    color: var(--primary) !important;
}
.card-body { padding: 1.5rem; }

/* Status badges */
.status-badge {
    padding: 0.2rem 0.65rem; border-radius: 9999px; font-size: 12px;
    font-weight: 600; display: inline-flex; align-items: center; gap: 0.25rem;
    border: 1px solid transparent;
}
.status-badge .status-icon {
    font-size: 14px; margin-right: 1px;
}
.status-creating { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.status-pending { background: #fef3c7; color: #d97706; border-color: #fde68a; }
.status-booked { background: #dbeafe; color: #2563eb; border-color: #bfdbfe; }
.status-searching { background: #f3e8ff; color: #7c3aed; border-color: #e9d5ff; }
.status-accepted { background: #dcfce7; color: #16a34a; border-color: #bbf7d0; }
.status-driver_arriving { background: #fef3c7; color: #d97706; border-color: #fde68a; }
.status-driver_arrived { background: #e0f2fe; color: #0284c7; border-color: #bae6fd; }
.status-onboard, .status-in_progress { background: #dbeafe; color: #2563eb; border-color: #bfdbfe; }
.status-completed { background: #dcfce7; color: #16a34a; border-color: #bbf7d0; }
.status-cancelled, .status-cancelled_central { background: #fee2e2; color: #dc2626; border-color: #fecaca; }
.status-archived { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
.status-awaiting_payment, .status-processing_payment { background: #fef3c7; color: #d97706; border-color: #fde68a; }
.status-no_driver { background: #fee2e2; color: #dc2626; border-color: #fecaca; }
.status-error { background: #fee2e2; color: #dc2626; border-color: #fecaca; }
.status-active, .status-approved { background: #d1fae5; color: #059669; border-color: #a7f3d0; }
.status-inactive, .status-disabled { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
.status-available { background: #d1fae5; color: #059669; border-color: #a7f3d0; }
.status-busy { background: #fef3c7; color: #d97706; border-color: #fde68a; }
.status-offline { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
.status-confirmed { background: #dcfce7; color: #16a34a; border-color: #bbf7d0; }
.status-rejected { background: #fee2e2; color: #dc2626; border-color: #fecaca; }

/* Badge borders for Tailwind-class badges */
.rounded-full.bg-green-600 { border: 1px solid #16a34a; }
.rounded-full.bg-green-100 { border: 1px solid #bbf7d0; }
.rounded-full.bg-red-100 { border: 1px solid #fecaca; }
.rounded-full.bg-red-600 { border: 1px solid #dc2626; }
.rounded-full.bg-blue-100 { border: 1px solid #bfdbfe; }
.rounded-full.bg-blue-600 { border: 1px solid #2563eb; }
.rounded-full.bg-yellow-100 { border: 1px solid #fde68a; }
.rounded-full.bg-orange-100 { border: 1px solid #fed7aa; }
.rounded-full.bg-purple-100 { border: 1px solid #e9d5ff; }
.rounded-full.bg-gray-100 { border: 1px solid #e5e7eb; }
.rounded-full.bg-gray-200 { border: 1px solid #d1d5db; }
.rounded-full.bg-indigo-100 { border: 1px solid #c7d2fe; }
.rounded-full.bg-pink-100 { border: 1px solid #fbcfe8; }

/* Inputs */
.input-field {
    width: 100%; padding: 0.6rem 0.875rem; border: 2px solid var(--border-color);
    border-radius: var(--radius-lg); font-size: 13px; transition: all 0.2s;
    background: white; font-family: inherit;
}
.input-field:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(253, 184, 19, 0.15);
}

/* Tables */
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data-table th, .data-table td {
    padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}
.data-table th { font-weight: 600; color: var(--text-secondary); background: #f9fafb; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.data-table tbody tr { cursor: pointer; transition: background 0.1s; }
.data-table tbody tr:nth-child(even) { background: #f8fafc; }
.data-table tbody tr:hover { background: #f1f5f9; }

/* Stat cards */
.stat-card {
    background: white; border-radius: var(--radius-xl); padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}
.stat-card-value { font-size: 28px; font-weight: 800; color: var(--secondary); }
.stat-card-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-card-icon {
    width: 48px; height: 48px; border-radius: 12px; display: flex;
    align-items: center; justify-content: center; font-size: 20px;
}

/* Modal */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 50; backdrop-filter: blur(4px); animation: fadeIn 0.2s;
}
.modal-content {
    background: white; border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px rgba(0,0,0,0.25); width: 90%;
    max-width: 600px; max-height: 90vh; display: flex;
    flex-direction: column; animation: scaleIn 0.2s; overflow: visible;
}
.modal-header {
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-body { padding: 1.5rem; overflow-y: auto; overflow: visible; flex: 1; }
.modal-footer {
    padding: 1rem 1.5rem; border-top: 1px solid var(--border-color);
    display: flex; justify-content: flex-end; gap: 0.75rem;
}

/* Tabs */
.tb-tabs {
    display: flex; border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px; gap: 0; flex-wrap: wrap;
}
.tb-tab {
    padding: 10px 10px; font-size: 13px; font-weight: 600;
    color: #64748B; border-bottom: 2px solid transparent;
    margin-bottom: -2px; cursor: pointer; transition: all 0.15s;
    white-space: nowrap; display: flex; align-items: center; gap: 6px;
    background: none; border-top: none; border-left: none; border-right: none;
    font-family: inherit;
}
.tb-tab:hover { color: var(--primary); }
.tb-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tb-tab-danger { color: #ef4444; }
.tb-tab-danger:hover { color: #dc2626; }
.tb-tab-danger.active { color: #ef4444; border-bottom-color: #ef4444; }

/* Filter pills */
.tb-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.tb-filter {
    padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
    background: #f3f4f6; color: var(--text-secondary); cursor: pointer;
    transition: all 0.15s; border: none; font-family: inherit;
}
.tb-filter:hover { background: #e5e7eb; }
.tb-filter.active { background: var(--primary); color: #1f2937; }

/* Detail view */
.tb-detail-topblock {
    background: #fff; border: 1px solid var(--border-color); border-radius: 14px;
    padding: 16px 20px; margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}
.tb-detail-topblock.has-tabs {
    padding-bottom: 0;
}
.tb-detail-topblock.has-tabs > .tb-tabs {
    margin: 16px -20px 0; padding: 0 20px;
    border-bottom: none; border-top: 1px solid var(--border-color);
    background: #f8fafc; border-radius: 0 0 14px 14px;
}
.tb-detail-header {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.tb-detail-back {
    width: 40px; height: 40px; border-radius: 12px; background: #f3f4f6;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-secondary); font-size: 16px;
    transition: all 0.15s; border: none;
}
.tb-detail-back:hover { background: #e5e7eb; color: var(--secondary); }
.tb-detail-avatar {
    width: 48px; height: 48px; border-radius: 14px;
    background: linear-gradient(135deg, #FDB813, #E09400);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 18px;
}
.tb-detail-avatar-green {
    width: 48px; height: 48px; border-radius: 14px;
    background: linear-gradient(135deg, #4ade80, #16a34a);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 18px;
}
.tb-detail-avatar-blue {
    width: 48px; height: 48px; border-radius: 14px;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 18px;
}
.tb-detail-avatar-red {
    width: 48px; height: 48px; border-radius: 14px;
    background: linear-gradient(135deg, #f87171, #dc2626);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 18px;
}
.tb-detail-title { font-size: 20px; font-weight: 700; color: var(--secondary); }
.tb-detail-sub { font-size: 13px; color: var(--text-muted); }
.tb-detail-status-area { display: flex; align-items: center; }
.tb-detail-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Ride cards (expanded view) */
.ride-card {
    background: white; border-radius: var(--radius-xl); padding: 16px 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    cursor: pointer; transition: all 0.15s; border-left: 4px solid transparent;
}
.ride-card:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1); transform: translateY(-1px); }

/* Ride row (inspired listing) */
.ride-row {
    display: flex; align-items: center; gap: 16px; padding: 14px 18px;
    background: white; border-radius: var(--radius-xl);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
    border-left: 5px solid #e5e7eb;
    cursor: pointer; transition: all 0.15s;
}
.ride-row:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-1px); }
.ride-row-source { display: flex; align-items: center; gap: 4px; min-width: 70px; flex-shrink: 0; }
.ride-row-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ride-row-date { flex-shrink: 0; text-align: center; }
.ride-date-badge {
    display: inline-block; padding: 4px 10px; border-radius: 6px;
    color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.ride-row-status { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 110px; flex-shrink: 0; }
.ride-row-ago { min-width: 80px; text-align: center; flex-shrink: 0; }
.ride-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ride-action-btn {
    width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 14px;
    background: #f3f4f6; transition: all 0.15s;
}
.ride-action-btn:hover { background: #e5e7eb; transform: scale(1.1); }
.ride-tag {
    display: inline-flex; align-items: center; padding: 1px 7px;
    border-radius: 4px; font-size: 10px; font-weight: 700; white-space: nowrap;
}

@media (max-width: 1024px) {
    .ride-row { flex-wrap: wrap; gap: 10px; }
    .ride-row-ago { display: none; }
    .ride-row-source { min-width: auto; }
}

.ride-card.s-pending { border-left-color: #f59e0b; }
.ride-card.s-searching { border-left-color: #8b5cf6; }
.ride-card.s-accepted, .ride-card.s-driver_arriving { border-left-color: #3b82f6; }
.ride-card.s-in_progress { border-left-color: #10b981; }
.ride-card.s-completed { border-left-color: #6b7280; }
.ride-card.s-cancelled { border-left-color: #ef4444; }

/* Empty state */
.empty-state { padding: 60px 20px; text-align: center; }
.empty-state-icon { font-size: 48px; color: #d1d5db; margin-bottom: 16px; }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--secondary); margin-bottom: 4px; }
.empty-state-desc { font-size: 13px; color: var(--text-muted); }

/* Toast */
.tb-toast {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    padding: 12px 20px; border-radius: var(--radius-lg);
    color: white; font-weight: 600; font-size: 13px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2); animation: slideUp 0.3s;
}
.tb-toast.success { background: var(--success); }
.tb-toast.error { background: var(--danger); }
.tb-toast.info { background: var(--info); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.loading-spinner {
    width: 2.5rem; height: 2.5rem; border: 3px solid var(--border-color);
    border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #6b7280; }

/* Split button + dropdown */
.btn-split { display: inline-flex; position: relative; }
.btn-split-main {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; padding: 0.6rem 1.25rem; border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    font-weight: 600; border: none; cursor: pointer; display: inline-flex;
    align-items: center; gap: 0.5rem; font-size: 13px; font-family: inherit;
    transition: all 0.15s;
}
.btn-split-main:hover { filter: brightness(1.05); }
.btn-split-toggle {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; padding: 0.6rem 0.75rem; border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    border: none; cursor: pointer; border-left: 1px solid rgba(0,0,0,0.1);
    font-family: inherit; transition: all 0.15s;
}
.btn-split-toggle:hover { filter: brightness(1.05); }
.btn-dropdown {
    position: absolute; top: 100%; right: 0; margin-top: 4px; min-width: 200px;
    background: white; border-radius: var(--radius-lg); border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); z-index: 40; overflow: hidden;
    animation: scaleIn 0.15s;
}
.btn-dropdown-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    font-size: 13px; color: var(--text-primary); cursor: pointer;
    transition: background 0.1s; width: 100%; border: none; background: none;
    font-family: inherit; text-align: left;
}
.btn-dropdown-item:hover { background: #f3f4f6; }
.btn-dropdown-item.danger { color: var(--danger); }
.btn-dropdown-item.danger:hover { background: #fef2f2; }
.btn-dropdown-sep { height: 1px; background: var(--border-color); margin: 4px 0; }

/* Leaflet map overrides */
.leaflet-container { border-radius: var(--radius-xl); }

/* ============================================================ */
/* COMMAND PALETTE (CMD+K)                                       */
/* ============================================================ */
.cp-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px); z-index: 99999;
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 15vh; animation: fadeIn 0.1s;
}
.cp-modal {
    width: 560px; max-width: 95vw; background: white; border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25); overflow: hidden;
    animation: scaleIn 0.15s;
}
.cp-search-bar {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px; border-bottom: 1px solid #e5e7eb;
}
.cp-search-icon { color: #6b7280; font-size: 16px; }
.cp-input {
    flex: 1; border: none; outline: none; font-size: 15px;
    font-family: inherit; color: #1f2937; background: transparent;
}
.cp-input::placeholder { color: #6b7280; }
.cp-shortcuts { display: flex; gap: 4px; }
.cp-shortcuts kbd, .cp-footer kbd {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 6px;
    background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 5px;
    font-size: 11px; font-family: inherit; color: #6b7280;
}
.cp-results {
    max-height: 400px; overflow-y: auto; padding: 8px;
}
.cp-group-label {
    font-size: 11px; font-weight: 700; color: #6b7280;
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 8px 12px 4px;
}
.cp-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px; cursor: pointer;
    transition: background 0.1s;
}
.cp-item:hover, .cp-active { background: #f3f4f6; }
.cp-item-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}
.cp-item-text { flex: 1; min-width: 0; }
.cp-item-label { font-size: 13px; font-weight: 600; color: #374151; flex: 1; }
.cp-item-sub { font-size: 11px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-item-type { font-size: 10px; color: #6b7280; background: #f3f4f6; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.cp-item-arrow { font-size: 10px; color: #d1d5db; margin-left: 4px; }
.cp-footer {
    display: flex; gap: 16px; padding: 10px 20px;
    border-top: 1px solid #f3f4f6; background: #fafafa;
    font-size: 11px; color: #6b7280;
}
.cp-footer span { display: flex; align-items: center; gap: 4px; }
.cp-loading, .cp-empty, .cp-hint { text-align: center; padding: 24px; color: #6b7280; font-size: 13px; }
.cp-hint { display: none; }
.cp-hint-row { margin-bottom: 16px; }
.cp-recent-label { font-size: 11px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; text-align: left; padding: 0 12px 8px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================ */
/* FLOATING WIDGETS                                              */
/* ============================================================ */
/* ---- Top bar (action buttons) ---- */
.fw-topbar {
    position: fixed; top: 0; left: var(--sidebar-width, 260px); right: 0; z-index: 40; flex-shrink: 0;
}
.fw-topbar-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 24px; border-bottom: 1px solid var(--border-color);
    background: #fff;
}
.fw-topbar-left { display: flex; align-items: center; gap: 8px; }
.fw-topbar-buttons {
    display: flex; align-items: center; gap: 6px;
}
.fw-tb-btn {
    height: 34px; border-radius: 10px; border: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; transition: all .15s; position: relative;
    background: #f3f4f6; color: #64748b; padding: 0 10px;
    font-family: inherit; font-weight: 500;
}
.fw-tb-btn:hover { background: #e5e7eb; color: #374151; }
.fw-tb-btn.active { background: var(--primary); color: #1f2937; }
.fw-tb-btn-primary {
    background: linear-gradient(135deg, #FDB813, #E09400); color: #fff;
    font-size: 13px; font-weight: 600; padding: 0 14px;
}
.fw-tb-btn-primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, #FDB813, #E09400); color: #fff; }
.fw-tb-sep { width: 1px; height: 20px; background: #e5e7eb; margin: 0 4px; }

/* Live rides button (clients en course) */
.fw-tb-btn-live {
    background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0;
    font-size: 13px; font-weight: 600; padding: 0 14px; gap: 8px;
}
.fw-tb-btn-live:hover { background: #dcfce7; color: #166534; }
.fw-tb-btn-live.active { background: #dcfce7; color: #166534; border-color: #86efac; }
.fw-tb-btn-live i { font-size: 12px; }
.fw-live-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
    display: inline-block; animation: pulse 2s infinite; flex-shrink: 0;
}

/* Active drivers button (chauffeurs en course) */
.fw-tb-btn-drivers {
    background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe;
    font-size: 13px; font-weight: 600; padding: 0 14px; gap: 8px;
}
.fw-tb-btn-drivers:hover { background: #dbeafe; color: #1e40af; }
.fw-tb-btn-drivers.active { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.fw-tb-btn-drivers i { font-size: 13px; }

/* Live rides modal */
.fw-live-overlay {
    position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,0.25);
    display: flex; align-items: flex-start; justify-content: center; padding-top: 70px;
    animation: fadeIn .15s ease;
}
.fw-live-modal {
    background: #fff; border-radius: 16px; width: 520px; max-width: calc(100vw - 48px);
    max-height: calc(100vh - 120px); display: flex; flex-direction: column;
    box-shadow: 0 24px 50px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.04);
    animation: slideDown .2s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
.fw-live-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #f3f4f6;
}
.fw-live-modal-close {
    width: 30px; height: 30px; border-radius: 8px; border: none; cursor: pointer;
    background: #f3f4f6; color: #6b7280; display: flex; align-items: center; justify-content: center;
    font-size: 13px; transition: all .15s;
}
.fw-live-modal-close:hover { background: #e5e7eb; color: #374151; }
.fw-live-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; border-radius: 11px; padding: 0 6px;
    background: #f3f4f6; color: #6b7280; font-size: 12px; font-weight: 700; margin-left: 6px;
}
.fw-live-modal-body {
    overflow-y: auto; padding: 8px; flex: 1; min-height: 0;
}
.fw-live-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px 20px;
}
.fw-live-ride {
    display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px;
    cursor: pointer; transition: background .15s;
}
.fw-live-ride:hover { background: #f9fafb; }
.fw-live-ride-status {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.fw-live-ride-info { flex: 1; min-width: 0; }
.fw-live-ride-client { font-size: 13px; font-weight: 600; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fw-live-ride-address { font-size: 12px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.fw-live-ride-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.fw-live-ride-badge {
    font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap;
}
.fw-live-ride-driver { font-size: 11px; color: #6b7280; white-space: nowrap; }

/* Rides tab header */
.rides-card-title-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; border-bottom: 1px solid #f3f4f6;
}
.rides-card-title-bar .fas, .rides-card-title-bar .far, .rides-card-title-bar .fab {
    color: var(--primary) !important;
}
/* Boutons carrés listing : + vert sur fond clair (hérite pour l’icône, hors règle primary ci-dessus) */
.rides-card-title-bar .listing-add-btn .fas {
    color: inherit !important;
}
.listing-add-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1.5px solid #047857;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.15s, filter 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(5, 150, 105, 0.25);
}
.listing-add-btn:hover {
    filter: brightness(1.08);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
}
/* Bouton vert plein, croix blanche (fermer / retirer dans une barre listing) */
.listing-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1.5px solid #047857;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.15s, filter 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(5, 150, 105, 0.25);
}
.listing-close-btn:hover {
    filter: brightness(1.06);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
}
.rides-card-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 28px; height: 22px; padding: 0 8px;
    background: #f3f4f6; color: #6b7280; border-radius: 12px;
    font-size: 12px; font-weight: 700;
}
.btn-icon {
    width: 34px; height: 34px; border-radius: 8px; border: 1px solid #e5e7eb;
    background: #fff; color: #6b7280; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 13px;
    transition: all .15s;
}
.btn-icon:hover { background: #f9fafb; color: #374151; border-color: #d1d5db; }
.rides-tab-header {
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid #e5e7eb; padding: 0 16px;
}
.rides-tab-list {
    display: flex; gap: 0; overflow-x: auto; scrollbar-width: none;
}
.rides-tab-list::-webkit-scrollbar { display: none; }
.rides-tab-btn {
    padding: 10px 14px; font-size: 13px; font-weight: 500; border: none;
    background: none; cursor: pointer; color: #6b7280; white-space: nowrap;
    border-bottom: 2px solid transparent; transition: all .15s;
    font-family: inherit; display: inline-flex; align-items: center;
}
.rides-tab-btn:hover { color: #374151; }
.rides-tab-btn.active { color: #ea580c; font-weight: 600; }
.rides-tab-btn.active i { color: #f97316; }
.rides-tab-search {
    flex-shrink: 0; padding: 8px 0;
}
.rides-search-input-wrap {
    position: relative; display: flex; align-items: center;
}
.rides-search-icon {
    position: absolute; left: 10px; font-size: 12px; color: #6b7280; pointer-events: none;
}
.rides-search-input {
    height: 34px; padding: 0 12px 0 32px; border-radius: 8px;
    border: 1px solid #e5e7eb; font-size: 13px; font-family: inherit;
    width: 220px; background: #f9fafb; color: #1f2937;
    transition: all .15s; outline: none;
}
.rides-search-input:focus { border-color: #f97316; background: #fff; box-shadow: 0 0 0 3px rgba(249,115,22,0.08); }
.rides-search-input::placeholder { color: #6b7280; }

.btn-back-modules {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 10px; border: none; cursor: pointer;
    background: #f3f4f6; color: #64748B; font-size: 13px; font-weight: 600;
    font-family: inherit; transition: all 0.15s;
}
.btn-back-modules:hover { background: #e5e7eb; color: #1f2937; }

.addr-suggestions {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12); margin-top: 4px;
    max-height: 260px; overflow-y: auto;
}
.addr-suggestion-item {
    padding: 10px 14px; cursor: pointer; font-size: 13px; color: #374151;
    display: flex; align-items: center; transition: background 0.15s;
}
.addr-suggestion-item:first-child { border-radius: 0.75rem 0.75rem 0 0; }
.addr-suggestion-item:last-child { border-radius: 0 0 0.75rem 0.75rem; }
.addr-suggestion-item:hover { background: #FFF8E1; }

/* === BOOKING TABS === */
.bk-tabs-bar {
    display: flex; align-items: center; gap: 4px; margin-bottom: 20px;
    padding: 4px; background: #f1f5f9; border-radius: 14px;
}
.bk-tabs-list { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.bk-tab-btn {
    display: flex; align-items: center; gap: 4px; padding: 8px 14px;
    border: none; border-radius: 10px; cursor: pointer;
    font-size: 13px; font-weight: 500; color: #64748b;
    background: transparent; transition: all 0.2s; white-space: nowrap;
}
.bk-tab-btn:hover { background: #e2e8f0; color: #334155; }
.bk-tab-active, .bk-tab-btn.bk-tab-active:hover { background: #fff; color: #1e293b; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.bk-tab-close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%; margin-left: 4px;
    font-size: 9px; color: #94a3b8; transition: all 0.15s;
}
.bk-tab-close:hover { background: #fecaca; color: #dc2626; }
.bk-tab-add {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 10px; border: 2px dashed #cbd5e1;
    background: transparent; color: #94a3b8; cursor: pointer;
    transition: all 0.2s; flex-shrink: 0; font-size: 13px;
}
.bk-tab-add:hover { border-color: #3b82f6; color: #3b82f6; background: #eff6ff; }
.bk-tab-single-add { display: flex; justify-content: flex-end; margin-bottom: 12px; }

/* === BOOKING VIEW === */
.bk-vehicles-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px;
}
.bk-vehicle-card {
    position: relative; display: flex; flex-direction: column; align-items: center;
    padding: 20px 16px 16px; border: 2px solid #e5e7eb; border-radius: 16px;
    cursor: pointer; transition: all 0.2s ease; background: #fff; text-align: center;
}
.bk-vehicle-card:hover { border-color: #93c5fd; background: #f8fafc; }
.bk-vehicle-selected { border-color: #3b82f6; background: #eff6ff; box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.bk-vehicle-img { width: 72px; height: 48px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.bk-vehicle-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bk-vehicle-info { margin-bottom: 8px; }
.bk-vehicle-name { font-weight: 700; font-size: 0.95rem; color: #1f2937; }
.bk-vehicle-cap { font-size: 0.75rem; color: #6b7280; }
.bk-vehicle-price { font-weight: 800; font-size: 1.15rem; color: #1f2937; }
.bk-vehicle-selected .bk-vehicle-price { color: #2563eb; }
.bk-vehicle-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.bk-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 600; }
.bk-badge-surge { background: #fef3c7; color: #d97706; }
.bk-badge-promo { background: #d1fae5; color: #059669; }
.bk-vehicle-check {
    position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%;
    background: #3b82f6; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px;
}

.bk-options-grid { display: flex; flex-direction: column; gap: 10px; }
.bk-option-card {
    display: flex; align-items: center; gap: 14px; padding: 14px 18px;
    background: #f9fafb; border: 2px solid transparent; border-radius: 14px;
    cursor: pointer; transition: all 0.2s ease;
}
.bk-option-card:hover { background: #f1f5f9; }
.bk-option-selected { border-color: #1f2937; background: #fafafa; }
.bk-option-icon {
    width: 44px; height: 44px; background: #fff; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.15rem; color: #64748b; flex-shrink: 0;
}
.bk-option-selected .bk-option-icon { background: #1f2937; color: #fff; }
.bk-option-info { flex: 1; min-width: 0; }
.bk-option-name { font-weight: 600; font-size: 0.95rem; color: #1f2937; }
.bk-option-desc { font-size: 0.8rem; color: #6b7280; }
.bk-option-price { font-weight: 700; font-size: 1rem; color: #1f2937; flex-shrink: 0; }
.bk-option-check {
    width: 22px; height: 22px; border: 2px solid #d1d5db; border-radius: 6px;
    display: flex; align-items: center; justify-content: center; color: transparent; transition: all 0.2s ease; flex-shrink: 0;
}
.bk-option-selected .bk-option-check { background: #1f2937; border-color: #1f2937; color: #fff; }

.fw-container { position: relative; }

@keyframes fw-ring { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }

.fw-panel {
    position: absolute; top: 100%; right: 24px; width: 360px;
    margin-top: 4px;
    background: white; border-radius: 16px; overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15); border: 1px solid #e5e7eb;
    display: flex; flex-direction: column; max-height: 500px;
    animation: scaleIn 0.15s; z-index: 9999;
}
.fw-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; border-bottom: 1px solid #f3f4f6;
    background: #fafafa;
}
.fw-panel-tabs { display: flex; gap: 0; }
.fw-ptab {
    padding: 6px 10px; font-size: 11px; font-weight: 600;
    background: none; border: none; cursor: pointer; color: #6b7280;
    border-radius: 6px; transition: all 0.15s; font-family: inherit;
}
.fw-ptab.active { background: var(--primary); color: #1f2937; }
.fw-ptab:not(.active):hover { background: #f3f4f6; }
.fw-close {
    width: 28px; height: 28px; border-radius: 8px; background: none;
    border: none; cursor: pointer; color: #6b7280; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.fw-close:hover { background: #f3f4f6; color: #374151; }

.fw-panel-body { flex: 1; overflow-y: auto; padding: 12px; max-height: 380px; }
.fw-empty { text-center; padding: 24px; color: #6b7280; font-size: 13px; text-align: center; }

.fw-user-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    border-radius: 10px; margin-bottom: 4px; transition: background 0.1s;
}
.fw-user-item.clickable { cursor: pointer; }
.fw-user-item.clickable:hover { background: #f3f4f6; }
.fw-user-avatar-wrap { position: relative; flex-shrink: 0; }
.chat-status-dot {
    position: absolute; bottom: -1px; right: -1px; width: 10px; height: 10px;
    border-radius: 50%; border: 2px solid #fff;
}
.fw-user-avatar-sm {
    width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 11px; font-weight: 700;
}
.fw-user-avatar {
    width: 34px; height: 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.fw-user-info { flex: 1; min-width: 0; }
.fw-user-name { font-size: 13px; font-weight: 600; color: #374151; display: flex; align-items: center; gap: 6px; }
.fw-user-meta { font-size: 11px; color: #6b7280; }
.fw-you { font-size: 9px; background: #ecfdf5; color: #059669; padding: 1px 6px; border-radius: 8px; font-weight: 600; }
.fw-role { font-size: 9px; padding: 1px 6px; border-radius: 8px; font-weight: 600; margin-left: 4px; }
.fw-role-admin { background: #fef2f2; color: #ef4444; }
.fw-role-manager { background: #eff6ff; color: #3b82f6; }
.fw-chat-action { color: var(--primary); cursor: pointer; font-size: 14px; }

.fw-chat-body { display: flex; flex-direction: column; padding: 0; }
.fw-chat-header-sub { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #f3f4f6; }
.fw-back-btn { background: none; border: none; cursor: pointer; color: #6b7280; font-size: 14px; padding: 4px; }
.fw-back-btn:hover { color: #374151; }
.fw-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.fw-panel-chat .fw-messages { max-height: 310px; }
.fw-panel-chat-open .fw-messages { max-height: 440px; }
.fw-msg { display: flex; flex-direction: column; max-width: 85%; }
.fw-msg-me { align-self: flex-end; }
.fw-msg-other { align-self: flex-start; }
.fw-msg-bubble { padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; word-break: break-word; }
.fw-msg-me .fw-msg-bubble { background: var(--primary); color: #1f2937; border-bottom-right-radius: 4px; }
.fw-msg-other .fw-msg-bubble { background: #f3f4f6; color: #374151; border-bottom-left-radius: 4px; }
.fw-msg-time { font-size: 10px; color: #6b7280; margin-top: 2px; }
.fw-msg-me .fw-msg-time { text-align: right; }

.fw-chat-input {
    display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #f3f4f6;
    background: #fafafa;
}

/* Chat panel - larger when conversation is open */
.fw-panel-chat-open { max-height: 600px; width: 400px; }

/* Chat presence */
.chat-presence-label { font-size: 11px; display: flex; align-items: center; gap: 4px; }
.chat-presence-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.chat-conv-header { display: flex; align-items: center; gap: 8px; flex: 1; }

/* Chat online badge in tab */
.chat-online-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
    font-size: 10px; font-weight: 700; background: #10b981; color: #fff; margin-left: 4px;
}

/* Conversation preview */
.chat-convo-preview { font-size: 11px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }

/* Unread badge in conversation list */
.chat-unread-badge {
    min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px;
    background: #ef4444; color: #fff; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Unread badge on topbar chat button */
.fw-tb-badge {
    position: absolute; top: -4px; right: -4px;
    min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
    background: #ef4444; color: #fff; font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}

/* Date separator in chat */
.chat-date-separator {
    text-align: center; padding: 8px 0; font-size: 10px; color: #6b7280;
}
.chat-date-separator span {
    background: #f3f4f6; padding: 2px 10px; border-radius: 10px;
}
.fw-input {
    flex: 1; padding: 8px 12px; border: 1px solid #e5e7eb;
    border-radius: 10px; font-size: 13px; outline: none;
    font-family: inherit; transition: border 0.15s;
}
.fw-input:focus { border-color: var(--primary); }
.fw-send-btn {
    width: 36px; height: 36px; border-radius: 10px; border: none;
    background: var(--primary); color: #1f2937; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; transition: all 0.15s;
}
.fw-send-btn:hover { filter: brightness(1.1); }

.fw-ticket-item {
    display: flex; align-items: center; gap: 10px; padding: 10px;
    border-radius: 10px; cursor: pointer; transition: background 0.1s;
    margin-bottom: 4px;
}
.fw-ticket-item:hover { background: #f3f4f6; }
.fw-ticket-icon {
    width: 34px; height: 34px; border-radius: 10px; background: #fef3c7;
    display: flex; align-items: center; justify-content: center;
    color: #d97706; font-size: 14px; flex-shrink: 0;
}
.fw-ticket-info { flex: 1; min-width: 0; }
.fw-ticket-subject { font-size: 13px; font-weight: 600; color: #374151; }
.fw-ticket-meta { font-size: 11px; color: #6b7280; }

.fw-session-info { padding: 8px; }
.fw-session-active { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #10b981; margin-bottom: 8px; }
.fw-session-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; animation: pulse 2s infinite; }

.fw-status-dot { width: 8px; height: 8px; border-radius: 50%; }
.fw-status-idle { background: #6b7280; }
.fw-status-ringing { background: #ef4444; animation: pulse 1s infinite; }
.fw-status-connected { background: #10b981; animation: pulse 2s infinite; }

.fw-incoming-call { text-align: center; padding: 20px; }
.fw-call-animation { position: relative; width: 80px; height: 80px; margin: 0 auto 16px; }
.fw-call-ring { position: absolute; inset: 0; border: 3px solid #ef4444; border-radius: 50%; animation: fw-expand 1.5s ease infinite; opacity: 0; }
.fw-ring-2 { animation-delay: 0.5s; }
@keyframes fw-expand { 0% { transform: scale(0.5); opacity: 0.8; } 100% { transform: scale(1.5); opacity: 0; } }
.fw-call-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 28px; color: #ef4444; animation: fw-ring 0.5s ease infinite; }
.fw-caller-id { font-size: 16px; font-weight: 700; color: #374151; margin-bottom: 16px; }
.fw-call-actions { display: flex; justify-content: center; gap: 16px; }
.fw-answer-btn, .fw-reject-btn {
    width: 52px; height: 52px; border-radius: 50%; border: none;
    cursor: pointer; color: white; font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.fw-answer-btn { background: #10b981; }
.fw-answer-btn:hover { background: #059669; }
.fw-reject-btn { background: #ef4444; }
.fw-reject-btn:hover { background: #dc2626; }

.fw-active-call { text-align: center; padding: 16px; }
.fw-connected-indicator { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 600; color: #10b981; margin-bottom: 8px; }
.fw-pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; animation: pulse 2s infinite; }
.fw-call-controls { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.fw-ctrl-btn {
    width: 44px; height: 44px; border-radius: 50%; border: 2px solid #e5e7eb;
    background: white; cursor: pointer; color: #374151; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.fw-ctrl-btn:hover { background: #f3f4f6; }
.fw-ctrl-btn.fw-ctrl-active { background: #fef2f2; border-color: #ef4444; color: #ef4444; }
.fw-ctrl-btn.fw-ctrl-danger { background: #ef4444; border-color: #ef4444; color: white; }
.fw-ctrl-btn.fw-ctrl-danger:hover { background: #dc2626; }

.fw-call-log-item {
    display: flex; align-items: center; gap: 8px; padding: 6px 8px;
    border-radius: 8px; font-size: 12px;
}
.fw-call-log-item:hover { background: #f3f4f6; }

/* Pagination */
.tb-pagination {
    display: flex; align-items: center; justify-content: flex-start; gap: 12px;
    padding: 12px 16px; border-top: 1px solid #e5e7eb; background: #fafbfc;
}
.tb-pagination-info {
    font-size: 13px; color: #6b7280;
}
.tb-pagination-controls {
    display: flex; align-items: center; gap: 4px;
}
.tb-pagination-btn {
    min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; color: #374151;
    font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s;
    padding: 0 8px;
}
.tb-pagination-btn:hover:not(:disabled):not(.active) {
    background: #f3f4f6; border-color: #d1d5db;
}
.tb-pagination-btn.active {
    background: var(--primary); color: #fff; border-color: var(--primary);
}
.tb-pagination-btn:disabled {
    opacity: 0.4; cursor: not-allowed;
}
.tb-pagination-ellipsis {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; font-size: 13px; color: #6b7280;
}

/* Toggle Switch */
.tb-toggle-group { }
.tb-toggle-group-title {
    display: flex; align-items: center; font-size: 13px; font-weight: 600;
    color: #6b7280; text-transform: uppercase; letter-spacing: .04em;
    padding: 0 0 10px; margin-bottom: 4px; border-bottom: 1px solid #f3f4f6;
}
.tb-toggle-group-list { display: flex; flex-direction: column; }
.tb-toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid #f3f4f6;
}
.tb-toggle-row:last-child { border-bottom: none; }
.tb-toggle-info { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.tb-toggle-icon { font-size: 14px; color: var(--primary); width: 18px; text-align: center; flex-shrink: 0; }
.tb-toggle-label { font-size: 13.5px; font-weight: 500; color: #1f2937; }
.tb-toggle-desc { font-size: 12px; color: #6b7280; margin-top: 2px; }
.tb-toggle-btn {
    position: relative; display: inline-flex; height: 24px; width: 44px;
    align-items: center; border-radius: 12px; border: none; cursor: pointer;
    background: #d1d5db; transition: background .2s, opacity .2s;
    flex-shrink: 0; padding: 0;
}
.tb-toggle-btn.active { background: var(--primary); }
.tb-toggle-btn:disabled { opacity: .5; cursor: not-allowed; }
.tb-toggle-btn.loading { opacity: .6; }
.tb-toggle-knob {
    display: block; height: 18px; width: 18px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15);
    transition: transform .2s; transform: translateX(3px);
}
.tb-toggle-btn.active .tb-toggle-knob { transform: translateX(23px); }

/* ---- Price Calculator Widget ---- */
.fw-panel-calc { width: 400px; max-height: 600px; }
.calc-body { padding: 14px !important; display: flex; flex-direction: column; gap: 10px; }
.calc-field { position: relative; display: flex; align-items: center; gap: 0; }
.calc-field-icon {
    position: absolute; left: 12px; top: 10px; z-index: 1; width: 16px; text-align: center;
}
.calc-input {
    width: 100%; padding: 9px 12px 9px 34px; border: 1px solid #e5e7eb;
    border-radius: 10px; font-size: 13px; font-family: inherit; color: #1f2937;
    outline: none; transition: border .15s;
}
.calc-input:focus { border-color: var(--primary); }
.calc-input::placeholder { color: #6b7280; }
.calc-suggestions {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,.1); margin-top: 4px;
    max-height: 180px; overflow-y: auto;
}
.calc-postcode-badge {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe;
    border-radius: 6px; padding: 3px 8px; font-size: 11px; font-weight: 700;
    font-family: monospace; letter-spacing: .3px; pointer-events: none;
    display: inline-flex; align-items: center; gap: 4px;
}
.calc-sugg-item {
    padding: 8px 12px; cursor: pointer; font-size: 12px; color: #374151;
    display: flex; align-items: center; transition: background .1s;
}
.calc-sugg-item:hover { background: #fff8e1; }
.calc-recalc-btn {
    width: 100%; padding: 7px; border: none; border-radius: 8px;
    background: #f3f4f6; color: #374151; font-size: 12px; font-weight: 600;
    cursor: pointer; font-family: inherit; transition: background .15s;
}
.calc-recalc-btn:hover { background: #e5e7eb; }
.calc-loading { text-align: center; padding: 16px; color: #6b7280; font-size: 13px; }
.calc-route-info {
    display: flex; gap: 16px; justify-content: center; padding: 8px;
    background: #f9fafb; border-radius: 8px; font-size: 12px; color: #6b7280;
}
.calc-route-info span { display: flex; align-items: center; gap: 4px; }
.calc-route-info i { color: var(--primary); }
.calc-promo-banner {
    display: flex; align-items: center; padding: 8px 12px; background: #d1fae5;
    border-radius: 8px; font-size: 12px; font-weight: 600; color: #065f46;
}
.calc-vehicles { display: flex; flex-direction: column; gap: 0; }
.calc-vehicle-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid #f3f4f6;
}
.calc-vehicle-row:last-child { border-bottom: none; }
.calc-vehicle-left { display: flex; align-items: center; gap: 10px; }
.calc-vehicle-img {
    width: 52px; height: 36px; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; border-radius: 8px; background: #f8fafc; overflow: hidden;
}
.calc-vehicle-img img { width: 100%; height: 100%; object-fit: contain; }
.calc-vehicle-name { font-size: 13px; font-weight: 600; color: #1f2937; }
.calc-vehicle-cap { font-size: 11px; color: #6b7280; }
.calc-vehicle-right { text-align: right; }
.calc-vehicle-price { font-size: 16px; font-weight: 700; color: #1f2937; }
.calc-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; margin-top: 2px; }
.calc-badge {
    font-size: 9px; font-weight: 600; padding: 2px 5px; border-radius: 4px;
    text-transform: uppercase; letter-spacing: .02em;
}
.calc-badge-surge { background: #fef3c7; color: #d97706; }
.calc-badge-promo { background: #d1fae5; color: #059669; }
.calc-badge-special { background: #ede9fe; color: #7c3aed; }
.calc-badge-slot { background: #fed7aa; color: #c2410c; }
.calc-empty { text-align: center; padding: 24px; color: #6b7280; font-size: 13px; }

/* ---- Incoming Call Mini-Modal (bottom-left, "comme le chat") ---- */
.tb-inc-bar {
    position: fixed; bottom: 16px; left: 80px; z-index: 920;
    display: flex; flex-direction: column-reverse; gap: 10px;
    align-items: flex-start; pointer-events: none;
}
.tb-inc-modal {
    pointer-events: auto;
    width: 320px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(15,23,42,.18), 0 4px 12px rgba(15,23,42,.08);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    animation: tbIncSlideIn .3s cubic-bezier(.4,0,.2,1) both;
}
@keyframes tbIncSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.tb-inc-ringing {
    border: 1.5px solid #FDB813;
    box-shadow: 0 18px 48px rgba(253,184,19,.25), 0 4px 12px rgba(15,23,42,.08);
}
.tb-inc-header {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 14px 12px;
    background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
    position: relative;
}
.tb-inc-active .tb-inc-header {
    background: linear-gradient(135deg, #ecfdf5 0%, #fff 100%);
}
.tb-inc-avatar {
    position: relative;
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, #FDB813, #E09400);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(253,184,19,.4);
}
.tb-inc-active .tb-inc-avatar {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 8px rgba(16,185,129,.4);
}
.tb-inc-pulse {
    position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid #FDB813; opacity: .7;
    animation: tbIncPulse 1.4s ease-out infinite;
}
.tb-inc-pulse-2 { animation-delay: .7s; }
@keyframes tbIncPulse {
    0%   { transform: scale(1); opacity: .7; }
    100% { transform: scale(1.8); opacity: 0; }
}
.tb-inc-header-info { flex: 1; min-width: 0; }
.tb-inc-status {
    font-size: 11px; font-weight: 600; color: #6b7280;
    text-transform: uppercase; letter-spacing: .5px;
    margin-bottom: 2px; display: flex; align-items: center;
}
.tb-inc-dot {
    display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    margin-right: 6px;
}
.tb-inc-dot-ringing { background: #FDB813; animation: tbIncBlink 1s infinite; }
.tb-inc-dot-active  { background: #10b981; }
@keyframes tbIncBlink { 50% { opacity: .3; } }
.tb-inc-name {
    font-size: 15px; font-weight: 700; color: #111827;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-inc-phone {
    font-size: 12px; color: #6b7280; margin-top: 1px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-inc-close {
    position: absolute; top: 8px; right: 8px;
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(0,0,0,.04); color: #6b7280;
    border: none; cursor: pointer; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.tb-inc-close:hover { background: rgba(0,0,0,.1); color: #111827; }

.tb-inc-body {
    padding: 0 14px 12px;
    display: flex; flex-direction: column; gap: 8px;
}
.tb-inc-loading {
    font-size: 12px; color: #6b7280; padding: 6px 0;
    display: flex; align-items: center;
}
.tb-inc-tag {
    display: inline-flex; align-items: center;
    padding: 4px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 600; align-self: flex-start;
}
.tb-inc-tag-known { background: #dbeafe; color: #1e40af; }
.tb-inc-tag-new   { background: #fef3c7; color: #92400e; }
.tb-inc-meta {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 12px; color: #4b5563;
    padding: 6px 8px; background: #f9fafb; border-radius: 8px;
}
.tb-inc-meta i { color: #9ca3af; margin-top: 2px; flex-shrink: 0; }
.tb-inc-section-label {
    font-size: 10px; font-weight: 700; color: #9ca3af;
    text-transform: uppercase; letter-spacing: .5px;
    margin-top: 4px;
}
.tb-inc-addr-item, .tb-inc-ride-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: #4b5563;
    padding: 4px 0;
    white-space: nowrap; overflow: hidden;
}
.tb-inc-addr-item i, .tb-inc-ride-item i { color: #9ca3af; font-size: 10px; flex-shrink: 0; }
.tb-inc-addr-item span, .tb-inc-ride-item span {
    overflow: hidden; text-overflow: ellipsis;
}

.tb-inc-actions {
    display: flex; gap: 6px; padding: 0 14px 10px;
}
.tb-inc-btn {
    flex: 1; display: flex; align-items: center; justify-content: center;
    gap: 6px; padding: 9px 8px; border-radius: 10px;
    border: none; cursor: pointer;
    font-size: 12px; font-weight: 600;
    transition: all .15s; white-space: nowrap;
}
.tb-inc-btn:active { transform: scale(.97); }
.tb-inc-btn-accept {
    background: #10b981; color: #fff;
    box-shadow: 0 2px 6px rgba(16,185,129,.3);
}
.tb-inc-btn-accept:hover { background: #059669; }
.tb-inc-btn-reject, .tb-inc-btn-hangup {
    background: #fee2e2; color: #b91c1c;
}
.tb-inc-btn-reject:hover, .tb-inc-btn-hangup:hover { background: #fecaca; }
.tb-inc-btn-hold {
    background: #f3f4f6; color: #4b5563; flex: 0 0 auto; min-width: 38px;
}
.tb-inc-btn-hold:hover { background: #e5e7eb; }

.tb-inc-launch {
    width: 100%; display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 12px 14px;
    background: linear-gradient(135deg, #FDB813 0%, #E09400 100%);
    color: #fff; border: none; cursor: pointer;
    font-size: 13px; font-weight: 700;
    transition: all .15s;
    border-top: 1px solid rgba(0,0,0,.05);
}
.tb-inc-launch:hover { filter: brightness(1.05); }
.tb-inc-launch:active { transform: scale(.99); }
.tb-inc-launch-arrow { transition: transform .2s; }
.tb-inc-launch:hover .tb-inc-launch-arrow { transform: translateX(3px); }

/* Décale les call cards si une mini-modale est affichée */
.tb-inc-bar + .tb-call-cards-bar {
    bottom: auto; top: auto;
}

/* ---- Call Cards Bar ---- */
.tb-call-cards-bar {
    position: fixed; bottom: 16px; left: 80px; z-index: 900;
    display: flex; gap: 12px; align-items: flex-end;
    animation: slideUpIn .3s ease;
}
@keyframes slideUpIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.tb-call-card {
    width: 220px; background: #fff; border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
    border: 1px solid #e5e7eb; overflow: hidden;
    animation: slideUpIn .3s ease;
}
.tb-call-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; background: linear-gradient(135deg, #FDB813, #E09400);
}
.tb-call-card-icon { color: #fff; font-size: 14px; }
.tb-call-card-close {
    background: none; border: none; color: rgba(255,255,255,.7); cursor: pointer;
    font-size: 12px; padding: 2px 4px; border-radius: 4px;
}
.tb-call-card-close:hover { color: #fff; background: rgba(255,255,255,.2); }
.tb-call-card-body { padding: 10px 12px; cursor: pointer; }
.tb-call-card-body:hover { background: #f9fafb; }
.tb-call-card-phone { font-size: 14px; font-weight: 700; color: #1f2937; }
.tb-call-card-name { font-size: 12px; color: #6b7280; margin-top: 2px; }
.tb-call-card-addr { font-size: 11px; color: #6b7280; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-call-card-action {
    margin-top: 8px; padding: 6px 0; text-align: center;
    font-size: 12px; font-weight: 600; color: var(--primary);
    border-top: 1px solid #f3f4f6;
}

/* ---- Call Booking Panel (drawer bottom-left) ---- */
.tb-callbk-panel {
    position: fixed;
    left: 80px;
    top: 16px;
    bottom: 16px;
    width: min(560px, calc(100vw - 96px));
    z-index: 950;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .18), 0 4px 12px rgba(15, 23, 42, .08);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: callbkSlideIn .25s ease;
}
@keyframes callbkSlideIn {
    from { opacity: 0; transform: translate(-20px, 0); }
    to { opacity: 1; transform: translate(0, 0); }
}
.tb-callbk-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #FDB813, #E09400);
    color: #fff;
    flex-shrink: 0;
}
.tb-callbk-header-icon {
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .2);
    font-size: 16px;
    flex-shrink: 0;
    animation: callbkPulse 1.6s ease-in-out infinite;
}
@keyframes callbkPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.45); }
    50% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
}
.tb-callbk-header-info { flex: 1; min-width: 0; }
.tb-callbk-header-name {
    font-size: 15px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-callbk-header-phone {
    font-size: 12px; opacity: .9; margin-top: 2px;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.tb-callbk-tag {
    background: rgba(255, 255, 255, .22);
    padding: 2px 8px; border-radius: 999px;
    font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .4px;
}
.tb-callbk-header-btn {
    background: rgba(255, 255, 255, .18);
    border: none; color: #fff;
    width: 30px; height: 30px;
    border-radius: 8px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    transition: background .15s;
    flex-shrink: 0;
}
.tb-callbk-header-btn:hover { background: rgba(255, 255, 255, .32); }
.tb-callbk-body-wrap {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
    overflow: hidden;
    background: #f9fafb;
}
.tb-callbk-body {
    flex: 1; min-height: 0;
    overflow-y: auto;
    padding: 18px;
}
.tb-callbk-body .booking-view { padding: 0; }
.tb-callbk-body .card { box-shadow: 0 1px 2px rgba(0,0,0,.04); }
/* Dans la modal, les blocs Client / Itinéraire passent en pleine largeur */
.tb-callbk-body .booking-view > form > .grid { grid-template-columns: 1fr !important; }

/* ---- Multi-call tabs ---- */
.tb-callbk-tabs {
    display: flex; gap: 2px;
    padding: 6px 8px 0 8px;
    background: linear-gradient(180deg, #fef3c7, #fde68a);
    border-bottom: 1px solid rgba(0,0,0,.05);
    overflow-x: auto;
    flex-shrink: 0;
}
.tb-callbk-tabs::-webkit-scrollbar { height: 4px; }
.tb-callbk-tabs::-webkit-scrollbar-thumb { background: rgba(0,0,0,.2); border-radius: 2px; }
.tb-callbk-tabitem {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 10px;
    background: rgba(255,255,255,.5);
    color: #92400e;
    border-radius: 8px 8px 0 0;
    font-size: 12px; font-weight: 600;
    cursor: pointer;
    max-width: 200px; min-width: 0;
    flex-shrink: 0;
    border: 1px solid transparent;
    border-bottom: none;
    transition: background .15s;
}
.tb-callbk-tabitem:hover { background: rgba(255,255,255,.8); }
.tb-callbk-tabitem-active {
    background: #fff;
    color: #1f2937;
    border-color: rgba(0,0,0,.06);
    box-shadow: 0 -1px 2px rgba(0,0,0,.04);
}
.tb-callbk-tabitem-icon { font-size: 10px; flex-shrink: 0; }
.tb-callbk-tabitem-text {
    flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-callbk-tabitem-close {
    background: none; border: none; cursor: pointer;
    color: inherit; opacity: .5;
    width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
    font-size: 9px;
    padding: 0;
}
.tb-callbk-tabitem-close:hover { opacity: 1; background: rgba(0,0,0,.08); }
.tb-callbk-tab {
    position: fixed;
    left: 16px; bottom: 16px;
    z-index: 10001;
    display: flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, #FDB813, #E09400);
    color: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    cursor: pointer;
    font-size: 13px; font-weight: 600;
    border: none;
    animation: slideUpIn .25s ease;
    max-width: 320px;
}
.tb-callbk-tab-text {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    flex: 1; min-width: 0;
}
.tb-callbk-tab-close {
    background: rgba(255,255,255,.22); border: none; color: #fff;
    width: 22px; height: 22px; border-radius: 6px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 10px;
}
.tb-callbk-tab-close:hover { background: rgba(255,255,255,.4); }

@media (max-width: 768px) {
    .tb-callbk-panel {
        left: 8px; right: 8px; top: 8px; bottom: 8px;
        width: auto;
    }
    .tb-callbk-tab { left: 8px; bottom: 8px; }
}

/* ---- Live View (split map + list) ---- */
.live-layout { display: flex; flex-direction: column; height: calc(100vh - 0px); margin: -24px; }
.live-split { display: flex; flex: 1; min-height: 0; }
.live-map-container { flex: 1; min-width: 0; position: relative; }
.live-map-container .leaflet-container { border-radius: 0; }
.live-list-container {
    width: 380px; flex-shrink: 0; display: flex; flex-direction: column;
    border-left: 1px solid #e5e7eb; background: #fff;
}
.live-list-filters {
    display: flex; gap: 4px; padding: 10px 12px; border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0; overflow-x: auto;
}
.live-filter-btn {
    font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 8px;
    border: 1px solid #e5e7eb; background: #fff; color: #6b7280; cursor: pointer;
    white-space: nowrap; transition: all .15s;
}
.live-filter-btn:hover { background: #f9fafb; }
.live-filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.live-list-scroll { flex: 1; overflow-y: auto; }

.live-list-item {
    padding: 12px 14px; border-bottom: 1px solid #f3f4f6; cursor: pointer;
    transition: background .15s;
}
.live-list-item:hover { background: #f9fafb; }
.live-list-item.active { background: #fffbeb; border-left: 3px solid var(--primary); }
.live-list-item.highlighted { background: #fef3c7; }
.live-list-item-top { display: flex; align-items: center; gap: 10px; }
.live-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.live-list-item-name { font-size: 13px; font-weight: 600; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-list-item-addr { font-size: 11px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.live-list-item-meta { text-align: right; flex-shrink: 0; }
.live-list-item-status { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.live-list-item-time { display: block; font-size: 10px; color: #6b7280; margin-top: 2px; }

.live-list-item-detail {
    margin-top: 10px; padding-top: 10px; border-top: 1px solid #f3f4f6;
}
.live-list-detail-row { font-size: 12px; color: #4b5563; margin-bottom: 4px; display: flex; align-items: center; }
.live-list-detail-actions { display: flex; gap: 6px; margin-top: 8px; }

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}
.live-pulse { animation: livePulse 1.5s ease-in-out infinite; }
.sidebar-badge {
    font-size: 10px; font-weight: 700; background: #ef4444; color: #fff;
    border-radius: 10px; padding: 1px 6px; margin-left: auto;
}
@media (max-width: 768px) {
    .live-split { flex-direction: column-reverse; }
    .live-list-container { width: 100%; height: 50%; border-left: none; border-top: 1px solid #e5e7eb; }
    .live-map-container { height: 50%; }
}

/* Fleet cards */
.fleet-card { overflow: hidden; border-radius: 14px; }
.fleet-card-img {
    position: relative; background: #f8fafc; display: flex; align-items: center; justify-content: center;
    height: 160px; overflow: hidden;
}
.fleet-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.fleet-card-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.fleet-card-img-btn {
    position: absolute; bottom: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,.9); border: 1px solid #e5e7eb; color: #6b7280; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 13px;
    opacity: 0; transition: opacity .2s;
}
.fleet-card:hover .fleet-card-img-btn { opacity: 1; }
.fleet-card-img-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Session indicator button in topbar */
.fw-tb-btn-session {
    display: flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5); border: 1px solid #bbf7d0;
    border-radius: 8px; padding: 5px 12px; font-size: 12px; font-weight: 600; color: #15803d;
    cursor: pointer; transition: all .15s; white-space: nowrap;
}
.fw-tb-btn-session:hover { background: linear-gradient(135deg, #dcfce7, #d1fae5); border-color: #86efac; }
.fw-session-user-name { color: #374151; font-weight: 600; }
.fw-session-timer { font-variant-numeric: tabular-nums; }
.fw-session-tasks {
    background: #15803d; color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 10px; font-weight: 700;
}

/* Session Report overlay */
.sr-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,.45); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn .2s;
}
.sr-container {
    width: 90vw; max-width: 1000px; height: 85vh; max-height: 700px;
    background: #fff; border-radius: 16px; box-shadow: 0 25px 50px rgba(0,0,0,.2);
    display: flex; flex-direction: column; overflow: hidden;
}
.sr-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px; border-bottom: 1px solid #e5e7eb;
}
.sr-timer-badge {
    display: inline-flex; align-items: center; gap: 4px;
    background: #ecfdf5; color: #15803d; border: 1px solid #bbf7d0;
    border-radius: 20px; padding: 3px 12px; font-size: 12px; font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.sr-close-btn {
    width: 32px; height: 32px; border-radius: 8px; border: none; background: #f3f4f6;
    color: #6b7280; cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 14px; transition: all .15s;
}
.sr-close-btn:hover { background: #e5e7eb; color: #374151; }
.sr-body {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0; flex: 1; min-height: 0; overflow: hidden;
}
.sr-panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.sr-panel:first-child { border-right: 1px solid #e5e7eb; }
.sr-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; border-bottom: 1px solid #f3f4f6; flex-shrink: 0;
}
.sr-task-counter {
    background: #f97316; color: #fff; border-radius: 12px; padding: 2px 10px;
    font-size: 11px; font-weight: 700;
}
.sr-panel-body {
    flex: 1; overflow-y: auto; padding: 8px 0;
}
.sr-notes-panel { display: flex; flex-direction: column; padding: 0; }
.sr-remark {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 10px 20px; font-size: 12px; color: #6b7280; background: #fffbeb;
    margin: 0 12px 8px; border-radius: 8px; border: 1px solid #fef3c7;
}
.sr-remark i { color: #f59e0b; margin-top: 1px; }
.sr-category {
    padding: 10px 20px 6px; font-size: 11px; font-weight: 700;
    color: #6b7280; text-transform: uppercase; letter-spacing: .05em;
}
.sr-task {
    display: flex; align-items: center; gap: 12px; padding: 10px 20px;
    cursor: pointer; transition: background .15s;
}
.sr-task:hover { background: #f9fafb; }
.sr-task-check {
    width: 22px; height: 22px; border-radius: 6px; border: 2px solid #d1d5db;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: all .2s;
}
.sr-task-check i { font-size: 11px; color: transparent; transition: color .2s; }
.sr-task.done .sr-task-check { background: #15803d; border-color: #15803d; }
.sr-task.done .sr-task-check i { color: #fff; }
.sr-task-label { font-size: 13px; color: #374151; }
.sr-task.done .sr-task-label { color: #6b7280; text-decoration: line-through; }

.sr-notes-area {
    flex: 1; border: none; outline: none; resize: none;
    padding: 16px 20px; font-size: 13px; line-height: 1.7; color: #374151;
    font-family: inherit;
}
.sr-notes-area::placeholder { color: #d1d5db; }
.sr-notes-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 20px; border-top: 1px solid #f3f4f6; flex-shrink: 0;
}
.sr-save-status { font-size: 12px; font-weight: 500; }

@media (max-width: 768px) {
    .sr-container { width: 95vw; height: 90vh; }
    .sr-body { grid-template-columns: 1fr; }
    .sr-panel:first-child { border-right: none; border-bottom: 1px solid #e5e7eb; max-height: 50%; }
}

/* ---- Topbar user area ---- */
.fw-tb-user-area {
    display: flex; align-items: center; gap: 8px;
}
.fw-tb-user-name {
    font-size: 12px; font-weight: 600; color: #374151;
    display: flex; align-items: center; gap: 4px; white-space: nowrap;
}
.fw-tb-btn-close-session {
    display: inline-flex; align-items: center; gap: 4px;
    background: #fef2f2; color: #dc2626; border: 1px solid #fecaca;
    border-radius: 8px; padding: 5px 12px; font-size: 12px; font-weight: 600;
    cursor: pointer; transition: all .15s; white-space: nowrap;
}
.fw-tb-btn-close-session:hover { background: #fee2e2; border-color: #fca5a5; }
.fw-tb-btn-logout {
    display: inline-flex; align-items: center; gap: 4px;
    background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb;
    border-radius: 8px; padding: 5px 12px; font-size: 12px; font-weight: 600;
    cursor: pointer; transition: all .15s; white-space: nowrap;
}
.fw-tb-btn-logout:hover { background: #e5e7eb; color: #374151; }

/* ---- Session Gate ---- */
.sg-container {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(to bottom, #f9fafb, #ffffff, #f9fafb); padding: 24px;
}
.sg-card {
    width: 100%; max-width: 680px; background: #fff; border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,.06); border: 1px solid #f3f4f6;
    overflow: hidden;
}
.sg-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 28px; border-bottom: 1px solid #f3f4f6;
}
.sg-header-left { display: flex; align-items: center; gap: 14px; }
.sg-welcome { font-size: 16px; font-weight: 700; color: #111827; }
.sg-subtitle { font-size: 13px; color: #6b7280; margin-top: 2px; }
.sg-logout-btn {
    display: inline-flex; align-items: center; gap: 4px;
    background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb;
    border-radius: 8px; padding: 6px 14px; font-size: 12px; font-weight: 600;
    cursor: pointer; transition: all .15s;
}
.sg-logout-btn:hover { background: #e5e7eb; color: #374151; }
.sg-body { padding: 24px 28px; }
.sg-section-title {
    display: flex; align-items: center; font-size: 14px; font-weight: 700;
    color: #374151; margin-bottom: 16px;
}
.sg-loading {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px 0; gap: 12px; color: #6b7280; font-size: 13px;
}
.sg-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px 0;
}
.sg-reports-list { display: flex; flex-direction: column; gap: 4px; }
.sg-report-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border-radius: 12px; cursor: pointer;
    transition: background .15s; border: 1px solid transparent;
}
.sg-report-item:hover { background: #f9fafb; border-color: #f3f4f6; }
.sg-report-avatar {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #FDB813, #E09400);
}
.sg-report-info { flex: 1; min-width: 0; }
.sg-report-name { font-size: 14px; font-weight: 600; color: #111827; }
.sg-report-date { font-size: 12px; color: #6b7280; margin-top: 2px; }
.sg-report-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.sg-report-duration {
    font-size: 12px; font-weight: 600; color: #374151;
    font-variant-numeric: tabular-nums;
}
.sg-report-tasks-badge {
    font-size: 11px; font-weight: 600; color: #15803d; background: #f0fdf4;
    border-radius: 10px; padding: 2px 8px;
}
.sg-footer {
    padding: 20px 28px; border-top: 1px solid #f3f4f6;
    display: flex; justify-content: center;
}
.sg-start-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: #FDB813; color: #fff; border: none; border-radius: 12px;
    padding: 12px 28px; font-size: 14px; font-weight: 700;
    cursor: pointer; transition: all .15s;
    box-shadow: 0 4px 12px rgba(253,184,19,.3);
}
.sg-start-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.sg-start-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* Session Gate Detail */
.sg-detail { padding: 24px 28px; }
.sg-back-btn {
    display: inline-flex; align-items: center;
    background: none; border: none; color: #6b7280; font-size: 13px; font-weight: 600;
    cursor: pointer; padding: 0; margin-bottom: 20px; transition: color .15s;
}
.sg-back-btn:hover { color: #374151; }
.sg-detail-header {
    display: flex; align-items: center; gap: 14px;
    padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid #f3f4f6;
}
.sg-detail-avatar {
    width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #FDB813, #E09400);
}
.sg-detail-name { font-size: 16px; font-weight: 700; color: #111827; }
.sg-detail-time { font-size: 13px; color: #6b7280; margin-top: 2px; }
.sg-detail-duration { color: #374151; font-weight: 600; }
.sg-detail-section { margin-bottom: 20px; }
.sg-detail-section-title {
    font-size: 12px; font-weight: 700; color: #6b7280; text-transform: uppercase;
    letter-spacing: .05em; margin-bottom: 10px;
}
.sg-detail-tasks { display: flex; flex-direction: column; gap: 6px; }
.sg-detail-task {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: #374151;
}
.sg-detail-notes {
    background: #f9fafb; border-radius: 10px; padding: 14px 16px;
    font-size: 13px; color: #374151; line-height: 1.7; white-space: pre-wrap;
    border: 1px solid #f3f4f6; min-height: 60px;
}
.sg-detail-actions {
    padding-top: 20px; border-top: 1px solid #f3f4f6;
    display: flex; justify-content: center;
}

/* ---- MINI CHAT WINDOWS (bottom-left floating) ---- */
.mini-chat-window {
    position: fixed; bottom: 0; z-index: 10000;
    width: 300px; display: flex; flex-direction: column;
    border-radius: 12px 12px 0 0; overflow: hidden;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
    background: #fff; border: 1px solid #e5e7eb; border-bottom: none;
    animation: miniChatIn 0.2s;
}
.mini-chat-minimized { height: auto; }
@keyframes miniChatIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.mini-chat-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; background: linear-gradient(135deg, #1e293b, #334155);
    cursor: pointer; gap: 8px; min-height: 40px;
}
.mini-chat-avatar {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; color: #fff;
}
.mini-chat-status-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
    margin-left: -8px; margin-bottom: -12px;
    border: 2px solid #1e293b;
}
.mini-chat-btn {
    background: none; border: none; color: rgba(255,255,255,0.7); cursor: pointer;
    font-size: 12px; padding: 4px 5px; border-radius: 4px; transition: all .15s;
}
.mini-chat-btn:hover { color: #fff; background: rgba(255,255,255,0.15); }

.mini-chat-body { display: flex; flex-direction: column; height: 340px; }

.mini-chat-messages {
    flex: 1; overflow-y: auto; padding: 10px;
    display: flex; flex-direction: column; gap: 4px;
}
.mini-chat-messages .fw-msg-bubble { font-size: 12px; padding: 6px 10px; }
.mini-chat-messages .fw-msg-time { font-size: 9px; }

.mini-chat-input {
    display: flex; border-top: 1px solid #f3f4f6; padding: 6px 8px; gap: 6px;
    background: #fafafa;
}
.mini-chat-input input {
    flex: 1; border: 1px solid #e5e7eb; border-radius: 8px; padding: 6px 10px;
    font-size: 12px; outline: none; background: #fff;
}
.mini-chat-input input:focus { border-color: #FDB813; }
.mini-chat-input button {
    background: #FDB813; color: #fff; border: none; border-radius: 8px;
    width: 30px; height: 30px; cursor: pointer; font-size: 11px;
    display: flex; align-items: center; justify-content: center;
}
.mini-chat-input button:disabled { opacity: .4; cursor: not-allowed; }

/* Red badge for unread messages */
.fw-tb-badge-red {
    background: #ef4444;
}

/* Mini ticket chat specifics */
.mini-chat-header-ticket { background: linear-gradient(135deg, #92400e, #b45309); }
.mini-chat-badge-client {
    font-size: 9px; font-weight: 700; color: #fff; background: #ef4444;
    padding: 1px 6px; border-radius: 8px; flex-shrink: 0; text-transform: uppercase;
    letter-spacing: .03em;
}
.mini-ticket-client-bar {
    display: flex; align-items: center; gap: 6px; padding: 6px 10px;
    background: #fffbeb; border-bottom: 1px solid #fef3c7;
    font-size: 11px; color: #92400e; font-weight: 500;
}
.mini-ticket-system-msg {
    text-align: center; font-size: 10px; color: #6b7280; padding: 4px 8px;
    font-style: italic;
}
.mini-ticket-sender {
    font-size: 10px; color: #92400e; font-weight: 600; margin-bottom: 2px;
}
.mini-ticket-sender-me {
    font-size: 10px; color: #6b7280; font-weight: 500; margin-bottom: 2px; text-align: right;
}

/* Avatar images in chat */
.fw-user-avatar-img, .mini-chat-avatar-img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}

/* Sidebar bottom account */
.sidebar-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 8px 0;
    margin-top: auto;
}
.sidebar-item-account {
    color: #94a3b8 !important;
}
.sidebar-item-account:hover {
    color: #fff !important;
}

/* My Account View */
.myaccount-avatar-preview {
    width: 100px; height: 100px; border-radius: 50%; overflow: hidden;
    background: linear-gradient(135deg, #FDB813, #E09400);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700; color: #fff;
    border: solid 2px #FDB813;
}
.myaccount-dropzone {
    width: 100%; padding: 28px 20px;
    border: 2px dashed #e5e7eb; border-radius: 12px;
    text-align: center; cursor: pointer;
    transition: all .2s; background: #fafafa;
}
.myaccount-dropzone:hover { border-color: #FDB813; background: #fffcf0; }
.myaccount-dropzone.dragging { border-color: #FDB813; background: #fffbe6; box-shadow: 0 0 0 3px rgba(253,184,19,0.15); }

/* ---- SUPPORT TICKETS VIEW ---- */
.support-tickets-list { display: flex; flex-direction: column; gap: 8px; }
.support-ticket-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; background: #fff; border-radius: 12px;
    border: 1px solid #e5e7eb; cursor: pointer; transition: all .15s; gap: 16px;
}
.support-ticket-card:hover { border-color: #FDB813; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.support-ticket-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.support-ticket-icon {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.support-ticket-subject { font-size: 14px; font-weight: 600; color: #1f2937; }
.support-ticket-client { font-size: 12px; color: #6b7280; margin-top: 2px; }
.support-ticket-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.support-status-badge {
    font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 8px;
}
.support-cat-badge {
    font-size: 10px; background: #f3f4f6; color: #6b7280; padding: 1px 6px;
    border-radius: 6px; margin-left: 6px;
}

/* Ticket detail */
.support-ticket-detail { display: flex; flex-direction: column; height: calc(100vh - 100px); }
.support-detail-header {
    display: flex; align-items: flex-start; gap: 16px; padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb; margin-bottom: 0;
}
.btn-back {
    background: none; border: none; cursor: pointer; color: #6b7280;
    font-size: 13px; font-weight: 600; padding: 6px 0; transition: color .15s;
}
.btn-back:hover { color: #1f2937; }

.support-detail-chat {
    flex: 1; display: flex; flex-direction: column; overflow: hidden;
    background: #fff; border-radius: 12px; border: 1px solid #e5e7eb; margin-top: 16px;
}
.support-messages {
    flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px;
}
.support-system-msg {
    text-align: center; font-size: 12px; color: #6b7280; font-style: italic;
    padding: 8px 16px; background: #f9fafb; border-radius: 8px; align-self: center;
}
.support-msg { display: flex; gap: 10px; max-width: 80%; }
.support-msg-client { align-self: flex-start; }
.support-msg-me { align-self: flex-end; flex-direction: row-reverse; }
.support-msg-avatar {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #fff;
}
.support-msg-content { min-width: 0; }
.support-msg-sender {
    display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 12px; color: #6b7280;
}
.support-msg-me .support-msg-sender { flex-direction: row-reverse; }
.support-badge-client {
    font-size: 9px; font-weight: 700; color: #fff; background: #f59e0b;
    padding: 1px 6px; border-radius: 6px; text-transform: uppercase;
}
.support-badge-support {
    font-size: 9px; font-weight: 700; color: #fff; background: #3b82f6;
    padding: 1px 6px; border-radius: 6px; text-transform: uppercase;
}
.support-msg-time { font-size: 10px; color: #6b7280; }
.support-msg-text {
    padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5;
}
.support-msg-client .support-msg-text { background: #f3f4f6; color: #1f2937; border-top-left-radius: 4px; }
.support-msg-me .support-msg-text { background: #FDB813; color: #fff; border-top-right-radius: 4px; }

.support-reply-bar {
    display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #f3f4f6; background: #fafafa;
}
.support-reply-input {
    flex: 1; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 14px;
    font-size: 13px; outline: none; font-family: inherit;
}
.support-reply-input:focus { border-color: #FDB813; box-shadow: 0 0 0 3px rgba(253,184,19,0.1); }
.support-reply-btn {
    background: #FDB813; color: #fff; border: none; border-radius: 10px;
    width: 40px; height: 40px; cursor: pointer; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
}
.support-reply-btn:disabled { opacity: .4; cursor: not-allowed; }

/* Calendar insert button between events */
.cal-insert-btn {
    display: flex; align-items: center; justify-content: center; gap: 0;
    height: 0; margin: 0 2px; cursor: pointer; position: relative;
    opacity: 0; transition: opacity 0.15s, height 0.15s, margin 0.15s;
}
.cal-insert-btn:hover { opacity: 1 !important; height: 18px; margin: 2px 2px; }
div[style*="overflowY"]:hover .cal-insert-btn { opacity: 0.35; height: 14px; margin: 1px 2px; }
.cal-insert-line { flex: 1; height: 1px; background: #3b82f6; opacity: 0.5; }
.cal-insert-icon {
    width: 16px; height: 16px; border-radius: 50%; background: #3b82f6; color: #fff;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    font-size: 8px; line-height: 1;
}

/* Rides calendar blocks */
.rides-cal-block:hover { filter: brightness(0.96); transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,0.08); }

/* =============================================================================
 * DRIVERS LIVE MAP MODAL — fullscreen map with live driver positions
 * ============================================================================= */
.drivers-map-overlay {
    position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, 0.55);
    display: flex; align-items: center; justify-content: center; padding: 24px;
    animation: fadeIn .15s ease;
}
.drivers-map-modal {
    background: #fff; border-radius: 16px; width: 100%; height: 100%;
    max-width: 1500px; display: flex; flex-direction: column;
    box-shadow: 0 24px 60px rgba(0,0,0,0.25);
    animation: slideDown .22s ease; overflow: hidden;
}
.drivers-map-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 22px; border-bottom: 1px solid #f1f5f9; background: #fafbfc;
    flex-shrink: 0;
}
.drivers-map-title {
    display: flex; align-items: center; gap: 4px;
    font-size: 16px; font-weight: 700; color: #111827;
}
.drivers-map-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 26px; height: 24px; padding: 0 8px;
    border-radius: 12px; background: #ecfdf5; color: #047857;
    font-size: 12px; font-weight: 800; margin-left: 10px;
}
.drivers-map-header-right {
    display: flex; align-items: center; gap: 12px;
}
.drivers-map-update {
    font-size: 12px; color: #6b7280; font-weight: 500;
    display: inline-flex; align-items: center;
}
.drivers-map-close {
    width: 34px; height: 34px; border-radius: 10px; border: none; cursor: pointer;
    background: #f3f4f6; color: #6b7280;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; transition: all .15s;
}
.drivers-map-close:hover { background: #e5e7eb; color: #111827; }

.drivers-map-body {
    flex: 1; min-height: 0;
    display: grid; grid-template-columns: 1fr 360px; overflow: hidden;
}
.drivers-map-canvas {
    width: 100%; height: 100%; min-height: 0;
    background: #e5e7eb;
}

/* Pulsation pour les markers "client en attente" sur la carte Clients en course */
@keyframes tb-pulse {
    0%   { transform: scale(1);   opacity: 0.55; }
    70%  { transform: scale(1.8); opacity: 0;    }
    100% { transform: scale(1.8); opacity: 0;    }
}
.drivers-map-side {
    border-left: 1px solid #f1f5f9; background: #fafbfc;
    overflow-y: auto; padding: 10px;
}

.drivers-map-empty {
    text-align: center; padding: 60px 20px; color: #6b7280; font-size: 13px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%;
}

.drivers-map-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px; margin-bottom: 8px; border-radius: 10px;
    background: #fff; border: 1px solid #f1f5f9; cursor: pointer;
    transition: all .15s;
}
.drivers-map-item:hover { border-color: #d1d5db; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.drivers-map-item.active { border-color: #3b82f6; background: #eff6ff; box-shadow: 0 2px 10px rgba(59,130,246,0.2); }
.drivers-map-item-dot {
    width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.04);
}
.drivers-map-item-info { flex: 1; min-width: 0; }
.drivers-map-item-driver {
    font-size: 13px; font-weight: 700; color: #111827;
    display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.drivers-map-item-plate {
    margin-left: auto; font-family: monospace; font-size: 11px; font-weight: 600;
    background: #fef3c7; color: #92400e; padding: 1px 6px; border-radius: 4px;
}
.drivers-map-item-client { font-size: 12px; color: #4b5563; margin-bottom: 3px; }
.drivers-map-item-route {
    font-size: 11px; color: #6b7280;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 6px;
}
.drivers-map-item-status {
    display: inline-block; padding: 2px 8px; border-radius: 6px;
    font-size: 11px; font-weight: 700;
}
.drivers-map-item-open {
    width: 28px; height: 28px; border-radius: 8px; border: none;
    background: transparent; color: #9ca3af; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; transition: all .15s; flex-shrink: 0;
}
.drivers-map-item-open:hover { background: #e5e7eb; color: #374151; }

@media (max-width: 900px) {
    .drivers-map-body { grid-template-columns: 1fr; grid-template-rows: 1fr 240px; }
    .drivers-map-side { border-left: none; border-top: 1px solid #f1f5f9; }
}
