/* FleetWay - Design System (responsivo, sem dependência de Tailwind CDN) */

*, *::before, *::after { box-sizing: border-box; }

/* ── Temas ── */
[data-palette="indigo"]{--color-primary-50:#eef2ff;--color-primary-100:#e0e7ff;--color-primary-200:#c7d2fe;--color-primary-300:#a5b4fc;--color-primary-400:#818cf8;--color-primary-500:#6366f1;--color-primary-600:#4f46e5;--color-primary-700:#4338ca;--color-primary-800:#3730a3;--color-primary-900:#312e81}
[data-palette="emerald"]{--color-primary-50:#ecfdf5;--color-primary-100:#d1fae5;--color-primary-200:#a7f3d0;--color-primary-300:#6ee7b7;--color-primary-400:#34d399;--color-primary-500:#10b981;--color-primary-600:#059669;--color-primary-700:#047857;--color-primary-800:#065f46;--color-primary-900:#064e3b}
[data-palette="rose"]{--color-primary-50:#fff1f2;--color-primary-100:#ffe4e6;--color-primary-200:#fecdd3;--color-primary-300:#fda4af;--color-primary-400:#fb7185;--color-primary-500:#f43f5e;--color-primary-600:#e11d48;--color-primary-700:#be123c;--color-primary-800:#9f1239;--color-primary-900:#881337}
[data-palette="amber"]{--color-primary-50:#fffbeb;--color-primary-100:#fef3c7;--color-primary-200:#fde68a;--color-primary-300:#fcd34d;--color-primary-400:#fbbf24;--color-primary-500:#f59e0b;--color-primary-600:#d97706;--color-primary-700:#b45309;--color-primary-800:#92400e;--color-primary-900:#78350f}
[data-palette="cyan"]{--color-primary-50:#ecfeff;--color-primary-100:#cffafe;--color-primary-200:#a5f3fc;--color-primary-300:#67e8f9;--color-primary-400:#22d3ee;--color-primary-500:#06b6d4;--color-primary-600:#0891b2;--color-primary-700:#0e7490;--color-primary-800:#155e75;--color-primary-900:#164e63}
[data-palette="violet"]{--color-primary-50:#f5f3ff;--color-primary-100:#ede9fe;--color-primary-200:#ddd6fe;--color-primary-300:#c4b5fd;--color-primary-400:#a78bfa;--color-primary-500:#8b5cf6;--color-primary-600:#7c3aed;--color-primary-700:#6d28d9;--color-primary-800:#5b21b6;--color-primary-900:#4c1d95}
[data-mode="light"]{--color-bg:#f8fafc;--color-bg-elevated:#fff;--color-bg-muted:#f1f5f9;--color-border:#e2e8f0;--color-text:#0f172a;--color-text-muted:#64748b;--color-sidebar:#fff;--color-sidebar-text:#334155;--color-sidebar-active:var(--color-primary-50);--color-overlay:rgba(15,23,42,.5);color-scheme:light}
[data-mode="dark"]{--color-bg:#0f172a;--color-bg-elevated:#1e293b;--color-bg-muted:#334155;--color-border:#334155;--color-text:#f1f5f9;--color-text-muted:#94a3b8;--color-sidebar:#1e293b;--color-sidebar-text:#cbd5e1;--color-sidebar-active:color-mix(in srgb,var(--color-primary-600) 20%,transparent);--color-overlay:rgba(0,0,0,.6);color-scheme:dark}

:root {
  --space-page: 1rem;
  --space-page-sm: 1.25rem;
  --space-page-lg: 2rem;
  --radius-card: .75rem;
  --header-h: 4rem;
  --sidebar-w: 16rem;
  --sidebar-w-collapsed: 4.5rem;
  --sidebar-rail-w: 3rem;
  --container-max: 80rem;
  --container-narrow: 28rem;
  --container-medium: 42rem;
}

@media (min-width: 640px) { :root { --space-page: 1.5rem; } }
@media (min-width: 1024px) { :root { --space-page: 2rem; } }

html {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  transition: background-color .2s, color .2s;
  line-height: 1.5;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

/* ── Layout público ── */
.site-body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-bg-elevated) 88%, transparent);
  backdrop-filter: blur(10px);
}

.site-header__inner,
.site-footer__inner,
.site-container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-page);
}

.site-header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary-600);
  text-decoration: none;
}

.site-logo svg { width: 2rem; height: 2rem; flex-shrink: 0; }

.site-logo__mascot {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--color-primary-200);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
  flex-shrink: 0;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.site-footer__mascot {
  width: auto;
  height: 1.5rem;
  max-width: 1rem;
  max-height: 1.5rem;
  object-fit: contain;
  object-position: center top;
  flex-shrink: 0;
  border-radius: 0;
  border: none;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
}

.site-nav a:hover { opacity: .85; }

.site-nav-toggle { display: none !important; }

.site-mobile-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  padding: .65rem var(--space-page) .75rem;
}

.site-mobile-nav a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: .25rem 0;
}

.site-mobile-nav a:hover { color: var(--color-text); }

.site-mobile-nav__cta {
  font-weight: 600 !important;
  color: var(--color-primary-600) !important;
}

.site-main {
  flex: 1;
  width: 100%;
  padding: var(--space-page);
}

.site-main--flush {
  padding: 0;
}

.site-nav__login {
  font-weight: 600 !important;
  color: var(--color-text) !important;
}

.site-container--narrow { max-width: var(--container-narrow); }
.site-container--medium { max-width: var(--container-medium); }

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  padding-block: 2rem;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  font-size: .875rem;
  color: var(--color-text-muted);
}

.site-footer__links a { text-decoration: none; }
.site-footer__links a:hover { text-decoration: underline; }

@media (min-width: 768px) {
  .site-nav { display: flex; }
  .site-mobile-nav { display: none !important; }
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ── Auth pages ── */
.auth-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: var(--container-narrow);
  margin-inline: auto;
  min-height: calc(100dvh - var(--header-h) - 8rem);
  padding-block: 1.5rem;
}

.auth-page--wide { max-width: var(--container-medium); }

.auth-card .card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.auth-card .card-subtitle {
  margin: .25rem 0 0;
  font-size: .875rem;
  color: var(--color-text-muted);
}

.auth-form { margin-top: 1.5rem; display: grid; gap: 1rem; }
.auth-links {
  margin-top: 1rem;
  text-align: center;
  font-size: .875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.auth-links a { color: var(--color-primary-600); text-decoration: underline; }

/* ── App shell (painéis) ── */
.app-body { min-height: 100dvh; margin: 0; }

.app-shell {
  display: flex;
  min-height: 100dvh;
}

.app-sidebar {
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  flex-shrink: 0;
  border-right: 1px solid var(--color-border);
  background: var(--color-sidebar);
  transition: width .2s ease, transform .2s ease;
  z-index: 50;
}

.app-sidebar__brand {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  min-height: var(--header-h);
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.app-sidebar__identity {
  display: flex;
  flex-direction: column;
  gap: .125rem;
  min-width: 0;
  flex: 1;
}

.app-sidebar__company {
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar__logo-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}

.app-sidebar__logo {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: .375rem;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--color-bg-muted);
}

.app-sidebar__user {
  font-size: .8125rem;
  line-height: 1.25;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-toggle { flex-shrink: 0; }

.sidebar-toggle__expand { display: none; }
.app-sidebar.is-collapsed .sidebar-toggle__expand { display: block; }
.app-sidebar.is-collapsed .sidebar-toggle__collapse { display: none; }

.app-sidebar__nav {
  flex: 1;
  padding: .75rem;
  display: grid;
  gap: .25rem;
  align-content: start;
  overflow-y: auto;
}

.app-sidebar__footer {
  padding: .75rem;
  border-top: 1px solid var(--color-border);
}

.app-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--color-overlay);
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-header {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-inline: var(--space-page);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
}

.app-header__left {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  flex: 1;
}

.app-header__brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.app-header__logo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .5rem;
  object-fit: contain;
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
}

