/* ==========================================================================
   CSS GLOBAL & VARIÁVEIS DE TEMA - NADIA TRANSPORTES
   ========================================================================== */

:root {
  /* Tema Claro (Padrão) */
  --bg-primary: #f4f6f9;
  --bg-secondary: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  
  --accent-color: #1e3a8a; /* Azul Marinho da Nadia Transportes */
  --accent-hover: #172554;
  --accent-light: #dbeafe;
  
  --success-color: #10b981;
  --success-hover: #059669;
  --success-light: #d1fae5;
  
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
  --danger-light: #fee2e2;

  --warning-color: #fbbf24;
  --warning-light: #fef3c7;

  /* Cores Fixas da Sidebar (Dark-mode feel) */
  --sidebar-bg: #0b0f19;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  --sidebar-item-hover: #1e293b;
  --sidebar-item-active: #1e3a8a;

  --font-main: 'Outfit', sans-serif;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  
  --card-shadow: 0 4px 18px -4px rgba(0, 0, 0, 0.05), 0 2px 6px -2px rgba(0, 0, 0, 0.03);
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tema Escuro (Dark Mode) */
body.dark {
  --bg-primary: #080c14;
  --bg-secondary: #111723;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --border-color: #1f293d;
  
  --accent-color: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-light: #172554;
  
  --success-color: #34d399;
  --success-hover: #059669;
  --success-light: #064e3b;
  
  --danger-color: #f87171;
  --danger-hover: #dc2626;
  --danger-light: #7f1d1d;

  --warning-color: #fbbf24;
  --warning-light: #78350f;

  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  
  --sidebar-bg: #04060b;
  --sidebar-item-hover: #0f172a;
  --sidebar-item-active: #1e3a8a;
}

/* Reset Geral */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-main);
  outline: none;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   TELA DE LOGIN (ESTILIZAÇÃO PREMIUM)
   ========================================================================== */

.login-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 50%, #0f172a 0%, #020617 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  overflow: hidden;
  animation: fadeIn 0.4s ease;
}

/* Floating Glowing Orbs */
.login-wrapper::before,
.login-wrapper::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
  pointer-events: none;
}

.login-wrapper::before {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18) 0%, rgba(30, 58, 138, 0) 70%);
  top: 15%;
  left: 15%;
  animation: floatOrb1 15s infinite alternate ease-in-out;
}

.login-wrapper::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(79, 70, 229, 0) 70%);
  bottom: 10%;
  right: 15%;
  animation: floatOrb2 18s infinite alternate ease-in-out;
}

@keyframes floatOrb1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 30px) scale(1.1); }
}

@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-60px, -40px) scale(0.9); }
}

.login-card {
  position: relative;
  z-index: 1; /* Sits above glowing orbs */
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  padding: 36px 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #ffffff;
  animation: scaleIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.login-header p {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 4px;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-card label {
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 2px;
}

.login-card input {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff !important;
  padding: 11px 14px;
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.login-card input::placeholder {
  color: #64748b;
  opacity: 1;
}

.login-card input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.login-error-msg {
  background-color: rgba(239, 68, 68, 0.15);
  border-left: 3px solid var(--danger-color);
  color: #fca5a5;
  font-size: 0.8rem;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 8px;
  display: none;
  font-weight: 500;
}

.login-error-msg.active {
  display: block;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.75rem;
  color: #94a3b8;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
  padding: 10px 12px;
}

.login-footer strong {
  color: #ffffff;
}

/* ==========================================================================
   LAYOUT PRINCIPAL (Grid & Sidebar)
   ========================================================================== */

.app-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100vh;
  width: 100vw;
}

/* Sidebar */
.sidebar {
  background-color: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  justify-content: space-between;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 10;
  transition: width 0.3s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 24px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.brand-logo svg {
  width: 24px;
  height: 24px;
}

.brand-info h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sidebar-text-active);
  letter-spacing: 0.5px;
}

.brand-info span {
  font-size: 0.75rem;
  color: var(--sidebar-text);
  font-weight: 400;
}

/* Menu de Navegação */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: none;
  border: none;
  border-radius: var(--border-radius-md);
  color: var(--sidebar-text);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
  width: 100%;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  transition: var(--transition-smooth);
}

