/* LeetFleet Portal - App Styles
   D365/Fluent Design Language
   ============================================================ */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, system-ui, sans-serif;
  font-size: 13px;
  color: var(--lf-ink);
  background: var(--lf-canvas);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--lf-primary); color: #fff; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   D365 Layout: Blue Header + White Sitemap + Content
   ============================================================ */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* D365 Suite Header (48px blue bar) */
.lf-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  background: var(--lf-primary);
  padding: 0 16px;
  color: #fff;
}

.lf-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lf-header-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.lf-header-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lf-header-title {
  font-size: 14px;
  font-weight: 600;
}

/* Solution-scoped demo badge (shown when reached via /portal/rentals etc.) */
.lf-solution-badge {
  margin-left: 10px;
  padding: 2px 9px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  white-space: nowrap;
}

.lf-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lf-header-btn {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
}

.lf-header-btn:hover {
  background: rgba(255,255,255,0.15);
}

.lf-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* Main wrapper (sitemap + content) */
.lf-app-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* D365 Sitemap (228px white sidebar) */
.lf-sidebar {
  position: sticky;
  top: 48px;
  flex: none;
  width: 228px;
  height: calc(100vh - 48px);
  background: #fff;
  border-right: 1px solid var(--lf-line);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.lf-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--lf-line);
}

.lf-brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--lf-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.lf-brand-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--lf-ink);
}

.lf-brand-tag {
  font-family: var(--lf-font-mono);
  font-size: 10px;
  letter-spacing: 0.3px;
  color: var(--lf-muted);
  text-transform: uppercase;
}

/* Navigation Groups */
.lf-nav {
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lf-nav-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lf-muted);
  cursor: pointer;
  border-radius: 3px;
  margin-top: 8px;
}

.lf-nav-group-header:first-child {
  margin-top: 0;
}

.lf-nav-group-header:hover {
  background: var(--lf-surface-alt);
}

.lf-nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border-radius: 3px;
  color: var(--lf-ink);
  font-size: 12.5px;
  font-weight: 400;
  transition: background 0.1s;
}

.lf-nav-link:hover {
  background: var(--lf-surface-alt);
}

.lf-nav-link.active {
  background: var(--lf-primary-soft);
  color: var(--lf-primary);
  font-weight: 600;
}

.lf-nav-num {
  font-family: var(--lf-font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--lf-primary);
  background: var(--lf-primary-soft);
  padding: 1px 5px;
  border-radius: 3px;
  min-width: 24px;
  text-align: center;
}

.lf-nav-badge {
  margin-left: auto;
  font-family: var(--lf-font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--lf-primary);
  background: var(--lf-primary-soft);
  padding: 2px 6px;
  border-radius: 3px;
}

.lf-sidebar-footer {
  margin-top: auto;
  padding: 12px 18px;
  border-top: 1px solid var(--lf-line);
  font-size: 11px;
  color: var(--lf-faint);
}

/* Main Content */
.lf-main {
  flex: 1;
  min-width: 0;
  height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--lf-canvas);
}

/* Command Bar (below header, above content) */
.lf-command-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #fff;
  border-bottom: 1px solid var(--lf-line);
}

/* Legacy topbar (hidden in D365 mode) */
.lf-topbar {
  display: none;
}

.lf-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lf-topbar-icon {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: var(--lf-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lf-topbar-title {
  font-weight: 600;
  font-size: 15px;
}

.lf-topbar-subtitle {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--lf-muted);
  margin-left: 6px;
}

.lf-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* KPI Strip (D365 Fluent) */
.lf-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--lf-line);
  border-bottom: 1px solid var(--lf-line);
}

.lf-kpi {
  background: var(--lf-surface);
  padding: 14px 16px;
}

.lf-kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--lf-faint);
}

.lf-kpi-value {
  font-family: var(--lf-font-mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 4px;
  color: var(--lf-ink);
}

.lf-kpi-delta {
  font-size: 11px;
  margin-top: 3px;
}

.lf-kpi-delta.positive { color: var(--lf-active); }
.lf-kpi-delta.negative { color: var(--lf-danger); }

/* Cards (D365 Fluent) */
.lf-card {
  background: #fff;
  border: 1px solid var(--lf-line);
  border-radius: 3px;
  overflow: hidden;
}

.lf-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--lf-line);
  background: var(--lf-surface-alt);
}

.lf-card-title {
  font-weight: 600;
  font-size: 13px;
}

.lf-card-meta {
  font-family: var(--lf-font-mono);
  font-size: 11px;
  color: var(--lf-faint);
}

/* Dashboard Body */
.lf-dashboard-body {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
  padding: 18px;
  background: var(--lf-canvas);
}

.lf-dashboard-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Map placeholder */
.lf-map {
  position: relative;
  height: 220px;
  background: linear-gradient(#EEF1F5, #E7EBF0);
}

.lf-map-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(#dde3ea 1px, transparent 1px), linear-gradient(90deg, #dde3ea 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.7;
}

.lf-map-dot {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(19, 138, 78, 0.18);
}

.lf-map-dot.active { background: var(--lf-active); }
.lf-map-dot.warn { background: var(--lf-warn); box-shadow: 0 0 0 4px rgba(194, 113, 12, 0.18); }
.lf-map-dot.danger { background: var(--lf-danger); box-shadow: 0 0 0 4px rgba(197, 54, 47, 0.18); }

@keyframes lfpulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.82); }
}

.lf-map-dot.pulse { animation: lfpulse 2.4s infinite; }

/* Alert List */
.lf-alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--lf-line-row);
}

.lf-alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: none;
}

.lf-alert-plate {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  width: 78px;
}

.lf-alert-text {
  font-size: 13.5px;
  color: #3C424C;
  flex: 1;
}

.lf-alert-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--lf-muted);
}

/* Expiry Card */
.lf-expiry-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--lf-line-row);
}

.lf-expiry-doc {
  font-size: 13.5px;
  font-weight: 500;
}

.lf-expiry-plate {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--lf-muted);
}

.lf-expiry-days {
  font-size: 12px;
  font-weight: 600;
}

.lf-expiry-days.warn { color: var(--lf-warn); }
.lf-expiry-days.danger { color: var(--lf-danger); }

/* Clickable KPIs */
.lf-kpi-link {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lf-kpi-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Tasks Section */
.lf-task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--lf-line);
}

.lf-task-item:last-child {
  border-bottom: none;
}

.lf-task-check {
  width: 18px;
  height: 18px;
  border: 2px solid var(--lf-border-strong);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s ease;
}

.lf-task-check:hover {
  border-color: var(--lf-primary);
}

.lf-task-check.done {
  background: var(--lf-success);
  border-color: var(--lf-success);
}

.lf-task-content {
  flex: 1;
  min-width: 0;
}

.lf-task-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--lf-ink);
}

.lf-task-title.done {
  text-decoration: line-through;
  color: var(--lf-muted);
}

.lf-task-meta {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--lf-muted);
}

.lf-task-due {
  color: var(--lf-danger);
}

.lf-task-due.soon {
  color: var(--lf-warn);
}

.lf-task-actions {
  display: flex;
  gap: 6px;
}

.lf-task-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--lf-surface-alt);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lf-muted);
  transition: all 0.15s ease;
}

.lf-task-btn:hover {
  background: var(--lf-primary);
  color: #fff;
}

.lf-task-btn.whatsapp:hover {
  background: #25D366;
}

/* Cost Card */
.lf-cost-card {
  background: var(--lf-ink);
  border-radius: 12px;
  padding: 18px;
  color: #fff;
}

.lf-cost-label {
  font-size: 12px;
  color: #9AA1AC;
}

.lf-cost-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-top: 6px;
}

.lf-cost-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 46px;
  margin-top: 14px;
}

.lf-cost-bar {
  flex: 1;
  background: #3A4150;
  border-radius: 3px;
}

.lf-cost-bar.current { background: var(--lf-primary); }

/* Status Pills (Fluent D365 style: 7px dot, 2px radius) */
.lf-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 2px;
  white-space: nowrap;
}

.lf-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* Buttons (D365 Fluent) */
.lf-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
  line-height: 1;
}

.lf-btn:hover { filter: brightness(0.95); }

.lf-btn.primary {
  background: var(--lf-primary);
  color: #fff;
}

.lf-btn.primary:hover {
  background: #106EBE;
}

.lf-btn.secondary {
  background: #fff;
  color: var(--lf-ink);
  border-color: var(--lf-border-strong);
}

.lf-btn.secondary:hover {
  background: var(--lf-surface-alt);
}

.lf-btn.ghost {
  background: transparent;
  color: var(--lf-primary);
  padding: 8px 6px;
}

.lf-btn.danger {
  background: #fff;
  color: #a4262c;
  border-color: #f0c9c7;
}

/* Badge */
.lf-badge {
  font-size: 12px;
  color: var(--lf-muted);
  background: var(--lf-canvas);
  border: 1px solid var(--lf-line);
  padding: 5px 10px;
  border-radius: 2px;
}

/* Data Table */
.lf-table {
  width: 100%;
  border-collapse: collapse;
}

/* Table (D365 Fluent - 42px dense rows) */
.lf-table-header {
  display: grid;
  background: var(--lf-surface-alt);
  padding: 10px 16px;
  font-family: var(--lf-font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lf-faint);
  border-bottom: 1px solid var(--lf-line);
}

.lf-table-row {
  display: grid;
  padding: 0 16px;
  min-height: 42px;
  font-size: 13px;
  align-items: center;
  border-bottom: 1px solid var(--lf-line-row);
  cursor: pointer;
  transition: background 0.1s;
}

.lf-table-row:hover {
  background: var(--lf-surface-alt);
}

/* Data text (mono) */
.lf-data {
  font-family: var(--lf-font-mono);
}

/* Vehicle 360 Styles */
.lf-vehicle-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--lf-line-soft);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.lf-vehicle-plate {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 18px;
  font-weight: 600;
}

.lf-vehicle-meta {
  font-size: 13px;
  color: #6A7280;
  margin-top: 5px;
}

.lf-vehicle-tabs {
  display: flex;
  gap: 24px;
  padding: 6px 20px;
  border-bottom: 1px solid var(--lf-line-soft);
  font-size: 13px;
}

.lf-vehicle-tab {
  padding: 11px 0;
  color: var(--lf-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.12s;
}

.lf-vehicle-tab:hover {
  color: var(--lf-ink);
}

.lf-vehicle-tab.active {
  color: var(--lf-ink);
  font-weight: 600;
  border-bottom-color: var(--lf-primary);
}

.lf-vehicle-meters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--lf-line-soft);
}

.lf-meter {
  background: #fff;
  padding: 15px 18px;
}

.lf-meter-label {
  font-size: 11.5px;
  color: var(--lf-muted);
}

.lf-meter-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 18px;
  font-weight: 500;
  margin-top: 5px;
}

.lf-service-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--lf-warn-bg);
  border: 1px solid #F0DEBE;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 16px 20px;
}

.lf-service-text {
  font-size: 13.5px;
  color: #8A5A0B;
}

/* Rental Check-out Styles */
.lf-checkout-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1px;
  background: var(--lf-line-soft);
}

.lf-checkout-section {
  background: #fff;
  padding: 20px 22px;
}

.lf-section-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 16px;
}