.app-header__logo--client {
  object-fit: contain;
  padding: .15rem;
}

.app-header__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.header-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: .5rem;
  background: var(--color-bg-elevated);
  cursor: pointer;
  font-size: 1.05rem;
  color: var(--color-text);
  transition: background .15s, border-color .15s;
}

.header-icon-btn:hover {
  background: var(--color-bg-muted);
}

.header-icon-btn.recording {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
  animation: pulse-red .8s infinite;
}

[data-mode="dark"] .header-icon-btn.recording {
  background: color-mix(in srgb, #7f1d1d 55%, transparent);
  border-color: #991b1b;
  color: #fecaca;
}

[x-cloak] { display: none !important; }

.notification-bell {
  position: relative;
}

.notification-bell__trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: .5rem;
  background: var(--color-bg-elevated);
  cursor: pointer;
  font-size: 1.1rem;
}

.notification-bell__trigger:hover {
  background: var(--color-bg-muted);
}

.notification-bell__badge {
  position: absolute;
  top: -.35rem;
  right: -.35rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 .25rem;
  border-radius: 9999px;
  background: var(--color-danger, #dc2626);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
}

.notification-bell__panel {
  position: absolute;
  right: 0;
  top: calc(100% + .5rem);
  width: min(22rem, calc(100vw - 2rem));
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: .75rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
  z-index: 60;
  overflow: hidden;
}

.notification-bell__panel[hidden] {
  display: none !important;
}

.notification-bell__head,
.notification-bell__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .75rem 1rem;
  background: var(--color-bg-muted);
}

.notification-bell__body {
  max-height: 20rem;
  overflow-y: auto;
  padding: .25rem 0;
}

.notification-bell__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: .75rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
  cursor: pointer;
}

.notification-bell__item:hover {
  background: var(--color-bg-muted);
}