.nav-item:hover {
  background-color: var(--sidebar-item-hover);
  color: var(--sidebar-text-active);
}

.nav-item.active {
  background-color: var(--sidebar-item-active);
  color: var(--sidebar-text-active);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.nav-item.active svg {
  transform: scale(1.05);
}

/* Footer Sidebar */
.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

#theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: var(--sidebar-item-hover);
  border: none;
  border-radius: var(--border-radius-md);
  color: var(--sidebar-text-active);
  cursor: pointer;
  transition: var(--transition-smooth);
}

#theme-toggle:hover {
  background-color: var(--sidebar-item-active);
  transform: rotate(20deg);
}

/* Mostrar ícones corretos de acordo com o tema */
body.dark .sun-icon { display: block; }
body.dark .moon-icon { display: none; }
body:not(.dark) .sun-icon { display: none; }
body:not(.dark) .moon-icon { display: block; }

#theme-toggle svg {
  width: 20px;
  height: 20px;
}

.backup-actions {
  display: flex;
  gap: 6px;
  flex-grow: 1;
}

.backup-actions button {
  flex: 1;
  font-size: 0.75rem;
  padding: 8px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

/* ==========================================================================
   CONTEÚDO PRINCIPAL (Área Central)
   ========================================================================== */

.main-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100vh;
}

/* Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-title .date-today {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-title h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  background-color: var(--accent-light);
  color: var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid var(--accent-color);
}

.profile-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-info span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
}

/* Conteúdo de Abas */
.tab-content {
  display: none;
  padding: 32px;
  flex-grow: 1;
  overflow-y: auto;
  min-height: 0;
  animation: fadeIn 0.35s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   CARDS & GRID DE ESTATÍSTICAS
   ========================================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 26px;
  height: 26px;
}

.icon-cost {
  background-color: var(--success-light);
  color: var(--success-color);
}

.icon-count {
  background-color: var(--accent-light);
  color: var(--accent-color);
}

.icon-average {
  background-color: var(--warning-light);
  color: var(--warning-color);
}

.icon-active-trucks {
  background-color: #e0f2fe;
  color: #0284c7;
}

body.dark .icon-active-trucks {
  background-color: #0c4a6e;
  color: #38bdf8;
}

.stat-details span {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  display: block;
}

.stat-details h3 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

/* ==========================================================================
   CARDS DE CONTEÚDO E GRÁFICOS
   ========================================================================== */

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.card {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: block;
  margin-top: 2px;
}

.card-body {
  padding: 24px;
}

.card-body.no-padding {
  padding: 0;
}

/* Gráfico em CSS */
.monthly-chart-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 220px;
  padding-top: 10px;
}

.chart-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 14%;
  height: 100%;
  justify-content: flex-end;
  gap: 8px;
}