.lf-car-diagram {
  background: #F8F9FB;
  border: 1px solid var(--lf-line-soft);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.lf-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.lf-photo-slot {
  aspect-ratio: 4/3;
  background: #F2F4F6;
  border: 1px dashed #CDD3DB;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #9AA1AC;
}

.lf-damage-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lf-damage-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 10px 12px;
  border: 1px solid var(--lf-line-soft);
  border-radius: 9px;
}

.lf-damage-num {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lf-damage-num.danger { background: var(--lf-danger-bg); color: var(--lf-danger); }
.lf-damage-num.warn { background: var(--lf-warn-bg); color: var(--lf-warn); }

.lf-payment-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--lf-line-soft);
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 12px;
}

.lf-card-chip {
  width: 34px;
  height: 22px;
  border-radius: 4px;
  background: var(--lf-ink);
  flex: none;
}

.lf-card-number {
  font-size: 13.5px;
  font-weight: 600;
}

.lf-card-status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--lf-muted);
}

.lf-preauth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #EAF0FF;
  border: 1px solid #D5E0FF;
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 18px;
}

.lf-preauth-label {
  font-size: 13px;
  color: #2A3C66;
}

.lf-preauth-sub {
  font-size: 11.5px;
  color: #5A6B92;
  margin-top: 2px;
}

.lf-preauth-amount {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 18px;
  font-weight: 600;
  color: #15306E;
}

.lf-charges {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13.5px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--lf-line-soft);
}

.lf-charge-row {
  display: flex;
  justify-content: space-between;
}

.lf-charge-label { color: #6A7280; }
.lf-charge-amount { font-family: 'IBM Plex Mono', monospace; }

.lf-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0 18px;
}

.lf-total-label {
  font-weight: 600;
  font-size: 14px;
}

.lf-total-amount {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 20px;
  font-weight: 600;
}

.lf-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-top: 1px solid var(--lf-line-soft);
  background: #FbFcFd;
}

.lf-action-hint {
  font-size: 13px;
  color: var(--lf-muted);
}

.lf-action-buttons {
  display: flex;
  gap: 10px;
}

/* Loading State */
.lf-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--lf-muted);
}

/* Empty State (D365 Fluent) */
.lf-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--lf-faint);
}

.lf-empty-icon {
  font-size: 40px;
  opacity: 0.4;
  margin-bottom: 12px;
}

.lf-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--lf-muted);
  margin-bottom: 4px;
}

.lf-empty-text {
  font-size: 13px;
  color: var(--lf-faint);
}

/* Page Content (D365 Fluent) */
.lf-page {
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.lf-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.lf-page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--lf-ink);
}

.lf-page-subtitle {
  font-size: 14px;
  color: var(--lf-muted);
  margin-top: 4px;
}

/* Responsive */
@media (max-width: 1200px) {
  .lf-kpi-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .lf-dashboard-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .lf-sidebar {
    position: fixed;
    left: -256px;
    z-index: 1000;
    transition: left 0.3s;
  }

  .lf-sidebar.open {
    left: 0;
  }

  .lf-kpi-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Modal (D365 Fluent) */
.lf-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.lf-modal-content {
  background: #fff;
  border-radius: 3px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}

.lf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--lf-line);
}

.lf-modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.lf-modal-close {
  width: 28px;
  height: 28px;
  border-radius: 3px;
  border: none;
  background: var(--lf-surface-alt);
  cursor: pointer;
  font-size: 18px;
  color: var(--lf-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lf-modal-close:hover {
  background: var(--lf-line);
}

.lf-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--lf-line);
  background: #fbfcfd;
}

/* Form Elements */
.lf-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 22px;
}

.lf-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lf-form-group.full-width {
  grid-column: span 2;
}

.lf-form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #3c424c;
}

/* Inputs (D365 Fluent) */
.lf-input, .lf-select {
  padding: 8px 10px;
  border: 1px solid var(--lf-border-strong);
  border-radius: 2px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.1s;
}

.lf-input:focus, .lf-select:focus {
  outline: none;
  border-color: var(--lf-primary);
}

.lf-input::placeholder {
  color: var(--lf-faint);
}

textarea.lf-input {
  resize: vertical;
  min-height: 80px;
}

.lf-select {
  cursor: pointer;
}

/* Filters */
.lf-filters {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--lf-line);
  background: var(--lf-surface-alt);
}

.lf-filters .lf-input {
  flex: 1;
  max-width: 300px;
}

.lf-filters .lf-select {
  min-width: 150px;
}

/* Toast Notifications */
.lf-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--lf-ink);
  color: #fff;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  z-index: 3000;
}

.lf-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.lf-toast.success {
  background: var(--lf-active);
}

.lf-toast.error {
  background: var(--lf-danger);
}

/* Page Header with Back Link */
.lf-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--lf-primary);
  margin-bottom: 8px;
}

.lf-back-link::before {
  content: "←";
}

.lf-back-link:hover {
  text-decoration: underline;
}

.lf-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

/* Detail Grid */
.lf-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.lf-detail-grid .full-width {
  grid-column: span 2;
}

.lf-detail-rows {
  padding: 16px;
}

.lf-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--lf-line-row);
}

.lf-detail-row:last-child {
  border-bottom: none;
}

.lf-detail-label {
  font-size: 13px;
  color: var(--lf-muted);
}

.lf-detail-value {
  font-size: 14px;
  font-weight: 500;
}

/* List Items */
.lf-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--lf-line-row);
  cursor: pointer;
  transition: background 0.12s;
}

.lf-list-item:hover {
  background: #f8f9fb;
}

.lf-meta {
  font-size: 12px;
  color: var(--lf-muted);
  margin-top: 2px;
}

/* Reports */
.lf-reports-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.lf-report-card {
  background: #fff;
  border: 1px solid var(--lf-line);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.lf-report-card:hover {
  border-color: var(--lf-primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.lf-report-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.lf-report-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.lf-report-desc {
  font-size: 13px;
  color: var(--lf-muted);
}

/* Report Content */
.lf-report-content {
  padding: 20px;
}

.lf-stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.lf-stat-box {
  flex: 1;
  background: #f8f9fb;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.lf-stat-box.highlight {
  background: var(--lf-primary);
  color: #fff;
}

.lf-stat-box.danger {
  background: var(--lf-danger-bg);
  border: 1px solid #fecaca;
}

.lf-stat-box.warn {
  background: var(--lf-warn-bg);
  border: 1px solid #fde68a;
}

.lf-stat-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 24px;
  font-weight: 600;
}

.lf-stat-label {
  font-size: 12px;
  color: var(--lf-muted);
  margin-top: 4px;
}

.lf-stat-box.highlight .lf-stat-label {
  color: rgba(255, 255, 255, 0.8);
}

.lf-stat-percent {
  font-size: 12px;
  color: var(--lf-active);
  margin-top: 4px;
}

/* Charts */
.lf-chart-section {
  margin-top: 24px;
}

.lf-chart-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.lf-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lf-chart-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lf-chart-label {
  width: 120px;
  font-size: 13px;
  flex-shrink: 0;
}

.lf-chart-bar-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lf-chart-bar {
  height: 24px;
  border-radius: 4px;
  background: #e5e7eb;
  transition: width 0.3s ease;
}

.lf-chart-bar.active { background: var(--lf-active); }
.lf-chart-bar.warn { background: var(--lf-warn); }
.lf-chart-bar.danger { background: var(--lf-danger); }
.lf-chart-bar.rented { background: var(--lf-rented); }
.lf-chart-bar.fuel { background: var(--lf-primary); }

.lf-chart-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--lf-muted);
  min-width: 60px;
}

/* Consumption List */
.lf-consumption-list {
  padding: 10px 0;
}

.lf-consumption-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--lf-line-row);
}

.lf-consumption-bar-wrapper {
  flex: 1;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.lf-consumption-bar {
  height: 100%;
  background: var(--lf-primary);
  border-radius: 4px;
}

/* Document Alert Sections */
.lf-alert-section {
  margin-top: 20px;
  padding: 16px;
  border-radius: 10px;
  background: #f8f9fb;
}

.lf-alert-section.danger {
  background: var(--lf-danger-bg);
  border: 1px solid #fecaca;
}

.lf-alert-section.warn {
  background: var(--lf-warn-bg);
  border: 1px solid #fde68a;
}

.lf-alert-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.lf-doc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lf-doc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
}

.lf-danger-text { color: var(--lf-danger); font-weight: 600; }
.lf-warn-text { color: var(--lf-warn); font-weight: 600; }

/* ============================================
   NEW GROUPED NAVIGATION STYLES
   ============================================ */

/* Updated Layout */
.lf-main-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar styles moved to D365 section above */

/* Navigation Groups */
.lf-nav {
  padding: 10px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lf-nav-group {
  margin-top: 2px;
}

.lf-nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--lf-muted);
  transition: color 0.1s;
}

.lf-nav-group-header:hover {
  color: var(--lf-ink);
}

.lf-nav-group-label {
  font-family: var(--lf-font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lf-faint);
}

.lf-nav-caret {
  display: flex;
  transition: transform 0.15s;
  color: var(--lf-faint);
}

.lf-nav-group.collapsed .lf-nav-caret {
  transform: rotate(-90deg);
}

.lf-nav-group-items {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 2px;
  overflow: hidden;
  max-height: 1000px;
  transition: max-height 0.2s ease-out, opacity 0.15s;
}

.lf-nav-group.collapsed .lf-nav-group-items {
  max-height: 0;
  opacity: 0;
}

/* Nav Links (D365 Fluent) */
.lf-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 2px;
  font-size: 13px;
  cursor: pointer;
  color: var(--lf-muted);
  background: transparent;
  transition: background 0.1s, color 0.1s;
}

.lf-nav-link:hover {
  background: var(--lf-surface-alt);
  color: var(--lf-ink);
}

.lf-nav-link.active {
  background: var(--lf-primary-soft);
  color: var(--lf-primary);
  font-weight: 600;
}

.lf-nav-link.active .lf-nav-dot {
  background: var(--lf-primary);
}

.lf-nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--lf-ghost);
  flex: none;
}

/* Topbar */
.lf-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 58px;
  background: rgba(245, 246, 248, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #E3E6EA;
  flex: none;
}

.lf-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.lf-breadcrumb-group {
  color: #9AA1AC;
}

.lf-breadcrumb-sep {
  color: #C5CAD1;
}

.lf-breadcrumb-page {
  font-weight: 600;
}

.lf-topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lf-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #E3E6EA;
  border-radius: 8px;
  padding: 7px 12px;
  width: 220px;
}

.lf-search-box input {
  border: none;
  outline: none;
  font-size: 12.5px;
  color: var(--lf-ink);
  background: transparent;
  flex: 1;
}

.lf-search-box input::placeholder {
  color: #B6BCC4;
}

.lf-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #2457E6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* Main content area */
.lf-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  background: var(--lf-canvas);
  padding: 0;
}

/* Page Header Styles */
.lf-page-header-flex {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.lf-page-header-content {
  max-width: 680px;
}

.lf-page-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lf-page-kind {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: #2457E6;
  background: #EAF0FF;
  padding: 4px 9px;
  border-radius: 6px;
}

.lf-page-doctype {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #6B4FD8;
  background: #F4F1FC;
  padding: 4px 9px;
  border-radius: 6px;
}

.lf-page-actions {
  display: flex;
  gap: 9px;
}

/* Kanban Board Styles */
.lf-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.lf-board-column {
  background: #F1F3F6;
  border: 1px solid #E3E6EA;
  border-radius: 12px;
  padding: 12px;
  min-height: 300px;
}

.lf-board-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.lf-board-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.lf-board-title {
  font-size: 13px;
  font-weight: 600;
}

.lf-board-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #9AA1AC;
  margin-left: auto;
}

