/* Fleet Maintenance Control v0.1.8 */
.fmc {
  --fmc-blue: #0b6fbd;
  --fmc-blue-dark: #075795;
  --fmc-blue-soft: #eaf5ff;
  --fmc-border: #d5dce7;
  --fmc-text: #1f2937;
  --fmc-muted: #64748b;
  --fmc-panel: #ffffff;
  --fmc-row: #f8fbff;
  --fmc-shadow: 0 10px 28px rgba(15, 76, 129, .12);
  color: var(--fmc-text);
  max-width: 1480px;
  margin: 0 auto;
  padding: 16px 18px 28px;
  box-sizing: border-box;
  font-size: 15px;
}
.fmc * { box-sizing: border-box; }
.fmc h1, .fmc h2, .fmc h3 { color: var(--fmc-text); line-height: 1.2; }
.fmc h1 { margin: 0; font-size: 34px; font-weight: 700; }
.fmc h2 { margin: 0; font-size: 22px; font-weight: 700; }
.fmc h3 { margin: 22px 0 10px; font-size: 18px; font-weight: 700; }
.fmc .fmc-version { font-size: 14px; color: rgba(255,255,255,.78); margin-left: 8px; font-weight: 500; }
.fmc-muted { color: var(--fmc-muted); }
.fmc-hero {
  border-radius: 18px;
  padding: 26px 30px;
  margin: 8px 0 18px;
  background: linear-gradient(135deg, var(--fmc-blue-dark), var(--fmc-blue));
  color: #fff;
  box-shadow: var(--fmc-shadow);
  position: relative;
  overflow: hidden;
}
.fmc-hero:after {
  content: "";
  position: absolute;
  right: -80px;
  top: -90px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  border: 38px solid rgba(255,255,255,.12);
}
.fmc-hero h1 { color: #fff; }
.fmc-hero p { margin: 8px 0 0; max-width: 780px; color: rgba(255,255,255,.88); font-size: 16px; }
.fmc-sync-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-left: 5px solid var(--fmc-blue);
  border-radius: 12px;
  background: #eff6ff;
  color: #334155;
}
.fmc .nav-tab-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border: 0;
  margin: 0 0 14px;
  padding: 0;
}
.fmc .nav-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--fmc-border);
  border-radius: 999px;
  background: #fff;
  color: var(--fmc-blue-dark);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(2, 42, 73, .06);
}
.fmc .nav-tab:hover { background: var(--fmc-blue-soft); color: var(--fmc-blue-dark); }
.fmc .nav-tab-active {
  background: var(--fmc-blue);
  color: #fff;
  border-color: var(--fmc-blue);
}
.fmc-filters {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin: 16px 0 18px;
  padding: 16px;
  background: var(--fmc-panel);
  border: 1px solid var(--fmc-border);
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(15, 76, 129, .08);
}
.fmc-filters label, .fmc-inline-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  color: #334155;
}
.fmc-filters select,
.fmc-inline-form input,
.fmc-inline-form select,
.fmc .form-table input,
.fmc .form-table select {
  min-width: 160px;
  min-height: 40px;
  border: 1px solid #b8c4d3;
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  color: var(--fmc-text);
}
.fmc .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--fmc-blue);
  background: #fff;
  color: var(--fmc-blue-dark);
  text-decoration: none;
  border-radius: 8px;
  padding: 8px 14px;
  line-height: 1.2;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(15,76,129,.08);
}
.fmc .button:hover { background: var(--fmc-blue-soft); color: var(--fmc-blue-dark); }
.fmc .button-primary {
  background: var(--fmc-blue);
  color: #fff;
  border-color: var(--fmc-blue);
}
.fmc .button-primary:hover { background: var(--fmc-blue-dark); color: #fff; }
.fmc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin: 18px 0;
}
.fmc-card {
  background: var(--fmc-panel);
  border: 1px solid var(--fmc-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--fmc-shadow);
  position: relative;
  overflow: hidden;
}
.fmc-card:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 100%;
  background: var(--fmc-blue);
}
.fmc-card-title { color: var(--fmc-muted); font-weight: 800; font-size: 14px; letter-spacing: .01em; }
.fmc-card-value { font-size: 30px; font-weight: 800; margin-top: 8px; color: #111827; }
.fmc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 18px; }
.fmc-actions .button { margin-right: 0; }
.fmc-panel {
  margin: 20px 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--fmc-border);
  border-radius: 18px;
  box-shadow: var(--fmc-shadow);
}
.fmc-section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 14px;
}
.fmc-section-head span { color: var(--fmc-muted); font-weight: 600; }
.fmc-mini-chart { width: 100%; max-width: 100%; background: transparent; border: 0; padding: 0; border-radius: 0; }
.fmc-bar-row {
  display: grid;
  grid-template-columns: 90px minmax(120px,1fr) 130px;
  gap: 12px;
  align-items: center;
  margin: 8px 0;
}
.fmc-bar-row span { color: #334155; font-weight: 700; }
.fmc-bar-row div { height: 18px; background: #e5effa; border-radius: 999px; overflow: hidden; }
.fmc-bar-row b { display: block; height: 18px; background: linear-gradient(90deg, var(--fmc-blue), #58b7ff); border-radius: 999px; }
.fmc-bar-row em { text-align: right; font-style: normal; font-weight: 800; color: #1e3a5f; }
.fmc-table-wrap { overflow: auto; max-width: 100%; border: 1px solid #dbe4ef; border-radius: 14px; }
.fmc table.widefat {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 0;
  margin: 0;
}
.fmc table.widefat th,
.fmc table.widefat td {
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.fmc table.widefat th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--fmc-blue-dark);
  color: #fff;
  font-weight: 800;
}
.fmc table.striped tbody tr:nth-child(odd) { background: var(--fmc-row); }
.fmc table.striped tbody tr:nth-child(even) { background: #fff; }
.fmc table.striped tbody tr:hover { background: #eaf5ff; }
.fmc-table { font-size: 13px; }
.fmc-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 800;
  background: #e5e7eb;
  color: #111827;
}
.fmc-critical, .fmc-do-not-drive { background: #991b1b; color: #fff; }
.fmc-red { background: #dc2626; color: #fff; }
.fmc-yellow { background: #facc15; color: #111; }
.fmc-green, .fmc-ok { background: #16a34a; color: #fff; }
.fmc-overdue { background: #ea580c; color: #fff; }
.fmc-no-market-value, .fmc-no-repair-spend { background: #cbd5e1; color: #0f172a; }
.fmc-inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  background: #fff;
  border: 1px solid var(--fmc-border);
  padding: 14px;
  margin: 14px 0;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(15,76,129,.06);
}
.fmc .form-table {
  background: #fff;
  border: 1px solid var(--fmc-border);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--fmc-shadow);
  border-collapse: separate;
  border-spacing: 0;
}
.fmc .form-table th,
.fmc .form-table td { padding: 14px; vertical-align: top; }
.fmc .description { color: var(--fmc-muted); margin-top: 6px; max-width: 760px; }
@media (max-width: 760px) {
  .fmc { padding: 12px; }
  .fmc h1 { font-size: 26px; }
  .fmc-hero { padding: 20px; }
  .fmc .nav-tab { flex: 1 1 auto; }
  .fmc-filters label { width: 100%; }
  .fmc-filters select { width: 100%; }
  .fmc-bar-row { grid-template-columns: 1fr; gap: 5px; }
  .fmc-bar-row em { text-align: left; }
}