.chart-bar-container {
  background-color: var(--bg-primary);
  width: 100%;
  height: 140px;
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.chart-bar {
  background: linear-gradient(180deg, var(--accent-color), #60a5fa);
  width: 100%;
  border-radius: 4px;
  height: 0; /* Atualizado por JS */
  transition: height 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  position: relative;
  cursor: pointer;
}

.chart-bar:hover {
  background: linear-gradient(180deg, var(--accent-hover), #3b82f6);
}

/* Tooltip do Gráfico */
.chart-bar-tooltip {
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background-color: var(--sidebar-bg);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  font-weight: 500;
}

.chart-bar:hover .chart-bar-tooltip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  top: -42px;
}

.chart-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
}

.chart-value {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.chart-empty, .list-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-style: italic;
}

/* Lista de Top Caminhões */
.top-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.top-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.top-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.top-item-plate {
  font-weight: 600;
  color: var(--text-primary);
}

.top-item-model {
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 6px;
}

.top-item-value {
  font-weight: 700;
  color: var(--accent-color);
}

.top-item-bar-bg {
  background-color: var(--bg-primary);
  height: 8px;
  border-radius: 4px;
  width: 100%;
  overflow: hidden;
}

.top-item-bar {
  background-color: var(--accent-color);
  height: 100%;
  border-radius: 4px;
  width: 0; /* Preenchido via JS */
  transition: width 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

/* ==========================================================================
   TABELAS E HISTÓRICO
   ========================================================================== */

.recent-table-wrapper {
  overflow-x: auto;
}

.recent-table, .main-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.recent-table th, .main-table th {
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
}

.recent-table td, .main-table td {
  padding: 16px 24px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
}

.recent-table tbody tr:hover, .main-table tbody tr:hover {
  background-color: rgba(30, 58, 138, 0.02);
}

/* Estilo Placa */
.badge-plate {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: monospace;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-block;
  letter-spacing: 0.5px;
}

.table-truck-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.table-truck-model {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.table-value {
  font-weight: 600;
  color: var(--text-primary);
}

.table-location {
  display: flex;
  flex-direction: column;
}

.table-oficina {
  font-weight: 500;
}

.table-cidade {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.table-desc {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
}

/* Badge Forma Pagamento */
.badge-payment {
  background-color: #f1f5f9;
  color: #475569;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-block;
}

body.dark .badge-payment {
  background-color: #1e293b;
  color: #cbd5e1;
}

/* Botões de Ação */
.actions-cell {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-icon-sm svg {
  width: 16px;
  height: 16px;
}

.btn-edit:hover {
  background-color: var(--accent-light);
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.btn-delete:hover {
  background-color: var(--danger-light);
  color: var(--danger-color);
  border-color: var(--danger-color);
}

.table-empty {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: 40px !important;
}

/* ==========================================================================
   FILTROS E PAGINAÇÃO
   ========================================================================== */

.filter-card {
  margin-bottom: 24px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  align-items: flex-end;
}

.filter-actions-group {
  display: flex;
  gap: 10px;
  height: 42px;
}

.filter-actions-group button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.table-actions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.table-sort-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-sort-selector select {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.8rem;
  cursor: pointer;
}

/* Paginação */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pagination-buttons {
  display: flex;
  gap: 6px;
}

.btn-page {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-page:hover:not(:disabled) {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.btn-page.active {
  background-color: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
}

.btn-page:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================================================
   FORMULÁRIO DE CADASTRO
   ========================================================================== */

.form-card {
  max-width: 850px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group label .required {
  color: var(--danger-color);
}

.form-group input, 
.form-group select, 
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* Ajustes de Prefixo e Ícones */
.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrapper input {
  padding-left: 40px;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  pointer-events: none;
}

/* Campo Valor (Currency) */
.input-icon-wrapper span.currency-prefix {
  position: absolute;
  left: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  pointer-events: none;
}

.input-icon-wrapper input#input-valor {
  padding-left: 40px;
}

/* Autocomplete Dropdown */
.autocomplete-container {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  display: none;
}

.autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

.autocomplete-item:hover {
  background-color: var(--bg-primary);
}

.autocomplete-item .item-plate {
  font-weight: 700;
  font-family: monospace;
}

.autocomplete-item .item-model {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

/* ==========================================================================
   FROTA (60 CAMINHÕES)
   ========================================================================== */

.fleet-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  margin-bottom: 24px;
}

.search-fleet-wrapper {
  width: 320px;
}

.search-fleet-wrapper input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.fleet-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition-smooth);
}

.fleet-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.fleet-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.fleet-card-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.fleet-card-info span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.fleet-card-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.8rem;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}

.fleet-stat-item span {
  color: var(--text-secondary);
  display: block;
}

.fleet-stat-item strong {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
}

.fleet-stat-item strong.cost-high {
  color: var(--danger-color);
}

.fleet-progress-bar-bg {
  background-color: var(--bg-primary);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.fleet-progress-bar {
  height: 100%;
  background-color: var(--success-color);
  width: 0;
  transition: width 0.6s ease;
}

/* ==========================================================================
   BOTÕES GERAIS (ESTILOS)
   ========================================================================== */

.btn-primary, .btn-success, .btn-danger, .btn-secondary {
  border: none;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background-color: var(--accent-color);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
}

.btn-success {
  background-color: var(--success-color);
  color: #ffffff;
}

.btn-success:hover {
  background-color: var(--success-hover);
}

.btn-danger {
  background-color: var(--danger-color);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: var(--danger-hover);
}

.btn-secondary {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--accent-color);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-text-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   TOASTS (NOTIFICAÇÕES FLUTUANTES)
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999999; /* Fica acima até do login */
}

.toast {
  background-color: var(--bg-secondary);
  border-left: 4px solid var(--accent-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  color: var(--text-primary);
  animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: var(--transition-smooth);
}

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.toast-success {
  border-left-color: var(--success-color);
}

.toast.toast-error {
  border-left-color: var(--danger-color);
}

.toast.toast-warning {
  border-left-color: var(--warning-color);
}

.toast-message {
  font-size: 0.85rem;
  font-weight: 500;
}

/* ==========================================================================
   MODAIS / CONFIRMAÇÕES
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  width: 90%;
  max-width: 480px;
  max-height: 90vh; /* Limita a altura do modal para caber no viewport */
  display: flex; /* Permite flexbox para estruturar cabeçalho/corpo/rodapé */
  flex-direction: column;
  box-shadow: var(--card-shadow);
  transform: scale(0.9);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-backdrop.active .modal {
  transform: scale(1);
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0; /* Cabeçalho não encolhe */
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.modal-body {
  padding: 24px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-primary);
  overflow-y: auto; /* Adiciona rolagem interna caso o conteúdo do modal exceda a altura */
  flex-grow: 1; /* O corpo expande para ocupar o espaço disponível */
}

.warning-text {
  color: var(--danger-color);
  font-weight: 600;
  font-size: 0.8rem;
  margin-top: 8px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0; /* Rodapé não encolhe */
}

/* Grid de vínculo de pneus no modal (responsivo) */
.tire-link-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 768px) {
  .tire-link-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ==========================================================================
   RESPONSIVIDADE (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: 100vh;
  }

  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 12px 16px;
    flex-direction: row;
    align-items: center;
  }

  .brand {
    border-bottom: none;
    padding: 0;
  }

  .brand-info {
    display: none;
  }

  .nav-menu {
    flex-direction: row;
    margin-top: 0;
    margin-left: 12px;
    gap: 4px;
    flex-grow: 1;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-item {
    padding: 8px 12px;
    font-size: 0.85rem;
    white-space: nowrap;
    justify-content: center;
    width: auto;
  }

  .nav-item span {
    display: none; /* Esconder texto no mobile */
  }

  .sidebar-footer {
    border-top: none;
    padding-top: 0;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  #theme-toggle {
    width: 36px;
    height: 36px;
  }

  .backup-actions, .btn-logout {
    display: none; /* Ocultar no mobile para economizar espaço */
  }

  .main-content {
    height: calc(100vh - 65px);
  }

  .main-header {
    padding: 16px;
  }

  .header-title h2 {
    font-size: 1.3rem;
  }

  .profile-info {
    display: none;
  }

  .tab-content {
    padding: 16px;
  }

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

  .form-group.full-width {
    grid-column: span 1;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions button {
    width: 100%;
    justify-content: center;
  }
  
  .filter-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-actions-group {
    width: 100%;
    margin-top: 10px;
  }

  .fleet-header-card {
    flex-direction: column;
    gap: 16px;
  }

  .search-fleet-wrapper {
    width: 100%;
  }
}

/* ==========================================================================
   ADICIONAIS - LOGOTIPO & PLANO DE FUNDO BLURRED (SENIOR POLISH)
   ========================================================================== */

/* Custom logo image sizing */
.login-logo-img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
  margin-bottom: 12px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.login-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 4px;
  text-align: center;
}

.sidebar-logo-img {
  width: 100%;
  max-height: 52px;
  object-fit: contain;
  display: block;
  border-radius: var(--border-radius-sm);
  padding: 4px;
}

/* Sophisticated semi-blurred background for Visao Geral */
#tab-dashboard {
  position: relative;
  background-color: var(--bg-primary);
  z-index: 1;
  overflow-x: hidden;
  overflow-y: auto;
}

#tab-dashboard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(244, 246, 249, 0.84), rgba(244, 246, 249, 0.96)),
              url('https://images.unsplash.com/photo-1601584115197-04ecc0da31d7?q=80&w=1200&auto=format&fit=crop') no-repeat center center;
  background-size: cover;
  filter: blur(12px) saturate(1.3);
  opacity: 0.28;
  z-index: -1;
  pointer-events: none;
  transition: var(--transition-smooth);
}

/* Dark Mode Adjustment for Dashboard Background */
body.dark #tab-dashboard::before {
  background: linear-gradient(to bottom, rgba(8, 12, 20, 0.86), rgba(8, 12, 20, 0.97)),
              url('https://images.unsplash.com/photo-1601584115197-04ecc0da31d7?q=80&w=1200&auto=format&fit=crop') no-repeat center center;
  opacity: 0.32;
  filter: blur(12px) saturate(0.9);
}

/* Ensure all dashboard contents sit above background */
#tab-dashboard > * {
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   ADICIONAIS - ESTOQUE, QUILOMETRAGEM (KM) E LEMBRETES (SPRINT 2)
   ========================================================================== */

/* Alinhamento do sufixo "KM" no input wrapper */
.input-icon-wrapper input#input-km {
  padding-right: 45px;
}

/* Lembretes de Manutenção no Dashboard */
.reminders-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.reminder-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-primary);
  border-radius: var(--border-radius-sm);
  padding: 12px 16px;
  border-left: 4px solid var(--warning-color);
  animation: fadeIn 0.3s ease;
  transition: var(--transition-smooth);
}