.notification-bell__item.is-unread {
  background: color-mix(in srgb, var(--color-primary-100, #eef2ff) 55%, transparent);
}

.notification-bell__item-title {
  display: block;
  font-weight: 600;
  font-size: .875rem;
}

.notification-bell__item-msg {
  display: block;
  margin-top: .2rem;
  font-size: .8125rem;
  color: var(--color-text-muted);
}

.notification-bell__item-time {
  display: block;
  margin-top: .35rem;
  font-size: .6875rem;
  color: var(--color-text-muted);
}

.notification-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.notification-list__item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.notification-list__item.is-read {
  opacity: .65;
}

.notification-list__title {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.notification-list__title:hover {
  text-decoration: underline;
}

.app-content {
  flex: 1;
  padding: var(--space-page);
}

.rq-main .app-content { padding-inline: 0; }

/* Mobile: faixa de ícones fixa; toque no menu abre drawer completo */
@media (max-width: 1023px) {
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-w-collapsed);
    height: 100dvh;
    height: 100vh;
    transform: none;
    -webkit-transform: none;
  }

  .app-sidebar.is-open {
    width: min(var(--sidebar-w), 88vw);
    max-width: 88vw;
    box-shadow: 4px 0 24px rgb(0 0 0 / .12);
  }

  .app-sidebar:not(.is-open) .app-sidebar__company,
  .app-sidebar:not(.is-open) .app-sidebar__user,
  .app-sidebar:not(.is-open) .sidebar-link__label {
    display: none;
  }

  .app-sidebar:not(.is-open) .app-sidebar__identity {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .app-sidebar:not(.is-open) .app-sidebar__logo-row {
    justify-content: center;
  }

  .app-sidebar:not(.is-open) .sidebar-toggle__expand {
    display: block !important;
  }

  .app-sidebar:not(.is-open) .sidebar-toggle__collapse {
    display: none !important;
  }

  .app-sidebar.is-open .sidebar-toggle__expand {
    display: none !important;
  }

  .app-sidebar.is-open .sidebar-toggle__collapse {
    display: block !important;
  }

  .app-main {
    margin-left: var(--sidebar-w-collapsed);
  }

  .app-sidebar.is-open ~ .app-main {
    margin-left: min(var(--sidebar-w), 88vw);
  }
}

/* Desktop: sidebar fixa com recolher */
@media (min-width: 1024px) {
  .app-sidebar {
    position: sticky;
    top: 0;
    height: 100dvh;
  }

  .app-shell.sidebar-collapsed .app-sidebar,
  .app-sidebar.is-collapsed {
    width: var(--sidebar-w-collapsed);
  }

  .app-shell.sidebar-collapsed .app-sidebar__company,
  .app-sidebar.is-collapsed .app-sidebar__company,
  .app-shell.sidebar-collapsed .app-sidebar__user,
  .app-sidebar.is-collapsed .app-sidebar__user,
  .app-shell.sidebar-collapsed .sidebar-link__label,
  .app-sidebar.is-collapsed .sidebar-link__label {
    display: none;
  }

  .app-shell.sidebar-collapsed .app-sidebar__identity,
  .app-sidebar.is-collapsed .app-sidebar__identity {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .app-shell.sidebar-collapsed .app-sidebar__logo-row,
  .app-sidebar.is-collapsed .app-sidebar__logo-row {
    justify-content: center;
  }

  .app-shell.sidebar-collapsed .app-sidebar__brand,
  .app-sidebar.is-collapsed .app-sidebar__brand {
    flex-direction: column;
    align-items: center;
    padding-inline: .5rem;
  }

  .app-shell.sidebar-collapsed .sidebar-link,
  .app-sidebar.is-collapsed .sidebar-link {
    justify-content: center;
    padding-inline: .5rem;
  }

  .app-content { padding: var(--space-page-lg); }
}

/* ── Componentes ── */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: .5rem;
  padding: .625rem 1rem;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background-color .2s, border-color .2s, opacity .2s;
  white-space: nowrap;
}

.btn-primary {
  color: #fff;
  background-color: var(--color-primary-600);
}

.btn-primary:hover { background-color: var(--color-primary-700); }

.btn-secondary {
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-elevated);
  color: var(--color-text);
}

.btn-secondary:hover { background-color: var(--color-bg-muted); }

.btn-xs {
  padding: .25rem .55rem;
  font-size: .75rem;
  line-height: 1.25;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .375rem;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  padding: .35rem .75rem;
  font-size: .875rem;
}

.btn-danger.btn-xs { padding: .25rem .55rem; font-size: .75rem; }
.btn-danger:hover { background: #fee2e2; }

.table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
}

.table-actions__form { display: inline-flex; margin: 0; }

.table-actions > a,
.table-actions > button,
.table-actions > form,
.table-actions > form > button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.table-actions .btn-xs {
  min-width: 4.5rem;
  min-height: 2rem;
  padding: .35rem .7rem;
  line-height: 1;
}

@media (min-width: 768px) {
  .table-actions { width: max-content; flex-wrap: nowrap; }
  td:has(.table-actions) { width: 1%; min-width: max-content; white-space: nowrap; }
}

.status-desc {
  display: block;
  font-size: .7rem;
  color: var(--color-text-muted);
  margin-top: .15rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1rem;
}

/* Tabela no desktop, cards no mobile */
.list-cards { display: grid; gap: 1rem; width: 100%; max-width: 100%; margin-inline: 0; }
.list-table-desktop { display: none; }

.list-cards .financial-entry-card__meta,
.list-cards > .card > p { display: none; }

@media (min-width: 768px) {
  .list-cards { display: none; }
  .list-table-desktop { display: block; }
}

@media (min-width: 900px) {
  .table-wrap { width: 100%; max-width: 100%; margin-inline: 0; }
}

.btn-sm { padding: .375rem .75rem; font-size: .8125rem; }
.btn-icon { padding: .5rem; min-width: 2.5rem; min-height: 2.5rem; }
.btn-block { width: 100%; }

.card {
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  padding: 1.25rem;
  background-color: color-mix(in srgb, var(--color-bg-elevated) 92%, var(--color-primary-50));
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

/* Variações leves e quase transparentes entre cards em sequência */
.dash-grid-2 > .card:nth-child(4n+1),
.dash-grid-2 > .dash-panel:nth-child(4n+1),
.dash-actions-grid > .card:nth-child(3n+1),
.app-content > .card:nth-child(3n+1) {
  background-color: color-mix(in srgb, var(--color-primary-50) 34%, var(--color-bg-elevated));
  border-color: color-mix(in srgb, var(--color-primary-200) 35%, var(--color-border));
}
.dash-grid-2 > .card:nth-child(4n+2),
.dash-grid-2 > .dash-panel:nth-child(4n+2),
.dash-actions-grid > .card:nth-child(3n+2),
.app-content > .card:nth-child(3n+2) {
  background-color: color-mix(in srgb, #ecfdf5 28%, var(--color-bg-elevated));
  border-color: color-mix(in srgb, #a7f3d0 30%, var(--color-border));
}
.dash-grid-2 > .card:nth-child(4n+3),
.dash-grid-2 > .dash-panel:nth-child(4n+3),
.dash-actions-grid > .card:nth-child(3n+3),
.app-content > .card:nth-child(3n+3) {
  background-color: color-mix(in srgb, #fff7ed 30%, var(--color-bg-elevated));
  border-color: color-mix(in srgb, #fed7aa 28%, var(--color-border));
}
.dash-grid-2 > .card:nth-child(4n+4),
.dash-grid-2 > .dash-panel:nth-child(4n+4) {
  background-color: color-mix(in srgb, #f0f9ff 30%, var(--color-bg-elevated));
  border-color: color-mix(in srgb, #bae6fd 28%, var(--color-border));
}

[data-mode="dark"] .card {
  background-color: color-mix(in srgb, var(--color-bg-elevated) 92%, var(--color-primary-900));
}
[data-mode="dark"] .dash-grid-2 > .card:nth-child(4n+1),
[data-mode="dark"] .dash-grid-2 > .dash-panel:nth-child(4n+1) {
  background-color: color-mix(in srgb, var(--color-primary-900) 22%, var(--color-bg-elevated));
}
[data-mode="dark"] .dash-grid-2 > .card:nth-child(4n+2),
[data-mode="dark"] .dash-grid-2 > .dash-panel:nth-child(4n+2) {
  background-color: color-mix(in srgb, #064e3b 20%, var(--color-bg-elevated));
}
[data-mode="dark"] .dash-grid-2 > .card:nth-child(4n+3),
[data-mode="dark"] .dash-grid-2 > .dash-panel:nth-child(4n+3) {
  background-color: color-mix(in srgb, #7c2d12 16%, var(--color-bg-elevated));
}
[data-mode="dark"] .dash-grid-2 > .card:nth-child(4n+4),
[data-mode="dark"] .dash-grid-2 > .dash-panel:nth-child(4n+4) {
  background-color: color-mix(in srgb, #0c4a6e 18%, var(--color-bg-elevated));
}

@media (min-width: 640px) {
  .card { padding: 1.5rem; }
}

.input,
select.input,
textarea.input {
  width: 100%;
  border-radius: .5rem;
  border: 1px solid var(--color-border);
  padding: .625rem .875rem;
  font-size: .9375rem;
  background-color: var(--color-bg-elevated);
  color: var(--color-text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.input:focus,
select.input:focus,
textarea.input:focus {
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary-500) 20%, transparent);
}

.label {
  display: block;
  margin-bottom: .375rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--color-text);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: .125rem .625rem;
  font-size: .75rem;
  font-weight: 500;
  background-color: var(--color-primary-100);
  color: var(--color-primary-700);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  border-radius: .5rem;
  padding: .625rem .75rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--color-sidebar-text);
  text-decoration: none;
  transition: background-color .2s;
}

.sidebar-link:hover { background-color: var(--color-bg-muted); }
.sidebar-link.active {
  background-color: var(--color-sidebar-active);
  color: var(--color-primary-700);
  font-weight: 600;
}

.sidebar-link__icon {
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
  font-size: 1rem;
  line-height: 1;
}

.sidebar-link__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-link--logout {
  color: var(--color-text-muted);
}

.sidebar-link--logout:hover {
  color: #dc2626;
  background: color-mix(in srgb, #dc2626 8%, transparent);
}

.alert {
  border-radius: .5rem;
  padding: .75rem 1rem;
  font-size: .875rem;
  margin-bottom: 1rem;
}

.alert-success {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

[data-mode="dark"] .alert-success { background: #064e3b; color: #d1fae5; border-color: #065f46; }
[data-mode="dark"] .alert-error { background: #7f1d1d; color: #fecaca; border-color: #991b1b; }

/* ── Grids responsivos ── */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── Tabelas responsivas ── */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.rq-grid-scroll { overflow-x: hidden !important; scrollbar-gutter: auto; }
.rq-grid-scroll.rq-grid-scroll--overflowing { overflow-x: auto !important; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  min-width: 640px;
}

.table th,
.table td {
  padding: .75rem .5rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.table th { font-weight: 600; color: var(--color-text-muted); }

/* ── Utilitários de página ── */
.page-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .page-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.page-title { margin: 0; font-size: 1.125rem; font-weight: 600; }

.usage-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .usage-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .usage-bar { grid-template-columns: repeat(var(--usage-card-count, 4), minmax(0, 1fr)); }
}

.usage-bar__item {
  display: flex;
  min-width: 0;
  min-height: 3.5rem;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  border-radius: .5rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg-muted);
  padding: .625rem .875rem;
  font-size: .875rem;
}

.usage-bar__item .text-muted { min-width: 0; font-size: .75rem; line-height: 1.25; }
.usage-bar__item strong { flex: 0 0 auto; font-size: 1rem; font-weight: 700; line-height: 1.25; }

/* Escala tipográfica oficial da tela de checklists. */
.checklist-page { font-size: .875rem; line-height: 1.5; }
.checklist-page .page-title { font-size: 1.25rem; line-height: 1.2; font-weight: 800; }
.checklist-page .page-head .text-sm,
.checklist-page .table tbody td { font-size: .875rem; line-height: 1.45; }
.checklist-page .table thead th { font-size: .75rem; line-height: 1.25; }
.checklist-page .table .text-xs { font-size: .75rem; line-height: 1.4; }
.checklist-page .btn-sm,
.checklist-page .btn-xs { font-size: .8125rem; line-height: 1.2; }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state p { margin: 0; }
.empty-state .empty-title { font-size: 1.125rem; font-weight: 600; }
.empty-state .empty-desc {
  margin-top: .5rem;
  font-size: .875rem;
  color: var(--color-text-muted);
}

.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: .875rem; }
.text-link { color: var(--color-primary-600); text-decoration: underline; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.hidden { display: none !important; }

.palette-swatch {
  height: 2rem;
  width: 2rem;
  cursor: pointer;
  border-radius: 9999px;
  border: 2px solid transparent;
  transition: transform .2s;
}

.palette-swatch:hover { transform: scale(1.08); }
.palette-swatch.selected {
  outline: 2px solid var(--color-primary-600);
  outline-offset: 2px;
}

[x-cloak] { display: none !important; }

/* ── Landing institucional ── */
.lp-wrap {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-page);
}

.lp-hero {
  padding: 3rem 0 4rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, color-mix(in srgb, var(--color-primary-400) 22%, transparent), transparent),
    var(--color-bg);
}

.lp-hero__grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 960px) {
  .lp-hero { padding: 4.5rem 0 5rem; }
  .lp-hero__grid { grid-template-columns: 1.05fr .95fr; gap: 3rem; }
}

.lp-eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: .35rem .85rem;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--color-primary-700);
  background: var(--color-primary-50);
  border-radius: 9999px;
}

.lp-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--color-text);
}

.lp-title__accent {
  color: var(--color-primary-600);
}

.lp-lead {
  margin: 1.25rem 0 0;
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: 36rem;
}

.lp-lead strong { color: var(--color-text); font-weight: 600; }

.lp-hero__cta {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 2rem;
}

@media (min-width: 520px) {
  .lp-hero__cta { flex-direction: row; flex-wrap: wrap; align-items: center; }
}

.lp-btn-lg {
  padding: .875rem 1.5rem !important;
  font-size: 1rem !important;
}

.lp-hero__note {
  margin: 1rem 0 0;
  font-size: .8125rem;
  color: var(--color-text-muted);
}

/* Mock dashboard */
.lp-mock {
  border-radius: 1rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, .06),
    0 20px 40px -12px rgba(15, 23, 42, .12);
  overflow: hidden;
}

.lp-mock__bar {
  display: flex;
  gap: .4rem;
  padding: .75rem 1rem;
  background: var(--color-bg-muted);
  border-bottom: 1px solid var(--color-border);
}

.lp-mock__bar span {
  width: .65rem;
  height: .65rem;
  border-radius: 9999px;
  background: var(--color-border);
}

.lp-mock__body { padding: 1.25rem 1.5rem 1.5rem; }

.lp-mock__greeting {
  margin: 0 0 1rem;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--color-text);
}

.lp-mock__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin-bottom: 1rem;
}

.lp-mock__stats div {
  padding: .75rem .5rem;
  text-align: center;
  border-radius: .5rem;
  background: var(--color-bg-muted);
}

.lp-mock__stats strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary-600);
}

