/* pages-fleet.css – vehicles, drivers, deadlines, customers (prefix fl-) */
.fl-search { position: relative; display: flex; align-items: center; flex: 1 1 260px; max-width: 360px; }
.fl-search .icon { position: absolute; left: 11px; color: var(--text-3); pointer-events: none; }
.fl-filters .fl-search .input { width: 100%; min-width: 0; padding-left: 34px; }
.fl-plate { font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.fl-plats { gap: 10px; flex-wrap: wrap; }
.fl-next { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fl-red { color: var(--danger); font-weight: 650; } .fl-err { color: var(--danger); } .fl-warn { color: var(--warning) !important; }
.fl-tg { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--info-bg); color: #229ed9; flex: none; }
[data-mode="dark"] .fl-tg { color: #5cc2f2; }
.fl-tg .icon { width: 13px; height: 13px; }

/* list: table on desktop, cards on phones */
.fl-cards { display: none; list-style: none; margin: 0; padding: 0; }
.fl-cards li { border-bottom: 1px solid var(--border); } .fl-cards li:last-child { border-bottom: 0; }
.fl-cards > li > a, .fl-cardbox { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; color: var(--text); text-decoration: none !important; }
.fl-cards > li > a:active { background: var(--surface-2); }
.fl-cardnums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fl-cardnums span { display: flex; flex-direction: column; } .fl-cardnums small { font-size: 11px; color: var(--text-3); } .fl-cardnums b { font-variant-numeric: tabular-nums; font-size: var(--fs); }
.fl-wrap { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .fl-desk { display: none; } .fl-cards { display: block; }
  .fl-search { max-width: none; flex-basis: 100%; }
  .fl-filters .chips { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; max-width: 100%; }
  .fl-filters .chip { flex: none; }
}

/* file header */
.fl-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.fl-head h1 { flex-wrap: wrap; min-width: 0; }
.fl-head .sub { gap: 6px 14px; margin-top: 6px; } .fl-head .sub a { display: inline-flex; align-items: center; gap: 5px; }
.fl-avatar { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.fl-avatar .icon { width: 24px; height: 24px; }
.avatar.fl-avatar-lg { width: 48px; height: 48px; font-size: 16px; }
.fl-next-h { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); padding: 0 6px; }
.fl-actions { align-items: center; }
.fl-kpis { margin-bottom: 18px; }
.fl-tabn { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--surface-3); color: var(--text-2); font-size: 11px; }
.tabs .active .fl-tabn { background: var(--primary-soft); color: var(--primary); }
@media (max-width: 720px) {
  .fl-head { align-items: flex-start; } .fl-avatar, .avatar.fl-avatar-lg { width: 40px; height: 40px; }
  .fl-actions { margin-left: 0 !important; width: 100%; }
  .fl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .fl-kpis .kpi.hero { grid-column: 1 / -1; }
  .fl-kpis .kpi .val { font-size: 20px; }
}

/* deadline rows */
.fl-dls > li { padding: 0; } .fl-dls > li.fl-dl { padding: 12px 18px; }
.fl-dl, .fl-dlrow { display: flex; align-items: center; gap: 12px; padding: 12px 18px; color: var(--text); text-decoration: none !important; }
a.fl-dlrow:hover { background: var(--surface-2); }
.fl-dl-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.fl-dl-ic.off { background: var(--surface-3); color: var(--text-3); }
.fl-dl-t { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; } .fl-dl-t b { font-weight: 600; font-size: var(--fs-sm); }
.fl-dl-d { display: flex; align-items: center; gap: 8px; flex: none; justify-content: flex-end; }
@media (max-width: 520px) { .fl-dl, .fl-dlrow { flex-wrap: wrap; } .fl-dl-d { width: 100%; padding-left: 44px; justify-content: flex-start; } }
.fl-group + .fl-group { border-top: 1px solid var(--border); }
.fl-group-h { display: flex; align-items: center; gap: 8px; padding: 12px 18px 4px; }
.fl-facts .dl { margin: 0; }
.fl-note { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: var(--fs-sm); white-space: pre-wrap; }
.fl-tse-mini .icon { color: var(--primary); }

/* forms */
.fl-form { display: flex; flex-direction: column; gap: var(--gap); }
.fl-sec .card-body { padding-bottom: 20px; }
.fl-sw { justify-content: flex-end; padding-bottom: 8px; }
.fl-save { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); box-shadow: var(--shadow); }
.fl-expl { margin-top: 14px; }

/* cash account */
.fl-cash { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fl-cash > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.fl-cash small { font-size: 11.5px; color: var(--text-3); font-weight: 550; } .fl-cash b { font-size: var(--fs-md); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fl-cash > div.fl-cash-bad { background: var(--danger-bg); border-color: transparent; color: var(--danger); } .fl-cash-bad small { color: inherit; }
@media (max-width: 420px) { .fl-cash { grid-template-columns: 1fr 1fr; } .fl-cash > div:last-child { grid-column: 1 / -1; } }
.fl-h3 { font-size: var(--fs-sm); color: var(--text-2); margin: 16px 0 4px; }
.fl-mw { display: flex; gap: 12px; align-items: flex-start; } .fl-mw > .icon { color: var(--primary); margin-top: 2px; }
.fl-merge { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; } .fl-merge > .icon { color: var(--primary); }

/* deadlines page */
.fl-countdown { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--accent-50); }
.fl-countdown b { font-size: 26px; font-weight: 750; color: var(--accent-600); line-height: 1; }
[data-mode="dark"] .fl-countdown b { color: var(--accent); }

/* customers */
.fl-kind { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; }
.fl-kind .icon { color: var(--text-3); }

/* ---------- checklist templates (public/js/pages/checklists.js) ---------- */
.clx-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 16px; }
.clx-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.clx-card:hover { border-color: var(--primary); box-shadow: var(--shadow); } .clx-card.off { opacity: .65; }
.clx-card-h { display: flex; align-items: center; gap: 8px; } .clx-card-h .icon { color: var(--primary); }
.clx-card-f { display: flex; gap: 10px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; margin-top: auto; }
.clx-classes h3 { font-size: var(--fs-md); margin-bottom: 10px; }
.clx-grid { display: grid; gap: 16px; } .clx-main { display: grid; gap: 16px; align-content: start; min-width: 0; }
@media (min-width: 1100px) { .clx-grid { grid-template-columns: minmax(0, 1fr) 420px; } .clx-side { position: sticky; top: calc(var(--topbar-h) + 12px); align-self: start; } }
.clx-items { display: flex; flex-direction: column; }
.clx-item { padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.clx-item:last-child { border-bottom: 0; } .clx-item.open { background: var(--surface-2); }
.clx-item.drag { opacity: .4; } .clx-item.over { box-shadow: inset 0 3px 0 var(--primary); }
.clx-row { display: flex; align-items: center; gap: 8px; }
.clx-grip { cursor: grab; color: var(--text-3); display: grid; place-items: center; width: 24px; height: 36px; flex: none; touch-action: none; }
.clx-label { flex: 1 1 auto; min-width: 0; } .clx-type { flex: 0 0 170px; } .clx-req { flex: none; } .clx-req .txt { font-size: var(--fs-xs); }
.clx-btns { display: flex; gap: 2px; flex: none; }
.clx-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 0 32px; } .clx-meta:empty { display: none; }
.clx-details { margin: 12px 0 4px 32px; }
.clx-phone { margin: 14px auto; width: 100%; max-width: 390px; max-height: 70vh; overflow: auto; padding: 14px; border: 1px solid var(--border-strong); border-radius: 24px; background: var(--bg); }
.clx-phone .ho-checks { grid-template-columns: 1fr; }
@media (max-width: 700px) {
  .clx-row { flex-wrap: wrap; } .clx-label { flex: 1 1 calc(100% - 40px); } .clx-type { flex: 1 1 auto; }
  .clx-btns { margin-left: auto; } .clx-meta, .clx-details { margin-left: 0; }
/* vehicle → Kalender-Sync (iCal export / import), prefix cs- */
.cs-grid { align-items: start; margin-bottom: var(--gap); }
.cs-grid > * { min-width: 0; }
.cs-card .card-head h2 { display: inline-flex; align-items: center; gap: 8px; }
.cs-card .dl { margin: 0; }
.cs-card .mono, .cs-feed .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.cs-qr { display: flex; align-items: center; gap: 14px; }
.cs-qr .qr { border-radius: var(--radius-sm); background: #fff; padding: 6px; border: 1px solid var(--border); flex: none; }
.cs-feeds { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); }
.cs-feed { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.cs-feed:last-child { border-bottom: 0; }
.cs-feed-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 220px; }
.cs-feed-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cs-feed-act { display: flex; align-items: center; gap: 8px; flex: none; }
.cs-feed-act .switch .txt { font-size: var(--fs-sm); }
.cs-none { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--text-3); font-size: var(--fs-sm); }
.cs-add { border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.cs-add h3 { margin: 0; }
.cs-blocks { list-style: none; margin: 0; padding: 4px 0; }
.cs-blocks li { display: grid; grid-template-columns: 12px minmax(0, auto) minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--border); }
.cs-blocks li:last-child { border-bottom: 0; }
.cs-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--st-ical); }
@media (max-width: 720px) {
  .cs-feed { flex-direction: column; align-items: stretch; }
  .cs-feed-main { flex: none; }
  .cs-feed-act { justify-content: flex-start; flex-wrap: wrap; }
  .cs-qr { flex-direction: column; align-items: flex-start; }
  .cs-blocks li { grid-template-columns: 12px minmax(0, 1fr); }
  .cs-blocks li .xs { grid-column: 2; }
}