.reminder-item:hover {
  transform: translateX(4px);
}

.reminder-item.reminder-urgent {
  border-left-color: var(--danger-color);
}

.reminder-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reminder-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.reminder-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.reminder-action {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--warning-color);
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: var(--warning-light);
  padding: 4px 10px;
  border-radius: 6px;
}

.reminder-urgent .reminder-action {
  color: var(--danger-color);
  background-color: var(--danger-light);
}

/* Badges de Estoque */
.badge-stock-ok {
  background-color: var(--success-light);
  color: var(--success-color);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

.badge-stock-low {
  background-color: var(--danger-light);
  color: var(--danger-color);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

/* Botões de Ajuste Rápido de Estoque */
.qty-adjust-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-adjust {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-adjust:hover {
  background-color: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
}

/* ==========================================================================
   MODAL DE DETALHES DO VEÍCULO (TAXAS & ANEXOS)
   ========================================================================== */

.modal-lg {
  max-width: 850px;
}

.vehicle-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.details-section h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.details-table {
  width: 100%;
  border-collapse: collapse;
}

.details-table th, .details-table td {
  padding: 8px 12px;
  font-size: 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.details-table th {
  color: var(--text-secondary);
  font-weight: 500;
  width: 35%;
}

.details-table td {
  color: var(--text-primary);
  font-weight: 600;
}

.doc-status-cards {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.status-card {
  flex: 1;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition-smooth);
}

.status-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
}

.status-select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
}

.due-date-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.due-date-wrapper label {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.due-date-wrapper input {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.8rem;
  width: 100%;
}

/* Card Borders by Status */
#card-ipva.status-pago { border-left: 4px solid var(--success-color); }
#card-ipva.status-pendente { border-left: 4px solid var(--warning-color); }
#card-ipva.status-atrasado { border-left: 4px solid var(--danger-color); }

#card-licenciamento.status-regular { border-left: 4px solid var(--success-color); }
#card-licenciamento.status-pendente { border-left: 4px solid var(--warning-color); }
#card-licenciamento.status-vencido { border-left: 4px solid var(--danger-color); }

.document-attachment-box {
  background-color: var(--bg-primary);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 16px;
}

.document-attachment-box h5 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.doc-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-secondary);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.doc-file-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-file-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.doc-file-details {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.doc-actions {
  display: flex;
  gap: 6px;
}

.btn-upload-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 6px;
  border: 1px dashed var(--accent-color);
  background-color: var(--accent-light);
  color: var(--accent-color);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-upload-trigger:hover {
  background-color: var(--accent-color);
  color: #ffffff;
}

/* Responsividade Mobile para Grade do Veículo */
@media (max-width: 768px) {
  .vehicle-details-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .doc-status-cards {
    flex-direction: column;
  }
}

.form-group input[type="checkbox"] {
  width: auto;
}


/* ==========================================================================
   PÁGINA INICIAL / HOME PORTAL
   ========================================================================== */

#tab-home {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
}

.home-portal-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-hero-card {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background: url('https://images.unsplash.com/photo-1601584115197-04ecc0da31d7?q=80&w=1200&auto=format&fit=crop') no-repeat center center;
  background-size: cover;
  min-height: 140px; /* Reduzido de 280px para evitar rolagem */
  display: flex;
  align-items: center;
  padding: 20px 32px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  animation: fadeIn 0.4s ease;
}

.home-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 58, 138, 0.4) 100%);
  z-index: 1;
}