.lp-mock__stats span {
  font-size: .65rem;
  color: var(--color-text-muted);
  line-height: 1.2;
}

.lp-mock__alerts {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .8125rem;
}

.lp-mock__alerts li {
  padding: .5rem .65rem;
  border-radius: .375rem;
  margin-bottom: .35rem;
}

.lp-mock__alerts li.ok {
  background: #ecfdf5;
  color: #166534;
}

.lp-mock__alerts li.warn {
  background: #fffbeb;
  color: #92400e;
}

/* Fleet Bull — mascote */
.lp-fleet-bull-hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 20rem;
}

.lp-fleet-bull-hero__glow {
  position: absolute;
  inset: 10% 5% 0;
  background: radial-gradient(ellipse at center bottom, color-mix(in srgb, var(--color-primary-400) 35%, transparent), transparent 70%);
  pointer-events: none;
}

.lp-fleet-bull-hero__img {
  position: relative;
  z-index: 1;
  width: auto;
  max-width: 100%;
  max-height: 28rem;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(15, 23, 42, .18));
}

.lp-fleet-bull-cta {
  width: min(100%, 17.5rem);
  height: auto;
  border-radius: 1rem;
  object-fit: cover;
  object-position: center top;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, .25));
}

.lp-about-head,
.lp-contact-head {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.lp-fleet-bull-about {
  width: 10rem;
  height: 10rem;
  border-radius: 1rem;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--color-primary-100);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .1);
  flex-shrink: 0;
}

.lp-fleet-bull-contact {
  width: 7rem;
  height: 7rem;
  border-radius: 9999px;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--color-primary-100);
  flex-shrink: 0;
}

/* Sections */
.lp-section {
  padding: 4rem 0;
}

.lp-section__label {
  margin: 0 0 .5rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-primary-600);
}

.lp-section__title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: var(--color-text);
}

.lp-section__subtitle {
  margin: .75rem 0 0;
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  max-width: 40rem;
}

.lp-pain {
  background: var(--color-bg-muted);
}

.lp-pain__grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .lp-pain__grid { grid-template-columns: repeat(3, 1fr); }
}

.lp-pain__item {
  padding: 1.5rem;
  border-radius: .75rem;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
}

.lp-pain__icon { font-size: 1.75rem; display: block; margin-bottom: .75rem; }

.lp-pain__item h3 {
  margin: 0 0 .5rem;
  font-size: 1.0625rem;
  font-weight: 700;
}

.lp-pain__item p {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.lp-pain__item--with-image {
  padding: 0;
  overflow: hidden;
}

.lp-pain__img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: .75rem .75rem 0 0;
}

.lp-pain__item--with-image .lp-pain__icon,
.lp-pain__item--with-image h3,
.lp-pain__item--with-image p {
  padding-inline: 1.5rem;
}

.lp-pain__item--with-image .lp-pain__icon {
  padding-top: .75rem;
}

.lp-pain__item--with-image p {
  padding-bottom: 1.5rem;
}

.lp-promise__inner { max-width: 52rem; }

.lp-quote {
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--color-primary-500);
  border-radius: 0 .5rem .5rem 0;
  background: color-mix(in srgb, var(--color-primary-50) 60%, var(--color-bg-elevated));
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  font-style: italic;
}

.lp-quote em { color: var(--color-primary-700); font-style: normal; font-weight: 600; }

.lp-promise__grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .lp-promise__grid { grid-template-columns: repeat(3, 1fr); }
}

.lp-promise__card {
  padding: 1.5rem;
  border-radius: .75rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
}

.lp-promise__card h3 {
  margin: 0 0 .5rem;
  font-size: 1.0625rem;
  font-weight: 700;
}