.lf-board-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lf-board-card {
  background: #fff;
  border: 1px solid #E3E6EA;
  border-radius: 9px;
  padding: 12px;
  cursor: pointer;
  transition: box-shadow 0.12s;
}

.lf-board-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.lf-board-card-title {
  font-size: 13px;
  font-weight: 500;
}

.lf-board-card-meta {
  font-size: 12px;
  color: #9AA1AC;
  margin-top: 4px;
}

/* Map View Styles */
.lf-map-view {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 16px;
  margin-top: 22px;
}

.lf-map-container {
  background: #fff;
  border: 1px solid #E3E6EA;
  border-radius: 12px;
  overflow: hidden;
}

.lf-map-fullsize {
  position: relative;
  height: 400px;
  background: linear-gradient(#EEF1F5, #E7EBF0);
}

.lf-vehicle-list-panel {
  background: #fff;
  border: 1px solid #E3E6EA;
  border-radius: 12px;
  padding: 0;
  max-height: 460px;
  overflow-y: auto;
}

.lf-vehicle-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid #F2F4F6;
  cursor: pointer;
  transition: background 0.12s;
}

.lf-vehicle-list-item:hover {
  background: #F8F9FB;
}

.lf-vehicle-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.lf-vehicle-status-dot.moving { background: #138A4E; }
.lf-vehicle-status-dot.idle { background: #C2710C; }
.lf-vehicle-status-dot.offline { background: #9AA1AC; }

/* Playback Controls */
.lf-playback-controls {
  background: var(--lf-surface-alt);
  border-top: 1px solid var(--lf-line);
  padding: 16px 20px;
}

.lf-playback-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.lf-playback-progress input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--lf-line);
  border-radius: 3px;
  cursor: pointer;
}

.lf-playback-progress input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--lf-primary);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.lf-playback-progress input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--lf-primary);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.lf-playback-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lf-playback-buttons .lf-btn {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lf-playback-buttons #play-pause-btn {
  padding: 10px 16px;
}

/* Dark mode playback */
[data-theme="dark"] .lf-playback-controls {
  background: var(--lf-surface);
  border-top-color: var(--lf-line);
}

[data-theme="dark"] .lf-playback-progress input[type="range"] {
  background: var(--lf-line);
}

/* Dark mode meter */
[data-theme="dark"] .lf-meter {
  background: var(--lf-surface);
}

/* Dark mode cards */
[data-theme="dark"] .lf-card {
  background: var(--lf-surface);
  border-color: var(--lf-line);
}

/* Dark mode report cards */
[data-theme="dark"] .lf-report-card {
  background: var(--lf-surface);
  border-color: var(--lf-line);
}

[data-theme="dark"] .lf-report-card:hover {
  border-color: var(--lf-primary);
  box-shadow: 0 4px 12px rgba(36, 87, 230, 0.2);
}

/* Dark mode stat boxes */
[data-theme="dark"] .lf-stat-box {
  background: var(--lf-surface-alt);
  border-color: var(--lf-line);
}

/* Dark mode alert sections */
[data-theme="dark"] .lf-alert-section {
  background: var(--lf-surface-alt);
  border-color: var(--lf-line);
}

/* Dark mode report hub items */
[data-theme="dark"] .lf-report-hub-item {
  background: var(--lf-surface);
  border-color: var(--lf-line);
}

/* Dark mode board */
[data-theme="dark"] .lf-board-column {
  background: var(--lf-surface-alt);
  border-color: var(--lf-line);
}

[data-theme="dark"] .lf-board-card {
  background: var(--lf-surface);
  border-color: var(--lf-line);
}

[data-theme="dark"] .lf-board-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Drag and drop styles */
.lf-board-card.dragging {
  opacity: 0.5;
  transform: rotate(3deg);
}

.lf-board-column.drag-over {
  background: rgba(36, 87, 230, 0.08);
  border-color: var(--lf-primary);
}

[data-theme="dark"] .lf-board-column.drag-over {
  background: rgba(36, 87, 230, 0.15);
}

/* Settings Cards Grid */
.lf-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.lf-settings-card {
  background: #fff;
  border: 1px solid #E3E6EA;
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.12s;
}

.lf-settings-card:hover {
  border-color: var(--lf-primary);
}

.lf-settings-card-title {
  font-size: 14.5px;
  font-weight: 600;
}

.lf-settings-card-desc {
  font-size: 12.5px;
  color: #8A919C;
  margin-top: 5px;
  line-height: 1.5;
}

/* Report Hub Grid */
.lf-report-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.lf-report-hub-item {
  background: #fff;
  border: 1px solid #E3E6EA;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.lf-report-hub-item:hover {
  border-color: var(--lf-primary);
  box-shadow: 0 2px 8px rgba(36, 87, 230, 0.1);
}

.lf-report-hub-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #2457E6;
}

.lf-report-hub-label {
  font-size: 13.5px;
  font-weight: 500;
}

/* Key Elements Section */
.lf-key-elements {
  margin-top: 26px;
}

.lf-key-elements-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9AA1AC;
  margin-bottom: 12px;
}

.lf-key-elements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.lf-key-element {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #E3E6EA;
  border-radius: 10px;
  padding: 13px 15px;
}

.lf-key-element-icon {
  color: #138A4E;
  display: inline-flex;
}

.lf-key-element-text {
  font-size: 13.5px;
  color: #3C424C;
}

/* Scrollbar Styling */
.lf-sidebar::-webkit-scrollbar { width: 10px; height: 10px; }
.lf-sidebar::-webkit-scrollbar-thumb { background: var(--lf-border-strong); border-radius: 8px; border: 3px solid #fff; }
.lf-main::-webkit-scrollbar { width: 10px; height: 10px; }
.lf-main::-webkit-scrollbar-thumb { background: var(--lf-border-strong); border-radius: 8px; border: 3px solid var(--lf-canvas); }

/* Responsive adjustments */
@media (max-width: 900px) {
  .lf-reports-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lf-detail-grid {
    grid-template-columns: 1fr;
  }

  .lf-detail-grid .full-width {
    grid-column: span 1;
  }

  .lf-stats-row {
    flex-wrap: wrap;
  }

  .lf-stat-box {
    min-width: calc(50% - 8px);
  }

  .lf-form-grid {
    grid-template-columns: 1fr;
  }

  .lf-form-group.full-width {
    grid-column: span 1;
  }

  .lf-map-view {
    grid-template-columns: 1fr;
  }

  .lf-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .lf-sidebar {
    position: fixed;
    left: -264px;
    z-index: 1000;
    transition: left 0.3s;
  }

  .lf-sidebar.open {
    left: 0;
  }

  .lf-topbar {
    padding: 0 16px;
  }

  .lf-search-box {
    width: 160px;
  }
}

/* ============================================================
   Command Palette / Global Search
   ============================================================ */
/* Command Palette (D365 Fluent) */
.lf-command-palette {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.lf-command-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.lf-command-dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: var(--lf-surface);
  border: 1px solid var(--lf-line);
  border-radius: 3px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.22);
  overflow: hidden;
}

.lf-command-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--lf-line);
}

.lf-command-icon {
  color: var(--lf-faint);
  flex-shrink: 0;
}

.lf-command-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: var(--lf-font-sans);
  background: transparent;
  color: var(--lf-ink);
}

.lf-command-input::placeholder {
  color: var(--lf-ghost);
}

.lf-command-kbd,
.lf-search-kbd {
  font-family: var(--lf-font-mono);
  font-size: 10px;
  padding: 2px 5px;
  background: var(--lf-surface-alt);
  border: 1px solid var(--lf-line);
  border-radius: 2px;
  color: var(--lf-faint);
}

.lf-search-kbd {
  margin-left: auto;
}

.lf-command-results {
  max-height: 360px;
  overflow-y: auto;
}

.lf-command-group-label {
  padding: 10px 16px 4px;
  font-family: var(--lf-font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lf-faint);
}

.lf-command-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.08s;
}

.lf-command-item:hover,
.lf-command-item.selected {
  background: var(--lf-surface-alt);
}

.lf-command-item-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lf-primary-soft);
  border-radius: 2px;
  font-size: 12px;
  color: var(--lf-primary);
}

.lf-command-item-text {
  flex: 1;
  min-width: 0;
}

.lf-command-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--lf-ink);
}

.lf-command-item-meta {
  font-size: 12px;
  color: var(--lf-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lf-command-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--lf-muted);
}

.lf-command-loading {
  padding: 20px;
  text-align: center;
  color: var(--lf-muted);
  font-size: 13px;
}

/* ============================================================
   Theme Toggle Button
   ============================================================ */
.lf-theme-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--lf-line);
  border-radius: var(--lf-radius-md);
  background: var(--lf-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lf-muted);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.lf-theme-toggle:hover {
  background: var(--lf-surface-alt);
  color: var(--lf-ink);
  border-color: var(--lf-border-strong);
}

/* ============================================================
   Keyboard Navigation
   ============================================================ */
.lf-keyboard-selected {
  outline: 2px solid var(--lf-primary) !important;
  outline-offset: -2px;
  background: var(--lf-primary-soft) !important;
}

kbd {
  font-family: var(--lf-font-mono);
  font-size: 12px;
  padding: 3px 7px;
  background: var(--lf-surface-alt);
  border: 1px solid var(--lf-line);
  border-radius: 4px;
  color: var(--lf-text);
  box-shadow: 0 1px 0 var(--lf-border-strong);
}

/* ============================================================
   Export Menu
   ============================================================ */
.lf-export-menu {
  position: fixed;
  background: var(--lf-surface);
  border: 1px solid var(--lf-line);
  border-radius: var(--lf-radius-md);
  box-shadow: var(--lf-shadow-lg);
  overflow: hidden;
  z-index: 1000;
  min-width: 170px;
}

.lf-export-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.1s;
  color: var(--lf-text);
}

.lf-export-menu-item:hover {
  background: var(--lf-surface-alt);
}

/* ============================================================
   Shortcuts Help Modal
   ============================================================ */
.lf-shortcuts-table {
  width: 100%;
  border-collapse: collapse;
}

.lf-shortcuts-table td {
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--lf-line-soft);
}

.lf-shortcuts-table td:first-child {
  width: 140px;
  color: var(--lf-muted);
}

.lf-shortcuts-table tr:last-child td {
  border-bottom: none;
}

/* ============================================================
   Customer Portal Styles
   ============================================================ */

/* Portal Navigation Highlight */
.lf-nav-group-highlight {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.lf-nav-group-highlight .lf-nav-group-label {
  color: var(--lf-primary);
}

/* Customer Portal Grid */
.lf-customer-portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.lf-portal-card {
  background: var(--lf-surface);
  border: 1px solid var(--lf-line);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.lf-portal-card:hover {
  border-color: var(--lf-primary);
  box-shadow: 0 4px 16px rgba(36, 87, 230, 0.1);
  transform: translateY(-2px);
}

.lf-portal-card-icon {
  width: 56px;
  height: 56px;
  background: var(--lf-primary-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--lf-primary);
}

.lf-portal-card-content {
  flex: 1;
}

.lf-portal-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--lf-ink);
  margin-bottom: 4px;
}

