:root {
  --fm-ink: #1e293b;
  --fm-muted: #64748b;
  --fm-line: #dbe4e0;
  --fm-accent: #1f7a5c;
  --fm-accent-soft: #2f9d6a;
}

body.fm-shell .sidebar {
  border-right: 1px solid var(--fm-line);
}

.fm-brand-kicker {
  display: block;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fm-accent);
  font-weight: 800;
  line-height: 1;
}

.fm-truck-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.fm-fleet-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
  white-space: nowrap;
}

.fm-color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.fm-color-swatch.is-active {
  border-color: #1f7a5c;
  box-shadow: 0 0 0 3px rgba(31, 122, 92, 0.22);
}

.fm-stat-card {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.fm-stat-sage {
  background: linear-gradient(180deg, #e7f6ee 0%, #ffffff 72%);
  border: 1px solid #c5e6d2 !important;
  box-shadow: inset 0 3px 0 #2f9d6a;
}

.fm-stat-teal {
  background: linear-gradient(180deg, #e6f4f6 0%, #ffffff 72%);
  border: 1px solid #c3e0e6 !important;
  box-shadow: inset 0 3px 0 #2a8a9a;
}

.fm-stat-amber {
  background: linear-gradient(180deg, #fbf0dc 0%, #ffffff 72%);
  border: 1px solid #edd7a8 !important;
  box-shadow: inset 0 3px 0 #d4a017;
}

.fm-stat-navy {
  background: linear-gradient(180deg, #e7eef8 0%, #ffffff 72%);
  border: 1px solid #c5d4ea !important;
  box-shadow: inset 0 3px 0 #3d6fb8;
}

.fm-stat-card .text-slate-800 {
  color: #16324a;
}

.fm-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  line-height: 1.4;
}

.fm-status-available,
.fm-status-completed {
  background: #d8f3e4;
  color: #146b3a;
}

.fm-status-on_dispatch,
.fm-status-in_progress {
  background: #fde9c8;
  color: #8a5a00;
}

.fm-status-maintenance,
.fm-status-scheduled {
  background: #dce8fb;
  color: #1d4f9c;
}

.fm-status-inactive,
.fm-status-cancelled,
.fm-status-unknown {
  background: #f8d9d9;
  color: #9b2c2c;
}

.fm-btn-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #1f7a5c;
  border: 1px solid #1f7a5c;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
}

.fm-btn-quiet:hover {
  background: #18634b;
  border-color: #18634b;
  color: #fff;
}

.fm-btn-quiet-sm {
  padding: 6px 12px;
  font-size: 12px;
}

body.fm-shell .btn-primary {
  background: #1f7a5c !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 8px 16px rgba(31, 122, 92, 0.22) !important;
}

body.fm-shell .btn-primary:hover {
  background: #18634b !important;
  transform: none;
}

body.fm-shell .btn-outline-primary {
  background: #fff !important;
  border: 1px solid #1f7a5c !important;
  color: #1f7a5c !important;
  box-shadow: none !important;
}

body.fm-shell .btn-outline-primary:hover {
  background: #1f7a5c !important;
  color: #fff !important;
}

body.fm-shell .btn-outline-info,
body.fm-shell .btn-outline-success,
body.fm-shell .btn-outline-danger,
body.fm-shell .btn-outline-warning {
  background: #fff !important;
}

.fm-login-page {
  min-height: 100vh;
  margin: 0;
  color: #e8eee9;
  background:
    radial-gradient(1100px 620px at 12% 8%, rgba(47, 157, 106, 0.38), transparent 58%),
    radial-gradient(900px 520px at 92% 88%, rgba(61, 111, 184, 0.32), transparent 52%),
    linear-gradient(165deg, #08110f 0%, #10241e 48%, #0b1624 100%);
}

.fm-login-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.fm-login-card {
  width: 100%;
  max-width: 380px;
  background: rgba(14, 24, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 36px 32px 32px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
}

.fm-login-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(47, 157, 106, 0.18);
  border: 1px solid rgba(94, 224, 176, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.fm-login-page .fm-brand-kicker {
  color: #7ee0b5;
}

.fm-login-card h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  color: #f4faf7;
}

.fm-login-lead {
  margin: 0 0 22px;
  font-size: 14px;
  color: #a8c0b6;
}

.fm-login-card label {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #c5d8cf;
}

.fm-login-card .form-input {
  width: 100%;
  margin-bottom: 16px;
  background: #0c1715 !important;
  border: 1px solid #2c4a42 !important;
  color: #f1f5f3 !important;
  box-shadow: none !important;
}

.fm-login-card .form-input::placeholder {
  color: #7f9a90 !important;
}

.fm-login-card .form-input:focus {
  background: #10201c !important;
  border-color: #3cb88a !important;
  color: #f8fffb !important;
  box-shadow: 0 0 0 3px rgba(60, 184, 138, 0.22) !important;
}

.btn-fm-login {
  display: block;
  width: 100%;
  margin-top: 8px;
  background: linear-gradient(180deg, #3cb88a 0%, #2f9d6a 100%);
  border: none;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #06241a;
  cursor: pointer;
}

.btn-fm-login:hover {
  background: linear-gradient(180deg, #48c496 0%, #278a5c 100%);
  color: #06241a;
}

.btn-fm-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.fm-palette-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fm-report-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fm-period-btn {
  border: 1px solid #c5d4ce;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.fm-period-btn:hover {
  border-color: #1f7a5c;
  color: #1f7a5c;
}

.fm-period-btn.is-active {
  background: #1f7a5c;
  border-color: #1f7a5c;
  color: #fff;
}

.fm-custom-range {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.fm-custom-range.hidden {
  display: none;
}

.fm-custom-range .form-input {
  min-width: 160px;
}

.fm-report-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--fm-line);
  border-radius: 8px;
  padding: 4px 8px;
  color: #1e293b;
  background: #fff;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label {
  color: #64748b;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 8px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: #e7f6ee !important;
  border-color: #c5e6d2 !important;
  color: #146b3a !important;
}

.admin-dt-export-buttons .btn,
.admin-dt-export-buttons .dt-button {
  background: #fff !important;
  border: 1px solid #1f7a5c !important;
  color: #1f7a5c !important;
  box-shadow: none !important;
}