.lp-promise__card p {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.lp-features {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .lp-features { grid-template-columns: repeat(2, 1fr); }
}

.lp-feature {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: .75rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
}

.lp-feature__num {
  flex-shrink: 0;
  font-size: .875rem;
  font-weight: 800;
  color: var(--color-primary-600);
  opacity: .7;
}

.lp-feature h3 {
  margin: 0 0 .35rem;
  font-size: 1.0625rem;
  font-weight: 700;
}

.lp-feature p {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.lp-steps {
  background: var(--color-bg-muted);
}

.lp-steps__list {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.5rem;
  max-width: 36rem;
}

.lp-steps__list li {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.lp-steps__n {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: var(--color-primary-600);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
}

.lp-steps__list h3 {
  margin: 0 0 .25rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.lp-steps__list p {
  margin: 0;
  font-size: .9375rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.lp-audience__grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .lp-audience__grid { grid-template-columns: repeat(3, 1fr); }
}

.lp-audience__item {
  padding: 1.5rem;
  border-radius: .75rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
}

.lp-audience__item strong {
  display: block;
  margin-bottom: .5rem;
  font-size: 1rem;
  color: var(--color-primary-700);
}

.lp-audience__item p {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.lp-cta {
  padding: 4.5rem 0 5rem;
  background: linear-gradient(145deg, var(--color-primary-700), var(--color-primary-900));
  color: #fff;
}

.lp-pricing__grid { display:grid; gap:1rem; margin-top:2rem; }
@media (min-width: 768px) { .lp-pricing__grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
.lp-pricing__card { display:flex; flex-direction:column; gap:1rem; padding:1.5rem; border:1px solid var(--color-border); border-radius:1.25rem; background:var(--color-surface); box-shadow:var(--shadow-sm); }
.lp-pricing__card h3 { font-size:1.25rem; font-weight:800; }
.lp-pricing__card p { color:var(--color-text-muted); min-height:3rem; }
.lp-pricing__price { font-size:2rem; font-weight:900; color:var(--color-primary-600); }
.lp-pricing__price span { font-size:.9rem; margin-right:.25rem; }
.lp-pricing__price small { font-size:.8rem; font-weight:600; color:var(--color-text-muted); margin-left:.25rem; }
.lp-pricing__card ul { display:grid; gap:.5rem; margin:0 0 .5rem; padding:0; list-style:none; color:var(--color-text-muted); }
.lp-pricing__card ul li::before { content:'✓'; color:var(--color-success-600); font-weight:900; margin-right:.5rem; }
.lp-pricing__card .btn-primary { margin-top:auto; text-align:center; }
.lp-pricing__note { max-width:48rem; margin:1.25rem auto 0; text-align:center; color:var(--color-text-muted); font-size:.9rem; }

.lp-cta__inner {
  text-align: center;
  max-width: 36rem;
}

.lp-cta__grid {
  display: grid;
  gap: 2rem;
  align-items: center;
  max-width: 56rem;
  text-align: left;
}

@media (min-width: 768px) {
  .lp-cta__grid {
    grid-template-columns: 1fr auto;
    text-align: left;
  }
  .lp-cta__inner.lp-cta__grid { max-width: 56rem; }
}

.lp-cta__copy { max-width: 32rem; }

.lp-cta__mascot {
  display: flex;
  justify-content: center;
}

.lp-cta h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -.02em;
}

.lp-cta p {
  margin: 1rem 0 0;
  font-size: 1.0625rem;
  opacity: .92;
  line-height: 1.55;
}

.lp-cta__btn {
  margin-top: 1.75rem !important;
  background: #fff !important;
  color: var(--color-primary-800) !important;
}

.lp-cta__btn:hover {
  background: #f8fafc !important;
}

.lp-cta__sub {
  margin: 1.25rem 0 0;
  font-size: .9375rem;
  opacity: .85;
}

.lp-cta__sub .text-link {
  color: #fff;
  font-weight: 600;
}

/* ── Painel motorista ── */
.role-driver .app-content { max-width: 56rem; margin: 0 auto; padding-bottom: 2rem; }

.driver-vehicle-plate { font-size: 1.375rem; font-weight: 800; font-family: ui-monospace, monospace; letter-spacing: .05em; margin: .15rem 0; }
.driver-text-warning { color: #d97706; }
.driver-text-ok { color: #16a34a; }
.driver-file-input { font-size: .875rem; padding: .5rem; }
.driver-submit { padding: 1rem; font-size: 1rem; }
.driver-alert { padding: 1rem; border-left: 4px solid #d97706; }
.driver-alert--success { border-left-color: #16a34a; }
.driver-required { color: #dc2626; font-weight: 700; }

/* Welcome */
.driver-welcome-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.driver-welcome-date { font-size: .875rem; color: var(--color-text-muted); white-space: nowrap; padding: .35rem .75rem; background: var(--color-bg-muted); border-radius: .5rem; }

/* Stats grid: lado a lado no web, empilhado no mobile */
.driver-stats-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .driver-stats-grid { grid-template-columns: 1fr 1fr; }
}

.driver-stat-card { display: flex; flex-direction: column; min-height: 100%; }
.driver-stat-card__head { display: flex; align-items: flex-start; gap: .875rem; margin-bottom: .5rem; }
.driver-stat-card__icon { font-size: 2rem; line-height: 1; flex-shrink: 0; width: 3rem; height: 3rem; display: flex; align-items: center; justify-content: center; background: var(--color-bg-muted); border-radius: .75rem; }
.driver-stat-card__label { font-size: .8125rem; color: var(--color-text-muted); margin: 0; }
.driver-stat-card__value { font-size: 2rem; font-weight: 800; line-height: 1.1; margin: .15rem 0 0; }
.driver-stat-card__hint { margin: 0; flex: 1; }
.driver-stat-split { display: flex; gap: 1.5rem; margin-top: .25rem; }
.driver-stat-mini-label { display: block; font-size: .75rem; color: var(--color-text-muted); }
.driver-stat-mini-value { display: block; font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.driver-stat-mini-value--ok { color: #16a34a; }
.driver-stat-mini-value--warn { color: #d97706; }

/* Quick links */
.driver-quick-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.driver-quick-link {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem; border-radius: .5rem; font-size: .875rem; font-weight: 500;
  background: var(--color-bg-elevated); border: 1px solid var(--color-border);
  text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s;
}
.driver-quick-link:hover { border-color: var(--color-primary-400); box-shadow: 0 2px 8px rgba(0,0,0,.06); }

/* Modal */
.driver-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
@media (min-width: 640px) {
  .driver-modal { align-items: center; padding: 1rem; }
}
.driver-modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); }
.driver-modal__panel {
  position: relative; z-index: 1; width: 100%; max-width: 32rem;
  max-height: 92vh; overflow-y: auto; margin: 0;
  border-radius: 1rem 1rem 0 0;
}
@media (min-width: 640px) {
  .driver-modal__panel { border-radius: .75rem; }
}
.driver-modal__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.driver-modal__close {
  background: var(--color-bg-muted); border: none; border-radius: .375rem;
  width: 2rem; height: 2rem; cursor: pointer; font-size: 1rem; color: var(--color-text-muted);
}
.occurrence-grid { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 480px) { .occurrence-grid { grid-template-columns: 1fr 1fr; } }

/* ── Checklist execução ── */
.driver-checklist-form { display: flex; flex-direction: column; gap: 0; }

.driver-checklist-hero__top {
  display: flex; flex-direction: column; gap: 1rem;
}
@media (min-width: 640px) {
  .driver-checklist-hero__top { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}
.driver-checklist-hero__odometer { min-width: 160px; }

/* Progress bar */
.driver-progress__labels { display: flex; justify-content: space-between; font-size: .875rem; margin-bottom: .5rem; }
.driver-progress__bar { height: .625rem; background: var(--color-bg-muted); border-radius: 9999px; overflow: hidden; }
.driver-progress__fill {
  height: 100%; background: linear-gradient(90deg, var(--color-primary-500), var(--color-primary-600));
  border-radius: 9999px; transition: width .35s ease;
}

/* Item cards */
.driver-checklist-items { display: flex; flex-direction: column; gap: .75rem; }

.driver-item-card {
  border: 2px solid var(--color-border);
  transition: border-color .25s, box-shadow .25s;
  overflow: hidden;
}
.driver-item-card--done {
  border-color: #86efac;
  box-shadow: 0 0 0 1px rgba(22,163,74,.15);
}
.driver-item-card__header {
  display: flex; align-items: center; gap: .75rem;
  padding: .875rem 1rem;
  background: var(--color-bg-muted);
  border-bottom: 1px solid var(--color-border);
}
.driver-item-card--done .driver-item-card__header { background: #f0fdf4; }
.driver-item-card__num {
  flex-shrink: 0; width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9999px; font-weight: 700; font-size: .875rem;
  background: var(--color-bg-elevated); border: 2px solid var(--color-border);
  color: var(--color-text-muted);
}
.driver-item-card__num.is-done { background: #16a34a; border-color: #16a34a; color: #fff; }
.driver-item-card__title-wrap { flex: 1; min-width: 0; }
.driver-item-card__title { margin: 0; font-size: .9375rem; font-weight: 600; line-height: 1.3; }
.driver-item-card__status {
  flex-shrink: 0; width: 1.75rem; height: 1.75rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9999px; font-size: .875rem; font-weight: 700;
  color: var(--color-text-muted); background: var(--color-bg-elevated);
  border: 2px solid var(--color-border);
}
.driver-item-card__status.is-done { background: #dcfce7; border-color: #86efac; color: #166534; }
.driver-item-card__body { padding: 1rem; }

/* OK toggle pill */
.driver-item-ok-toggle { display: block; cursor: pointer; }
.driver-item-ok-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.driver-item-ok-toggle__pill {
  display: inline-flex; border-radius: .5rem; overflow: hidden;
  border: 2px solid var(--color-border); font-size: .8125rem; font-weight: 600;
}
.driver-item-ok-toggle__ok,
.driver-item-ok-toggle__nok { padding: .5rem 1rem; transition: background .15s, color .15s; }
.driver-item-ok-toggle__ok { background: var(--color-bg-muted); color: var(--color-text-muted); }
.driver-item-ok-toggle__nok { background: var(--color-bg-muted); color: var(--color-text-muted); }
.driver-item-ok-toggle input:checked ~ .driver-item-ok-toggle__pill .driver-item-ok-toggle__ok {
  background: #dcfce7; color: #166534;
}
.driver-item-ok-toggle input:checked ~ .driver-item-ok-toggle__pill .driver-item-ok-toggle__nok {
  background: transparent; color: var(--color-text-muted);
}
.driver-item-ok-toggle input:not(:checked) ~ .driver-item-ok-toggle__pill .driver-item-ok-toggle__ok {
  background: transparent; color: var(--color-text-muted);
}
.driver-item-ok-toggle input:not(:checked) ~ .driver-item-ok-toggle__pill .driver-item-ok-toggle__nok {
  background: #fee2e2; color: #991b1b;
}

.driver-item-media-grid {
  display: grid; gap: .75rem; grid-template-columns: 1fr;
}
@media (min-width: 480px) {
  .driver-item-media-grid { grid-template-columns: 1fr 1fr; }
}
.driver-item-media-box {
  padding: .75rem; background: var(--color-bg-muted); border-radius: .5rem;
  border: 1px dashed var(--color-border);
}

/* Histórico */
.driver-history-list { list-style: none; margin: 0; padding: 0; }
.driver-history-list li { border-bottom: 1px solid var(--color-border); }
.driver-history-list li:last-child { border-bottom: none; }
.driver-history-list a {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  padding: .875rem 0; text-decoration: none; color: inherit;
  transition: color .15s;
}
.driver-history-list a:hover { color: var(--color-primary-600); }
.driver-history-date { font-weight: 600; min-width: 5rem; }
.driver-history-arrow { margin-left: auto; color: var(--color-text-muted); }

.checklist-media-grid,
.entity-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; margin-top: .5rem; }
.checklist-media,
.entity-media { width: 100%; height: 120px; object-fit: cover; border-radius: .5rem; border: 1px solid var(--color-border); background: var(--color-bg-muted); }
.checklist-items-list { list-style: none; margin: 0; padding: 0; }
.checklist-item-row { padding: 1rem 0; border-bottom: 1px solid var(--color-border); }
.checklist-item-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.checklist-item-status { width: 1.5rem; height: 1.5rem; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; }
.checklist-item-status.ok { background: #dcfce7; color: #166534; }
.checklist-item-status.fail { background: #fee2e2; color: #991b1b; }

.theme-picker .palette-swatch.selected { outline: 2px solid var(--color-primary-600); outline-offset: 2px; }

/* Badge --warning */
.badge--warning { background: #fef3c7; color: #92400e; }
.badge--success { background: #dcfce7; color: #166534; }
.badge--danger { background: #fee2e2; color: #991b1b; }
.badge--muted { background: var(--color-bg-muted); color: var(--color-text-muted); }

/* ── Suporte / Chat ── */
.support-page { max-width: 56rem; margin: 0 auto; }
.support-empty { padding: 2rem 1.5rem; }
.support-empty__icon { font-size: 3rem; margin-bottom: .5rem; }
.support-chat-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .support-chat-layout { grid-template-columns: 1fr 220px; }
}
.support-chat-panel { display: flex; flex-direction: column; min-height: 420px; padding: 0; overflow: hidden; }
.support-chat-messages {
  flex: 1; min-height: 280px; max-height: 50vh; overflow-y: auto;
  padding: 1rem; display: flex; flex-direction: column; gap: .75rem;
  background: var(--color-bg-muted);
}
.support-chat-messages--tall { max-height: 60vh; min-height: 360px; }
.support-chat-compose { padding: 1rem; border-top: 1px solid var(--color-border); background: var(--color-bg-elevated); }
.support-chat-hint { font-size: .8125rem; color: #d97706; margin-bottom: .5rem; }
.support-send-form { display: flex; flex-direction: column; gap: .5rem; }
.support-input { resize: vertical; min-height: 2.75rem; }
.support-send-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.support-chat-sidebar { align-self: start; }
.support-sidebar-actions { display: flex; flex-direction: column; gap: .5rem; margin-top: .75rem; }
/* ── Blog ── */
.blog-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.blog-header__mascot {
  width: 5rem;
  height: 5rem;
  border-radius: 9999px;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--color-primary-200);
  flex-shrink: 0;
}

.blog-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}

.blog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .1);
}

.blog-card__img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--color-bg-muted);
}

.blog-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.blog-card:hover .blog-card__img { transform: scale(1.04); }

.blog-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: .5rem;
}

.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .8125rem;
  color: var(--color-text-muted);
}

.blog-card__author {
  font-weight: 600;
  color: var(--color-primary-600);
}

.blog-card__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}

.blog-card__link {
  color: inherit;
  text-decoration: none;
  transition: color .15s;
}

.blog-card__link:hover { color: var(--color-primary-600); }

.blog-card__excerpt {
  margin: 0;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  flex: 1;
}

.blog-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.blog-card__readmore {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-primary-600);
  text-decoration: none;
  margin-top: auto;
}

.blog-card__readmore:hover { text-decoration: underline; }

.blog-cta {
  margin-top: 3rem;
  padding: 1.5rem;
}

.blog-cta__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.blog-cta__mascot {
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
}

.blog-cta__inner h3 {
  margin: 0;
  font-size: 1.125rem;
}

.blog-cta__inner p {
  margin: .25rem 0 .5rem;
}

/* Breadcrumb */
.blog-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  font-size: .8125rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.blog-breadcrumb a {
  color: var(--color-primary-600);
  text-decoration: none;
}

.blog-breadcrumb a:hover { text-decoration: underline; }

.blog-breadcrumb__sep {
  color: var(--color-border);
}

/* Post individual */
.blog-post__header {
  margin-bottom: 2rem;
}

.blog-post__title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.25;
  margin: .5rem 0 .75rem;
}

@media (min-width: 640px) {
  .blog-post__title { font-size: 2rem; }
}

.blog-post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .875rem;
  color: var(--color-text-muted);
  margin-bottom: .75rem;
}

.blog-post__author {
  font-weight: 600;
  color: var(--color-primary-600);
}

.blog-post__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.blog-post__figure {
  margin: 0 0 2rem;
  border-radius: .75rem;
  overflow: hidden;
}

.blog-post__img {
  width: 100%;
  height: auto;
  border-radius: .75rem;
}

.blog-post__content {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text);
}

.blog-post__content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2rem 0 .75rem;
}

.blog-post__content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.5rem 0 .5rem;
}

.blog-post__content p {
  margin: 0 0 1rem;
}

.blog-post__content ul,
.blog-post__content ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.blog-post__content li {
  margin-bottom: .5rem;
}

.blog-post__content blockquote {
  margin: 1.5rem 0;
  padding: .75rem 1rem;
  border-left: 4px solid var(--color-primary-400);
  background: var(--color-bg-muted);
  border-radius: 0 .5rem .5rem 0;
  color: var(--color-primary-800);
  font-style: italic;
}

.blog-post__content blockquote p {
  margin: 0;
}

.blog-post__footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.blog-post__share {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.blog-post__share p {
  margin: 0;
}

.blog-post__cta {
  padding: 1.5rem;
}

.support-help-list { margin: .5rem 0 0; padding-left: 1rem; }
.support-help-list li { margin-bottom: .25rem; }
.support-chat-closed { padding: 1rem; border-top: 1px solid var(--color-border); text-align: center; }
.support-chat-header-admin {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 1rem; border-bottom: 1px solid var(--color-border); gap: 1rem;
}
.support-msg { max-width: 85%; padding: .65rem .85rem; border-radius: .75rem; font-size: .875rem; line-height: 1.45; }
.support-msg--user { align-self: flex-end; background: var(--color-primary-600); color: #fff; border-bottom-right-radius: .2rem; }
.support-msg--ai { align-self: flex-start; background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-bottom-left-radius: .2rem; }
.support-msg--human { align-self: flex-start; background: #ecfdf5; border: 1px solid #86efac; border-bottom-left-radius: .2rem; }
.support-msg__meta { display: flex; justify-content: space-between; gap: .5rem; font-size: .6875rem; opacity: .85; margin-bottom: .25rem; }
.support-msg--user .support-msg__meta { color: rgba(255,255,255,.85); }
.support-msg__who { font-weight: 600; }
.support-row--urgent { background: #fffbeb; }
.support-provider-card--active { border: 2px solid var(--color-primary-400); }
.support-kb-item { border: 1px solid var(--color-border); border-radius: .5rem; margin-bottom: .5rem; }
.support-kb-item__summary { padding: .65rem .75rem; cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.support-kb-item__body { padding: 0 .75rem .75rem; border-top: 1px solid var(--color-border); }
.support-history-mini { list-style: none; margin: 0; padding: 0; }
.support-history-mini li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--color-border); font-size: .875rem; }

/* PWA — banner de instalação */
.pwa-install {
  position: fixed;
  z-index: 9999;
  left: max(1rem, env(safe-area-inset-left));
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1rem;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: .875rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .18);
}

.pwa-install[hidden] { display: none !important; }

.pwa-install__icon {
  border-radius: .65rem;
  flex-shrink: 0;
}

.pwa-install__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
  line-height: 1.3;
}

.pwa-install__btn { flex-shrink: 0; white-space: nowrap; }

.pwa-install__close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  border-radius: .375rem;
}

.pwa-install__close:hover { background: var(--color-bg-muted); }

@media (display-mode: standalone) {
  .pwa-install { display: none !important; }
}

/* ── Dashboard — KPIs, gráficos e hero ── */
.dash-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 1.5rem;
  padding: 1.65rem 1.85rem;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--color-primary-100) 55%, transparent) 0%,
      var(--color-bg-elevated) 48%,
      color-mix(in srgb, var(--color-primary-50) 35%, var(--color-bg)) 100%);
  border: 1px solid color-mix(in srgb, var(--color-primary-200) 45%, var(--color-border));
  border-radius: 1.1rem;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--color-primary-600) 6%, transparent);
  position: relative;
  overflow: hidden;
}