.lf-portal-card-desc {
  font-size: 13px;
  color: var(--lf-muted);
  line-height: 1.4;
}

.lf-portal-card-arrow {
  font-size: 20px;
  color: var(--lf-muted);
  transition: transform 0.15s, color 0.15s;
}

.lf-portal-card:hover .lf-portal-card-arrow {
  transform: translateX(4px);
  color: var(--lf-primary);
}

/* Activity List */
.lf-activity-list {
  display: flex;
  flex-direction: column;
}

.lf-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--lf-line-soft);
}

.lf-activity-item:last-child {
  border-bottom: none;
}

.lf-activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: var(--lf-surface-alt);
}

.lf-activity-icon.invoice { background: var(--lf-primary-soft); }
.lf-activity-icon.toll { background: var(--lf-warn-bg); }
.lf-activity-icon.fine { background: var(--lf-danger-bg); }
.lf-activity-icon.payment { background: var(--lf-active-bg); }

.lf-activity-content {
  flex: 1;
}

.lf-activity-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--lf-ink);
}

.lf-activity-meta {
  font-size: 12px;
  color: var(--lf-muted);
  margin-top: 2px;
}

.lf-activity-time {
  font-size: 12px;
  color: var(--lf-subtle);
  flex-shrink: 0;
}

/* Dark mode for customer portal */
[data-theme="dark"] .lf-portal-card {
  background: var(--lf-surface);
  border-color: var(--lf-line);
}

[data-theme="dark"] .lf-portal-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .lf-portal-card-icon {
  background: rgba(36, 87, 230, 0.15);
}

[data-theme="dark"] .lf-activity-icon {
  background: var(--lf-surface-alt);
}

/* ============================================================
   Toast Notifications
   ============================================================ */

.lf-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--lf-surface);
  border: 1px solid var(--lf-line);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 10000;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  max-width: 380px;
}

.lf-toast.show {
  transform: translateX(0);
}

.lf-toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lf-toast-content {
  flex: 1;
  min-width: 0;
}

.lf-toast-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--lf-text);
  margin-bottom: 2px;
}

.lf-toast-message {
  font-size: 13px;
  color: var(--lf-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lf-toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--lf-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.lf-toast-close:hover {
  color: var(--lf-text);
}

/* ============================================================
   Enhanced Dashboard Styles
   ============================================================ */

.lf-dashboard-activity {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lf-activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--lf-line);
}

.lf-activity-item:last-child {
  border-bottom: none;
}

.lf-activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lf-activity-content {
  flex: 1;
  min-width: 0;
}

.lf-activity-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--lf-text);
}

.lf-activity-meta {
  font-size: 12px;
  color: var(--lf-muted);
}

.lf-activity-time {
  font-size: 11px;
  color: var(--lf-muted);
  font-family: var(--lf-font-mono);
}

/* Live Status Indicator */
.lf-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #138A4E;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lf-live-dot {
  width: 8px;
  height: 8px;
  background: #138A4E;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

/* Reservation Card */
.lf-reservation-card {
  background: var(--lf-surface);
  border: 1px solid var(--lf-line);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  transition: all 0.2s;
}

.lf-reservation-card:hover {
  border-color: var(--lf-primary);
  box-shadow: 0 4px 12px rgba(36, 87, 230, 0.08);
}

.lf-reservation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.lf-reservation-id {
  font-family: var(--lf-font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--lf-primary);
}

.lf-reservation-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.lf-reservation-status.confirmed {
  background: rgba(19, 138, 78, 0.1);
  color: #138A4E;
}

.lf-reservation-status.in-progress {
  background: rgba(14, 124, 134, 0.1);
  color: #0E7C86;
}

.lf-reservation-status.completed {
  background: rgba(107, 114, 128, 0.1);
  color: #6B7280;
}

.lf-reservation-customer {
  font-size: 14px;
  font-weight: 500;
  color: var(--lf-text);
  margin-bottom: 4px;
}

.lf-reservation-vehicle {
  font-size: 13px;
  color: var(--lf-muted);
}

.lf-reservation-dates {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--lf-line);
  font-size: 12px;
}

.lf-reservation-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lf-reservation-date-label {
  color: var(--lf-muted);
  font-size: 11px;
  text-transform: uppercase;
}

.lf-reservation-date-value {
  font-weight: 500;
  color: var(--lf-text);
}

/* Quick Action Buttons */
.lf-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.lf-quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--lf-surface-alt);
  border: 1px solid var(--lf-line);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.lf-quick-action:hover {
  border-color: var(--lf-primary);
  background: rgba(36, 87, 230, 0.04);
}

.lf-quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lf-primary);
  color: #fff;
}

.lf-quick-action-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--lf-text);
  text-align: center;
}

/* ============================================================
   FLEET4 DESIGN - My Day Action Center
   ============================================================ */

/* SLA Chips (D365 Fluent) */
.lf-sla,
.lf-sla-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--lf-font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 2px;
  white-space: nowrap;
}

