/* =====================================================
   FLEETBUSS - DASHBOARD STYLES v2.034 PRODUCTION
   Compatível com Dashboard + KPI Module + Fleet Analytics
   =================================================== */

/* ===== Reset e configuração global ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
}

/* ===== Variáveis de cores ===== */
:root {
  --primary-blue: #3b82f6;
  --primary-blue-dark: #2563eb;
  --primary-blue-light: #bfdbfe;
  --success-green: #10b981;
  --warning-yellow: #facc15;
  --warning-text: #f59e0b;
  --danger-red: #ef4444;
  --background-white: #ffffff;
  --background-light: #f1f5f9;
  --text-dark: #1e293b;
  --text-medium: #475569;
  --text-light: #94a3b8;
  --text-color: #1e293b;
  --border-color: #e2e8f0;
  --shadow-light: rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --gap: 1.5rem;
  --transition-speed: 0.3s;
  
  --ai-primary: #6366f1;
  --ai-secondary: #8b5cf6;
  --ai-accent: #06b6d4;
  --ai-success: #10b981;
  --ai-warning: #f59e0b;
  --ai-danger: #ef4444;
  --ai-glass: rgba(255, 255, 255, 0.95);
  --ai-glass-hover: rgba(255, 255, 255, 0.98);
  --ai-border: rgba(0, 0, 0, 0.1);
}

/* ===== Layout Container ===== */
.login-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: var(--background-light);
  justify-content: center;
  align-items: flex-start;
  padding: 2rem;
}

.dashboard-main {
  max-width: 1400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ===== Header ===== */
.header {
  background: var(--background-white);
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px var(--shadow-light);
}

.dashboard-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-aia {
  width: 48px;
  height: 48px;
  background-image: url('logo_aia.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex-shrink: 0;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.header p {
  margin: 0.5rem 0 0 0;
  font-size: 1rem;
  color: var(--text-medium);
}

.user-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.user-info {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.user-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-dark);
}

.user-email {
  font-size: 0.875rem;
  color: var(--text-medium);
}

.logout-btn {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-speed);
}

.logout-btn:hover {
  background: var(--primary-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.powered-by {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-medium);
  margin-top: 1rem;
}

.powered-by strong {
  color: var(--primary-blue);
  font-weight: 700;
}

/* ===== Live Indicator ===== */
.live-indicator {
  position: fixed;
  top: 6rem;
  right: 2rem;
  background: var(--ai-glass);
  border: 1px solid var(--ai-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1000;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ai-success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.1); }
}

.live-text {
  color: var(--text-color);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ===== Módulos Grid ===== */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}

.module-card {
  background: var(--background-white);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px var(--shadow-light);
  transition: all var(--transition-speed);
  cursor: pointer;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.module-card:hover {
  box-shadow: 0 6px 20px var(--shadow-light);
  transform: translateY(-2px);
}

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.module-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dark);
  margin: 0;
}

.status-badge {
  font-weight: 600;
  font-size: 0.8rem;
  background: var(--primary-blue);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-badge.status-primary {
  background: var(--primary-blue);
}

.status-badge.status-success {
  background: var(--success-green);
}

.status-badge.status-warning {
  background: var(--warning-text);
}

.status-badge.status-danger {
  background: var(--danger-red);
}

.status-badge.status-ai {
  background: linear-gradient(135deg, var(--ai-primary), var(--ai-secondary));
}

.stat-trend {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-medium);
  margin-top: 0.5rem;
}

.stat-primary { border-left: 4px solid var(--primary-blue); }
.stat-warning { border-left: 4px solid var(--warning-text); }
.stat-danger { border-left: 4px solid var(--danger-red); }
.stat-success { border-left: 4px solid var(--success-green); }

.stat-trend[data-trend="veiculos"] { color: var(--primary-blue); }
.stat-trend[data-trend="manutencoes"] { color: var(--warning-text); }
.stat-trend[data-trend="quebras"] { color: var(--danger-red); }
.stat-trend[data-trend="servicos"] { color: var(--success-green); }
.stat-trend[data-trend="custos"] { color: var(--danger-red); }
.stat-trend[data-trend="clusters"] { color: var(--success-green); }

.trend-positive { color: var(--success-green) !important; }
.trend-negative { color: var(--danger-red) !important; }
.trend-neutral { color: var(--text-medium) !important; }

/* ===== Module Cards - Special Styles ===== */
.module-card.main-action {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
  color: white;
  user-select: none;
}

.module-card.main-action:hover {
  background: var(--primary-blue-dark);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
  transform: translateY(-4px);
}

.module-card.main-action .module-header h3 {
  color: white;
}

.module-card.main-action p {
  color: rgba(255, 255, 255, 0.9);
}

.action-arrow {
  margin-left: auto;
  font-size: 1.5rem;
  font-weight: 700;
}