.home-hero-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
  max-width: 650px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-portal-logo {
  max-width: 130px; /* Reduzido de 180px */
  height: auto;
  border-radius: var(--border-radius-sm);
  background-color: #ffffff;
  padding: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  margin-bottom: 4px;
}

.welcome-heading {
  font-size: 1.5rem; /* Reduzido de 2.2rem */
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.welcome-text {
  font-size: 0.88rem; /* Reduzido de 1.05rem */
  line-height: 1.4;
  color: #cbd5e1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.home-navigation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Reduzido o minmax de 320px para caber na mesma linha */
  gap: 12px; /* Reduzido de 24px */
}

.home-nav-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 14px 16px; /* Reduzido de 24px */
  display: flex;
  align-items: center;
  gap: 12px; /* Reduzido de 20px */
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.home-nav-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(30, 58, 138, 0.1);
  border-color: var(--accent-color);
}

.home-nav-icon {
  width: 42px; /* Reduzido de 56px */
  height: 42px; /* Reduzido de 56px */
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.home-nav-card:hover .home-nav-icon {
  transform: scale(1.08) rotate(5deg);
}

.home-nav-icon svg {
  width: 20px; /* Reduzido de 28px */
  height: 20px; /* Reduzido de 28px */
}

/* Icon Palette Colors */
.color-blue { background-color: rgba(37, 99, 235, 0.1); color: #2563eb; }
.color-green { background-color: rgba(16, 185, 129, 0.1); color: #10b981; }
.color-amber { background-color: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.color-purple { background-color: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.color-teal { background-color: rgba(20, 184, 166, 0.1); color: #14b8a6; }

.home-nav-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
}

.home-nav-details h4 {
  font-size: 0.92rem; /* Reduzido de 1.1rem */
  font-weight: 700;
  color: var(--text-primary);
}

.home-nav-details p {
  font-size: 0.74rem; /* Reduzido de 0.82rem */
  line-height: 1.35;
  color: var(--text-secondary);
}

.home-nav-arrow {
  font-size: 1.1rem; /* Reduzido de 1.4rem */
  color: var(--text-secondary);
  font-weight: 700;
  transition: transform 0.3s ease, color 0.3s ease;
}

.home-nav-card:hover .home-nav-arrow {
  transform: translateX(3px);
  color: var(--accent-color);
}

/* Responsividade Home */
@media (max-width: 768px) {
  .home-hero-card {
    padding: 16px 20px;
    min-height: 110px;
  }
  .welcome-heading {
    font-size: 1.25rem;
  }
  .welcome-text {
    font-size: 0.82rem;
  }
  .home-portal-logo {
    max-width: 100px;
  }
  .home-navigation-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .home-nav-card {
    padding: 10px 12px;
  }
}


