﻿:root {
  --color-brand-primary: #005294;
  --color-brand-secondary: #005294;
  --color-brand-accent: #f5821f;
  --color-bg: #f5f7ff;
  --color-surface: #ffffff;
  --color-surface-elevated: rgba(255, 255, 255, .88);
  --color-text: #005294;
  --color-text-muted: #666a86;
  --color-border: #e4e7f4;
  --color-success: #177a55;
  --color-warning: #c97910;
  --color-danger: #bd3d3d;
  --color-info: #2f68c8;
  --color-critical: #8f1f34;
  --degraus-yellow: #ffd600;
  --degraus-yellow-soft: #fff4a8;
  --degraus-orange: #f5821f;
  --degraus-orange-soft: #fff0df;
  --degraus-blue: #005294;
  --degraus-blue-dark: #005294;
  --degraus-blue-soft: #eef2ff;
  --degraus-white: #ffffff;
  --degraus-bg: #f5f6fa;
  --degraus-surface: #ffffff;
  --degraus-text: #1f2933;
  --degraus-muted: #6b7280;
  --degraus-border: #e5e7eb;
  --status-success: #16a34a;
  --status-warning: #f59e0b;
  --status-danger: #ef4444;
  --status-info: #2563eb;
  --status-critical: #b91c1c;
  --ink: #005294;
  --muted: #61647d;
  --line: #dddff0;
  --panel: #ffffff;
  --bg: #f6f7fb;
  --brand: #005294;
  --brand-2: #f5821f;
  --accent: #f5821f;
  --danger: #a33b3b;
  --ok: #28724f;
  --warning: #d78318;
  --info: #3163a5;
  --brand-soft: #fff2e6;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-md: 12px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --font-xs: 12px;
  --font-sm: 13px;
  --font-md: 15px;
  --font-lg: 18px;
  --font-xl: 22px;
  --font-2xl: 28px;
  --font-3xl: 34px;
  --font-4xl: 42px;
  --shadow-soft: 0 12px 30px rgba(0, 82, 148, .08);
  --shadow-raised: 0 18px 42px rgba(0, 82, 148, .14);
  --shadow-sm: 0 8px 22px rgba(0, 82, 148, .08);
  --shadow-md: 0 16px 36px rgba(0, 82, 148, .12);
  --shadow-lg: 0 26px 70px rgba(0, 82, 148, .18);
  --shadow-glow: 0 18px 44px rgba(245, 130, 31, .18);
  --tap: 44px;
  --app-header-height: 82px;
  --app-sidebar-width: 264px;
  --app-content-max: 1520px;
  --app-gap: clamp(12px, 1.4vw, 20px);
  --app-padding: clamp(12px, 1.8vw, 28px);
  --motion-fast: 160ms;
  --motion-normal: 240ms;
  --transition-fast: 160ms ease;
  --transition-normal: 220ms ease;
  font-family: Inter, Roboto, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media screen {
  /* Fleet Analytics v68 priority layer. Mantem performance: somente CSS. */
  :root {
    --fleet-teal: #009aa6;
    --fleet-teal-dark: #006c75;
    --fleet-teal-soft: #e6fbfd;
    --fleet-orange: #ff9f1c;
    --fleet-orange-strong: #ff7f11;
    --fleet-charcoal: #1f2933;
    --fleet-surface-dark: #202a33;
    --fleet-text: #2f3640;
    --fleet-muted: #7b8794;
    --ref-blue: var(--fleet-teal);
    --ref-blue-dark: var(--fleet-teal-dark);
    --ref-blue-2: #0b8793;
    --ref-blue-soft: var(--fleet-teal-soft);
    --ref-orange: var(--fleet-orange);
    --ref-text: var(--fleet-text);
    --ref-muted: var(--fleet-muted);
    --brand: var(--fleet-teal);
    --brand-2: var(--fleet-orange);
    --accent: var(--fleet-orange);
    --ink: var(--fleet-text);
  }

  body {
    color: var(--fleet-text);
    background:
      radial-gradient(circle at 4% 18%, rgba(0, 154, 166, .10), transparent 24%),
      radial-gradient(circle at 96% 8%, rgba(255, 127, 17, .15), transparent 25%),
      linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
  }

  .app-header {
    color: #ffffff;
    background: linear-gradient(180deg, var(--fleet-teal-dark) 0%, var(--fleet-teal) 100%);
    border: 0;
    box-shadow: 0 12px 30px rgba(0, 108, 117, .18);
  }

  .app-header::before { height: 0; }

  .profile-greeting {
    min-height: 46px;
    display: grid;
    align-content: center;
    gap: 1px;
    padding: 6px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
  }

  .profile-greeting span {
    font-size: 13px;
    line-height: 1.1;
    font-weight: 700;
  }

  .profile-greeting strong {
    color: rgba(255, 255, 255, .78);
    font-size: 11px;
    line-height: 1.1;
    font-weight: 600;
  }

  .global-search input {
    background: rgba(255, 255, 255, .96);
    border: 0;
    color: var(--fleet-charcoal);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
  }

  .tabs {
    background: var(--fleet-charcoal);
    box-shadow: 0 16px 38px rgba(31, 41, 51, .22);
  }

  .tab svg {
    width: 26px;
    height: 26px;
    stroke-width: 2.2;
  }

  .tab.active,
  .tab[aria-current="page"] {
    color: #ffffff;
    background: var(--fleet-teal);
    box-shadow: 0 10px 24px rgba(0, 154, 166, .28);
  }

  .fleet-hero {
    background:
      radial-gradient(circle at 88% 12%, rgba(255, 159, 28, .38), transparent 28%),
      linear-gradient(135deg, var(--fleet-charcoal) 0%, var(--fleet-surface-dark) 46%, var(--fleet-teal-dark) 100%);
  }

  .fleet-hero .eyebrow { color: #85f3fb; }

  .metric::after {
    background: linear-gradient(90deg, var(--fleet-orange), var(--fleet-teal));
  }

  .metric-icon,
  .quick-action span:first-child,
  .admin-card-icon,
  .ops-icon {
    color: #ffffff;
    background: var(--fleet-teal);
  }

  .metric:hover .metric-icon,
  .quick-action:hover span:first-child,
  .admin-card:hover .admin-card-icon {
    background: var(--fleet-orange);
  }

  .bar-track {
    height: 14px;
    background: #edf1f5;
    border-radius: 999px;
  }

  .bar-fill {
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--fleet-orange), #ffb84d);
    box-shadow: 0 4px 10px rgba(255, 159, 28, .28);
  }

  .dashboard-panel:nth-of-type(2n) .bar-fill {
    background: linear-gradient(90deg, var(--fleet-teal), #32c7d3);
  }

  .button,
  .file-button {
    background: var(--fleet-teal);
    box-shadow: 0 8px 18px rgba(0, 154, 166, .18);
  }

  .button.secondary,
  .file-button {
    color: var(--fleet-teal-dark);
    background: #ffffff;
    border-color: rgba(0, 154, 166, .24);
  }

  .status.pending,
  .status.warning {
    color: #8a4f00;
    background: rgba(255, 159, 28, .16);
  }

  .maintenance-icon,
  .ops-card.maintenance-card::before {
    background: var(--fleet-orange);
  }

  .fuel-icon,
  .ops-card.fuel-card::before {
    background: var(--fleet-teal);
  }

  @media (max-width: 760px) {
    .app-header {
      background: linear-gradient(180deg, #00747d 0%, var(--fleet-teal) 100%);
    }

    .profile-greeting {
      min-height: 38px;
      max-width: 116px;
      padding: 5px 8px;
      border-radius: 12px;
    }

    .profile-greeting span {
      max-width: 98px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 12px;
    }

    .profile-greeting strong { display: none; }

    .tabs {
      background: rgba(255, 255, 255, .98);
      box-shadow: 0 -10px 30px rgba(31, 41, 51, .16);
    }

    .tab {
      color: #5f6f7d;
    }

    .tab svg {
      width: 30px;
      height: 30px;
    }

    .tab.active,
    .tab[aria-current="page"] {
      color: #ffffff;
      background: var(--fleet-teal);
      border-radius: 18px;
    }
  }

  @media (max-width: 430px) {
    .profile-greeting { display: none; }
  }
}

/* Fleet Analytics v68 final priority. Inspirado nos anexos, sem dependencias pesadas. */
:root {
  --fleet-teal: #009aa6;
  --fleet-teal-dark: #006c75;
  --fleet-teal-soft: #e4fbfd;
  --fleet-orange: #ff9f1c;
  --fleet-orange-strong: #ff7f11;
  --fleet-ink: #17212b;
  --fleet-panel: #202a33;
  --fleet-panel-2: #26333d;
  --fleet-line: #d8e2eb;
  --fleet-muted: #6d7a86;
}

body {
  color: var(--fleet-ink);
  background: linear-gradient(180deg, #f7fafc 0%, #eef3f7 100%);
}

.app-header {
  background: linear-gradient(135deg, var(--fleet-teal-dark), var(--fleet-teal));
  border-bottom: 0;
  box-shadow: 0 10px 26px rgba(0, 108, 117, .16);
}

.brand-logo,
.profile-button {
  box-shadow: 0 8px 18px rgba(0, 0, 0, .16);
}

.profile-greeting {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-height: 42px;
  padding: 6px 10px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, .12);
  cursor: pointer;
}

.profile-greeting span {
  font-size: 13px;
  line-height: 1.15;
}

.profile-greeting strong {
  font-size: 11px;
  line-height: 1.15;
  font-weight: 600;
  opacity: .8;
}

.global-search input {
  background: rgba(255, 255, 255, .96);
  border-color: transparent;
  color: var(--fleet-ink);
}

.global-search input::placeholder {
  color: #6a7783;
}

.button,
button.button,
.primary-action,
.floating-action {
  background: var(--fleet-teal);
  border-color: var(--fleet-teal);
  color: #ffffff;
}

.button:hover,
button.button:hover {
  background: var(--fleet-teal-dark);
  border-color: var(--fleet-teal-dark);
}

.button.secondary,
button.button.secondary {
  color: var(--fleet-teal-dark);
  background: #ffffff;
  border-color: rgba(0, 154, 166, .26);
}

.section-title,
.page-title,
.form-step-title,
.report-section-title,
.fleet-hero h2,
.card h2 {
  color: var(--fleet-ink);
}

.metric-card strong,
.stat-card strong,
.summary-value,
.money-value {
  color: var(--fleet-teal-dark);
}

.item,
.card,
.ops-card,
.vehicle-card,
.fine-card,
.report-card,
.form-card {
  border-color: rgba(0, 154, 166, .14);
  box-shadow: 0 8px 22px rgba(23, 33, 43, .08);
}

.ops-card::before,
.system-health {
  border-left-color: var(--fleet-orange);
}

.ops-icon,
.quick-action-icon,
.item-icon {
  color: #ffffff;
  background: var(--fleet-teal);
}

.fuel-icon,
.maintenance-icon {
  background: var(--fleet-orange);
}

.occurrence-icon {
  background: #ef4444;
}

.bar-fill,
.chart-bar,
.mini-bar {
  background: linear-gradient(180deg, var(--fleet-orange), #ffc061);
}

.chart-accent,
.report-accent,
.section-accent {
  color: var(--fleet-orange);
}

.status.pending,
.status.warning {
  color: #9a5a00;
  background: rgba(255, 159, 28, .15);
  border-color: rgba(255, 159, 28, .28);
}

.status.approved,
.status.success {
  color: #027a48;
  background: rgba(0, 200, 83, .12);
  border-color: rgba(0, 200, 83, .22);
}

.tabs {
  background: #ffffff;
  border-color: rgba(0, 154, 166, .12);
}

.tab svg {
  width: 24px;
  height: 24px;
}

.tab.active,
.tab[aria-current="page"] {
  color: var(--fleet-teal-dark);
  background: var(--fleet-teal-soft);
}

.tab.active svg,
.tab[aria-current="page"] svg {
  color: var(--fleet-teal);
}

@media (max-width: 760px) {
  body {
    background: #f5f7fa;
  }

  .app-header {
    background: linear-gradient(180deg, var(--fleet-teal) 0%, var(--fleet-teal-dark) 100%);
    min-height: 68px;
  }

  .header-actions {
    gap: 8px;
  }

  .profile-greeting {
    align-items: flex-start;
    max-width: 96px;
    padding: 5px 8px;
  }

  .profile-greeting span,
  .profile-greeting strong {
    overflow: hidden;
    max-width: 80px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .global-search input {
    height: 40px;
    font-size: 13px;
  }

  .tabs {
    height: calc(76px + env(safe-area-inset-bottom));
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px rgba(23, 33, 43, .12);
  }

  .tab {
    min-height: 58px;
    border-radius: 18px;
    font-weight: 500;
  }

  .tab svg {
    width: 31px;
    height: 31px;
  }

  .tab span {
    font-size: 11px;
    font-weight: 500;
  }

  .tab.active,
  .tab[aria-current="page"] {
    color: var(--fleet-teal-dark);
    background: rgba(0, 154, 166, .12);
    box-shadow: none;
  }

  .fleet-hero,
  .dashboard-hero {
    background: linear-gradient(135deg, var(--fleet-teal), var(--fleet-teal-dark));
  }

  .quick-actions {
    gap: 10px;
  }
}

@media (min-width: 761px) {
  .tabs {
    background: linear-gradient(180deg, #ffffff, #f7fbfc);
  }

  .tab.active,
  .tab[aria-current="page"] {
    border-left: 4px solid var(--fleet-orange);
  }
}

@media screen {
  /* Fleet Analytics v68 final override. */
  :root {
    --fleet-teal: #009aa6;
    --fleet-teal-dark: #006c75;
    --fleet-teal-soft: #e6fbfd;
    --fleet-orange: #ff9f1c;
    --fleet-orange-strong: #ff7f11;
    --fleet-charcoal: #1f2933;
    --fleet-surface-dark: #202a33;
    --fleet-text: #2f3640;
    --fleet-muted: #7b8794;
    --ref-blue: var(--fleet-teal);
    --ref-blue-dark: var(--fleet-teal-dark);
    --ref-blue-2: #0b8793;
    --ref-blue-soft: var(--fleet-teal-soft);
    --ref-orange: var(--fleet-orange);
    --ref-text: var(--fleet-text);
    --ref-muted: var(--fleet-muted);
    --brand: var(--fleet-teal);
    --brand-2: var(--fleet-orange);
    --accent: var(--fleet-orange);
    --ink: var(--fleet-text);
  }

  body {
    color: var(--fleet-text);
    background:
      radial-gradient(circle at 4% 18%, rgba(0, 154, 166, .10), transparent 24%),
      radial-gradient(circle at 96% 8%, rgba(255, 127, 17, .15), transparent 25%),
      linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
  }

  .app-header {
    color: #ffffff;
    background: linear-gradient(180deg, var(--fleet-teal-dark) 0%, var(--fleet-teal) 100%);
    border: 0;
    box-shadow: 0 12px 30px rgba(0, 108, 117, .18);
  }

  .app-header::before { height: 0; }

  .global-search input {
    background: rgba(255, 255, 255, .96);
    border: 0;
    color: var(--fleet-charcoal);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
  }

  .profile-greeting {
    min-height: 46px;
    display: grid;
    align-content: center;
    gap: 1px;
    padding: 6px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
  }

  .profile-greeting span {
    font-size: 13px;
    line-height: 1.1;
    font-weight: 700;
  }

  .profile-greeting strong {
    color: rgba(255, 255, 255, .78);
    font-size: 11px;
    line-height: 1.1;
    font-weight: 600;
  }

  .tabs {
    background: var(--fleet-charcoal);
    box-shadow: 0 16px 38px rgba(31, 41, 51, .22);
  }

  .tab svg {
    width: 26px;
    height: 26px;
    stroke-width: 2.2;
  }

  .tab.active,
  .tab[aria-current="page"] {
    color: #ffffff;
    background: var(--fleet-teal);
    box-shadow: 0 10px 24px rgba(0, 154, 166, .28);
  }

  .fleet-hero {
    background:
      radial-gradient(circle at 88% 12%, rgba(255, 159, 28, .38), transparent 28%),
      linear-gradient(135deg, var(--fleet-charcoal) 0%, var(--fleet-surface-dark) 46%, var(--fleet-teal-dark) 100%);
  }

  .fleet-hero .eyebrow { color: #85f3fb; }

  .metric::after {
    background: linear-gradient(90deg, var(--fleet-orange), var(--fleet-teal));
  }

  .metric-icon,
  .quick-action span:first-child,
  .admin-card-icon,
  .ops-icon {
    color: #ffffff;
    background: var(--fleet-teal);
  }

  .metric:hover .metric-icon,
  .quick-action:hover span:first-child,
  .admin-card:hover .admin-card-icon {
    background: var(--fleet-orange);
  }

  .bar-track {
    height: 14px;
    background: #edf1f5;
    border-radius: 999px;
  }

  .bar-fill {
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--fleet-orange), #ffb84d);
    box-shadow: 0 4px 10px rgba(255, 159, 28, .28);
  }

  .dashboard-panel:nth-of-type(2n) .bar-fill {
    background: linear-gradient(90deg, var(--fleet-teal), #32c7d3);
  }

  .button,
  .file-button {
    background: var(--fleet-teal);
    box-shadow: 0 8px 18px rgba(0, 154, 166, .18);
  }

  .button.secondary,
  .file-button {
    color: var(--fleet-teal-dark);
    background: #ffffff;
    border-color: rgba(0, 154, 166, .24);
  }

  .status.pending,
  .status.warning {
    color: #8a4f00;
    background: rgba(255, 159, 28, .16);
  }

  .maintenance-icon,
  .ops-card.maintenance-card::before {
    background: var(--fleet-orange);
  }

  .fuel-icon,
  .ops-card.fuel-card::before {
    background: var(--fleet-teal);
  }

  @media (max-width: 760px) {
    .app-header {
      background: linear-gradient(180deg, #00747d 0%, var(--fleet-teal) 100%);
    }

    .profile-greeting {
      min-height: 38px;
      max-width: 116px;
      padding: 5px 8px;
      border-radius: 12px;
    }

    .profile-greeting span {
      max-width: 98px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 12px;
    }

    .profile-greeting strong { display: none; }

    .tabs {
      background: rgba(255, 255, 255, .98);
      box-shadow: 0 -10px 30px rgba(31, 41, 51, .16);
    }

    .tab { color: #5f6f7d; }

    .tab svg {
      width: 30px;
      height: 30px;
    }

    .tab.active,
    .tab[aria-current="page"] {
      color: #ffffff;
      background: var(--fleet-teal);
      border-radius: 18px;
    }
  }

  @media (max-width: 430px) {
    .profile-greeting { display: none; }
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(48, 48, 128, .08), transparent 310px),
    linear-gradient(135deg, #f8f9ff 0%, #eef3ff 48%, #fff6ed 100%);
  font-family: Inter, Roboto, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.top-progress {
  position: fixed;
  z-index: 120;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  background: transparent;
}

.top-progress::before {
  content: "";
  display: block;
  width: 38%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ffd39a);
  transform: translateX(-110%);
}

.top-progress.active {
  opacity: 1;
}

.top-progress.active::before {
  animation: progress-slide 1.05s ease-in-out infinite;
}

:focus-visible {
  outline: 3px solid rgba(245, 130, 31, .55);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 130;
  left: 12px;
  top: 8px;
  padding: 10px 14px;
  color: white;
  background: var(--brand);
  border-radius: var(--radius);
  transform: translateY(-160%);
  transition: transform var(--motion-fast) ease;
}

.skip-link:focus {
  transform: translateY(0);
}

[hidden] {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #005294 0%, #f5821f 100%);
}

.login-card {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(20, 35, 33, .18);
}

.login-logo {
  width: 118px;
  height: 118px;
  object-fit: contain;
  justify-self: center;
}

.login-card h1 {
  color: var(--brand);
}

.decars-wordmark {
  display: inline-block;
  color: var(--degraus-blue);
  font-weight: 950;
  letter-spacing: .01em;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .4);
}

.app-header .decars-wordmark {
  color: white;
  font-size: clamp(24px, 2.3vw, 31px);
}

.small {
  font-size: 13px;
  color: var(--muted);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(16px, 4vw, 40px);
  background: var(--brand);
  color: white;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  background: white;
  border-radius: 8px;
  padding: 4px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #ffd9b8;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

h1, h2, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(24px, 4vw, 38px);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.header-actions,
.inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.profile-button {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  min-width: 46px;
  padding: 0;
  border: 2px solid rgba(255,255,255,.7);
  border-radius: 999px;
  color: white;
  background: rgba(255,255,255,.14);
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}

.profile-button img,
.user-list-avatar img,
.profile-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-initials,
.user-list-avatar span,
.profile-preview-initials {
  display: inline-grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-weight: 900;
}

.profile-button:hover {
  transform: translateY(-1px);
}

.offline-queue-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 46px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 999px;
  color: white;
  background: rgba(18, 18, 45, .2);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
  cursor: pointer;
}

.offline-queue-badge svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.offline-queue-badge strong {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  color: var(--brand);
  background: white;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.offline-queue-badge.has-error {
  border-color: rgba(255, 255, 255, .68);
  background: rgba(163, 59, 59, .76);
}

.offline-queue-badge:hover {
  transform: translateY(-1px);
}

.offline-queue-badge[hidden] {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.global-search {
  position: relative;
  min-width: min(360px, 46vw);
  flex: 1 1 320px;
}

.global-search input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, .13);
  font: inherit;
  font-weight: 700;
}

.global-search input::placeholder {
  color: rgba(255, 255, 255, .76);
}

.global-search-results {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(70vh, 520px);
  overflow: auto;
  padding: 10px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(18, 18, 45, .46);
}

.profile-modal {
  width: min(440px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
}

.profile-preview {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  margin: 8px auto 12px;
  overflow: hidden;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border: 4px solid white;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  font-size: 42px;
}

.profile-meta {
  display: grid;
  gap: 3px;
  margin-bottom: 14px;
  text-align: center;
}

.profile-meta span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.profile-upload {
  width: 100%;
  justify-content: center;
  margin-bottom: 10px;
}

.profile-logout {
  display: block;
  width: fit-content;
  margin: -4px auto 12px;
  padding: 5px 14px;
  color: var(--danger);
  background: white;
  border: 1px solid rgba(163, 59, 59, .18);
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.profile-push {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f8fc;
}

.profile-install {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(48, 48, 128, .14);
  border-radius: 14px;
  background: rgba(234, 242, 255, .72);
}

.profile-offline {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(245, 130, 31, .24);
  border-radius: 14px;
  background: rgba(245, 130, 31, .09);
}

.profile-offline p {
  margin: 0;
}

.profile-offline .button {
  justify-self: start;
}

.profile-install p {
  margin: 0;
}

.install-action {
  gap: 7px;
}

.install-action span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-weight: 900;
}

.install-help {
  margin-top: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(48, 48, 128, .14);
  border-radius: 12px;
  background: white;
}

.install-help summary {
  cursor: pointer;
  font-weight: 800;
}

.install-help p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.profile-push p {
  margin: 0;
}

.user-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-list-avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  overflow: hidden;
  color: white;
  background: var(--brand);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.search-group + .search-group {
  margin-top: 10px;
}

.search-group h3 {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.search-result {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 10px;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.search-result:hover,
.search-result:focus-visible {
  background: var(--brand-soft);
}

.search-result strong {
  font-size: 14px;
}

.search-result span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.search-all-results {
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.user-badge,
.sync-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.layout {
  width: min(1240px, calc(100% - 24px));
  margin: 18px auto 40px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.tabs {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.tab,
.button,
.file-button {
  border: 0;
  border-radius: var(--radius);
  min-height: var(--tap);
  padding: 0 14px;
  color: white;
  background: var(--brand);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, border-color var(--motion-fast) ease, background var(--motion-fast) ease, opacity var(--motion-fast) ease;
}

.tab:hover,
.button:hover,
.file-button:hover {
  transform: translateY(-1px);
}

.tab:active,
.button:active,
.file-button:active {
  transform: translateY(0) scale(.99);
}

.button:disabled,
.button.is-loading {
  cursor: wait;
  opacity: .82;
}

.button.is-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  vertical-align: -2px;
  animation: spin .75s linear infinite;
}

.tab {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}

.tab svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-button {
  display: inline-flex;
  align-items: center;
}

.file-button input {
  display: none;
}

.tab {
  background: white;
  color: var(--brand);
  border: 1px solid var(--line);
}

.tab.active {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 10px 22px rgba(245, 130, 31, .2);
}

.mobile-label {
  display: none;
}

.button.secondary {
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid var(--line);
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 4px 0;
  text-align: left;
}

.forgot-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--brand-soft);
}

.button.danger,
.button.secondary.danger {
  color: var(--danger);
}

.view {
  display: none;
  min-width: 0;
  animation: view-enter var(--motion-normal) ease both;
}

.view.active {
  display: block;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric,
.form,
.tools,
.item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, border-color var(--motion-fast) ease;
}

.item:hover,
.form:focus-within,
.tools:hover {
  border-color: rgba(48, 48, 128, .22);
  box-shadow: var(--shadow-soft);
}

.metric {
  position: relative;
  padding: 18px;
  overflow: hidden;
  animation: card-enter 260ms ease both;
}

.metric-link {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.metric-link:hover,
.metric-link:focus-within {
  border-color: var(--brand);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.metric > span:not(.metric-icon) {
  display: block;
  font-size: 34px;
  font-weight: 800;
  color: var(--accent);
}

.metric-icon {
  position: absolute;
  right: 14px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  height: 34px;
  padding: 7px;
  border-radius: 8px;
  color: var(--brand);
  background: var(--brand-soft);
}

.metric-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric p,
.item p,
.tools p {
  color: var(--muted);
  margin-bottom: 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 12px;
}

.search-page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 20px;
  color: white;
  background: linear-gradient(135deg, var(--brand), #202768 70%, var(--accent));
  border-radius: 22px;
  box-shadow: var(--shadow-md);
}

.search-page-head .eyebrow {
  color: rgba(255, 235, 215, .92);
}

.search-page-head h2 {
  margin: 0 0 4px;
  font-size: clamp(22px, 2vw, 30px);
}

.search-page-head .section-subtitle {
  color: rgba(255, 255, 255, .84);
}

.search-page-results,
.search-page-group {
  display: grid;
  gap: 12px;
}

.search-page-group h3 {
  margin: 6px 0 0;
  color: var(--brand);
  font-size: 16px;
}

.search-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.search-page-card,
.empty-search-page {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.search-page-card {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 15px;
}

.search-page-card strong {
  color: var(--ink);
  font-size: 16px;
}

.search-page-card p {
  min-height: 38px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.search-page-kind {
  justify-self: start;
  padding: 3px 8px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.search-page-card .button {
  justify-self: start;
  min-height: 38px;
  box-shadow: none;
}

.empty-search-page {
  padding: 22px;
  color: var(--muted);
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.dashboard-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.dashboard-panel .section-title {
  margin-top: 0;
}

.smart-alert {
  cursor: pointer;
  border-left: 4px solid var(--brand);
  content-visibility: auto;
  contain-intrinsic-size: 120px;
}

.smart-alert.severity-alta {
  border-left-color: #d78318;
}

.smart-alert.severity-critica,
.smart-alert.severity-crÃ­tica {
  border-left-color: var(--danger);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.admin-card {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 18px;
  text-align: left;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.admin-card strong {
  font-size: 20px;
}

.admin-card span {
  color: var(--muted);
  font-weight: 700;
}

.admin-card:hover,
.admin-card:focus-visible {
  border-color: var(--brand);
  outline: none;
}

.timeline-panel {
  margin-top: 18px;
}

.timeline-filters,
.timeline-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 10px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  content-visibility: auto;
  contain-intrinsic-size: 96px;
}

.timeline-item:hover,
.timeline-item:focus-visible {
  border-color: var(--brand);
  box-shadow: var(--shadow-soft);
}

.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef0f7;
}

.bar-fill {
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.compact-field {
  min-width: 180px;
  font-size: 13px;
}

.month-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--brand);
  cursor: pointer;
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form {
  display: grid;
  gap: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.form[aria-busy="true"] {
  position: relative;
}

.form[aria-busy="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  pointer-events: none;
  background: linear-gradient(120deg, transparent, rgba(245, 130, 31, .08), transparent);
  animation: form-busy 1.1s ease-in-out infinite;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}

.check-row input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.reset-scope {
  max-width: 720px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(245, 130, 31, .08);
  font-weight: 700;
}

.offline-center-head {
  align-items: end;
  margin-top: 0;
}

.offline-queue-metrics {
  margin: 12px 0;
}

.offline-queue-item {
  border-left: 4px solid var(--warning);
}

.offline-queue-item.has-error {
  border-left-color: var(--danger);
}

.offline-queue-meta {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.offline-queue-error {
  color: var(--danger);
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 12px;
  font: inherit;
  background: white;
  color: var(--ink);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(163, 59, 59, .14);
}

select:disabled,
input:disabled,
textarea:disabled {
  color: var(--ink);
  background: #f1f2f8;
  opacity: 1;
}

textarea {
  resize: vertical;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 12px;
  color: var(--brand);
  font-size: 16px;
  font-weight: 900;
}

.form-steps {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.form-step-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: var(--muted);
  background: #eef0f7;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 900;
}

.form-step-indicator.active {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

.form-step-indicator.done {
  color: white;
  background: var(--brand);
  border-color: var(--brand);
}

.form-step {
  display: none;
}

.form-step.active {
  display: grid;
  gap: 12px;
}

.form-navigation {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.review-box {
  display: grid;
  gap: 10px;
}

.review-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f7f8fc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.review-card span {
  color: var(--muted);
  font-weight: 700;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.compact-split {
  gap: 10px;
}

.filter-panel {
  margin-bottom: 12px;
}

.section-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.push-permission-help {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, .32);
  border-radius: 12px;
  background: rgba(255, 244, 214, .82);
  color: var(--ink);
}

.push-permission-help summary {
  cursor: pointer;
  font-weight: 800;
}

.push-permission-help p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 680px) {
  .modal-backdrop {
    place-items: start center;
    overflow: auto;
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  }

  .profile-modal {
    max-height: calc(100dvh - max(20px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
    padding: 14px;
  }
}

.report-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
  padding: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.report-toolbar > label {
  min-width: 0;
}

.report-toolbar > .button {
  justify-self: start;
  min-width: 0;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.report-title-card {
  padding: 16px;
  margin-bottom: 12px;
  color: white;
  background: linear-gradient(135deg, var(--brand), #1f2f8a);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.report-title-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
}

.report-title-card p {
  margin: 0;
  color: rgba(255,255,255,.86);
  font-weight: 700;
}

.metric small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compact-item {
  padding: 12px;
}

.table-shell {
  margin-bottom: 14px;
}

.responsive-table {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.responsive-table table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

.responsive-table th,
.responsive-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.responsive-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--brand);
  background: #f7f8fc;
  font-weight: 900;
}

.compact-admin-form {
  margin-bottom: 12px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

  .fine-action-menu {
    position: relative;
    width: fit-content;
    margin-top: 10px;
    margin-left: auto;
  }

.fine-action-menu summary {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 34px;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  list-style: none;
  cursor: pointer;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: .04em;
}

  .fine-action-menu summary::-webkit-details-marker {
    display: none;
  }

  .fine-action-popover {
    position: absolute;
    right: 0;
    z-index: 40;
    display: grid;
    min-width: 236px;
    margin-top: 8px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(0, 82, 148, .16);
  }

  .fine-action-popover button {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    color: var(--ink);
    background: transparent;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
  }

  .fine-action-popover button:hover,
  .fine-action-popover button:focus-visible {
    color: var(--brand);
    background: var(--brand-soft);
    outline: none;
  }

  .fine-action-menu[open] summary {
    color: #ffffff;
    background: var(--brand);
    border-color: var(--brand);
  }

.item {
  padding: 14px;
}

.item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  background: #eef5f2;
  color: var(--brand);
  transition: background var(--motion-fast) ease, color var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.status.is-busy::before,
.status.is-ok::before,
.status.is-error::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 999px;
  background: currentColor;
}

.status.is-busy::before {
  animation: status-blink .8s ease-in-out infinite alternate;
}

.status.is-ok {
  color: var(--ok);
  background: #e9f7ef;
}

.status.is-error {
  color: var(--danger);
  background: #fdeaea;
}

.status.pending {
  background: #fff3d9;
  color: #805a13;
}

.status.approved {
  background: #e0f3e9;
  color: var(--ok);
}

.status.warning {
  background: #fff3d9;
  color: #805a13;
}

.status.rejected {
  background: #f7e2e2;
  color: var(--danger);
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tools {
  padding: 16px;
  margin-top: 18px;
}

.qr-box {
  margin-top: 12px;
  min-height: 0;
}

.qr-box img {
  width: 180px;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.qr-inline {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.qr-inline img {
  width: 86px;
  height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.photo-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.photo-link {
  display: inline-grid;
  gap: 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.photo-link img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  opacity: 0;
  transform: translateY(8px);
  transition: .2s ease;
  pointer-events: none;
  box-shadow: var(--shadow-raised);
}

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

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

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

.toast.info {
  background: var(--ink);
}

.pulse-once {
  animation: pulse-once 620ms ease;
}

.screen-busy .metric,
.screen-busy .item {
  cursor: progress;
}

@keyframes progress-slide {
  0% { transform: translateX(-110%); }
  55% { transform: translateX(110%); }
  100% { transform: translateX(260%); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes view-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes card-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-once {
  0% { box-shadow: 0 0 0 0 rgba(245, 130, 31, .32); }
  70% { box-shadow: 0 0 0 10px rgba(245, 130, 31, 0); }
  100% { box-shadow: none; }
}

@keyframes status-blink {
  from { opacity: .35; transform: scale(.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes form-busy {
  0% { opacity: .25; transform: translateX(-8px); }
  50% { opacity: 1; transform: translateX(0); }
  100% { opacity: .25; transform: translateX(8px); }
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(1160px, calc(100% - 24px));
  margin: 0 auto 24px;
  padding: 16px;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.app-footer img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex: 0 0 auto;
}

.app-footer p {
  margin: 0;
}

@media (max-width: 760px) {
  body {
    padding-bottom: 86px;
  }

  .app-header,
  .item-head {
    align-items: stretch;
    flex-direction: column;
  }

  .app-header {
    padding: 14px 14px 12px;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
  }

  h1 {
    font-size: 24px;
  }

  .layout {
    display: block;
    width: min(100% - 18px, 760px);
    margin: 12px auto 22px;
  }

  .tabs {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    top: auto;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 40px rgba(0, 82, 148, .22);
    overflow: hidden;
  }

  .tab {
    min-height: 58px;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 4px;
    padding: 6px 4px;
    font-size: 11px;
    white-space: normal;
    line-height: 1.05;
  }

  .tab svg {
    width: 21px;
    height: 21px;
  }

  .secondary-mobile-nav {
    display: none;
  }

  .desktop-label {
    display: none;
  }

  .mobile-label {
    display: inline;
  }

  .metrics,
  .split,
  .dashboard-grid,
  .report-toolbar {
    grid-template-columns: 1fr;
  }

  .report-actions .button {
    flex: 1 1 46%;
  }

  .responsive-table {
    border-radius: 8px;
  }

  .responsive-table table {
    min-width: 680px;
  }

  .header-actions .button {
    flex: 1;
  }

  .global-search {
    min-width: 100%;
    order: -1;
  }

  .global-search-results {
    position: fixed;
    top: 92px;
    left: 10px;
    right: 10px;
    max-height: calc(100vh - 190px);
  }

  .app-footer {
    align-items: center;
    flex-direction: column;
    margin-bottom: 76px;
  }

  .form-navigation {
    position: sticky;
    bottom: 84px;
    z-index: 20;
    padding: 10px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
  }

  .form-navigation .button {
    flex: 1 1 42%;
  }
}

/* Degraus Fleet Mobile Experience */
.app-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: var(--degraus-text);
  background: linear-gradient(135deg, var(--degraus-orange), #e86d12 68%, var(--degraus-blue));
  border-bottom: 1px solid rgba(31, 41, 51, .08);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .10);
  padding-block: 12px;
}

.brand-logo {
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .14);
}

.brand-lockup h1 {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 900;
  color: var(--degraus-text);
}

.global-search input,
input,
select,
textarea {
  border-radius: 18px;
  border-color: var(--degraus-border);
  color: var(--degraus-text);
  background: var(--degraus-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.global-search input {
  min-height: 40px;
  padding-inline: 16px;
  color: var(--degraus-text);
  background: var(--degraus-white);
  border-color: rgba(15, 23, 42, .08);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .10);
  font-size: 14px;
  font-weight: 600;
}

.global-search input::placeholder {
  color: #5f6878;
}

.global-search input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(245, 130, 31, .72);
  box-shadow: 0 0 0 4px rgba(245, 130, 31, .13);
}

.layout {
  max-width: 1500px;
  grid-template-columns: minmax(224px, 264px) minmax(0, 1fr);
  gap: 20px;
  padding: 20px clamp(14px, 3vw, 30px) 32px;
}

.tabs {
  position: sticky;
  top: 104px;
  align-self: start;
  padding: 14px;
  border: 1px solid rgba(48, 48, 128, .22);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--degraus-blue-soft), var(--degraus-white));
  box-shadow: var(--shadow-sm);
}

.tabs::before {
  content: "";
  display: block;
  height: 4px;
  margin: -4px 10px 4px;
  border-radius: 999px;
  background: var(--degraus-blue);
}

.tab {
  min-height: 54px;
  border-radius: 16px;
  color: var(--degraus-text);
  font-weight: 800;
  transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast);
}

.tab svg {
  width: 22px;
  height: 22px;
}

.tab:hover {
  transform: translateY(-1px);
  background: var(--degraus-blue-soft);
}

.tab.active {
  color: white;
  background: var(--degraus-blue);
  box-shadow: 0 10px 22px rgba(48, 48, 128, .20);
}

.view {
  border: 1px solid rgba(48, 48, 128, .10);
  border-radius: 24px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
}

#reports .section-title,
#admin .section-title,
.timeline-panel .section-title,
.report-print-area > .section-title {
  padding-inline: 10px;
}

.timeline-panel {
  padding: 12px;
  border: 1px solid var(--degraus-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
}

.timeline-filters {
  padding-inline: 4px;
}

.fleet-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
  padding: clamp(20px, 3vw, 28px);
  color: white;
  overflow: hidden;
  border-radius: 24px;
  background:
    linear-gradient(135deg, var(--degraus-blue), var(--degraus-blue-dark) 72%, #005294);
  box-shadow: var(--shadow-md);
}

.fleet-hero .eyebrow {
  color: #ffd9ad;
  font-weight: 900;
}

.fleet-hero h2 {
  margin-bottom: 8px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
  font-weight: 900;
}

.fleet-hero p:not(.eyebrow) {
  max-width: 680px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, .88);
  font-size: clamp(14px, 1.3vw, 16px);
}

.fleet-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(360px, 100%);
}

.hero-button {
  min-height: 48px;
  border-color: rgba(255, 255, 255, .25);
  box-shadow: 0 14px 26px rgba(0, 0, 0, .16);
}

.hero-button.secondary {
  color: var(--degraus-blue);
  color: white;
  background: var(--degraus-orange);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.quick-action {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 92px;
  padding: 12px 10px;
  color: var(--degraus-text);
  background: var(--degraus-white);
  border: 1px solid var(--degraus-border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.quick-action span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--degraus-blue);
  background: linear-gradient(135deg, var(--degraus-blue-soft), var(--degraus-orange-soft));
  border-radius: 16px;
  font-size: 24px;
  font-weight: 950;
}

.quick-action strong {
  color: var(--degraus-text);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.quick-action:hover {
  transform: translateY(-2px);
  border-color: rgba(48, 48, 128, .22);
  box-shadow: var(--shadow-md);
}

.metrics {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.metric {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--degraus-border);
  border-radius: 20px;
  background: var(--degraus-white);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.metric::after {
  content: "";
  position: absolute;
  inset: auto 18px 16px 18px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--degraus-blue), var(--degraus-orange));
  opacity: .85;
}

.metric:hover,
.item:hover,
.dashboard-panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.metric span[id] {
  display: block;
  margin-top: 12px;
  color: var(--degraus-blue);
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1;
  font-weight: 900;
}

.metric p {
  margin: 8px 0 0;
  color: var(--degraus-muted);
  font-weight: 800;
  font-size: 14px;
}

.metric-icon {
  width: 42px;
  height: 42px;
  color: white;
  background: var(--degraus-blue);
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(48, 48, 128, .16);
}

.dashboard-panel,
.form,
.tools-card,
.item,
.profile-dialog,
.modal-card,
.responsive-table {
  border: 1px solid var(--degraus-border);
  border-radius: 20px;
  background: var(--degraus-white);
  box-shadow: var(--shadow-sm);
}

.section-title {
  margin: 24px 0 14px;
}

.section-title h2 {
  color: var(--degraus-text);
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 850;
}

.button {
  min-height: 46px;
  border-radius: 14px;
  font-weight: 900;
  background: var(--degraus-blue);
  box-shadow: 0 8px 20px rgba(48, 48, 128, .14);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(48, 48, 128, .18);
}

.button:active {
  transform: translateY(0) scale(.99);
}

.status,
.badge,
.sync-status,
.user-badge {
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0;
}

.sync-status {
  color: var(--degraus-text);
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(31, 41, 51, .08);
}

.profile-button {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-width: 3px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .18);
}

.global-search-results {
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
}

.user-badge {
  color: var(--degraus-text);
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(31, 41, 51, .08);
}

.more-profile-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 22px;
  color: var(--degraus-text);
  background: linear-gradient(135deg, var(--degraus-orange), #e86d12 64%, var(--degraus-blue));
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.more-profile-avatar {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  overflow: hidden;
  color: white;
  background: var(--degraus-blue);
  border: 3px solid rgba(255, 255, 255, .8);
  border-radius: 999px;
  font-weight: 950;
}

.more-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.more-profile-panel .eyebrow {
  color: rgba(31, 41, 51, .72);
  font-size: 12px;
  font-weight: 950;
}

.more-profile-panel h2 {
  margin: 0;
  color: var(--degraus-text);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
}

.more-profile-panel p:last-child {
  margin: 4px 0 0;
  color: rgba(31, 41, 51, .78);
  font-weight: 750;
}

.more-feature-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 64px;
  margin-bottom: 18px;
  padding: 14px 18px;
  color: white;
  background: linear-gradient(135deg, var(--degraus-blue), var(--degraus-blue-dark));
  border: 0;
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  text-align: left;
}

.more-feature-card strong,
.more-feature-card small {
  display: block;
}

.more-feature-card strong {
  font-size: 17px;
}

.more-feature-card small {
  margin-top: 2px;
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
}

.more-feature-card > span:last-child {
  font-size: 30px;
  font-weight: 700;
}

.more-section-title {
  margin-top: 10px;
}

.admin-grid {
  gap: 12px;
}

.admin-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 74px;
  border-radius: 18px;
  background: var(--degraus-white);
  border: 1px solid var(--degraus-border);
  box-shadow: var(--shadow-sm);
}

.admin-card strong {
  color: var(--degraus-text);
  font-size: 18px;
}

.admin-card span {
  color: var(--degraus-muted);
}

.admin-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white !important;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--degraus-blue), var(--degraus-orange));
  box-shadow: 0 8px 18px rgba(48, 48, 128, .18);
}

.admin-card-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-card-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-card-copy > span {
  font-size: 13px;
  line-height: 1.35;
}

@media (min-width: 901px) {
  .form,
  .tools {
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
  }

  label {
    gap: 5px;
    font-size: 13px;
    font-weight: 650;
  }

  input,
  select,
  textarea {
    min-height: 40px;
    padding: 8px 11px;
    border-radius: 12px;
    font-size: 14px;
  }

  textarea {
    min-height: 78px;
  }

  .button,
  .file-button {
    min-height: 40px;
    padding-inline: 13px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
  }

  .section-title {
    margin: 15px 0 10px;
  }

  .section-title h2 {
    font-size: clamp(17px, 1.5vw, 21px);
    font-weight: 800;
  }

  .app-header .header-actions {
    flex-wrap: nowrap;
  }

  .app-header .global-search {
    flex: 0 1 420px;
    min-width: min(300px, 34vw);
  }

  .app-header .user-badge {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #fines .metrics {
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 11px;
    margin-bottom: 12px;
  }

  #fines .metric {
    min-height: 112px;
    padding: 14px;
    border-radius: 18px;
  }

  #fines .metric::after {
    inset: auto 14px 12px;
    height: 3px;
  }

  #fines .metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 13px;
  }

  #fines .metric span[id] {
    margin-top: 7px;
    font-size: clamp(21px, 1.8vw, 28px);
  }

  #fines .metric > span:not(.metric-icon) {
    margin-top: 7px;
    font-size: clamp(21px, 1.8vw, 28px);
  }

  #fines .metric p,
  #fines .metric small {
    font-size: 12px;
    line-height: 1.3;
  }

  #fines .split {
    grid-template-columns: minmax(360px, .92fr) minmax(300px, 1.08fr);
    gap: 14px;
  }

  #fineForm,
  #fines .filter-panel {
    gap: 8px;
    padding: 14px;
    border-radius: 18px;
  }

  #fineForm .section-title {
    margin: 0 0 5px;
  }

  #fineForm .section-title h2 {
    font-size: 18px;
  }

  #fineForm label,
  #fineForm legend {
    font-size: 13px;
    line-height: 1.35;
  }

  #fineForm legend {
    margin-bottom: 7px;
  }

  #fineForm input,
  #fineForm select,
  #fineForm textarea {
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 11px;
    font-size: 14px;
  }

  #fineForm textarea {
    min-height: 66px;
  }

  #fineForm .form-steps {
    gap: 5px;
    margin-bottom: 7px;
  }

  #fineForm .form-step-indicator {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  #fineForm .form-step.active {
    gap: 8px;
  }

  #fineForm .form-navigation {
    gap: 6px;
    margin-top: 9px;
    padding-top: 9px;
  }

  #fineForm .button {
    min-height: 38px;
    padding-inline: 11px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 700;
  }

  #fines .item {
    padding: 13px;
    border-radius: 17px;
  }

  #fines .item h3,
  #fines .item strong {
    font-size: 15px;
    line-height: 1.35;
  }

  #fines .item p {
    font-size: 13px;
    line-height: 1.38;
  }
}

.toast {
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.bar-chart .bar {
  border-radius: 14px;
}

.app-footer {
  margin: 6px auto 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .76);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 900px) {
  body {
    padding-bottom: 86px;
    background: var(--degraus-bg);
  }

  .app-header {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 46px;
    align-items: center;
    gap: 9px;
    min-height: 74px;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    color: var(--degraus-text);
    background: linear-gradient(135deg, var(--degraus-orange), #e86d12 68%, var(--degraus-blue));
    border-radius: 0 0 26px 26px;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .brand-lockup h1 {
    font-size: 18px;
  }

  .brand-lockup {
    grid-column: 1;
    gap: 0;
    width: 48px;
  }

  .brand-lockup > div {
    display: none;
  }

  .header-actions {
    display: contents;
  }

  .global-search {
    grid-column: 2;
    grid-row: 1;
    order: 0;
    width: 100%;
    min-width: 0;
    margin-top: 0;
  }

  .global-search input {
    min-height: 46px;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--degraus-text);
    background: white;
    font-size: 14px;
  }

  .sync-status,
  .user-badge,
  #installBtn {
    display: none;
  }

  .profile-button {
    grid-column: 3;
    grid-row: 1;
    width: 48px;
    height: 48px;
    min-width: 48px;
    color: white;
    background: var(--degraus-blue);
  }

  .layout {
    display: block;
    padding: 12px 10px 104px;
  }

  .tabs {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    top: auto;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 8px;
    min-height: calc(76px + env(safe-area-inset-bottom));
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-radius: 24px;
    background: white;
    border: 1px solid rgba(48, 48, 128, .28);
    box-shadow: 0 -6px 20px rgba(15, 23, 42, .12);
  }

  .tabs::before {
    display: none;
  }

  .tab {
    min-height: 58px;
    padding: 6px 3px;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    color: var(--degraus-muted);
    background: transparent;
    border: 0;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.1;
  }

  .tab svg {
    width: 29px;
    height: 29px;
    padding: 5px;
    border-radius: 15px;
    background: linear-gradient(135deg, #f2f4ff, #fff0df);
    filter: drop-shadow(0 5px 10px rgba(15, 23, 42, .10));
  }

  .tab.active {
    color: var(--degraus-blue);
    background: transparent;
    box-shadow: none;
  }

  .tab.active svg {
    width: 31px;
    height: 31px;
    color: white;
    padding: 5px;
    background: linear-gradient(135deg, var(--degraus-blue), var(--degraus-orange));
    border-radius: 16px;
  }

  .secondary-mobile-nav,
  .mobile-more-nav {
    display: none !important;
  }

  .view {
    padding: 10px;
    border: 0;
    border-radius: 22px;
    background: transparent;
    box-shadow: none;
  }

  .fleet-hero {
    display: grid;
    min-height: 146px;
    padding: 20px 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--degraus-blue), var(--degraus-blue-dark));
  }

  .fleet-hero h2 {
    font-size: 27px;
  }

  .fleet-hero p:not(.eyebrow) {
    font-size: 14px;
  }

  .fleet-hero-actions {
    min-width: 0;
    justify-content: stretch;
  }

  .fleet-hero-actions .button {
    flex: 1 1 100%;
  }

  .section-title {
    margin: 14px 0 9px;
  }

  .section-title h2 {
    font-size: 17px;
    line-height: 1.25;
    font-weight: 750;
  }

  .section-subtitle,
  .item p,
  .tools p {
    font-size: 13px;
    line-height: 1.4;
  }

  .button,
  .file-button {
    min-height: 40px;
    padding-inline: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 650;
    box-shadow: 0 5px 14px rgba(48, 48, 128, .12);
  }

  .button:hover,
  .file-button:hover {
    transform: none;
  }

  .form,
  .tools,
  .item,
  .dashboard-panel,
  .responsive-table {
    padding: 12px;
    border-radius: 16px;
  }

  .form {
    gap: 9px;
    margin-bottom: 12px;
  }

  .form .section-title {
    margin: 0 0 4px;
  }

  label {
    gap: 4px;
    font-size: 14px;
    font-weight: 650;
  }

  input,
  select,
  textarea {
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 15px;
  }

  textarea {
    min-height: 76px;
  }

  legend {
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 750;
  }

  .form-step.active {
    gap: 9px;
  }

  .form-steps {
    gap: 5px;
    margin-bottom: 8px;
  }

  .form-step-indicator {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .form-navigation {
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
  }

  #fineForm {
    gap: 7px;
    padding: 10px;
  }

  #fineForm .section-title h2 {
    font-size: 15px;
  }

  #fineForm label,
  #fineForm legend {
    font-size: 12px;
  }

  #fineForm input,
  #fineForm select,
  #fineForm textarea {
    min-height: 36px;
    padding: 6px 9px;
    font-size: 13px;
  }

  #fineForm .form-navigation {
    position: static;
    padding: 8px 0 0;
    background: transparent;
    border-radius: 0;
    border-inline: 0;
    border-bottom: 0;
    box-shadow: none;
  }

  #fineForm .form-navigation .button {
    flex: 0 1 auto;
    min-height: 32px;
    padding-inline: 9px;
    font-size: 12px;
  }

  #fines .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #fines .metric {
    min-height: 98px;
    padding: 11px;
    border-radius: 15px;
  }

  #fines .metric::after {
    inset: auto 11px 10px;
    height: 3px;
  }

  #fines .metric-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  #fines .metric span[id] {
    margin-top: 7px;
    font-size: 22px;
  }

  #fines .metric > span:not(.metric-icon) {
    font-size: 21px;
    line-height: 1;
  }

  #fines .metric p {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.25;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .metric {
    min-height: 126px;
    padding: 16px;
    border-radius: 18px;
  }

  .metric-icon {
    width: 42px;
    height: 42px;
  }

  .metric span[id] {
    font-size: 27px;
  }

  .quick-actions {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 12px;
    scroll-snap-type: x mandatory;
  }

  .quick-action {
    flex: 0 0 82px;
    width: 82px;
    min-height: 86px;
    scroll-snap-align: start;
    border-radius: 16px;
  }

  .quick-action span {
    width: 40px;
    height: 40px;
    font-size: 23px;
  }

  .more-profile-panel {
    margin: -2px 0 14px;
    padding: 22px 18px;
    border-radius: 22px;
  }

  .more-profile-panel h2 {
    font-size: 30px;
  }

  .admin-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-card {
    min-height: 62px;
    padding: 11px 12px;
    text-align: left;
  }

  .admin-card strong {
    font-size: 15px;
    font-weight: 700;
  }

  .admin-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .admin-card-icon svg {
    width: 22px;
    height: 22px;
  }

  .timeline-panel {
    padding: 10px;
  }

  .timeline-filters,
  .timeline-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-inline: 0;
  }

  .timeline-filters input,
  .timeline-filters select {
    min-width: 0;
  }

  #reports .section-title,
  #admin .section-title,
  .timeline-panel .section-title,
  .report-print-area > .section-title {
    padding-inline: 4px;
  }

  .list-footer {
    padding-inline: 8px;
  }

  .more-profile-panel {
    padding: 16px;
  }

  .more-profile-avatar {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
  }

  .more-profile-panel h2 {
    font-size: 24px;
  }

  .more-feature-card {
    min-height: 56px;
    padding: 12px 14px;
    border-radius: 16px;
  }

  .more-feature-card strong {
    font-size: 15px;
  }

  #approvals .section-title {
    padding-inline: 2px;
  }

  .item,
  .form,
  .dashboard-panel {
    border-radius: 22px;
  }
}

