*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Arial, sans-serif; background: #f5f5f5; color: #222; font-size: 14px; }
.dash-header { background: #000; color: #fff; padding: 14px 24px; display: flex; align-items: center; gap: 16px; }
.brand { font-size: 20px; font-weight: 700; letter-spacing: 2px; }
.dash-title { font-size: 14px; color: #aaa; flex: 1; }
.nav-link { background: transparent; border: 1px solid #666; color: #fff; padding: 6px 14px; cursor: pointer; border-radius: 2px; font-size: 13px; text-decoration: none; }
.nav-link:hover { border-color: #fff; }
.site-nav { display: flex; gap: 3px; }
.site-nav-btn { background: transparent; border: 1px solid #444; color: #aaa; padding: 4px 10px; cursor: pointer; border-radius: 2px; font-size: 12px; text-decoration: none; }
.site-nav-btn:hover { border-color: #aaa; color: #fff; }
.site-nav-btn.active { background: #fff; color: #000; border-color: #fff; font-weight: 600; }
.dash-main { padding: 24px; }
.section, .day-card { background: #fff; border-radius: 4px; box-shadow: 0 1px 6px rgba(0,0,0,.08); padding: 20px 24px; margin-bottom: 20px; }
.toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) 150px 150px 155px 120px 125px 150px; gap: 10px; margin-bottom: 14px; }
.marque-filter { position: relative; }
.marque-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 4px; border: 1px solid #ddd; border-radius: 2px; padding: 8px 10px; font-size: 13px; font-family: inherit; background: #fff; cursor: pointer; text-align: left; }
.marque-btn:focus { border-color: #000; outline: none; }
.marque-btn-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.marque-arrow { flex-shrink: 0; color: #666; font-size: 11px; }
.marque-dropdown { position: absolute; top: calc(100% + 2px); left: 0; min-width: 100%; background: #fff; border: 1px solid #ddd; border-radius: 2px; box-shadow: 0 4px 12px rgba(0,0,0,.12); z-index: 100; padding: 4px 0; max-height: 240px; overflow-y: auto; }
.marque-option { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.marque-option:hover { background: #f5f5f5; }
.calendar-toolbar { grid-template-columns: 220px 160px; }
.toolbar input:not([type="checkbox"]), .toolbar select { width: 100%; border: 1px solid #ddd; border-radius: 2px; padding: 8px 10px; font-size: 13px; font-family: inherit; outline: none; background: #fff; }
.list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.export-btn { background: #FBBC04; color: #000; border: none; padding: 8px 18px; cursor: pointer; border-radius: 2px; font-size: 13px; font-weight: 600; }
.export-btn:hover { background: #e0a900; }
.table-wrap { overflow-x: hidden; }
table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 10.5px; }
thead tr { background: #f0f0f0; }
th, td { padding: 5px 6px; text-align: left; border-bottom: 1px solid #eee; vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
th { font-weight: 600; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { background: #e4e4e4; }
th.sort-active { background: #e0e8f0; }
.sort-icon { font-size: 9px; opacity: 0.5; margin-left: 2px; }
th.sort-active .sort-icon { opacity: 1; }
tbody tr:hover { background: #fafafa; }
.mono { font-family: Consolas, 'Courier New', monospace; white-space: nowrap; }
.badge { display: inline-block; max-width: 100%; padding: 2px 6px; border-radius: 10px; font-size: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge.ok { background: #e8f8e8; color: #1e8449; }
.badge.wait { background: #fee; color: #c0392b; }
.badge.neutral { background: #fef9e7; color: #935116; }
.map-link { color: #1a73e8; font-weight: 600; text-decoration: none; }
.map-link:hover { text-decoration: underline; }
/* date liv | date fact | client | financement | marque | version | couleur | chassis | immat | parc | gps | vendeur | bl | apc | plaque | livreur | zone | commentaire */
th:nth-child(1), td:nth-child(1)   { width: 64px; }
th:nth-child(2), td:nth-child(2)   { width: 64px; }
th:nth-child(3), td:nth-child(3)   { width: 10%; }
th:nth-child(4), td:nth-child(4)   { width: 64px; }
th:nth-child(5), td:nth-child(5)   { width: 6%; }
th:nth-child(6), td:nth-child(6)   { width: 10%; }
th:nth-child(7), td:nth-child(7)   { width: 7%; }
th:nth-child(8), td:nth-child(8)   { width: 9%; }
th:nth-child(9), td:nth-child(9)   { width: 5%; }
th:nth-child(10), td:nth-child(10) { width: 6%; }
th:nth-child(11), td:nth-child(11) { width: 42px; }
th:nth-child(12), td:nth-child(12) { width: 7%; }
th:nth-child(13), td:nth-child(13) { width: 52px; }
th:nth-child(14), td:nth-child(14) { width: 52px; }
th:nth-child(15), td:nth-child(15) { width: 52px; }
th:nth-child(16), td:nth-child(16) { width: 6%; }
th:nth-child(17), td:nth-child(17) { width: 6%; }
th:nth-child(18), td:nth-child(18) { width: 7%; }
.day-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.day-title h2 { font-size: 18px; }
.day-count { color: #777; font-size: 13px; }
.calendar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.delivery-card { border: 1px solid #eee; border-radius: 4px; padding: 12px; background: #fafafa; }
.delivery-card strong { display: block; margin-bottom: 5px; }
.delivery-meta { color: #555; font-size: 13px; line-height: 1.45; }
.empty { text-align: center; color: #777; }
@media (max-width: 860px) {
  .dash-main { padding: 14px; }
  .toolbar { grid-template-columns: 1fr; }
  .dash-header { padding: 12px 14px; flex-wrap: wrap; }
  .table-wrap { overflow-x: auto; }
  table { table-layout: auto; min-width: 900px; }
  th, td { white-space: nowrap; overflow: visible; text-overflow: clip; }
}