.lf-sla.breach { background: #fde7e9; color: #a4262c; font-weight: 700; }
.lf-sla.soon { background: #fff4ce; color: #7a5a00; }
.lf-sla.ok { background: #eff6fc; color: #0078D4; }
.lf-sla.done { background: #dff6dd; color: #0b6a0b; }
.lf-sla.idle { background: #f3f2f1; color: #605e5c; }

/* Type Chips (D365 Fluent) */
.lf-chip,
.lf-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 2px;
  white-space: nowrap;
}

.lf-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.lf-chip.maintenance { background: #fff4ce; color: #7a5a00; }
.lf-chip.maintenance .lf-chip-dot { background: #7a5a00; }
.lf-chip.compliance { background: #f3e8f3; color: #742774; }
.lf-chip.compliance .lf-chip-dot { background: #742774; }
.lf-chip.rental { background: #e0f2f1; color: #0E7C86; }
.lf-chip.rental .lf-chip-dot { background: #0E7C86; }
.lf-chip.inspection { background: #dff6dd; color: #0b6a0b; }
.lf-chip.inspection .lf-chip-dot { background: #0b6a0b; }
.lf-chip.fines { background: #fde7e9; color: #a4262c; }
.lf-chip.fines .lf-chip-dot { background: #a4262c; }
.lf-chip.trip { background: #eff6fc; color: #0078D4; }
.lf-chip.trip .lf-chip-dot { background: #0078D4; }

/* Owner Avatar */
.lf-owner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.lf-avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.lf-owner-name {
  font-size: 12px;
  color: #3C424C;
}

/* Assurance Banner (D365 Fluent) */
.lf-assurance-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: 3px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.lf-assurance-banner.breach {
  background: #fde7e9;
  border: 1px solid #f0c9c7;
}

.lf-assurance-banner.ok {
  background: #dff6dd;
  border: 1px solid #bfe3c0;
}

.lf-assurance-icon {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.lf-assurance-icon.danger { background: #a4262c; }
.lf-assurance-icon.success { background: #0b6a0b; }

.lf-assurance-content {
  flex: 1;
}

.lf-assurance-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--lf-ink);
}

.lf-assurance-sub {
  font-size: 13px;
  color: #6A7280;
  margin-top: 2px;
}

.lf-assurance-stats {
  display: flex;
  gap: 26px;
  text-align: center;
}

.lf-assurance-stat-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.lf-assurance-stat-label {
  font-size: 11px;
  color: #6A7280;
  margin-top: 4px;
}

/* My Day Header */
.lf-myday-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.lf-myday-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

.lf-myday-subtitle {
  font-size: 13px;
  color: #6A7280;
  margin-left: 12px;
}

/* My Day Layout */
.lf-myday-layout {
  display: grid;
  grid-template-columns: 1fr 296px;
  gap: 12px;
  align-items: start;
}

.lf-myday-worklist {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lf-myday-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Worklist Band */
.lf-band {
  background: #fff;
  border: 1px solid #E1E4E9;
  border-radius: 12px;
  overflow: hidden;
}

.lf-band-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid #EEF0F3;
}

.lf-band-header.overdue { background: #FFF7F6; }
.lf-band-header.due-today { background: #FFFCF5; }
.lf-band-header.due-week { background: #F7FAFF; }

.lf-band-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex-shrink: 0;
}

.lf-band-title {
  font-size: 13px;
  font-weight: 600;
}

.lf-band-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  background: #fff;
  border: 1px solid;
  padding: 1px 7px;
  border-radius: 999px;
}

.lf-band-rule {
  font-size: 11.5px;
  color: #8A919C;
  margin-left: 6px;
}

/* Task Row */
.lf-task-row {
  display: grid;
  grid-template-columns: 128px 1fr 150px 120px;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid #F3F5F7;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.12s;
}

.lf-task-row:hover {
  background: #F2F6FF;
}

.lf-task-row:last-child {
  border-bottom: none;
}

.lf-task-row.accent-red { border-left-color: #C5362F; }
.lf-task-row.accent-amber { border-left-color: #C2710C; }
.lf-task-row.accent-blue { border-left-color: #2457E6; }

.lf-task-main {
  min-width: 0;
}

.lf-task-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #15171C;
}

.lf-task-detail {
  font-size: 12px;
  color: #6A7280;
  margin-top: 1px;
}

.lf-task-plate {
  font-family: 'IBM Plex Mono', monospace;
  color: #2457E6;
}

.lf-task-cta {
  font-size: 12px;
  font-weight: 500;
  color: #15171C;
  background: #fff;
  border: 1px solid #D4D8DE;
  padding: 6px 11px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.12s;
}

.lf-task-cta:hover {
  background: #EAF0FF;
  border-color: #9EBBF5;
}

/* Approvals Panel */
.lf-approvals {
  background: #fff;
  border: 1px solid #E1E4E9;
  border-radius: 12px;
  overflow: hidden;
}

.lf-approvals-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 1px solid #EEF0F3;
}

.lf-approvals-header-icon {
  color: #2457E6;
}

.lf-approvals-title {
  font-size: 13px;
  font-weight: 600;
}

.lf-approvals-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #C5362F;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: auto;
}

.lf-approval-item {
  padding: 11px 16px;
  border-bottom: 1px solid #F3F5F7;
}

.lf-approval-item:last-child {
  border-bottom: none;
}

.lf-approval-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lf-approval-title-icon {
  color: #2457E6;
}

.lf-approval-title-text {
  font-size: 12.5px;
  font-weight: 600;
  color: #15171C;
}

.lf-approval-desc {
  font-size: 11.5px;
  color: #6A7280;
  margin: 5px 0 9px;
}

.lf-approval-actions {
  display: flex;
  gap: 7px;
}

.lf-approval-btn {
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.lf-approval-btn.approve {
  background: #2457E6;
  color: #fff;
}

.lf-approval-btn.reject {
  background: #fff;
  color: #C5362F;
  border: 1px solid #F0C9C7;
}

.lf-approvals-footer {
  padding: 9px 16px;
  font-size: 11px;
  color: #8A919C;
  border-top: 1px solid #EEF0F3;
}

/* Guardrails Panel */
.lf-guardrails {
  background: #fff;
  border: 1px solid #E1E4E9;
  border-radius: 12px;
  padding: 16px;
}

.lf-guardrails-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

.lf-guardrail-item {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #F3F5F7;
}

.lf-guardrail-item:last-child {
  border-bottom: none;
}

.lf-guardrail-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.lf-guardrail-text h4 {
  font-size: 12.5px;
  font-weight: 600;
  color: #15171C;
  margin: 0;
}

.lf-guardrail-text p {
  font-size: 11.5px;
  color: #6A7280;
  margin: 1px 0 0;
  line-height: 1.45;
}

/* Coverage Panel */
.lf-coverage {
  background: #fff;
  border: 1px solid #E1E4E9;
  border-radius: 12px;
  padding: 16px;
}

.lf-coverage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.lf-coverage-title {
  font-size: 13px;
  font-weight: 600;
}

.lf-coverage-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.lf-coverage-badge.ok { background: #E5F4EC; color: #138A4E; }
.lf-coverage-badge.warn { background: #FBF1E0; color: #C2710C; }

.lf-coverage-stats {
  display: flex;
  gap: 1px;
  background: #EEF0F3;
  border: 1px solid #EEF0F3;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 13px;
}

.lf-coverage-stat {
  flex: 1;
  background: #fff;
  padding: 8px 10px;
}

.lf-coverage-stat-label {
  font-size: 10px;
  color: #8A919C;
}

.lf-coverage-stat-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  font-weight: 600;
}

.lf-coverage-stat-value.green { color: #138A4E; }
.lf-coverage-stat-value.amber { color: #C2710C; }

.lf-coverage-section-label {
  font-size: 10.5px;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9AA1AC;
  margin-bottom: 6px;
}

.lf-coverage-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}

.lf-coverage-person-name {
  font-size: 12.5px;
  flex: 1;
  color: #3C424C;
}

.lf-coverage-person-load {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: #6A7280;
}

.lf-coverage-bar {
  width: 54px;
  height: 6px;
  background: #EEF0F3;
  border-radius: 999px;
  overflow: hidden;
}

.lf-coverage-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.lf-coverage-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #F3F5F7;
  font-size: 11.5px;
  color: #6A7280;
  line-height: 1.5;
}

.lf-coverage-note strong {
  color: #C2710C;
}

/* KPI Strip Improvements */
.lf-kpi-strip-new {
  display: grid;
  gap: 1px;
  background: #E1E4E9;
  border: 1px solid #E1E4E9;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}

.lf-kpi-new {
  background: #fff;
  padding: 12px 15px;
  cursor: pointer;
  transition: background 0.12s;
}

.lf-kpi-new:hover {
  background: #F8FAFC;
}

.lf-kpi-new-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lf-kpi-new-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.lf-kpi-new-label {
  font-size: 11.5px;
  color: #6A7280;
}

.lf-kpi-new-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 5px;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .lf-assurance-banner.breach {
  background: rgba(197, 54, 47, 0.12);
  border-color: rgba(197, 54, 47, 0.3);
}

[data-theme="dark"] .lf-assurance-banner.ok {
  background: rgba(19, 138, 78, 0.12);
  border-color: rgba(19, 138, 78, 0.3);
}

[data-theme="dark"] .lf-assurance-title,
[data-theme="dark"] .lf-myday-title {
  color: var(--lf-ink);
}

[data-theme="dark"] .lf-band,
[data-theme="dark"] .lf-approvals,
[data-theme="dark"] .lf-guardrails,
[data-theme="dark"] .lf-coverage {
  background: var(--lf-surface);
  border-color: var(--lf-line);
}

[data-theme="dark"] .lf-band-header.overdue {
  background: rgba(197, 54, 47, 0.1);
}

[data-theme="dark"] .lf-band-header.due-today {
  background: rgba(194, 113, 12, 0.1);
}

[data-theme="dark"] .lf-band-header.due-week {
  background: rgba(36, 87, 230, 0.1);
}

[data-theme="dark"] .lf-task-row:hover {
  background: rgba(36, 87, 230, 0.08);
}

[data-theme="dark"] .lf-task-name {
  color: var(--lf-ink);
}

[data-theme="dark"] .lf-task-cta {
  background: var(--lf-surface-alt);
  border-color: var(--lf-line);
  color: var(--lf-text);
}

[data-theme="dark"] .lf-kpi-new {
  background: var(--lf-surface);
}

[data-theme="dark"] .lf-kpi-new:hover {
  background: var(--lf-surface-alt);
}

/* Responsive */
@media (max-width: 1100px) {
  .lf-myday-layout {
    grid-template-columns: 1fr;
  }

  .lf-myday-rail {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .lf-task-row {
    grid-template-columns: 100px 1fr 120px 100px;
  }
}

@media (max-width: 768px) {
  .lf-myday-rail {
    grid-template-columns: 1fr;
  }

  .lf-task-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .lf-assurance-stats {
    flex-direction: column;
    gap: 8px;
  }
}

/* ========================================
   RECORD VIEW
======================================== */
.lf-record-view {
  min-height: 100vh;
  background: var(--lf-canvas);
}

.lf-record-cmdbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid var(--lf-border);
}

.lf-cmdbar-divider {
  width: 1px;
  height: 18px;
  background: var(--lf-border);
  margin: 0 6px;
}

.lf-record-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.lf-record-doctype {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #8A919C;
}

.lf-record-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 3px;
}

.lf-record-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 0;
}

/* Vehicle id shown muted beside the plate in linked list cells */
.lf-vlabel-id {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--lf-text-muted, #9098a3);
  margin-left: 4px;
}

/* Secondary record id (docname / join key) shown beside the plate */
.lf-record-id {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--lf-text-muted, #6b7280);
  background: var(--lf-surface-alt, #f3f4f6);
  border: 1px solid var(--lf-line, #e5e7eb);
  border-radius: 6px;
  padding: 2px 7px;
}

.lf-record-subtitle {
  font-size: 13px;
  color: #6A7280;
  margin-top: 6px;
}

.lf-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
}

.lf-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
}

.lf-record-header-facts {
  display: flex;
  gap: 1px;
  background: var(--lf-border);
  border: 1px solid var(--lf-border);
  border-radius: 10px;
  overflow: hidden;
}

.lf-header-fact {
  background: #fff;
  padding: 10px 16px;
  min-width: 96px;
}

.lf-header-fact-label {
  font-size: 11px;
  color: #8A919C;
}

.lf-header-fact-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  font-weight: 600;
  margin-top: 3px;
}

/* RACI Chips */
.lf-raci-chips {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  flex-wrap: wrap;
}

.lf-raci-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #9AA1AC;
  margin-right: 2px;
}

.lf-raci-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--lf-border);
  border-radius: 999px;
  padding: 3px 11px 3px 4px;
}

.lf-raci-role {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 700;
}

.lf-raci-name {
  font-size: 12px;
  color: #3C424C;
}

/* ========================================
   BUSINESS PROCESS FLOW (BPF)
======================================== */
.lf-bpf {
  background: #fff;
  border: 1px solid var(--lf-border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
}

.lf-bpf-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-bottom: 1px solid #EEF0F3;
}

.lf-bpf-title {
  font-size: 13px;
  font-weight: 600;
}

.lf-bpf-meta {
  font-size: 11.5px;
  color: #8A919C;
  margin-left: 4px;
}

.lf-bpf-stages {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: #F7F8FA;
}

.lf-bpf-stage {
  position: relative;
  flex: 1;
  padding: 13px 14px 13px 26px;
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 50%, calc(100% - 13px) 100%, 0 100%, 13px 50%);
  margin-right: -9px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.lf-bpf-stage:first-child {
  padding-left: 14px;
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 50%, calc(100% - 13px) 100%, 0 100%);
}

.lf-bpf-mark {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex: none;
}

.lf-bpf-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.lf-bpf-panel {
  padding: 16px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}

.lf-bpf-panel-left {
  min-width: 0;
}

.lf-bpf-panel-right {
  border-left: 1px solid #EEF0F3;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
}

.lf-bpf-panel-title {
  font-size: 12px;
  font-weight: 600;
  color: #2457E6;
  margin-bottom: 12px;
}

/* SOP Required Reading */
.lf-sop-required {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F7FAFF;
  border: 1px solid #CFE0FF;
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 12px;
}

.lf-sop-title {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: #15306E;
}

.lf-sop-ack {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #138A4E;
  background: #E5F4EC;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
}

.lf-sop-ack:hover {
  background: #D1EDE0;
}

.lf-stage-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lf-stage-field label {
  font-size: 11px;
  color: #8A919C;
  margin-bottom: 4px;
  display: block;
}

.lf-stage-field-value {
  background: #F7F8FA;
  border: 1px solid var(--lf-border);
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 13px;
}

/* Checklist */
.lf-checklist-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.lf-checklist-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
  font-size: 12.5px;
}

.lf-checklist-item.done {
  color: #138A4E;
}

.lf-checklist-item.pending {
  color: #9AA1AC;
}

.lf-advance-hint {
  font-size: 11px;
  color: #C2710C;
  margin-top: auto;
  margin-bottom: 7px;
  padding-top: 14px;
}

.lf-btn.advance {
  width: 100%;
  justify-content: center;
}

.lf-btn.advance.disabled {
  background: #9FB4D8;
  cursor: not-allowed;
}

/* ========================================
   RECORD TABS
======================================== */
.lf-record-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--lf-border);
  padding: 0 2px;
  margin-top: 18px;
}

.lf-record-tab {
  font-size: 13px;
  padding: 9px 0;
  color: #6A7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.lf-record-tab:hover {
  color: var(--lf-ink);
}

.lf-record-tab.active {
  color: var(--lf-ink);
  font-weight: 600;
  border-bottom-color: var(--lf-primary);
}

.lf-record-tab-content {
  margin-top: 18px;
}

.lf-summary-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  align-items: start;
}

.lf-summary-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Followups */
.lf-followup-list {
  border-top: 1px solid #EEF0F3;
}

.lf-followup-row {
  display: grid;
  grid-template-columns: 100px 1fr 100px;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid #F3F5F7;
  border-left: 3px solid #2457E6;
}

.lf-followup-task {
  font-size: 13px;
  font-weight: 600;
}

.lf-followup-detail {
  font-size: 11.5px;
  color: #6A7280;
  margin-top: 1px;
}

.lf-followup-owner {
  font-size: 12px;
  color: #6A7280;
  text-align: right;
}

/* Details Grid */
.lf-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px 20px;
}

.lf-detail-label {
  font-size: 11px;
  color: #8A919C;
}

.lf-detail-value {
  font-size: 13.5px;
  font-weight: 500;
  margin-top: 3px;
}

/* Timeline */
.lf-timeline {
  display: flex;
  flex-direction: column;
}

.lf-timeline-item {
  display: flex;
  gap: 11px;
  padding-bottom: 14px;
  position: relative;
}

.lf-timeline-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  margin-top: 3px;
  flex: none;
}

.lf-timeline-line {
  position: absolute;
  left: 4px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: #EEF0F3;
}

.lf-timeline-item:last-child .lf-timeline-line {
  display: none;
}

.lf-timeline-content {
  flex: 1;
  min-width: 0;
}

.lf-timeline-text {
  font-size: 12.5px;
  color: var(--lf-ink);
}

.lf-timeline-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: #9AA1AC;
  margin-top: 2px;
}

/* ========================================
   RACI TAB
======================================== */
.lf-raci-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #EEF0F3;
}

.lf-raci-card {
  background: #fff;
  padding: 14px 16px;
}

.lf-raci-card-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 11px;
}

.lf-raci-key {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 700;
}

.lf-raci-role-name {
  font-size: 13px;
  font-weight: 600;
}

.lf-raci-person {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lf-raci-person-name {
  font-size: 12.5px;
  font-weight: 500;
}

.lf-raci-person-title {
  font-size: 11px;
  color: #8A919C;
}

.lf-raci-note {
  font-size: 11px;
  color: #8A919C;
  margin-top: 8px;
  line-height: 1.45;
}

/* RACI Matrix */
.lf-matrix-title {
  font-size: 12px;
  font-weight: 600;
  color: #6A7280;
  margin-bottom: 10px;
}

.lf-raci-matrix {
  border: 1px solid #EEF0F3;
  border-radius: 9px;
  overflow: hidden;
}

.lf-matrix-header {
  display: grid;
  grid-template-columns: 1.6fr repeat(5, 1fr);
  background: #F7F8FA;
  border-bottom: 1px solid #EEF0F3;
  padding: 8px 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8A919C;
}

.lf-matrix-header > div:not(:first-child) {
  text-align: center;
}

.lf-matrix-row {
  display: grid;
  grid-template-columns: 1.6fr repeat(5, 1fr);
  padding: 8px 12px;
  border-bottom: 1px solid #F3F5F7;
  font-size: 12px;
  align-items: center;
}

.lf-matrix-row:last-child {
  border-bottom: none;
}

.lf-matrix-cell {
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
}

.lf-matrix-A { color: #C5362F; }
.lf-matrix-R { color: #2457E6; }
.lf-matrix-C { color: #0E7C86; }
.lf-matrix-I { color: #6B4FD8; }

/* ========================================
   KNOWLEDGE TAB
======================================== */
.lf-knowledge-header {
  display: grid;
  grid-template-columns: 1.5fr 88px 120px 150px;
  background: #F7F8FA;
  border-bottom: 1px solid #EEF0F3;
  padding: 8px 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8A919C;
}

.lf-knowledge-row {
  display: grid;
  grid-template-columns: 1.5fr 88px 120px 150px;
  padding: 11px 16px;
  border-bottom: 1px solid #F3F5F7;
  align-items: center;
}

.lf-knowledge-title {
  font-size: 13px;
  font-weight: 600;
}

.lf-knowledge-meta {
  font-size: 11.5px;
  color: #8A919C;
}

.lf-scope-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #3C424C;
  background: #EEF1F5;
  padding: 2px 7px;
  border-radius: 5px;
}

.lf-version {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: #6A7280;
}

.lf-ack-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
}

.lf-ack-badge.done {
  color: #138A4E;
  background: #E5F4EC;
}

/* ========================================
   KANBAN BOARD
======================================== */
.lf-kanban {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--lf-canvas);
}

.lf-kanban-header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--lf-border);
}

.lf-kanban-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin: 0;
}

.lf-kanban-subtitle {
  font-size: 12.5px;
  color: #6A7280;
}

.lf-kanban-actions {
  margin-left: auto;
}

.lf-kanban-board {
  flex: 1;
  display: flex;
  overflow-x: auto;
  min-height: 0;
}

.lf-kanban-col {
  flex: 1 0 232px;
  min-width: 232px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--lf-border);
}

.lf-kanban-col:last-child {
  border-right: none;
}

.lf-kanban-col-header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--lf-border);
  background: #fff;
}

.lf-kanban-col-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.lf-kanban-col-title {
  font-size: 12.5px;
  font-weight: 600;
}

.lf-kanban-col-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #6A7280;
  background: #F2F4F6;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: auto;
}

