/* Decars Institutional Tech Theme v70. CSS puro, sem dependencias extras. */
:root {
  --de-primary: #0b1220;
  --de-primary-soft: #111827;
  --de-secondary: #1d4ed8;
  --de-tech: #06b6d4;
  --de-cta: #f97316;
  --de-bg: #f8fafc;
  --de-surface: #ffffff;
  --de-surface-featured: #eff6ff;
  --de-border: #e2e8f0;
  --de-text: #0f172a;
  --de-muted: #64748b;
  --de-inverse: #ffffff;
  --de-available: #16a34a;
  --de-in-use: #2563eb;
  --de-warning: #f59e0b;
  --de-error: #dc2626;
  --de-critical: #991b1b;
  --de-approval: #7c3aed;
  --de-inactive: #94a3b8;
  --de-radius-card: 20px;
  --de-radius-control: 14px;
  --de-shadow-card: 0 10px 28px rgba(15, 23, 42, .08);
  --de-shadow-soft: 0 6px 18px rgba(15, 23, 42, .06);

  --color-brand-primary: var(--de-primary);
  --color-brand-secondary: var(--de-secondary);
  --color-brand-accent: var(--de-tech);
  --color-bg: var(--de-bg);
  --color-surface: var(--de-surface);
  --color-surface-elevated: var(--de-surface-featured);
  --color-text: var(--de-text);
  --color-text-muted: var(--de-muted);
  --color-border: var(--de-border);
  --color-success: var(--de-available);
  --color-warning: var(--de-warning);
  --color-danger: var(--de-error);
  --color-info: var(--de-in-use);
  --color-critical: var(--de-critical);
  --degraus-blue: var(--de-primary);
  --degraus-blue-dark: var(--de-primary-soft);
  --degraus-orange: var(--de-cta);
  --brand: var(--de-primary);
  --brand-2: var(--de-secondary);
  --accent: var(--de-cta);
  --ink: var(--de-text);
  --muted: var(--de-muted);
  --line: var(--de-border);
  --panel: var(--de-surface);
  --bg: var(--de-bg);
  --ref-blue: var(--de-primary);
  --ref-blue-2: var(--de-secondary);
  --ref-blue-dark: var(--de-primary-soft);
  --ref-orange: var(--de-cta);
  --ref-text: var(--de-text);
}

html,
body {
  color: var(--de-text);
  background: var(--de-bg);
}

.app-header {
  color: var(--de-inverse);
  background: linear-gradient(135deg, var(--de-primary) 0%, var(--de-primary-soft) 72%, #172554 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
}

.app-header::before {
  background: linear-gradient(90deg, var(--de-cta), var(--de-tech), var(--de-secondary));
}

.profile-greeting {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-height: 42px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--de-radius-control);
  color: var(--de-inverse);
  background: rgba(255, 255, 255, .08);
  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: .78;
}

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

.global-search input {
  color: var(--de-text);
  background: var(--de-surface);
  border: 1px solid rgba(226, 232, 240, .82);
}

.global-search input::placeholder {
  color: var(--de-muted);
}

.global-search input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--de-tech);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, .14);
}

.layout,
.view {
  background: var(--de-bg);
}

.item,
.card,
.metric,
.ops-card,
.vehicle-card,
.fine-card,
.report-card,
.form-card,
.admin-card,
.quick-action,
.system-health,
.offline-card,
.search-page-result,
.timeline-item,
.empty {
  color: var(--de-text);
  background: var(--de-surface);
  border: 1px solid var(--de-border);
  border-radius: var(--de-radius-card);
  box-shadow: var(--de-shadow-soft);
}

.item:hover,
.card:hover,
.quick-action:hover,
.admin-card:hover {
  box-shadow: var(--de-shadow-card);
}