/* Visual shell audit: shared sizing keeps pages aligned without changing flows. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  color: var(--color-text);
}

button,
input,
select,
textarea {
  font: inherit;
  line-height: 1.35;
}

button,
input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}

select:not([multiple]) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
}

.brand-home {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  text-decoration: none;
}

.brand-home:hover .brand-logo,
.brand-home:focus-visible .brand-logo {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.brand-logo {
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.app-header {
  position: sticky;
  z-index: 90;
  top: 0;
  min-height: var(--app-header-height);
  height: var(--app-header-height);
  padding-block: 10px;
  isolation: isolate;
  box-shadow: 0 10px 28px rgba(30, 27, 75, .12);
}

.app-header .brand-lockup,
.app-header .header-actions {
  min-width: 0;
}

.app-header .brand-lockup > div {
  min-width: 0;
}

.app-header .eyebrow {
  margin-bottom: 2px;
}

.app-header .decars-wordmark {
  font-size: clamp(23px, 2vw, 30px);
}

.app-header .global-search {
  min-width: 220px;
  width: min(440px, 42vw);
  flex: 1 1 280px;
}

.global-search input {
  min-width: 0;
  min-height: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layout {
  width: min(var(--app-content-max), calc(100% - (2 * var(--app-padding))));
  grid-template-columns: minmax(236px, var(--app-sidebar-width)) minmax(0, 1fr);
  gap: var(--app-gap);
  margin: var(--app-gap) auto 26px;
}

.tabs {
  top: calc(var(--app-header-height) + 12px);
  max-height: calc(100dvh - var(--app-header-height) - 28px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.tab {
  min-height: 46px;
  border-radius: 12px;
  font-size: 14px;
}

.view {
  scroll-margin-top: calc(var(--app-header-height) + 16px);
}

.fleet-hero,
.dashboard-panel,
.metric,
.form,
.tools,
.item,
.responsive-table,
.search-page-card,
.empty-search-page {
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.metric:hover,
.item:hover,
.dashboard-panel:hover {
  transform: translateY(-1px);
}

.form,
.tools,
.dashboard-panel,
.item {
  padding: clamp(12px, 1.1vw, 18px);
}

.form {
  gap: 10px;
}

.form .section-title:first-child,
.tools > h2:first-child {
  margin-top: 0;
}

.section-title {
  min-width: 0;
  margin: 18px 0 10px;
}

.section-title h2 {
  line-height: 1.25;
}

h1 {
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.12;
}

h2 {
  font-size: clamp(19px, 1.7vw, 25px);
  line-height: 1.25;
}

h3 {
  font-size: clamp(17px, 1.3vw, 21px);
  line-height: 1.3;
}

p {
  line-height: 1.5;
}

label {
  font-size: 14px;
  font-weight: 650;
}

input,
select,
textarea {
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 15px;
}

textarea {
  min-height: 88px;
}

.button,
.file-button {
  min-height: 46px;
  padding-inline: 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(48, 48, 128, .12);
}

.button.secondary,
.file-button {
  box-shadow: none;
}

.split,
.timeline-filters,
.timeline-summary {
  min-width: 0;
}

.report-toolbar {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  box-shadow: var(--shadow-sm);
}

.report-toolbar > .button {
  width: fit-content;
  max-width: 100%;
}

.app-footer {
  width: min(var(--app-content-max), calc(100% - (2 * var(--app-padding))));
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 650;
}

.app-footer img {
  width: 34px;
  height: 34px;
}

@media (max-width: 1024px) {
  :root {
    --app-sidebar-width: 236px;
  }

  .layout {
    grid-template-columns: minmax(212px, var(--app-sidebar-width)) minmax(0, 1fr);
  }

  .app-header .global-search {
    width: min(360px, 36vw);
  }
}

@media (min-width: 901px) {
  .layout {
    display: grid;
    align-items: start;
  }

  .tabs {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    width: 100%;
    min-width: 0;
  }

  .view.active {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
  }

  .view > .form:not(#fineForm) {
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    align-items: start;
    max-width: 1040px;
  }

  .view > .form:not(#fineForm) > .section-title,
  .view > .form:not(#fineForm) > .check-row,
  .view > .form:not(#fineForm) > button,
  .view > .form:not(#fineForm) > label:has(textarea) {
    grid-column: 1 / -1;
  }

  .view > .form:not(#fineForm) > button {
    justify-self: start;
    width: auto;
  }

  .split .form {
    align-content: start;
    min-width: 0;
  }

  input,
  select,
  textarea {
    min-height: 42px;
    padding-block: 8px;
  }

  textarea {
    min-height: 78px;
  }
}

@media (max-width: 900px) {
  :root {
    --app-header-height: calc(72px + env(safe-area-inset-top));
  }

  .app-header {
    height: var(--app-header-height);
    min-height: var(--app-header-height);
    padding-top: max(9px, env(safe-area-inset-top));
    padding-bottom: 9px;
    border-radius: 0 0 20px 20px;
  }

  .app-header .global-search {
    width: 100%;
    min-width: 0;
  }

  .global-search input {
    min-height: 44px;
    padding-inline: 13px;
    font-size: 14px;
  }

  .layout {
    width: 100%;
    margin: 0;
    padding: 10px 9px calc(100px + env(safe-area-inset-bottom));
  }

  .tabs {
    position: fixed !important;
    top: auto !important;
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-height: none;
    overflow: hidden;
  }

  .view {
    padding-inline: 4px;
    scroll-margin-top: calc(var(--app-header-height) + 10px);
  }

  .section-title {
    margin: 13px 0 8px;
    padding-inline: 2px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  input,
  select,
  textarea {
    min-height: 46px;
  }

  #fineForm input,
  #fineForm select,
  #fineForm textarea {
    min-height: 40px;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .timeline-filters,
  .timeline-summary {
    grid-template-columns: 1fr;
  }

  .report-toolbar > .button,
  .report-actions .button {
    width: 100%;
  }

  .app-footer {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}

@media print {
  body {
    padding: 0;
    background: white;
  }

  .login-screen,
  .app-header,
  .tabs,
  .report-toolbar,
  .report-actions,
  .app-footer,
  .toast,
  .section-title:not(#reports .section-title) {
    display: none !important;
  }

  .layout {
    display: block;
    width: 100%;
    margin: 0;
  }

  .view {
    display: none !important;
    box-shadow: none;
    border: 0;
  }

  #reports.view {
    display: block !important;
    padding: 0;
  }

  .report-print-area,
  .responsive-table,
  .metric,
  .item {
    box-shadow: none;
  }

  .responsive-table {
    overflow: visible;
  }

  .responsive-table table {
    min-width: 0;
    font-size: 10px;
  }
}

@media screen {
  /* Degraus vehicles reference layout - v62. Local visual layer based on
     docs/referencia-layout-veiculos.png.png. Business logic is preserved. */
  :root {
    --ref-blue-dark: #005294;
    --ref-blue: #005294;
    --ref-blue-2: #005294;
    --ref-blue-soft: #eef2ff;
    --ref-orange: #f5821f;
    --ref-green: #00c853;
    --ref-red: #f44336;
    --ref-bg: #f6f7fb;
    --ref-surface: #ffffff;
    --ref-text: #005294;
    --ref-muted: #61647d;
    --ref-border: #e5eaf0;
    --ref-radius-sm: 12px;
    --ref-radius: 18px;
    --ref-radius-lg: 24px;
    --ref-shadow: 0 12px 34px rgba(0, 82, 148, .08);
    --ref-shadow-soft: 0 4px 18px rgba(0, 82, 148, .07);
    --ref-header-height: 76px;
    --ref-sidebar-width: 252px;
    --brand: var(--ref-blue);
    --brand-2: var(--ref-orange);
    --accent: var(--ref-orange);
    --ink: var(--ref-text);
    --muted: var(--ref-muted);
    --line: var(--ref-border);
    --panel: var(--ref-surface);
    --bg: var(--ref-bg);
    --radius: var(--ref-radius-sm);
    --radius-lg: var(--ref-radius);
    --radius-xl: var(--ref-radius-lg);
    --shadow-soft: var(--ref-shadow-soft);
    --shadow-raised: var(--ref-shadow);
    --app-header-height: var(--ref-header-height);
    --app-sidebar-width: var(--ref-sidebar-width);
    --app-content-max: 1480px;
  }

  html,
  body {
    min-width: 0;
    overflow-x: hidden;
    background: var(--ref-bg);
    color-scheme: light;
  }

  body {
    color: var(--ref-text);
    color-scheme: light;
    font-family: Inter, Nunito Sans, Roboto, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 450;
    line-height: 1.48;
  }

  h1,
  h2,
  h3,
  strong {
    color: var(--ref-text);
  }

  h1 { font-size: 24px; font-weight: 700; }
  h2 { font-size: 20px; font-weight: 700; }
  h3 { font-size: 16px; font-weight: 650; }

  .eyebrow {
    color: var(--ref-blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
  }

  .section-subtitle,
  .field-help,
  .small,
  .item p,
  .admin-card span,
  .more-feature-card small {
    color: var(--ref-muted);
  }

  .login-screen {
    min-height: 100dvh;
    padding: clamp(18px, 4vw, 48px);
    background: radial-gradient(circle at 18% 10%, rgba(245, 130, 31, .18), transparent 28%),
      linear-gradient(135deg, #f8f9ff 0%, #f6f7fb 58%, #fff6ed 100%);
  }

  .login-card {
    width: min(420px, 100%);
    padding: 30px 26px;
    border: 1px solid rgba(229, 234, 240, .92);
    border-radius: 24px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 28px 70px rgba(0, 82, 148, .12);
  }

  .login-logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
    margin-bottom: 10px;
  }

  .login-card h1,
  .login-card .decars-wordmark {
    color: var(--ref-blue-dark);
    font-size: 24px;
    letter-spacing: 0;
  }

  .app-header {
    position: sticky;
    top: 0;
    z-index: 80;
    min-height: var(--ref-header-height);
    height: var(--ref-header-height);
    padding: 12px clamp(16px, 2vw, 28px);
    color: var(--ref-text);
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--ref-border);
    box-shadow: 0 8px 24px rgba(0, 82, 148, .06);
    backdrop-filter: blur(16px);
    border-top: 4px solid var(--ref-orange);
  }

  .app-header::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 118px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(245, 130, 31, .16), transparent);
  }

  .brand-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(245, 130, 31, .2);
  }

  .app-header .brand-copy {
    display: none !important;
  }

  .app-header .eyebrow {
    color: var(--ref-muted);
    font-size: 10px;
  }

  .app-header .decars-wordmark {
    color: var(--ref-blue-dark);
    font-size: 21px;
    font-weight: 850;
    letter-spacing: 0;
  }

  .header-actions {
    gap: 10px;
    flex-wrap: nowrap;
    min-width: 0;
  }

  .global-search {
    flex: 1 1 420px;
    min-width: 240px;
    max-width: 560px;
  }

  .global-search input {
    min-height: 46px;
    padding: 0 18px;
    color: var(--ref-text);
    background: #ffffff;
    border: 1px solid var(--ref-border);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
    font-size: 14px;
    font-weight: 500;
    color-scheme: light;
  }

  input[type="date"],
  input[type="datetime-local"],
  input[type="month"],
  input[type="time"] {
    color-scheme: light;
  }

  input[type="file"] {
    color: var(--ref-muted);
    background: #ffffff;
  }

  .global-search input::placeholder { color: #7b8f9b; }

  .global-search input:focus {
    background: white;
    border-color: rgba(0, 87, 217, .5);
    box-shadow: 0 0 0 4px rgba(0, 87, 217, .12);
  }

  .profile-button,
  .offline-queue-badge {
    width: 46px;
    height: 46px;
    min-width: 46px;
    color: var(--ref-blue);
    background: #ffffff;
    border: 1px solid var(--ref-border);
    box-shadow: var(--ref-shadow-soft);
  }

  .offline-queue-badge strong {
    color: white;
    background: var(--ref-orange);
  }

  .profile-initials { color: var(--ref-blue-dark); }

  .layout {
    width: min(var(--app-content-max), 100%);
    margin: 0 auto;
    padding: 18px clamp(16px, 2vw, 28px) 28px;
    display: grid;
    grid-template-columns: var(--ref-sidebar-width) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
  }

  .tabs {
    position: sticky;
    top: calc(var(--ref-header-height) + 18px);
    z-index: 50;
    width: 100%;
    max-height: calc(100dvh - var(--ref-header-height) - 36px);
    overflow: auto;
    display: grid;
    gap: 7px;
    padding: 16px;
    background: radial-gradient(circle at 30% 0, rgba(245, 130, 31, .28), transparent 24%),
      linear-gradient(180deg, var(--ref-blue) 0%, var(--ref-blue-dark) 100%);
    border: 0;
    border-radius: 24px;
    box-shadow: 0 22px 54px rgba(0, 82, 148, .22);
  }

  .tab {
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    color: rgba(255, 255, 255, .82);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 14px;
    box-shadow: none;
    font-size: 14px;
    font-weight: 600;
  }

  .tab svg {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
  }

  .tab:hover,
  .tab:focus-visible {
    color: white;
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .12);
    transform: none;
  }

  .tab.active,
  .tab[aria-current="page"] {
    color: var(--ref-blue-dark);
    background: white;
    border-color: white;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .14);
  }

  .reference-mobile-only {
    display: none !important;
  }

  .view {
    min-width: 0;
    padding: 0;
    scroll-margin-top: calc(var(--ref-header-height) + 18px);
  }

  .fleet-hero,
  .dashboard-panel,
  .metric,
  .form,
  .tools-card,
  .admin-card,
  .item,
  .search-page-card,
  .report-title-card,
  .review-card,
  .profile-modal,
  .more-profile-panel,
  .more-feature-card {
    background: var(--ref-surface);
    border: 1px solid var(--ref-border);
    border-radius: 22px;
    box-shadow: var(--ref-shadow-soft);
  }

  .fleet-hero {
    position: relative;
    min-height: 170px;
    padding: 22px;
    align-items: center;
    background: linear-gradient(135deg, var(--ref-blue) 0%, var(--ref-blue-2) 68%, #005294 100%);
    color: white;
    border: 0;
    overflow: hidden;
  }

  .fleet-hero::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -64px;
    width: 210px;
    height: 210px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .15);
  }

  .fleet-hero h2,
  .fleet-hero p,
  .fleet-hero .eyebrow {
    color: white;
  }

  .fleet-hero h2 {
    font-size: 26px;
    font-weight: 800;
  }

  .fleet-hero p:not(.eyebrow) {
    max-width: 620px;
    color: rgba(255, 255, 255, .88);
  }

  .quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 12px;
    margin: 16px 0;
  }

  .quick-action {
    min-height: 92px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    padding: 14px;
    color: var(--ref-blue-dark);
    background: white;
    border: 1px solid var(--ref-border);
    border-radius: 18px;
    box-shadow: var(--ref-shadow-soft);
    font-size: 13px;
    font-weight: 600;
  }

  .quick-action span {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: white;
    background: var(--ref-blue);
    border-radius: 12px;
    font-size: 18px;
  }

  .quick-action svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
  }

  .metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin: 16px 0 22px;
  }

  .metric {
    min-height: 128px;
    padding: 18px;
    display: grid;
    align-content: space-between;
    gap: 10px;
    border-radius: 20px;
  }

  .metric > span:not(.metric-icon),
  .metric span[id] {
    color: var(--ref-blue-dark);
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 0;
  }

  .metric p {
    margin: 0;
    color: var(--ref-muted);
    font-size: 13px;
    font-weight: 600;
  }

  .metric-icon {
    width: 40px;
    height: 40px;
    color: var(--ref-blue);
    background: var(--ref-blue-soft);
    border-radius: 14px;
  }

  .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
  }

  .section-title {
    gap: 10px;
    align-items: center;
    margin: 18px 0 12px;
    padding-inline: 2px;
  }

  .section-title h2 {
    color: var(--ref-text);
    font-size: 20px;
    line-height: 1.2;
  }

  .form {
    gap: 14px;
    padding: 20px;
    border-radius: 22px;
  }

  .split { gap: 18px; }

  label {
    color: var(--ref-text);
    font-size: 13px;
    font-weight: 650;
  }

  input,
  select,
  textarea {
    min-height: 46px;
    margin-top: 6px;
    padding: 10px 13px;
    color: var(--ref-text);
    background: white;
    border: 1px solid var(--ref-border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
  }

  textarea { min-height: 92px; }

  input:focus,
  select:focus,
  textarea:focus {
    border-color: rgba(0, 87, 217, .55);
    box-shadow: 0 0 0 4px rgba(0, 87, 217, .12);
    outline: 0;
  }

  .button,
  .file-button {
    min-height: 44px;
    padding: 0 18px;
    color: white;
    background: var(--ref-blue);
    border: 1px solid var(--ref-blue);
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(48, 48, 128, .18);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.1;
  }

  .button:hover,
  .file-button:hover {
    filter: brightness(.96);
    transform: translateY(-1px);
  }

  .button.secondary,
  .file-button {
    color: var(--ref-blue);
    background: white;
    border-color: rgba(0, 87, 217, .38);
    box-shadow: none;
  }

  .button.danger,
  .button.secondary.danger {
    color: var(--ref-red);
    background: #fff7f7;
    border-color: rgba(244, 67, 54, .32);
    box-shadow: none;
  }

  .hero-button.secondary {
    color: white;
    border-color: rgba(255, 255, 255, .6);
    background: rgba(255, 255, 255, .12);
  }

  .status {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ref-blue);
    background: #eaf3ff;
    border: 1px solid rgba(0, 87, 217, .12);
  }

  .status.approved,
  .status.success,
  .status.active,
  .status.ok {
    color: #008c3a;
    background: #e9fff1;
    border-color: rgba(0, 200, 83, .18);
  }

  .status.warning,
  .status.pending {
    color: #c86600;
    background: #fff3e3;
    border-color: rgba(255, 131, 0, .2);
  }

  .status.rejected,
  .status.danger,
  .status.critical {
    color: #d51f1f;
    background: #fff0f0;
    border-color: rgba(244, 67, 54, .18);
  }

  .list {
    display: grid;
    gap: 12px;
  }

  .item {
    padding: 16px;
    border-radius: 18px;
  }

  .item-head { gap: 12px; }

  .item strong {
    font-size: 15px;
    font-weight: 750;
  }

  .item p {
    margin: 5px 0 0;
    font-size: 13px;
    font-weight: 500;
  }

  .vehicle-photo-field {
    grid-column: 1 / -1;
  }

  .vehicle-photo-preview {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 150px;
    margin-top: 8px;
    overflow: hidden;
    border: 1px dashed rgba(48, 48, 128, .24);
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff, #f7f8ff);
  }

  .vehicle-photo-preview img {
    width: 100%;
    height: 170px;
    object-fit: cover;
  }

  .vehicle-photo-placeholder {
    color: var(--ref-muted);
    font-size: 13px;
    font-weight: 650;
  }

  .vehicle-card {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
  }

  .vehicle-card-media {
    position: relative;
    min-height: 96px;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, #eef2ff, #fff6ed);
    border: 1px solid rgba(48, 48, 128, .08);
  }

  .vehicle-card-media img {
    display: block;
    width: 100%;
    height: 112px;
    object-fit: cover;
  }

  .vehicle-card-main {
    min-width: 0;
  }

  .vehicle-card-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .vehicle-card-title strong {
    min-width: 0;
  }

  .vehicle-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 9px;
  }

  .vehicle-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 26px;
    padding: 4px 9px;
    color: var(--ref-muted);
    background: #f8f9ff;
    border: 1px solid var(--ref-border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
  }

  .vehicle-chip svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
  }

  .actions {
    gap: 9px;
    margin-top: 12px;
  }

  .admin-grid,
  .tools-grid,
  .report-grid {
    gap: 16px;
  }

  .admin-card {
    min-height: 96px;
    padding: 16px;
    align-items: center;
    border-radius: 20px;
  }

  .admin-card-icon {
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--ref-orange), var(--ref-blue));
    border-radius: 14px;
  }

  .admin-card-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
  }

  .admin-card strong { font-size: 15px; }

  .profile-modal { border-radius: 24px; }

  .profile-preview {
    background: linear-gradient(135deg, var(--ref-blue), var(--ref-blue-dark));
  }

  .profile-logout {
    color: var(--ref-red);
    border-color: rgba(244, 67, 54, .24);
  }

  .toast {
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(0, 82, 148, .16);
  }

  .app-footer {
    color: var(--ref-muted);
    background: white;
    border-top: 1px solid var(--ref-border);
    box-shadow: none;
  }

  .app-footer img {
    width: 30px;
    height: 30px;
  }
}