.lf-kanban-col-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.lf-kanban-card {
  background: #fff;
  border: 1px solid var(--lf-border);
  border-left: 3px solid #2457E6;
  border-radius: 8px;
  padding: 9px 11px;
  cursor: grab;
  transition: box-shadow 0.15s, transform 0.15s;
}

.lf-kanban-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.lf-kanban-card.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
}

.lf-kanban-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.lf-kanban-plate {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #2457E6;
}

.lf-kanban-model {
  font-size: 12px;
  color: #6A7280;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lf-kanban-card-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.lf-priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-left: auto;
}

/* ========================================
   APPROVAL GATE MODAL
======================================== */
.lf-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.lf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20,23,28,.45);
}

.lf-modal-content {
  position: relative;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.32);
}

.lf-gate-modal {
  width: 430px;
}

.lf-gate-header {
  padding: 18px 20px;
  border-bottom: 1px solid #EEF0F3;
  display: flex;
  align-items: center;
  gap: 11px;
}

.lf-gate-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #FBEAE9;
  color: #C5362F;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lf-gate-title {
  font-size: 15px;
  font-weight: 600;
}

.lf-gate-subtitle {
  font-size: 12px;
  color: #8A919C;
}

.lf-gate-body {
  padding: 18px 20px;
}

.lf-gate-text {
  font-size: 13.5px;
  color: #3C424C;
  line-height: 1.55;
}

.lf-gate-flow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  background: #F7F8FA;
  border: 1px solid #EEF0F3;
  border-radius: 9px;
  padding: 11px 13px;
}

.lf-gate-person {
  display: flex;
  align-items: center;
  gap: 7px;
}

.lf-gate-person-name {
  font-size: 11.5px;
  font-weight: 600;
}

.lf-gate-person-role {
  font-size: 10.5px;
  color: #8A919C;
}

.lf-gate-arrow {
  color: #C5CAD1;
  font-size: 14px;
}

.lf-gate-actions {
  display: flex;
  gap: 10px;
  padding: 0 20px 18px;
}

.lf-gate-actions .lf-btn {
  flex: 1;
  justify-content: center;
}

/* ========================================
   SEARCH BAR / COMMAND PALETTE
======================================== */
.lf-search-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--lf-surface-alt);
  border: 1px solid var(--lf-line);
  border-radius: 2px;
  padding: 6px 11px;
  width: 280px;
  cursor: pointer;
}

.lf-search-trigger:hover {
  background: var(--lf-line);
}

.lf-search-placeholder {
  font-size: 12px;
  color: var(--lf-faint);
}

.lf-search-modal {
  width: 560px;
  max-height: 420px;
}

.lf-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #EEF0F3;
}

.lf-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
}

.lf-search-results {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
}

.lf-search-group {
  margin-bottom: 12px;
}

.lf-search-group-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #8A919C;
  padding: 6px 8px;
}

.lf-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
}

.lf-search-item:hover,
.lf-search-item.selected {
  background: #F2F6FF;
}

.lf-search-item-title {
  font-size: 13px;
  font-weight: 500;
}

.lf-search-item-meta {
  font-size: 11px;
  color: #8A919C;
}

/* ========================================
   ENHANCED KPI STRIP
======================================== */
.lf-kpi-strip-new {
  display: grid;
  gap: 1px;
  background: var(--lf-border);
  border: 1px solid var(--lf-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}

.lf-kpi-strip-new .lf-kpi {
  background: #fff;
  padding: 12px 15px;
}

.lf-kpi-strip-new .lf-kpi-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lf-kpi-strip-new .lf-kpi-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.lf-kpi-strip-new .lf-kpi-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-top: 5px;
}

/* ========================================
   SELECT DROPDOWN
======================================== */
.lf-select {
  appearance: none;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--lf-ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236A7280' stroke-width='2.2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--lf-border);
  border-radius: 7px;
  padding: 6px 32px 6px 12px;
  cursor: pointer;
}

.lf-select:hover {
  border-color: #B6BCC4;
}

.lf-select:focus {
  outline: none;
  border-color: var(--lf-primary);
}

/* Tab placeholder */
.lf-tab-placeholder {
  background: #fff;
  border: 1px solid var(--lf-border);
  border-radius: 12px;
  padding: 44px;
  text-align: center;
  color: #9AA1AC;
  font-size: 13px;
}

/* ========================================
   DEMO MODE INDICATOR
======================================== */
.lf-demo-indicator {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--lf-primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 3px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  z-index: 1000;
  font-size: 12px;
}

.lf-demo-badge {
  background: #fff;
  color: var(--lf-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
}

.lf-demo-text {
  color: #B8BCC4;
}

.lf-demo-text a {
  color: #60A5FA;
  text-decoration: underline;
}

.lf-demo-text a:hover {
  color: #93C5FD;
}

/* ========================================
   WORKFLOW UI COMPONENTS (D365/Fluent)
======================================== */

/* 1. Stage Badge (List Views) - 7px dot, 2px radius */
.lf-stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 2px;
  cursor: pointer;
  transition: filter 0.1s;
  white-space: nowrap;
}

.lf-stage-badge:hover {
  filter: brightness(0.95);
}

.lf-stage-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* 2. BPF Breadcrumb (Record Header) */
.lf-bpf-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.lf-bpf-segment {
  display: flex;
  align-items: center;
}

.lf-bpf-node {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 2px;
}

.lf-bpf-mark {
  width: 17px;
  height: 17px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
}

.lf-bpf-label {
  font-size: 12px;
  white-space: nowrap;
}

.lf-bpf-arrow {
  color: #c8c6c4;
  font-size: 15px;
  margin: 0 2px;
}

/* 3. Chevron Ribbon (Full-width Process Bar) */
.lf-bpf-ribbon {
  display: flex;
  overflow: hidden;
  border-radius: 2px;
}

.lf-bpf-chevron {
  flex: 1;
  padding: 9px 12px 9px 22px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  margin-right: -7px;
  text-align: center;
}

.lf-bpf-chevron:first-child {
  padding-left: 12px;
}

/* 4. Progress Dots (Compact Inline) */
.lf-bpf-dots {
  display: flex;
  align-items: center;
}

.lf-bpf-dot {
  border-radius: 999px;
  flex-shrink: 0;
}

.lf-bpf-line {
  width: 34px;
  height: 2px;
  flex-shrink: 0;
}

/* 5. SLA Chip */
.lf-sla-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--lf-font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 2px;
}

/* 6. RACI Chips */
.lf-raci-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
}

.lf-raci-row {
  display: flex;
  gap: 12px;
}

.lf-raci-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lf-raci-user {
  font-size: 12px;
  color: var(--lf-ink);
}

.lf-raci-unassigned {
  font-size: 12px;
  color: var(--lf-faint);
}

/* 7. Priority Marker */
.lf-priority-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}

.lf-priority-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* 8. Timeline */
.lf-timeline {
  display: flex;
  flex-direction: column;
}

.lf-timeline-item {
  display: flex;
  gap: 11px;
  padding-bottom: 16px;
}

.lf-timeline-item:last-child {
  padding-bottom: 0;
}

.lf-timeline-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.lf-timeline-node {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 3px;
  flex-shrink: 0;
}

.lf-timeline-line {
  flex: 1;
  width: 2px;
  background: #e1dfdd;
  margin-top: 4px;
}

.lf-timeline-content {
  flex: 1;
  min-width: 0;
}

.lf-timeline-text {
  font-size: 13px;
  color: var(--lf-ink);
  font-weight: 500;
}