.dash-hero::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--color-primary-500), var(--color-primary-700));
  border-radius: 1.1rem 0 0 1.1rem;
}

.dash-hero--compact { padding: 1.35rem 1.6rem; }
.dash-hero--driver {
  background: linear-gradient(135deg,
    color-mix(in srgb, #bbf7d0 40%, transparent) 0%,
    var(--color-bg-elevated) 55%,
    var(--color-bg) 100%);
  border-color: color-mix(in srgb, #86efac 40%, var(--color-border));
}

.dash-hero__main { flex: 1; min-width: 220px; position: relative; }
.dash-hero__eyebrow {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-primary-700);
  margin: 0 0 .45rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-primary-100) 70%, transparent);
}
.dash-hero__title {
  font-size: clamp(1.65rem, 2.4vw, 2.05rem);
  font-weight: 800;
  margin: 0;
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--color-text);
  background: linear-gradient(120deg, var(--color-text) 40%, var(--color-primary-700));
  -webkit-background-clip: text;
  background-clip: text;
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .dash-hero__title {
    color: transparent;
  }
}
.dash-hero__subtitle { font-size: .975rem; color: var(--color-text-muted); margin: .65rem 0 0; max-width: 42rem; }
.dash-hero__score { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }

.dash-hero__badge {
  display: inline-block;
  margin-top: .75rem;
  padding: .3rem .65rem;
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 600;
}
.dash-hero__badge--success { background: #dcfce7; color: #166534; }
.dash-hero__badge--warn { background: #fef3c7; color: #92400e; }
.dash-hero__badge--neutral { background: var(--color-bg-muted); color: var(--color-text-muted); }

.dash-insights {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.dash-insights li {
  font-size: .875rem;
  color: var(--color-text-muted);
  padding-left: 1rem;
  position: relative;
}
.dash-insights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-primary-500);
}

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 768px) {
  .dash-kpi-grid { grid-template-columns: repeat(4, 1fr); }
}
.dash-kpi-grid--2 { grid-template-columns: repeat(2, 1fr); }