@media screen and (min-width: 1024px) {
  .view > .form:not(#fineForm) {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .view > .form:not(#fineForm) > .section-title,
  .view > .form:not(#fineForm) > .check-row,
  .view > .form:not(#fineForm) > button {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 1023px) {
  :root { --app-header-height: 70px; }

  body {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .app-header {
    min-height: var(--app-header-height);
    height: var(--app-header-height);
    padding: max(9px, env(safe-area-inset-top)) 12px 9px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    border-top-width: 3px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .app-header .brand-lockup > div {
    display: none;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .app-header .global-search {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }

  .global-search input {
    min-height: 42px;
    padding: 0 12px;
    font-size: 13px;
  }

  .profile-button,
  .offline-queue-badge {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }

  #installBtn {
    display: none !important;
  }

  .layout {
    display: block;
    width: 100%;
    padding: 12px 12px calc(104px + env(safe-area-inset-bottom));
  }

  .tabs {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    top: auto;
    z-index: 90;
    width: auto;
    max-height: none;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 8px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--ref-border);
    border-radius: 24px;
    box-shadow: 0 -8px 30px rgba(0, 82, 148, .14);
    backdrop-filter: blur(16px);
    overflow: visible;
  }

  .tab {
    display: none !important;
    min-height: 58px;
    padding: 6px 3px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    color: #546a78;
    background: transparent;
    border: 0;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 500;
  }

  .tab[data-tab="dashboard"],
  .tab[data-tab="approvals"],
  .tab[data-tab="movement"],
  .tab[data-tab="registry"].reference-mobile-only,
  .tab[data-tab="admin"] {
    display: flex !important;
  }

  .tab[data-tab="dashboard"] { order: 1; }
  .tab[data-tab="movement"] { order: 2; }
  .tab[data-tab="registry"].reference-mobile-only { order: 3; }
  .tab[data-tab="approvals"] { order: 4; }
  .tab[data-tab="admin"] { order: 5; }

  .tab svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
  }

  .tab.active,
  .tab[aria-current="page"] {
    color: var(--ref-blue);
    background: var(--ref-blue-soft);
    box-shadow: none;
  }

  .tab .desktop-label { display: none; }
  .tab .mobile-label { display: inline; }

  .fleet-hero {
    min-height: 148px;
    padding: 18px;
    border-radius: 22px;
  }

  .fleet-hero h2 { font-size: 24px; }

  .fleet-hero-actions { display: none; }

  .quick-actions {
    display: flex;
    overflow-x: auto;
    padding: 2px 0 8px;
    scroll-snap-type: x mandatory;
  }

  .quick-action {
    flex: 0 0 92px;
    min-height: 86px;
    scroll-snap-align: start;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .metric {
    min-height: 104px;
    padding: 14px;
    border-radius: 18px;
  }

  .metric > span:not(.metric-icon),
  .metric span[id] {
    font-size: 21px;
  }

  .metric-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .dashboard-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .form,
  .item,
  .dashboard-panel,
  .admin-card,
  .tools-card {
    border-radius: 20px;
  }

  .vehicle-card {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
  }

  .vehicle-card-media img {
    height: 96px;
  }

  .form {
    padding: 16px;
    gap: 12px;
  }

  .section-title {
    margin: 15px 0 10px;
  }

  .section-title h2 {
    font-size: 18px;
  }

  .button,
  .file-button {
    min-height: 44px;
    padding-inline: 14px;
  }

  .actions .button {
    flex: 1 1 140px;
  }

  .app-footer {
    display: none;
  }
}

@media screen and (max-width: 430px) {
  .app-header {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 7px;
  }

  .header-actions { gap: 6px; }
  .global-search input { font-size: 12px; }

  .profile-button,
  .offline-queue-badge {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .layout { padding-inline: 10px; }

  .tabs {
    left: 8px;
    right: 8px;
    border-radius: 22px;
  }

  .tab { font-size: 10.5px; }
  .metrics { grid-template-columns: 1fr 1fr; }

  .vehicle-card {
    grid-template-columns: 1fr;
  }

  .vehicle-card-media img {
    height: 150px;
  }
}

@media screen {
  .system-health {
    border-left: 4px solid var(--ref-blue, #005294);
  }

  .health-metrics .metric {
    min-height: 92px;
  }

  .compact-health-list {
    display: grid;
    gap: 10px;
  }

  .health-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
  }

  .health-row p {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
  }

  .ops-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 82, 148, .10);
    box-shadow: 0 10px 28px rgba(0, 82, 148, .08);
  }

  .ops-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--ref-blue, #005294);
  }

  .ops-card.occurrence-card::before { background: #ef4444; }
  .ops-card.maintenance-card::before { background: var(--ref-orange, #f5821f); }
  .ops-card.fuel-card::before { background: #00a86b; }

  .ops-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: var(--ref-blue, #005294);
  }

  .ops-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .occurrence-icon { background: linear-gradient(135deg, #ef4444, #b91c1c); }
  .maintenance-icon { background: linear-gradient(135deg, var(--ref-orange, #f5821f), #b54708); }
  .fuel-icon { background: linear-gradient(135deg, #00a86b, #027a48); }

  .ops-main {
    min-width: 0;
    flex: 1 1 auto;
  }

  .ops-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
  }

  .ops-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 87, 217, .08);
    color: var(--ref-blue-dark, #005294);
    font-size: 12px;
    font-weight: 700;
  }

  @media (max-width: 720px) {
    .health-row {
      align-items: flex-start;
      flex-direction: column;
    }

    .ops-icon {
      width: 38px;
      height: 38px;
      flex-basis: 38px;
      border-radius: 12px;
    }

    .ops-icon svg {
      width: 21px;
      height: 21px;
    }
  }
}

@media screen {
  [hidden] {
    display: none !important;
  }
}

@media screen {
  /* Fleet Analytics v68: inspirado nos anexos, sem dependências ou imagens pesadas. */
  :root {
    --fleet-teal: #009aa6;
    --fleet-teal-dark: #006c75;
    --fleet-teal-soft: #e6fbfd;
    --fleet-orange: #ff9f1c;
    --fleet-orange-strong: #ff7f11;
    --fleet-charcoal: #1f2933;
    --fleet-charcoal-2: #263238;
    --fleet-surface-dark: #202a33;
    --fleet-line: #dde3ea;
    --fleet-text: #2f3640;
    --fleet-muted: #7b8794;
    --fleet-card-shadow: 0 10px 26px rgba(31, 41, 51, .10);
    --ref-blue: var(--fleet-teal);
    --ref-blue-dark: var(--fleet-teal-dark);
    --ref-blue-2: #0b8793;
    --ref-blue-soft: var(--fleet-teal-soft);
    --ref-orange: var(--fleet-orange);
    --ref-text: var(--fleet-text);
    --ref-muted: var(--fleet-muted);
    --ref-shadow: var(--fleet-card-shadow);
    --ref-shadow-soft: 0 4px 14px rgba(31, 41, 51, .08);
    --brand: var(--fleet-teal);
    --brand-2: var(--fleet-orange);
    --accent: var(--fleet-orange);
    --ink: var(--fleet-text);
  }

  body {
    color: var(--fleet-text);
    background:
      radial-gradient(circle at 4% 18%, rgba(0, 154, 166, .10), transparent 24%),
      radial-gradient(circle at 96% 8%, rgba(255, 127, 17, .15), transparent 25%),
      linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
  }

  .app-header {
    color: #ffffff;
    background: linear-gradient(180deg, var(--fleet-teal-dark) 0%, var(--fleet-teal) 100%);
    border: 0;
    box-shadow: 0 12px 30px rgba(0, 108, 117, .18);
  }

  .app-header::before {
    height: 0;
  }

  .app-header .brand-logo {
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
  }

  .global-search input {
    background: rgba(255, 255, 255, .96);
    border: 0;
    color: var(--fleet-charcoal);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
  }

  .global-search input::placeholder {
    color: #8a98a6;
  }

  .profile-greeting {
    min-height: 46px;
    display: grid;
    align-content: center;
    gap: 1px;
    padding: 6px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
  }

  .profile-greeting span {
    font-size: 13px;
    line-height: 1.1;
    font-weight: 700;
  }

  .profile-greeting strong {
    color: rgba(255, 255, 255, .78);
    font-size: 11px;
    line-height: 1.1;
    font-weight: 600;
  }

  .profile-button,
  .offline-queue-badge {
    border: 0;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .16);
  }

  .tabs {
    background: var(--fleet-charcoal);
    box-shadow: 0 16px 38px rgba(31, 41, 51, .22);
  }

  .tab svg {
    width: 26px;
    height: 26px;
    stroke-width: 2.2;
  }

  .tab.active,
  .tab[aria-current="page"] {
    color: #ffffff;
    background: var(--fleet-teal);
    box-shadow: 0 10px 24px rgba(0, 154, 166, .28);
  }

  .fleet-hero {
    background:
      radial-gradient(circle at 88% 12%, rgba(255, 159, 28, .38), transparent 28%),
      linear-gradient(135deg, var(--fleet-charcoal) 0%, var(--fleet-surface-dark) 46%, var(--fleet-teal-dark) 100%);
    box-shadow: 0 18px 46px rgba(31, 41, 51, .18);
  }

  .fleet-hero .eyebrow {
    color: #85f3fb;
  }

  .metric,
  .dashboard-panel,
  .item,
  .form,
  .tools,
  .admin-card,
  .timeline-panel {
    border-color: rgba(31, 41, 51, .08);
    box-shadow: var(--fleet-card-shadow);
  }

  .section-title h2 {
    color: var(--fleet-charcoal);
  }

  .metric::after {
    background: linear-gradient(90deg, var(--fleet-orange), var(--fleet-teal));
  }

  .metric-icon,
  .quick-action span:first-child,
  .admin-card-icon,
  .ops-icon {
    color: #ffffff;
    background: var(--fleet-teal);
  }

  .metric:hover .metric-icon,
  .quick-action:hover span:first-child,
  .admin-card:hover .admin-card-icon {
    background: var(--fleet-orange);
  }

  .bar-chart {
    gap: 12px;
  }

  .bar {
    padding: 8px 0;
    border-bottom: 1px solid rgba(31, 41, 51, .08);
  }

  .bar-track {
    height: 14px;
    background: #edf1f5;
    border-radius: 999px;
  }

  .bar-fill {
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--fleet-orange), #ffb84d);
    box-shadow: 0 4px 10px rgba(255, 159, 28, .28);
  }

  .dashboard-panel:nth-of-type(2n) .bar-fill {
    background: linear-gradient(90deg, var(--fleet-teal), #32c7d3);
    box-shadow: 0 4px 10px rgba(0, 154, 166, .22);
  }

  .button,
  .file-button {
    background: var(--fleet-teal);
    box-shadow: 0 8px 18px rgba(0, 154, 166, .18);
  }

  .button:hover,
  .file-button:hover {
    background: #008b96;
  }

  .button.secondary,
  .file-button {
    color: var(--fleet-teal-dark);
    background: #ffffff;
    border-color: rgba(0, 154, 166, .24);
  }

  .button.secondary:hover,
  .file-button:hover {
    color: #8a4f00;
    background: #fff7e8;
    border-color: rgba(255, 159, 28, .45);
  }

  .status {
    min-height: 26px;
  }

  .status.pending,
  .status.warning {
    color: #8a4f00;
    background: rgba(255, 159, 28, .16);
  }

  .ops-card.maintenance-card::before,
  .maintenance-icon {
    background: var(--fleet-orange);
  }

  .fuel-icon,
  .ops-card.fuel-card::before {
    background: var(--fleet-teal);
  }

  .responsive-table th {
    color: var(--fleet-charcoal);
    background: #f2f5f8;
  }

  @media (max-width: 760px) {
    .app-header {
      background: linear-gradient(180deg, #00747d 0%, var(--fleet-teal) 100%);
    }

    .profile-greeting {
      min-height: 38px;
      max-width: 116px;
      padding: 5px 8px;
      border-radius: 12px;
    }

    .profile-greeting span {
      max-width: 98px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 12px;
    }

    .profile-greeting strong {
      display: none;
    }

    .tabs {
      background: rgba(255, 255, 255, .98);
      box-shadow: 0 -10px 30px rgba(31, 41, 51, .16);
    }

    .tab {
      color: #5f6f7d;
    }

    .tab svg {
      width: 29px;
      height: 29px;
    }

    .tab.active,
    .tab[aria-current="page"] {
      color: #ffffff;
      background: var(--fleet-teal);
      border-radius: 18px;
    }

    .fleet-hero {
      background:
        radial-gradient(circle at 88% 12%, rgba(255, 159, 28, .36), transparent 31%),
        linear-gradient(135deg, var(--fleet-surface-dark), var(--fleet-charcoal));
    }
  }

  @media (max-width: 430px) {
    .app-header {
      grid-template-columns: 38px minmax(0, 1fr);
    }

    .profile-greeting {
      display: none;
    }

    .tab svg {
      width: 30px;
      height: 30px;
    }
  }
}

@media screen {
  /* Degraus Vanguard v67: visual minimalista, institucional e mais vivo. */
  :root {
    --vanguard-blue: #303080;
    --vanguard-blue-deep: #20205f;
    --vanguard-blue-soft: #eef0ff;
    --vanguard-orange: #ff7f11;
    --vanguard-orange-soft: #fff1e2;
    --vanguard-bg: #f7f8fc;
    --vanguard-surface: #ffffff;
    --vanguard-ink: #17194e;
    --vanguard-muted: #667085;
    --vanguard-border: #e6e8f2;
    --vanguard-success: #00a86b;
    --vanguard-warning: #ff9f1c;
    --vanguard-danger: #ef4444;
    --vanguard-shadow: 0 14px 38px rgba(23, 25, 78, .08);
    --vanguard-shadow-soft: 0 6px 20px rgba(23, 25, 78, .06);
    --ref-blue-dark: var(--vanguard-blue-deep);
    --ref-blue: var(--vanguard-blue);
    --ref-blue-2: #005294;
    --ref-blue-soft: var(--vanguard-blue-soft);
    --ref-orange: var(--vanguard-orange);
    --ref-bg: var(--vanguard-bg);
    --ref-surface: var(--vanguard-surface);
    --ref-text: var(--vanguard-ink);
    --ref-muted: var(--vanguard-muted);
    --ref-border: var(--vanguard-border);
    --ref-shadow: var(--vanguard-shadow);
    --ref-shadow-soft: var(--vanguard-shadow-soft);
    --brand: var(--vanguard-blue);
    --brand-2: var(--vanguard-orange);
    --accent: var(--vanguard-orange);
    --ink: var(--vanguard-ink);
    --muted: var(--vanguard-muted);
    --line: var(--vanguard-border);
    --panel: var(--vanguard-surface);
    --bg: var(--vanguard-bg);
  }

  body {
    color: var(--vanguard-ink);
    background:
      radial-gradient(circle at 12% 0%, rgba(255, 127, 17, .14), transparent 30%),
      radial-gradient(circle at 90% 8%, rgba(48, 48, 128, .11), transparent 34%),
      linear-gradient(180deg, #ffffff 0%, var(--vanguard-bg) 42%, #f4f6fb 100%);
  }

  .app-header {
    background: rgba(255, 255, 255, .88);
    border-top: 0;
    border-bottom: 1px solid rgba(48, 48, 128, .12);
    box-shadow: 0 10px 30px rgba(23, 25, 78, .07);
  }

  .app-header::before {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--vanguard-orange), var(--vanguard-blue) 48%, #005294);
  }

  .brand-logo {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(255, 127, 17, .24);
  }

  .global-search input {
    color: var(--vanguard-ink);
    background: rgba(255, 255, 255, .95);
    border-color: rgba(48, 48, 128, .14);
    box-shadow: 0 6px 18px rgba(23, 25, 78, .04);
  }

  .global-search input:focus {
    border-color: rgba(255, 127, 17, .72);
    box-shadow: 0 0 0 4px rgba(255, 127, 17, .15);
  }

  .tabs {
    background:
      linear-gradient(180deg, var(--vanguard-blue-deep) 0%, var(--vanguard-blue) 100%);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 18px 45px rgba(23, 25, 78, .18);
  }

  .tab {
    color: rgba(255, 255, 255, .74);
    border-radius: 16px;
  }

  .tab:hover,
  .tab:focus-visible {
    color: #ffffff;
    background: rgba(255, 255, 255, .10);
  }

  .tab.active,
  .tab[aria-current="page"] {
    color: #ffffff;
    background: linear-gradient(135deg, var(--vanguard-orange), #ff9f1c);
    box-shadow: 0 12px 28px rgba(255, 127, 17, .28);
  }

  .fleet-hero {
    color: #ffffff;
    background:
      radial-gradient(circle at 84% 20%, rgba(255, 127, 17, .45), transparent 30%),
      linear-gradient(135deg, var(--vanguard-blue-deep) 0%, var(--vanguard-blue) 58%, #005294 100%);
    border: 0;
    box-shadow: 0 24px 60px rgba(23, 25, 78, .18);
  }

  .fleet-hero::after {
    background:
      linear-gradient(135deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .03));
    border-color: rgba(255, 255, 255, .24);
  }

  .fleet-hero .eyebrow {
    color: #ffd7b2;
  }

  .fleet-hero h2,
  .fleet-hero p {
    color: #ffffff;
  }

  .quick-action {
    background: #ffffff;
    border: 1px solid rgba(48, 48, 128, .10);
    box-shadow: 0 8px 22px rgba(23, 25, 78, .06);
  }

  .quick-action span:first-child {
    color: #ffffff;
    background: linear-gradient(135deg, var(--vanguard-blue), #005294);
  }

  .quick-action:hover span:first-child {
    background: linear-gradient(135deg, var(--vanguard-orange), #ff9f1c);
  }

  .metric,
  .form,
  .dashboard-panel,
  .admin-card,
  .tools,
  .item,
  .timeline-panel,
  .profile-modal {
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(48, 48, 128, .10);
    box-shadow: var(--vanguard-shadow-soft);
  }

  .metric {
    overflow: hidden;
  }

  .metric::after {
    background: linear-gradient(90deg, var(--vanguard-orange), transparent);
    opacity: .95;
  }

  .metric-icon,
  .admin-card-icon {
    color: #ffffff;
    background: linear-gradient(135deg, var(--vanguard-blue), #005294);
    box-shadow: 0 10px 24px rgba(48, 48, 128, .18);
  }

  .metric:hover .metric-icon,
  .admin-card:hover .admin-card-icon {
    background: linear-gradient(135deg, var(--vanguard-orange), #ff9f1c);
  }

  .button,
  .file-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--vanguard-blue), #005294);
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(48, 48, 128, .16);
  }

  .button:hover,
  .file-button:hover {
    filter: saturate(1.08);
    box-shadow: 0 14px 30px rgba(48, 48, 128, .20);
  }

  .button.secondary,
  .file-button {
    color: var(--vanguard-blue);
    background: #ffffff;
    border-color: rgba(48, 48, 128, .18);
    box-shadow: none;
  }

  .button.secondary:hover,
  .file-button:hover {
    color: var(--vanguard-blue-deep);
    border-color: rgba(255, 127, 17, .55);
    background: var(--vanguard-orange-soft);
  }

  .button.danger,
  .button.secondary.danger {
    color: var(--vanguard-danger);
    background: #ffffff;
    border-color: rgba(239, 68, 68, .22);
    box-shadow: none;
  }

  .status {
    border: 1px solid transparent;
    font-weight: 700;
  }

  .status.approved {
    color: #027a48;
    background: rgba(0, 168, 107, .12);
    border-color: rgba(0, 168, 107, .18);
  }

  .status.pending,
  .status.warning {
    color: #9a5a00;
    background: rgba(255, 159, 28, .14);
    border-color: rgba(255, 159, 28, .22);
  }

  .status.rejected {
    color: #b42318;
    background: rgba(239, 68, 68, .12);
    border-color: rgba(239, 68, 68, .18);
  }

  input,
  select,
  textarea {
    color: var(--vanguard-ink);
    background: #ffffff;
    border-color: rgba(48, 48, 128, .14);
  }

  input:focus,
  select:focus,
  textarea:focus {
    border-color: rgba(255, 127, 17, .7);
    box-shadow: 0 0 0 4px rgba(255, 127, 17, .14);
  }

  .ops-card::before,
  .system-health {
    border-left-color: var(--vanguard-orange);
  }

  .ops-icon {
    background: linear-gradient(135deg, var(--vanguard-blue), #005294);
  }

  .occurrence-icon {
    background: linear-gradient(135deg, #ef4444, #b42318);
  }

  .maintenance-icon {
    background: linear-gradient(135deg, var(--vanguard-orange), #ff9f1c);
  }

  .fuel-icon {
    background: linear-gradient(135deg, var(--vanguard-success), #027a48);
  }

  .vehicle-chip,
  .ops-meta span {
    color: var(--vanguard-blue-deep);
    background: var(--vanguard-blue-soft);
  }

  .app-footer {
    background: linear-gradient(135deg, var(--vanguard-blue-deep), var(--vanguard-blue));
  }

  @media (max-width: 760px) {
    body {
      background:
        radial-gradient(circle at 80% 0%, rgba(255, 127, 17, .18), transparent 26%),
        linear-gradient(180deg, #ffffff 0%, var(--vanguard-bg) 100%);
    }

    .app-header {
      border-bottom-color: rgba(48, 48, 128, .10);
    }

    .tabs {
      background: rgba(255, 255, 255, .96);
      border-color: rgba(48, 48, 128, .12);
      box-shadow: 0 -12px 34px rgba(23, 25, 78, .14);
    }

    .tab {
      color: var(--vanguard-muted);
      background: transparent;
    }

    .tab.active,
    .tab[aria-current="page"] {
      color: #ffffff;
      background: linear-gradient(135deg, var(--vanguard-blue), #005294);
      box-shadow: 0 10px 22px rgba(48, 48, 128, .18);
    }

    .fleet-hero {
      border-radius: 24px;
    }

    .quick-action strong {
      font-weight: 650;
    }
  }
}