.module-card p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-medium);
  line-height: 1.5;
}

/* ===== Chart Wrapper ===== */
.chart-wrapper {
  background: var(--background-white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 2px 12px var(--shadow-light);
  margin: 2rem 0;
  position: relative;
  min-height: 400px;
  max-height: 500px;
  overflow: hidden;
}

.chart-wrapper canvas {
  max-height: 400px !important;
  width: 100% !important;
  height: 400px !important;
}

/* ===== NEW FEATURE CARDS ===== */
.new-feature {
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: scale(1);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.new-feature:hover {
  transform: scale(1.02) translateY(-4px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.new-feature h3 {
  color: white !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.new-feature p {
  color: rgba(255, 255, 255, 0.9) !important;
}

.new-feature .status-badge {
  background: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
  backdrop-filter: blur(10px);
}

.feature-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fbbf24;
  color: #1f2937;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse-badge 2s infinite;
  z-index: 10;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* ===== KPI FEATURE CARDS ===== */
.kpi-feature {
  position: relative;
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: white;
  transform: scale(1);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.kpi-feature:hover {
  transform: scale(1.02) translateY(-4px);
  box-shadow: 0 12px 35px rgba(37, 99, 235, 0.5);
}

.kpi-feature h3 {
  color: white !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.kpi-feature p {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* ===== Fleet Analytics Section ===== */
.fleet-analytics-section {
  margin: 3rem 0;
  position: relative;
}

.ai-header {
  text-align: center;
  margin-bottom: 2rem;
}

.ai-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--ai-primary) 0%, var(--ai-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.ai-header p {
  color: var(--text-medium);
  font-size: 1rem;
}

/* Cluster Grid */
.cluster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.cluster-card {
  background: var(--ai-glass);
  border: 1px solid var(--ai-border);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.cluster-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  background: var(--ai-glass-hover);
}

.cluster-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
}

.cluster-1::before { background: linear-gradient(90deg, var(--ai-success), #34d399); }
.cluster-2::before { background: linear-gradient(90deg, var(--ai-warning), #fbbf24); }
.cluster-3::before { background: linear-gradient(90deg, var(--ai-danger), #f87171); }
.cluster-4::before { background: linear-gradient(90deg, var(--ai-secondary), #a78bfa); }

.cluster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.cluster-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
}

.cluster-1 .cluster-icon { background: linear-gradient(135deg, var(--ai-success), #059669); }
.cluster-2 .cluster-icon { background: linear-gradient(135deg, var(--ai-warning), #d97706); }
.cluster-3 .cluster-icon { background: linear-gradient(135deg, var(--ai-danger), #dc2626); }
.cluster-4 .cluster-icon { background: linear-gradient(135deg, var(--ai-secondary), #7c3aed); }

.cluster-info {
  flex: 1;
  margin-left: 1rem;
}

.cluster-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.cluster-subtitle {
  font-size: 0.875rem;
  color: var(--text-color);
  opacity: 0.7;
}

.cluster-count {
  background: linear-gradient(135deg, var(--ai-primary), var(--ai-secondary));
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
}

.cluster-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.cluster-metric {
  text-align: center;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.cluster-1 .metric-value { color: var(--ai-success); }
.cluster-2 .metric-value { color: var(--ai-warning); }
.cluster-3 .metric-value { color: var(--ai-danger); }
.cluster-4 .metric-value { color: var(--ai-secondary); }

.metric-label {
  font-size: 0.75rem;
  color: var(--text-color);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.health-bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.health-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease;
}

.cluster-1 .health-fill { background: linear-gradient(90deg, var(--ai-success), #34d399); }
.cluster-2 .health-fill { background: linear-gradient(90deg, var(--ai-warning), #fbbf24); }
.cluster-3 .health-fill { background: linear-gradient(90deg, var(--ai-danger), #f87171); }
.cluster-4 .health-fill { background: linear-gradient(90deg, var(--ai-secondary), #a78bfa); }

/* AI Charts Grid */
.ai-charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.ai-chart-container,
.ai-alerts-panel,
.ai-insights {
  background: var(--ai-glass);
  border: 1px solid var(--ai-border);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  position: relative;
  min-height: 450px;
  max-height: 550px;
}

.ai-chart-container canvas {
  max-height: 400px !important;
  width: 100% !important;
  height: 400px !important;
}

.chart-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* AI Alerts */
.ai-alert-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  margin: 0.75rem 0;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 10px;
  border-left: 3px solid;
  transition: all 0.3s ease;
  cursor: pointer;
}

.ai-alert-item:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateX(4px);
}

.alert-critical { border-left-color: var(--ai-danger); }
.alert-warning { border-left-color: var(--ai-warning); }
.alert-info { border-left-color: var(--ai-accent); }

.alert-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.alert-critical .alert-icon {
  background: rgba(239, 68, 68, 0.1);
  color: var(--ai-danger);
}

.alert-warning .alert-icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--ai-warning);
}

.alert-info .alert-icon {
  background: rgba(6, 182, 212, 0.1);
  color: var(--ai-accent);
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.alert-description {
  font-size: 0.75rem;
  color: var(--text-color);
  opacity: 0.7;
  line-height: 1.4;
}

/* Insights */
.insights-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.insights-icon {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--ai-primary), var(--ai-secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.125rem;
}

.insights-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.insight-card {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 10px;
  padding: 1.5rem;
  border-left: 3px solid var(--ai-accent);
  transition: all 0.3s ease;
  cursor: pointer;
}

.insight-card:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateX(4px);
}

.insight-metric {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ai-accent);
  margin-bottom: 0.5rem;
}

.insight-text {
  color: var(--text-color);
  font-size: 0.875rem;
  line-height: 1.5;
  opacity: 0.8;
}

/* ===== Atividade recente ===== */
.jornada-card {
  background: var(--background-white);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  box-shadow: 0 2px 12px var(--shadow-light);
  max-height: 300px;
  overflow-y: auto;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.jornada-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.colaborador-info strong {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 1rem;
}

.colaborador-info small {
  font-size: 0.85rem;
  color: var(--text-medium);
}

.jornada-data {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-medium);
}

.jornada-data .data {
  font-weight: 600;
  display: block;
  margin-bottom: 0.2rem;
}

.jornada-data .evento {
  font-style: italic;
}

/* ===== Loader spinner ===== */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
  color: var(--text-medium);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--background-light);
  border-top: 3px solid var(--primary-blue);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== Animations ===== */
.fade-in {
  animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== CARD AUDITORIA MATERIAIS - SEM CONFLITOS ===== */
.card-modulo {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-modulo:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.card-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.card-icon {
  font-size: 40px;
  line-height: 1;
}

.card-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.card-desc {
  font-size: 12px;
  opacity: 0.9;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.card-body {
  padding: 16px 20px;
  flex: 1;
}

.card-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card-features li {
  font-size: 13px;
  padding: 6px 0;
  color: #4a5568;
}

.card-features li::before {
  content: "✓ ";
  color: #667eea;
  font-weight: bold;
  margin-right: 6px;
}

.card-footer {
  padding: 16px 20px;
  border-top: 1px solid #e2e8f0;
}

.btn-modulo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
  width: 100%;
  border: none;
  cursor: pointer;
}

.btn-modulo:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-modulo .arrow {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.btn-modulo:hover .arrow {
  transform: translateX(4px);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .ai-charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .modules-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  
  .cluster-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .dashboard-main {
    padding: 1rem;
  }
  
  .live-indicator {
    display: none;
  }
  
  .cluster-metrics {
    grid-template-columns: 1fr;
  }
  
  .ai-header h1 {
    font-size: 2rem;
  }
  
  .ai-charts-grid {
    grid-template-columns: 1fr;
  }
  
  .cluster-grid {
    grid-template-columns: 1fr;
  }

  .chart-wrapper canvas,
  .ai-chart-container canvas {
    height: 300px !important;
  }
}

@media (max-width: 640px) {
  .dashboard-header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .user-section {
    width: 100%;
    justify-content: normal;
  }
  
  .module-card {
    padding: 1.25rem 1.5rem;
  }
  
  .modules-grid {
    grid-template-columns: 1fr;
  }
  
  .insights-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .header h1 {
    font-size: 1.5rem;
  }
  
  .ai-header h1 {
    font-size: 1.75rem;
  }
  
  .login-container {
    padding: 1rem;
  }
}

/* ===== Utility classes ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 1rem; }
.mt-1 { margin-top: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }
.hidden { display: none; }
.visible { display: block; }

/* ===== Scrollbar Customization ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--text-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-medium);
}

/* ===== Print Styles ===== */
@media print {
  .logout-btn,
  .live-indicator,
  .action-arrow {
    display: none;
  }
  
  .module-card {
    break-inside: avoid;
  }
}
/* ===== Uniformizar Card Modulo ===== */
.card-modulo {
  max-height: 280px;
}

.card-body {
  max-height: 120px;
  overflow-y: auto;
}

.card-header {
  padding: 16px 16px !important;
}

.card-header h3 {
  font-size: 16px !important;
}

.card-desc {
  font-size: 11px !important;
}

.card-features li {
  font-size: 12px !important;
  padding: 4px 0 !important;
}

/* Garantir mesmo tamanho no grid */
.modules-grid .card-modulo {
  display: flex;
  flex-direction: column;
}

.modules-grid .card-body {
  flex: 1;
}