.dash-kpi {
  padding: 1.1rem 1.25rem;
  border-radius: .875rem;
  border: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-bg-elevated) 88%, var(--color-primary-50));
  border-left: 3px solid var(--color-primary-500);
  backdrop-filter: blur(4px);
}
.dash-kpi--success {
  border-left-color: #16a34a;
  background: color-mix(in srgb, #dcfce7 28%, var(--color-bg-elevated));
}
.dash-kpi--warn {
  border-left-color: #d97706;
  background: color-mix(in srgb, #fef3c7 30%, var(--color-bg-elevated));
}
.dash-kpi--danger {
  border-left-color: #dc2626;
  background: color-mix(in srgb, #fee2e2 28%, var(--color-bg-elevated));
}
.dash-kpi--primary {
  border-left-color: var(--color-primary-600);
  background: color-mix(in srgb, var(--color-primary-100) 32%, var(--color-bg-elevated));
}
.dash-kpi--neutral {
  border-left-color: var(--color-border);
  background: color-mix(in srgb, var(--color-bg-muted) 40%, var(--color-bg-elevated));
}

[data-mode="dark"] .dash-kpi--success { background: color-mix(in srgb, #166534 18%, var(--color-bg-elevated)); }
[data-mode="dark"] .dash-kpi--warn { background: color-mix(in srgb, #92400e 18%, var(--color-bg-elevated)); }
[data-mode="dark"] .dash-kpi--danger { background: color-mix(in srgb, #991b1b 18%, var(--color-bg-elevated)); }
[data-mode="dark"] .dash-kpi--primary { background: color-mix(in srgb, var(--color-primary-800) 22%, var(--color-bg-elevated)); }

.dash-kpi__top { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; margin-bottom: .35rem; }
.dash-kpi__label { font-size: .8125rem; color: var(--color-text-muted); margin: 0; }
.dash-kpi__value { font-size: 1.65rem; font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -.02em; }
.dash-kpi__sub { font-size: .8125rem; color: var(--color-text-muted); margin: .25rem 0 0; }
.dash-kpi__compare { font-size: .75rem; color: var(--color-text-muted); margin: .35rem 0 0; opacity: .85; }

.dash-kpi__delta {
  font-size: .6875rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.dash-kpi__delta--up { background: #dcfce7; color: #166534; }
.dash-kpi__delta--down { background: #fee2e2; color: #991b1b; }
.dash-kpi__delta--neutral { background: var(--color-bg-muted); color: var(--color-text-muted); }

.dash-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 36px;
  margin-top: .75rem;
}
.dash-sparkline__bar {
  flex: 1;
  min-width: 4px;
  background: var(--color-primary-400);
  border-radius: 2px 2px 0 0;
  opacity: .75;
  transition: opacity .15s;
}
.dash-kpi:hover .dash-sparkline__bar { opacity: 1; }

.dash-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .5rem;
  height: 140px;
  padding-top: .5rem;
}
.dash-bars__item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .25rem; min-width: 0; }
.dash-bars__track {
  width: 100%;
  max-width: 36px;
  height: 100px;
  display: flex;
  align-items: flex-end;
  background: var(--color-bg-muted);
  border-radius: .375rem .375rem 0 0;
  overflow: hidden;
}
.dash-bars__fill {
  width: 100%;
  background: linear-gradient(180deg, var(--color-primary-500), var(--color-primary-700));
  border-radius: .375rem .375rem 0 0;
  transition: height .3s ease;
}
.dash-bars__label { font-size: .6875rem; color: var(--color-text-muted); }
.dash-bars__val { font-size: .75rem; font-weight: 600; }

.dash-ring { position: relative; width: 110px; height: 110px; margin: 0 auto; }
.dash-ring__svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dash-ring__bg { fill: none; stroke: var(--color-bg-muted); stroke-width: 8; }
.dash-ring__fg { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.dash-ring--primary .dash-ring__fg { stroke: var(--color-primary-600); }
.dash-ring--success .dash-ring__fg { stroke: #16a34a; }
.dash-ring--warn .dash-ring__fg { stroke: #d97706; }
.dash-ring--danger .dash-ring__fg { stroke: #dc2626; }
.dash-ring__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.dash-ring__score { font-size: 1.65rem; font-weight: 800; line-height: 1; }
.dash-ring__unit { font-size: .6875rem; color: var(--color-text-muted); }
.dash-ring__label { text-align: center; font-size: .75rem; color: var(--color-text-muted); margin: .5rem 0 0; max-width: 140px; }

.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .dash-grid-2 { grid-template-columns: 1fr 1fr; }
}

.dash-panel { padding: 1.25rem 1.5rem; }
.dash-panel__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .5rem; }
.dash-panel__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -.01em;
}
.dash-panel__sub { font-size: .8125rem; color: var(--color-text-muted); margin: .25rem 0 0; }

.dash-compare-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-top: .75rem;
  border-top: 1px solid var(--color-border);
}
.dash-compare-row strong { display: block; font-size: 1.1rem; margin-top: .15rem; }

.dash-finance-compare {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.dash-finance-compare__col { flex: 1; }
.dash-finance-compare__val { display: block; font-size: 1.35rem; font-weight: 700; margin-top: .2rem; }
.dash-finance-compare__vs { font-size: .8125rem; color: var(--color-text-muted); font-weight: 600; }

.dash-breakdown__row {
  display: grid;
  grid-template-columns: 90px 1fr 32px;
  align-items: center;
  gap: .65rem;
  margin-bottom: .5rem;
}
.dash-breakdown__label { font-size: .8125rem; }
.dash-breakdown__track {
  height: 8px;
  background: var(--color-bg-muted);
  border-radius: 999px;
  overflow: hidden;
}
.dash-breakdown__fill {
  height: 100%;
  background: var(--color-primary-500);
  border-radius: 999px;
  transition: width .4s ease;
}
.dash-breakdown__fill--active { background: #16a34a; }
.dash-breakdown__fill--maintenance { background: #d97706; }
.dash-breakdown__fill--inactive { background: #94a3b8; }
.dash-breakdown__num { font-size: .8125rem; font-weight: 600; text-align: right; }

.dash-usage__row { margin-bottom: .75rem; }
.dash-usage__head { display: flex; justify-content: space-between; font-size: .8125rem; margin-bottom: .35rem; }

.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: .875rem;
}
.dash-list__item:last-child { border-bottom: none; }

.dash-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.dash-actions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .dash-actions-grid { grid-template-columns: repeat(3, 1fr); }
}
.dash-action-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s, transform .15s;
}
.dash-action-card:hover { box-shadow: 0 4px 20px rgba(15,23,42,.08); transform: translateY(-1px); }
.dash-action-card__icon { font-size: 1.5rem; }

.dash-week {
  display: flex;
  justify-content: space-between;
  gap: .35rem;
}
.dash-week__day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: .5rem .25rem;
  border-radius: .5rem;
}
.dash-week__day--today { background: var(--color-primary-50, #eff6ff); }
.dash-week__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-bg-muted);
}
.dash-week__dot--done {
  background: #16a34a;
  border-color: #16a34a;
  box-shadow: inset 0 0 0 3px #fff;
}
.dash-week__label { font-size: .6875rem; color: var(--color-text-muted); font-weight: 600; }

.dash-alert {
  padding: .875rem 1rem;
  border-radius: .625rem;
  font-size: .875rem;
  border: 1px solid var(--color-border);
}
.dash-alert--warn { background: #fffbeb; border-color: #fcd34d; }

.dash-collection { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem; }
.dash-collection__ring-wrap .dash-ring { width: 100px; height: 100px; }

.text-ok { color: #16a34a; }
.text-warn { color: #d97706; }

/* ── Painel de ajuda / navegação por voz ── */
.voice-help-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--color-overlay);
}

.voice-help-panel {
  width: min(32rem, 100%);
  max-height: min(80vh, 36rem);
  display: flex;
  flex-direction: column;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  box-shadow: 0 20px 48px rgba(15, 23, 42, .18);
  overflow: hidden;
}

.voice-help-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-primary-50) 40%, var(--color-bg-muted));
}

.voice-help-panel__head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.voice-help-panel__body {
  padding: 1rem 1.15rem 1.25rem;
  overflow-y: auto;
  display: grid;
  gap: 1.25rem;
}

.voice-help-section h3 {
  margin: 0 0 .35rem;
  font-size: .875rem;
  font-weight: 700;
  color: var(--color-primary-700);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.voice-help-hint {
  margin: 0 0 .75rem;
  font-size: .8125rem;
  color: var(--color-text-muted);
}

.voice-help-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}

.voice-help-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem .75rem;
  padding: .55rem .7rem;
  border-radius: .5rem;
  background: color-mix(in srgb, var(--color-bg-muted) 65%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-border) 80%, transparent);
  font-size: .8125rem;
}

.voice-help-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-primary-700);
  background: color-mix(in srgb, var(--color-primary-100) 55%, transparent);
  padding: .15rem .4rem;
  border-radius: .3rem;
}

.voice-nav-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 90;
  max-width: min(90vw, 28rem);
  padding: .7rem 1rem;
  border-radius: .75rem;
  background: var(--color-text);
  color: var(--color-bg);
  font-size: .875rem;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .2);
}

.voice-nav-toast.is-error {
  background: #991b1b;
  color: #fff;
}

.app-shell.sidebar-collapsed .app-sidebar__logo-row .app-sidebar__company {
  display: none;
}

@media (max-width: 1023px) {
  .app-sidebar:not(.is-open) .app-sidebar__logo-row .app-sidebar__company {
    display: none;
  }
}