.fleet-hero,
.dashboard-hero,
.admin-hero,
.more-hero,
.page-hero,
.reports-hero,
.fines-hero,
.profile-hero,
.offline-hero,
.panel-hero {
  color: var(--de-inverse);
  background:
    radial-gradient(circle at 92% 10%, rgba(6, 182, 212, .34), transparent 30%),
    linear-gradient(135deg, var(--de-primary) 0%, var(--de-primary-soft) 70%, #172554 100%) !important;
  border: 1px solid rgba(255, 255, 255, .08);
}

.fleet-hero *,
.dashboard-hero *,
.admin-hero *,
.more-hero *,
.page-hero *,
.reports-hero *,
.fines-hero *,
.profile-hero *,
.offline-hero *,
.panel-hero * {
  color: inherit;
}

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

.fleet-hero h1,
.fleet-hero h2,
.dashboard-hero h1,
.dashboard-hero h2,
.admin-hero h1,
.admin-hero h2,
.page-hero h1,
.page-hero h2 {
  color: var(--de-inverse);
}

.small,
.muted,
.help,
.item p,
.card p,
.metric p {
  color: var(--de-muted);
}

.button,
button.button,
.button.primary,
.primary-action,
.floating-action,
button[type="submit"] {
  color: var(--de-inverse);
  background: var(--de-cta);
  border-color: var(--de-cta);
  border-radius: var(--de-radius-control);
  box-shadow: 0 8px 18px rgba(249, 115, 22, .18);
}

.button:hover,
button.button:hover,
button[type="submit"]:hover {
  background: #ea580c;
  border-color: #ea580c;
}

.button.secondary,
button.button.secondary,
.link-button {
  color: var(--de-secondary);
  background: var(--de-surface);
  border-color: rgba(29, 78, 216, .28);
  box-shadow: none;
}

.button.secondary:hover,
button.button.secondary:hover,
.link-button:hover {
  color: #1e40af;
  background: var(--de-surface-featured);
  border-color: rgba(29, 78, 216, .36);
}

.button.danger,
button.button.danger,
.button.secondary.danger {
  color: var(--de-error);
  background: #fff;
  border-color: rgba(220, 38, 38, .26);
}

.tabs {
  background: var(--de-primary);
  border-color: rgba(226, 232, 240, .12);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
}

.tabs .tab {
  color: rgba(255, 255, 255, .72);
  background: transparent;
  border-color: transparent;
}

.tabs .tab svg {
  width: 24px;
  height: 24px;
  color: currentColor;
}

.tabs .tab svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tabs .tab span {
  color: currentColor;
}

.tabs .tab:hover,
.tabs .tab:focus-visible {
  color: var(--de-inverse);
  background: rgba(255, 255, 255, .08);
}

.tabs .tab.active,
.tabs .tab[aria-current="page"] {
  color: var(--de-inverse);
  background: var(--de-secondary);
  box-shadow: 0 10px 22px rgba(29, 78, 216, .22);
}

.metric-icon,
.quick-action span,
.admin-card svg,
.more-option svg,
.search-result svg,
.report-icon,
.ai-icon {
  color: var(--de-tech);
}

.ops-icon,
.quick-action-icon,
.item-icon {
  color: var(--de-inverse);
  background: var(--de-secondary);
}

.fuel-icon,
.maintenance-icon {
  background: var(--de-cta);
}

.occurrence-icon {
  background: var(--de-error);
}

.bar-fill,
.chart-bar,
.mini-bar {
  background: linear-gradient(180deg, var(--de-tech), var(--de-secondary));
}

.chart-accent,
.report-accent,
.section-accent,
.eyebrow {
  color: var(--de-tech);
}

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

.status {
  border: 1px solid transparent;
  font-weight: 700;
}

.status.approved,
.status.success,
.status.active,
.status.ok,
.status.available {
  color: #166534;
  background: rgba(22, 163, 74, .12);
  border-color: rgba(22, 163, 74, .22);
}

.status.in-use {
  color: #1e40af;
  background: rgba(37, 99, 235, .12);
  border-color: rgba(37, 99, 235, .22);
}

.status.pending,
.status.approval {
  color: #5b21b6;
  background: rgba(124, 58, 237, .12);
  border-color: rgba(124, 58, 237, .22);
}

.status.warning {
  color: #92400e;
  background: rgba(245, 158, 11, .16);
  border-color: rgba(245, 158, 11, .28);
}

.status.rejected,
.status.danger,
.status.critical,
.status.error {
  color: var(--de-critical);
  background: rgba(153, 27, 27, .11);
  border-color: rgba(153, 27, 27, .22);
}

.status.inactive {
  color: #475569;
  background: rgba(148, 163, 184, .16);
  border-color: rgba(148, 163, 184, .28);
}

input,
select,
textarea {
  color: var(--de-text);
  background: var(--de-surface);
  border-color: var(--de-border);
}

table,
.table {
  color: var(--de-text);
  background: var(--de-surface);
  border-color: var(--de-border);
}

th {
  color: var(--de-muted);
  background: var(--de-surface-featured);
}

a,
.search-result strong,
.metric-card strong,
.stat-card strong,
.summary-value,
.money-value {
  color: var(--de-secondary);
}

@media (max-width: 760px) {
  body {
    background: var(--de-bg);
  }

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

  .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;
  }

  .profile-greeting strong {
    display: none;
  }

  .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));
    background: var(--de-surface);
    border-top: 1px solid var(--de-border);
    box-shadow: 0 -10px 24px rgba(15, 23, 42, .10);
  }

  .tabs .tab {
    min-height: 58px;
    border-radius: 18px;
    color: var(--de-muted);
    background: transparent;
    font-weight: 500;
  }

  .tabs .tab svg {
    width: 31px;
    height: 31px;
    color: var(--de-secondary);
  }

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

  .tabs .tab.active,
  .tabs .tab[aria-current="page"] {
    color: var(--de-inverse);
    background: var(--de-secondary);
    box-shadow: 0 10px 22px rgba(29, 78, 216, .24);
  }

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

  .fleet-hero,
  .dashboard-hero {
    border-radius: 22px;
  }
}