.lf-timeline-meta {
  font-size: 11px;
  color: var(--lf-faint);
  margin-top: 2px;
}

/* 9. Popover (Quick View) */
.lf-workflow-popover {
  position: fixed;
  z-index: 1000;
  background: #fff;
  border: 1px solid var(--lf-line);
  border-radius: 3px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  min-width: 220px;
  animation: popoverIn 0.12s ease-out;
}

@keyframes popoverIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.lf-popover-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--lf-line);
  font-size: 12px;
  font-weight: 600;
  color: var(--lf-ink);
}

.lf-popover-stages {
  padding: 10px 14px;
}

.lf-popover-stage {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}

.lf-popover-mark {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
}

.lf-popover-footer {
  padding: 8px 14px;
  border-top: 1px solid var(--lf-line);
  font-size: 11px;
  color: var(--lf-faint);
}

.lf-popover-stage.active .lf-popover-stage-mark {
  background: #2457E6;
  color: #fff;
}

.lf-popover-stage.pending .lf-popover-stage-mark {
  background: #E4E7EB;
  color: #9AA1AC;
}

.lf-popover-stage-name {
  font-size: 12.5px;
}

.lf-popover-stage.done .lf-popover-stage-name {
  color: #138A4E;
}

.lf-popover-stage.active .lf-popover-stage-name {
  color: #2457E6;
  font-weight: 600;
}

.lf-popover-stage.pending .lf-popover-stage-name {
  color: #9AA1AC;
}

.lf-popover-footer {
  padding: 8px 14px;
  background: #F7F8FA;
  border-top: 1px solid #EEF0F3;
  font-size: 11px;
  color: #8A919C;
  border-radius: 0 0 10px 10px;
}

/* 3. Sidebar Preview Panel */
.lf-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20,23,28,0.3);
  z-index: 199;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.lf-sidebar-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.lf-workflow-sidebar {
  position: fixed;
  top: 48px;
  right: 0;
  bottom: 0;
  width: 380px;
  background: #fff;
  border-left: 1px solid var(--lf-line);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.2s ease-out;
  overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}

.lf-workflow-sidebar.open {
  transform: translateX(0);
}

.lf-sidebar-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.lf-sidebar-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--lf-line);
  position: relative;
  background: var(--lf-surface-alt);
}

.lf-sidebar-panel-doctype {
  font-family: var(--lf-font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lf-faint);
}

.lf-sidebar-panel-title {
  font-family: var(--lf-font-mono);
  font-size: 18px;
  font-weight: 600;
  margin-top: 4px;
  color: var(--lf-ink);
}

.lf-sidebar-panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  background: var(--lf-line);
  border-radius: 3px;
  font-size: 18px;
  color: var(--lf-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lf-sidebar-panel-close:hover {
  background: #E4E7EB;
}

/* Sidebar Sections (D365 style) */
.lf-sidebar-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--lf-line);
}

.lf-sidebar-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lf-faint);
  margin-bottom: 10px;
}

.lf-sidebar-stage-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--lf-primary);
}

.lf-sidebar-complete {
  font-size: 13px;
  color: #0b6a0b;
  margin-top: 8px;
}

.lf-sidebar-actions {
  padding: 16px 20px;
  margin-top: auto;
  border-top: 1px solid var(--lf-line);
  background: var(--lf-surface-alt);
}

/* Legacy sidebar BPF (keep for compatibility) */
.lf-sidebar-bpf {
  padding: 16px 20px;
  background: var(--lf-surface-alt);
  border-bottom: 1px solid var(--lf-line);
}

.lf-sidebar-bpf-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lf-faint);
  margin-bottom: 10px;
}

.lf-sidebar-bpf-stages {
  display: flex;
  gap: 4px;
}

/* Sidebar Stage Info */
.lf-sidebar-stage-info {
  padding: 16px 20px;
  border-bottom: 1px solid var(--lf-line);
}

.lf-sidebar-stage-label {
  font-size: 11px;
  color: var(--lf-faint);
}

.lf-sidebar-sla {
  font-size: 12px;
  color: var(--lf-muted);
  margin-top: 8px;
}

.lf-sidebar-sla strong {
  color: #7a5a00;
}

/* Sidebar Facts */
.lf-sidebar-facts {
  padding: 16px 20px;
  flex: 1;
}

.lf-sidebar-fact {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--lf-line-row);
}

.lf-sidebar-fact:last-child {
  border-bottom: none;
}

.lf-sidebar-fact-label {
  font-size: 12px;
  color: #8A919C;
}

.lf-sidebar-fact-value {
  font-size: 12px;
  font-weight: 500;
  color: var(--lf-ink);
}

/* Sidebar Actions */
.lf-sidebar-actions {
  padding: 16px 20px;
  border-top: 1px solid #EEF0F3;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lf-sidebar-actions .lf-btn {
  width: 100%;
  justify-content: center;
}

/* ========================================
   HERO BPF PANEL (Command Center)
======================================== */
.lf-hero-bpf {
  background: #fff;
  border: 1px solid var(--lf-border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.lf-hero-bpf:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.lf-hero-bpf .lf-bpf-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-bottom: 1px solid #EEF0F3;
}

.lf-hero-bpf .lf-bpf-title {
  font-size: 13px;
  font-weight: 600;
}

.lf-hero-bpf .lf-bpf-meta {
  font-size: 11.5px;
  color: #8A919C;
  margin-left: 4px;
}

.lf-hero-bpf .lf-bpf-stages {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: #F7F8FA;
}

.lf-bpf-chevron {
  position: relative;
  flex: 1;
  padding: 13px 14px 13px 26px;
  margin-right: -9px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.lf-bpf-chevron:first-child {
  padding-left: 14px;
}

.lf-hero-bpf .lf-bpf-mark {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex: none;
}

.lf-hero-bpf .lf-bpf-stage-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.lf-hero-bpf .lf-bpf-panel {
  padding: 16px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}

.lf-hero-bpf .lf-bpf-panel-left {
  min-width: 0;
}

.lf-hero-bpf .lf-bpf-panel-right {
  border-left: 1px solid #EEF0F3;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
}

.lf-hero-bpf .lf-bpf-panel-title {
  font-size: 12px;
  font-weight: 600;
  color: #2457E6;
  margin-bottom: 12px;
}

.lf-hero-bpf .lf-sop-required {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F7FAFF;
  border: 1px solid #CFE0FF;
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 12px;
}

.lf-hero-bpf .lf-sop-title {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: #15306E;
}

.lf-hero-bpf .lf-sop-ack {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #138A4E;
  background: #E5F4EC;
  padding: 3px 9px;
  border-radius: 6px;
}

.lf-hero-bpf .lf-stage-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lf-hero-bpf .lf-stage-field label {
  font-size: 11px;
  color: #8A919C;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.lf-hero-bpf .lf-stage-field-value {
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
}

.lf-hero-bpf .lf-stage-field-value.filled {
  background: #F5FAF7;
  border: 1px solid #BFE3CD;
  color: #15171C;
}

.lf-hero-bpf .lf-stage-field-value.missing {
  background: #FFF7F6;
  border: 1px solid #F0C9C7;
  color: #C5362F;
  font-weight: 600;
  font-size: 12.5px;
}

.lf-hero-bpf .lf-checklist-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.lf-hero-bpf .lf-checklist-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
  font-size: 12.5px;
}

.lf-hero-bpf .lf-checklist-item.done {
  color: #6A7280;
}

.lf-hero-bpf .lf-checklist-item.pending {
  color: #15171C;
}

.lf-hero-bpf .lf-advance-section {
  margin-top: auto;
  padding-top: 14px;
}

.lf-hero-bpf .lf-advance-hint {
  font-size: 11px;
  color: #C2710C;
  margin-bottom: 7px;
}

.lf-hero-bpf .lf-btn.advance {
  width: 100%;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
  border-radius: 8px;
}

.lf-hero-bpf .lf-btn.advance.disabled {
  background: #9FB4D8;
  color: #fff;
  cursor: not-allowed;
}

/* ========================================
   MINI WORKFLOW STEPS (Task Row)
======================================== */
.lf-task-workflow {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
}

.lf-mini-step {
  width: 18px;
  height: 4px;
  border-radius: 2px;
  background: #E4E7EB;
  transition: background 0.15s;
}

.lf-mini-step.done {
  background: #138A4E;
}

.lf-mini-step.active {
  background: #2457E6;
  animation: pulse-step 1.5s ease-in-out infinite;
}

.lf-mini-step.pending {
  background: #E4E7EB;
}

@keyframes pulse-step {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Hover to show step name */
.lf-mini-step:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--lf-ink);
  color: #fff;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  margin-bottom: 4px;
}

.lf-mini-step {
  position: relative;
}

/* ============================================================
   Role / department switcher · delegation · guardrail cues
   ============================================================ */

/* Role switcher (Command Center + Process Board headers) */
.lf-role-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 9px;
  border: 1px solid var(--lf-line, #E3E7EC);
  border-radius: 7px;
  background: var(--lf-surface, #fff);
  font-size: 12px;
}
.lf-role-switch-icon { color: var(--lf-primary, #2457E6); display: inline-flex; }
.lf-role-switch-label { color: var(--lf-muted, #6A7280); font-weight: 500; }
.lf-role-switch-select {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--lf-ink, #15171C);
  cursor: pointer;
  outline: none;
  max-width: 230px;
}

/* Delegation control on a task row */
.lf-task-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.lf-delegate {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px 2px 2px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: transparent;
  cursor: pointer;
  color: var(--lf-muted, #6A7280);
  transition: background 0.12s, border-color 0.12s;
}
.lf-delegate:hover {
  background: var(--lf-surface-alt, #F2F6FF);
  border-color: var(--lf-line, #E3E7EC);
}

/* Delegate modal */
.lf-delegate-modal {
  max-width: 380px;
  width: 92%;
  padding: 0;
  overflow: hidden;
}
.lf-delegate-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--lf-line, #EEF1F4);
}
.lf-delegate-title { font-size: 15px; font-weight: 700; color: var(--lf-ink, #15171C); }
.lf-delegate-sub { font-size: 12.5px; color: var(--lf-muted, #6A7280); margin-top: 3px; }
.lf-delegate-list {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 2px;
  max-height: 320px;
  overflow-y: auto;
}
.lf-delegate-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 13.5px;
  color: var(--lf-ink, #15171C);
  transition: background 0.12s;
}
.lf-delegate-option:hover { background: var(--lf-surface-alt, #F2F6FF); }
.lf-delegate-option.current { background: var(--lf-primary-soft, #EFF4FF); }
.lf-delegate-option-name { font-weight: 600; flex: 1; }
.lf-delegate-current {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lf-primary, #2457E6);
  background: var(--lf-primary-soft, #EFF4FF);
  padding: 2px 6px;
  border-radius: 10px;
}

/* Process Board: rejected (guardrailed) drop cue */
.lf-kanban-col.reject {
  animation: lf-reject-shake 0.4s ease;
}
.lf-kanban-col.reject .lf-kanban-col-body {
  outline: 2px solid #C5362F;
  outline-offset: -2px;
  background: #FDECEA !important;
  border-radius: 8px;
}
@keyframes lf-reject-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* ------------------------------------------------------------------ */
/*  Engine / try-version controls (verticals, row actions, toggles)   */
/* ------------------------------------------------------------------ */
.lf-page-header-actions { display: flex; align-items: center; gap: 8px; }

.lf-row-actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.lf-btn-icon {
  border: 1px solid var(--lf-border, #E3E8EF);
  background: var(--lf-surface, #fff);
  color: var(--lf-text, #1A2333);
  border-radius: 6px; min-width: 26px; height: 26px; padding: 0 6px;
  font-size: 12px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .12s, border-color .12s, color .12s;
}
.lf-btn-icon:hover { background: var(--lf-surface-alt, #F3F5F9); border-color: var(--lf-primary, #2457E6); }
.lf-btn-icon.danger:hover { border-color: var(--lf-danger, #C0392B); color: var(--lf-danger, #C0392B); }

.lf-btn.small { padding: 4px 10px; font-size: 12px; }
.lf-btn.ghost { background: transparent; border: 1px solid var(--lf-border, #E3E8EF); color: var(--lf-text, #1A2333); }
.lf-btn.ghost:hover { background: var(--lf-surface-alt, #F3F5F9); }

.lf-settings-actions { margin-top: 18px; display: flex; gap: 10px; }

/* iOS-style toggle for the vertical capability matrix */
.lf-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.lf-switch input { opacity: 0; width: 0; height: 0; }
.lf-switch-track {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--lf-border, #CBD3E1); border-radius: 22px; transition: background .18s;
}
.lf-switch-track::before {
  content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .18s; box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.lf-switch input:checked + .lf-switch-track { background: var(--lf-primary, #2457E6); }
.lf-switch input:checked + .lf-switch-track::before { transform: translateX(18px); }

/* ---- Operations views: stat strip, sub-tabs, action tones ---- */
.lf-ops-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  padding: 4px 0 16px;
}
.lf-ops-stat {
  border: 1px solid var(--lf-border, #E3E8EF); border-radius: 10px;
  background: var(--lf-surface, #fff); padding: 12px 14px;
  border-left: 3px solid var(--lf-border-strong, #cbd3e0);
}
.lf-ops-stat.teal { border-left-color: #0E7C86; }
.lf-ops-stat.green { border-left-color: #0b6a0b; }
.lf-ops-stat.amber { border-left-color: #b8860b; }
.lf-ops-stat.red { border-left-color: #a4262c; }
.lf-ops-stat-value { font-size: 22px; font-weight: 700; line-height: 1.1; color: var(--lf-text, #1A2333); }
.lf-ops-stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--lf-muted, #6b7280); margin-top: 3px; }

.lf-ops-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 12px; }
.lf-ops-tab {
  border: 1px solid var(--lf-border, #E3E8EF); background: var(--lf-surface, #fff);
  color: var(--lf-text, #1A2333); border-radius: 999px; padding: 5px 14px;
  font-size: 12px; cursor: pointer; transition: all .12s;
}
.lf-ops-tab:hover { border-color: var(--lf-primary, #2457E6); }
.lf-ops-tab.active { background: var(--lf-primary, #2457E6); border-color: var(--lf-primary, #2457E6); color: #fff; }

.lf-btn-icon.ok:hover { border-color: #0b6a0b; color: #0b6a0b; }
.lf-ops-done { color: var(--lf-muted, #9aa3af); font-size: 12px; padding-left: 6px; }
.lf-ops-flag {
  display: inline-block; font-size: 10px; font-weight: 600; padding: 1px 6px;
  border-radius: 4px; background: #fff4ce; color: #7a5a00; margin-left: 4px;
}

/* ================================================================
   Vehicle Action Center (Command Center)
   ================================================================ */
.lf-ac-card {
  background: var(--lf-surface, #fff);
  border: 1px solid var(--lf-line, #e5e7eb);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 14px 0 18px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.lf-ac-head { display: flex; align-items: center; gap: 10px; }
.lf-ac-icon { color: var(--lf-text-soft, #6a7280); display: flex; }
.lf-ac-search-wrap { position: relative; flex: 1; }
.lf-ac-search {
  width: 100%; box-sizing: border-box; height: 38px;
  border: 1px solid var(--lf-line, #d9dce1); border-radius: 8px;
  padding: 0 12px; font-size: 14px; background: var(--lf-surface-alt, #f8f9fb);
  color: var(--lf-text, #1f2430);
}
.lf-ac-search:focus { outline: none; border-color: #2457E6; background: var(--lf-surface, #fff); }
.lf-ac-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #2457E6; background: #eef3ff; padding: 5px 9px; border-radius: 6px; white-space: nowrap;
}
.lf-ac-results {
  position: absolute; top: 42px; left: 0; right: 0; z-index: 40;
  background: var(--lf-surface, #fff); border: 1px solid var(--lf-line, #e5e7eb);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(16,24,40,0.12);
  max-height: 320px; overflow-y: auto;
}
.lf-ac-result {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer;
  border-bottom: 1px solid var(--lf-line-soft, #f0f1f4);
}
.lf-ac-result:last-child { border-bottom: none; }
.lf-ac-result:hover { background: var(--lf-surface-alt, #f5f7fb); }
.lf-ac-result.none { cursor: default; color: var(--lf-text-soft, #8a919c); font-size: 13px; }
.lf-ac-result-plate { font-weight: 700; font-size: 13px; color: var(--lf-text, #1f2430); min-width: 96px; }
.lf-ac-result-meta { flex: 1; font-size: 12px; color: var(--lf-text-soft, #6a7280); }
.lf-ac-result-status { font-size: 11px; font-weight: 600; color: #2457E6; }
.lf-ac-body { margin-top: 12px; }
.lf-ac-empty { font-size: 13px; color: var(--lf-text-soft, #6a7280); padding: 4px 2px; }

.lf-ac-vehicle { border-top: 1px dashed var(--lf-line, #e5e7eb); padding-top: 12px; }
.lf-ac-vh { display: flex; align-items: center; gap: 12px; }
.lf-ac-vh-id { flex: 1; display: flex; flex-direction: column; }
.lf-ac-plate { font-size: 16px; font-weight: 800; color: var(--lf-text, #1f2430); letter-spacing: .02em; }
.lf-ac-vin { font-size: 12px; color: var(--lf-text-soft, #6a7280); }
.lf-ac-clear {
  border: none; background: transparent; cursor: pointer; font-size: 16px;
  color: var(--lf-text-soft, #9aa0aa); width: 26px; height: 26px; border-radius: 6px;
}
.lf-ac-clear:hover { background: var(--lf-surface-alt, #f0f1f4); }
.lf-ac-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.lf-ac-fact {
  font-size: 12px; color: var(--lf-text, #3c424c);
  background: var(--lf-surface-alt, #f5f6f8); border: 1px solid var(--lf-line-soft, #eceef1);
  border-radius: 6px; padding: 4px 8px;
}
.lf-ac-fact b { color: var(--lf-text-soft, #6a7280); font-weight: 600; margin-right: 4px; }
.lf-ac-fact.on { background: #e0f2f1; border-color: #bfe3e0; }
.lf-ac-fact.on b { color: #0E7C86; }
.lf-ac-fact.warn { background: #fff4ce; border-color: #f2e4ad; }
.lf-ac-fact.warn b { color: #7a5a00; }
.lf-ac-actions-label {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--lf-text-soft, #8a919c); margin: 12px 0 8px;
}
.lf-ac-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.lf-ac-action {
  display: flex; align-items: center; gap: 10px; text-align: left;
  border: 1px solid var(--lf-line, #e2e5ea); border-radius: 8px; padding: 9px 11px;
  background: var(--lf-surface, #fff); cursor: pointer; transition: border-color .12s, background .12s;
}
.lf-ac-action:hover { border-color: #2457E6; background: #f7f9ff; }
.lf-ac-action.disabled { opacity: .5; cursor: not-allowed; background: var(--lf-surface-alt, #f7f8fa); }
.lf-ac-action.disabled:hover { border-color: var(--lf-line, #e2e5ea); background: var(--lf-surface-alt, #f7f8fa); }
.lf-ac-action-ic { font-size: 17px; line-height: 1; width: 22px; text-align: center; }
.lf-ac-action-tx { display: flex; flex-direction: column; min-width: 0; }
.lf-ac-action-lb { font-size: 13px; font-weight: 600; color: var(--lf-text, #1f2430); }
.lf-ac-action-ds { font-size: 11px; color: var(--lf-text-soft, #8a919c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lf-ac-note { font-size: 12px; color: var(--lf-text-soft, #6a7280); margin-top: 10px; line-height: 1.5; }
.lf-ac-note.warn { color: #7a5a00; }

/* ---- Action Center: Actions button, recommendation banner, call-in modes ---- */
.lf-ac-actions-btn {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  border: 1px solid #2457E6; background: #2457E6; color: #fff; cursor: pointer;
  height: 38px; padding: 0 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
}
.lf-ac-actions-btn:hover { background: #1c48c4; border-color: #1c48c4; }
.lf-ac-actions-btn:disabled { opacity: .45; cursor: not-allowed; }
.lf-ac-reco {
  display: flex; align-items: center; gap: 10px; margin: 12px 0 4px;
  padding: 10px 12px; border-radius: 8px; border: 1px solid #cfe0ff; background: #f2f7ff;
}
.lf-ac-reco.tone-ok { border-color: #bfe3c8; background: #eef8f0; }
.lf-ac-reco.tone-warn { border-color: #f2e4ad; background: #fff8e6; }
.lf-ac-reco.tone-muted { border-color: #e2e5ea; background: #f6f7f9; }
.lf-ac-reco-badge {
  font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: #2457E6; background: #fff; border: 1px solid #cfe0ff; border-radius: 5px; padding: 3px 7px; white-space: nowrap;
}
.lf-ac-reco.tone-ok .lf-ac-reco-badge { color: #138A4E; border-color: #bfe3c8; }
.lf-ac-reco.tone-warn .lf-ac-reco-badge { color: #b06a00; border-color: #f2e4ad; }
.lf-ac-reco-text { flex: 1; font-size: 13px; color: var(--lf-text, #1f2430); }
.lf-ac-reco-btn {
  border: none; background: #2457E6; color: #fff; cursor: pointer; white-space: nowrap;
  padding: 7px 14px; border-radius: 7px; font-size: 12px; font-weight: 700;
}
.lf-ac-reco-btn:hover { background: #1c48c4; }
.lf-ac-reco.tone-ok .lf-ac-reco-btn { background: #138A4E; }
.lf-ac-reco.tone-warn .lf-ac-reco-btn { background: #b06a00; }

/* Call-in resolution radios */
.lf-ac-mode {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; cursor: pointer;
  border: 1px solid var(--lf-line, #e5e7eb); border-radius: 8px; margin-bottom: 7px;
}
.lf-ac-mode:hover { border-color: #2457E6; background: #f7f9ff; }
.lf-ac-mode input { margin-top: 3px; }
.lf-ac-mode-tx { display: flex; flex-direction: column; }
.lf-ac-mode-lb { font-size: 13px; font-weight: 600; color: var(--lf-text, #1f2430); display: flex; align-items: center; gap: 8px; }
.lf-ac-mode-ds { font-size: 11.5px; color: var(--lf-text-soft, #6a7280); margin-top: 2px; }
.lf-ac-reco-tag {
  font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: #138A4E; background: #eef8f0; border: 1px solid #bfe3c8; border-radius: 4px; padding: 1px 5px;
}