@media (min-width: 761px) {
  .tabs {
    background: var(--de-primary);
  }

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

/* Degraus icon/card/footer polish v72. Overrides finais, visuais apenas. */
:root {
  --degraus-yellow: #ffd600;
  --degraus-yellow-soft: #fff6b8;
  --degraus-blue: #0057b8;
  --degraus-blue-dark: #003b7a;
  --degraus-blue-soft: #eaf2ff;
  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-surface-soft: #f8fafc;
  --color-text: #172033;
  --color-text-strong: #0f172a;
  --color-text-muted: #667085;
  --color-text-inverse: #ffffff;
  --color-border: #e5e7eb;
  --color-success: #16a34a;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #2563eb;
  --color-critical: #b91c1c;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, .08);
  --shadow-md: 0 12px 34px rgba(15, 23, 42, .12);
  --shadow-lg: 0 22px 60px rgba(15, 23, 42, .18);
  --transition-fast: 120ms ease;
  --transition-normal: 180ms ease;
  --brand: var(--degraus-blue);
  --brand-2: var(--degraus-yellow);
  --accent: var(--degraus-yellow);
  --ink: var(--color-text);
  --muted: var(--color-text-muted);
  --line: var(--color-border);
  --panel: var(--color-surface);
  --bg: var(--color-bg);
}

body {
  color: var(--color-text);
  background: var(--color-bg);
}

.app-header,
.tabs {
  background: linear-gradient(135deg, var(--degraus-blue-dark), var(--degraus-blue));
}

.app-header::before {
  background: linear-gradient(90deg, var(--degraus-yellow), var(--degraus-blue-soft), var(--degraus-blue));
}

.app-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

.app-icon svg,
.icon-box svg,
.quick-action svg,
.metric-icon svg,
.admin-card-icon svg,
.tab svg {
  display: block;
  width: 100%;
  height: 100%;
}

.app-icon--xs { width: 16px; height: 16px; }
.app-icon--sm { width: 20px; height: 20px; }
.app-icon--md { width: 24px; height: 24px; }
.app-icon--lg { width: 32px; height: 32px; }
.app-icon--xl { width: 40px; height: 40px; }
.app-icon--xxl { width: 48px; height: 48px; }

.icon-box,
.metric-icon,
.admin-card-icon,
.quick-action > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--degraus-blue);
  background: var(--degraus-blue-soft);
  border: 1px solid rgba(0, 87, 184, .10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86);
}

.icon-box--home,
.quick-action > span:first-child {
  width: 64px;
  height: 64px;
  border-radius: 20px;
}

.icon-box--admin,
.admin-card-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
}

.icon-box--footer {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.icon-box--success {
  color: var(--color-success);
  background: rgba(22, 163, 74, .12);
  border-color: rgba(22, 163, 74, .18);
}

.icon-box--warning {
  color: var(--color-warning);
  background: rgba(245, 158, 11, .14);
  border-color: rgba(245, 158, 11, .20);
}

.icon-box--danger {
  color: var(--color-danger);
  background: rgba(239, 68, 68, .12);
  border-color: rgba(239, 68, 68, .18);
}

.icon-box--yellow {
  color: var(--degraus-blue-dark);
  background: var(--degraus-yellow-soft);
  border-color: rgba(255, 214, 0, .44);
}

.icon-box svg path,
.quick-action svg path,
.metric-icon svg path,
.admin-card-icon svg path,
.tab svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fleet-hero {
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 214, 0, .28), transparent 28%),
    linear-gradient(135deg, var(--degraus-blue-dark), var(--degraus-blue)) !important;
}

.fleet-hero .eyebrow {
  color: var(--degraus-yellow);
}

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

.quick-action {
  min-height: 142px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 14px;
  color: var(--color-text-strong);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.quick-action strong {
  color: var(--color-text-strong);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.quick-action:hover,
.quick-action:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(0, 87, 184, .25);
  box-shadow: var(--shadow-md);
}

.quick-action:active {
  transform: scale(.98);
}

.metrics {
  gap: 16px;
}

.metric {
  min-height: 132px;
  padding: 18px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
}

.metric > span:not(.metric-icon),
.metric span[id] {
  color: var(--degraus-blue-dark);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
}

.metric p {
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

.admin-grid {
  gap: 16px;
}

.admin-card {
  position: relative;
  min-height: 104px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 46px 16px 16px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.admin-card::after {
  content: "›";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--degraus-blue);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.admin-card strong {
  color: var(--color-text-strong);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.admin-card-copy,
.admin-card-copy > span {
  color: var(--color-text-muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.admin-card:hover,
.admin-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(0, 87, 184, .25);
  box-shadow: var(--shadow-md);
}

.more-profile-panel,
.more-feature-card,
.dashboard-panel,
.form,
.item,
.card {
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.more-profile-panel {
  border-radius: 24px;
}

.more-feature-card {
  border-radius: 22px;
}

.more-feature-card strong {
  color: var(--color-text-strong);
}

.more-feature-card small {
  color: var(--color-text-muted);
}

.tabs .tab {
  color: rgba(255, 255, 255, .82);
}

.tabs .tab.active,
.tabs .tab[aria-current="page"] {
  color: var(--degraus-blue-dark);
  background: var(--degraus-yellow);
  box-shadow: 0 10px 24px rgba(0, 59, 122, .18);
}

.tabs .tab.active svg,
.tabs .tab[aria-current="page"] svg {
  color: var(--degraus-blue-dark);
}

.app-footer {
  margin-top: 40px;
  padding: 36px 20px 24px;
  color: var(--color-text-inverse);
  background: linear-gradient(135deg, var(--degraus-blue-dark), #002b5c);
}

.app-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.app-footer__brand img,
.app-footer img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
}

.app-footer__title {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

.app-footer__text {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, .88);
  font-size: 14px;
  line-height: 1.55;
}

.app-footer__link {
  display: block;
  width: fit-content;
  margin: 0 0 9px;
  color: rgba(255, 255, 255, .92);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}

.app-footer__link:hover,
.app-footer__link:focus-visible {
  color: var(--degraus-yellow);
}

@media (min-width: 900px) {
  .app-footer__inner {
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  }
}

@media (min-width: 1024px) {
  .quick-actions {
    grid-template-columns: repeat(6, minmax(128px, 1fr));
  }

  .metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --app-header-height: 88px;
  }

  .app-header {
    min-height: var(--app-header-height);
    height: var(--app-header-height);
  }

  .header-actions {
    position: relative;
    align-items: flex-start;
    padding-bottom: 18px;
  }

  .profile-button {
    order: 30;
    align-self: flex-start;
  }

  .profile-greeting {
    position: absolute;
    right: 0;
    top: 46px;
    z-index: 3;
    align-items: center;
    max-width: 76px;
    min-height: auto;
    padding: 0;
    color: #ffffff;
    background: transparent;
    border: 0;
    box-shadow: none;
    text-align: center;
    pointer-events: auto;
  }

  .profile-greeting span {
    max-width: 76px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.05;
    white-space: normal;
  }

  .profile-greeting strong {
    display: none;
  }

  .quick-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .quick-action {
    min-height: 86px;
    padding: 8px 4px;
    border-radius: 16px;
    gap: 6px;
  }

  .quick-action > span:first-child,
  .icon-box--home {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .quick-action strong {
    max-width: 100%;
    font-size: 10.8px;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

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

  .metric {
    min-height: 120px;
    padding: 15px;
  }

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

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

  .admin-card {
    min-height: 92px;
  }

  .tabs {
    background: #ffffff;
    border-top: 1px solid var(--color-border);
  }

  .tabs .tab {
    color: var(--color-text-muted);
    background: transparent;
  }

  .tabs .tab svg {
    width: 34px;
    height: 34px;
    color: var(--degraus-blue);
  }

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

  .tabs .tab.active svg,
  .tabs .tab[aria-current="page"] svg {
    color: var(--degraus-blue-dark);
  }

  .app-footer { padding: 14px 14px 84px; }

  .app-footer__inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Footer compacto e claro. */
.app-footer {
  margin-top: 28px;
  padding: 14px 20px;
  color: var(--color-text-inverse);
  background: linear-gradient(135deg, var(--degraus-blue-dark), var(--degraus-blue));
  border-top: 0;
  box-shadow: 0 -4px 18px rgba(0, 59, 122, .10);
}

.app-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.app-footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-footer__brand img,
.app-footer img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #ffffff;
}

.app-footer__title {
  margin: 0;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.app-footer__text {
  margin: 0;
  color: rgba(255, 255, 255, .88);
  font-size: 12.5px;
  line-height: 1.35;
}

.app-footer__contact {
  display: grid;
  gap: 2px;
}

@media (min-width: 900px) {
  .app-footer__inner {
    grid-template-columns: minmax(260px, .9fr) 1.5fr;
    align-items: center;
  }

  .app-footer__contact {
    justify-items: end;
    text-align: right;
  }
}

/* Bottom navigation v75: correção isolada do footer mobile. */
@media (max-width: 760px) {
  .layout {
    padding-bottom: calc(112px + env(safe-area-inset-bottom)) !important;
  }

  .view {
    scroll-margin-bottom: calc(112px + env(safe-area-inset-bottom));
  }

  .tabs {
    position: fixed !important;
    left: 16px !important;
    right: 16px !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    top: auto !important;
    z-index: 80 !important;
    width: auto !important;
    max-width: 640px !important;
    height: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
    margin: 0 auto !important;
    padding: 8px !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 4px !important;
    overflow: visible !important;
    border: 1px solid rgba(15, 23, 42, .08) !important;
    border-radius: 30px !important;
    background: rgba(255, 255, 255, .92) !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .14) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: none !important;
  }

  .tabs::before,
  .tabs::after {
    display: none !important;
  }

  .tabs .tab {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 60px !important;
    height: 60px !important;
    padding: 6px 4px !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    border: 0 !important;
    border-radius: 22px !important;
    color: #64748b !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    transition: background 160ms ease, color 160ms ease, transform 120ms ease;
    -webkit-tap-highlight-color: transparent;
  }

  .tabs .tab svg {
    width: 24px !important;
    height: 24px !important;
    color: currentColor !important;
    flex: 0 0 24px !important;
  }

  .tabs .tab span {
    max-width: 100%;
    color: currentColor !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .tabs .tab.active,
  .tabs .tab[aria-current="page"] {
    color: #005eb8 !important;
    background: linear-gradient(135deg, rgba(0, 94, 184, .14), rgba(0, 174, 239, .10)) !important;
    box-shadow: none !important;
  }

  .tabs .tab.active svg,
  .tabs .tab[aria-current="page"] svg {
    color: #005eb8 !important;
  }

  .tabs .tab:active {
    transform: scale(.98) !important;
  }

  .floating-action,
  .fab,
  [class*="floating"],
  [class*="Floating"] {
    bottom: calc(104px + env(safe-area-inset-bottom)) !important;
  }
}

/* Header/footer mobile alignment v76. */
@media (max-width: 760px) {
  :root {
    --app-header-height: 78px;
  }

  .app-header {
    height: var(--app-header-height) !important;
    min-height: var(--app-header-height) !important;
    padding-top: env(safe-area-inset-top) !important;
    align-items: center !important;
  }

  .app-header .brand-lockup,
  .app-header .header-actions {
    height: 52px !important;
    align-items: center !important;
  }

  .brand-logo,
  .profile-button {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }

  .profile-button {
    align-self: center !important;
    margin-top: 0 !important;
  }

  .app-header .global-search {
    flex: 1 1 min(58vw, 260px) !important;
    max-width: min(58vw, 260px) !important;
    min-width: 150px !important;
  }

  .global-search input {
    height: 36px !important;
    padding-inline: 12px !important;
    font-size: 12px !important;
  }

  .profile-greeting {
    right: -2px !important;
    top: 43px !important;
    width: 46px !important;
    max-width: 46px !important;
    color: #ffffff !important;
  }

  .profile-greeting span {
    max-width: 46px !important;
    font-size: 0 !important;
    line-height: 1.02 !important;
    text-align: center !important;
  }

  .profile-greeting span::after {
    content: attr(data-short-name);
    font-size: 10.5px;
    font-weight: 700;
  }
}

.app-footer__contact {
  grid-template-columns: minmax(0, 1fr);
}

.app-footer__contact .app-footer__text {
  white-space: nowrap;
}

@media (min-width: 900px) {
  .app-footer__contact {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  .app-footer__contact .app-footer__text {
    white-space: normal;
  }
}

/* Header mobile v78: busca larga e nome abaixo do avatar. */
@media (max-width: 760px) {
  :root {
    --app-header-height: 82px;
  }

  .app-header {
    height: var(--app-header-height) !important;
    min-height: var(--app-header-height) !important;
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 8px !important;
    align-items: center !important;
  }

  .app-header .brand-lockup {
    width: 44px !important;
    min-width: 44px !important;
    height: 54px !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding-top: 1px !important;
  }

  .brand-logo {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }

  .app-header .header-actions {
    width: 100% !important;
    height: 58px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 44px !important;
    grid-template-rows: 40px 14px !important;
    column-gap: 8px !important;
    row-gap: 0 !important;
    align-items: center !important;
    padding: 0 !important;
    position: relative !important;
  }

  .app-header .global-search {
    grid-column: 1 !important;
    grid-row: 1 / 3 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    align-self: center !important;
  }

  .global-search input {
    width: 100% !important;
    height: 38px !important;
    padding-inline: 12px !important;
    font-size: 12.5px !important;
  }

  .profile-button {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: center !important;
    justify-self: center !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    order: initial !important;
  }

  .profile-greeting {
    grid-column: 2 !important;
    grid-row: 2 !important;
    position: static !important;
    align-self: start !important;
    justify-self: center !important;
    width: 44px !important;
    max-width: 44px !important;
    min-height: 12px !important;
    padding: 0 !important;
    margin: -1px 0 0 !important;
    color: #ffffff !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    text-align: center !important;
  }

  .profile-greeting span {
    display: block !important;
    width: 44px !important;
    max-width: 44px !important;
    font-size: 0 !important;
    line-height: 1 !important;
    text-align: center !important;
  }

  .profile-greeting span::after {
    content: attr(data-short-name);
    display: block;
    width: 44px;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-greeting strong {
    display: none !important;
  }
}

/* Auth guard v80: nada do app interno deve ficar clicavel depois do logout. */
body.is-logged-out #appHeader,
body.is-logged-out #appShell,
body.is-logged-out #profileModal,
body.is-logged-out #globalSearchResults,
body.is-logged-out .modal-backdrop {
  display: none !important;
  pointer-events: none !important;
}

body.is-logged-out {
  overflow-x: hidden;
}
