/* style.css - Design System Global FrotaGov */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  /* Paleta Governamental Moderna */
  --bg-deep: #060911;
  --bg-main: #0b1120;
  --bg-surface: #111c35;
  --bg-card: rgba(17, 28, 53, 0.75);
  --bg-card-hover: rgba(24, 38, 71, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.25);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.15);

  --accent-cyan: #38bdf8;
  --accent-gold: #f59e0b;

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);

  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);

  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.35);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modo Claro (Light Theme) */
html[data-theme="light"] {
  --bg-deep: #f1f5f9;
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: rgba(241, 245, 249, 0.98);

  --border-subtle: rgba(0, 0, 0, 0.12);
  --border-glow: rgba(37, 99, 235, 0.25);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.1);

  --accent-cyan: #0284c7;
  --accent-gold: #d97706;

  --success: #059669;
  --success-bg: rgba(16, 185, 129, 0.12);

  --warning: #d97706;
  --warning-bg: rgba(245, 158, 11, 0.12);

  --danger: #dc2626;
  --danger-bg: rgba(239, 68, 68, 0.12);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.18);
}

html[data-theme="light"] body::before {
  background: 
    radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(2, 132, 199, 0.06) 0%, transparent 45%),
    linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
}

html[data-theme="light"] #sim-control-bar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

html[data-theme="light"] .brand-logo-placeholder {
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95) 0%, rgba(219, 234, 254, 0.8) 100%);
  border-color: rgba(37, 99, 235, 0.4);
}

html[data-theme="light"] .brand-logo-tag {
  color: #1d4ed8;
}

html[data-theme="light"] .brand-primary-name {
  color: #0f172a;
}

html[data-theme="light"] .brand-sub-title {
  color: #64748b;
}

html[data-theme="light"] .btn-customize-logo {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

html[data-theme="light"] .btn-customize-logo:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
}

html[data-theme="light"] .header-user-badge {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html[data-theme="light"] .header-user-name {
  color: #1e293b;
}

html[data-theme="light"] .header-user-role {
  color: #0284c7;
}

html[data-theme="light"] .btn-theme-toggle {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

html[data-theme="light"] .btn-theme-toggle:hover {
  background: #e2e8f0;
  color: #0f172a;
}

html[data-theme="light"] .header-guest-badge {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.3);
}

html[data-theme="light"] .branding-modal-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

html[data-theme="light"] .branding-modal-header {
  border-color: #e2e8f0;
}

html[data-theme="light"] .branding-modal-header h3 {
  color: #0f172a;
}

html[data-theme="light"] .branding-upload-dropzone {
  background: #f8fafc;
  border-color: #93c5fd;
}

html[data-theme="light"] .branding-upload-dropzone .branding-upload-text {
  color: #0f172a !important;
}

html[data-theme="light"] .branding-preview-box {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

html[data-theme="light"] #preview-org-name {
  color: #0f172a !important;
}

html[data-theme="light"] #preview-sub-name {
  color: #64748b !important;
}

html[data-theme="light"] .btn-preset-chip {
  background: #e2e8f0;
  color: #334155;
  border-color: #cbd5e1;
}

html[data-theme="light"] .btn-preset-chip:hover {
  background: #cbd5e1;
  color: #0f172a;
}

html[data-theme="light"] .branding-modal-footer {
  border-color: #e2e8f0;
}

html[data-theme="light"] .admin-sidebar {
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
}

html[data-theme="light"] .sidebar-user-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

html[data-theme="light"] .brand-text h3 {
  color: #0f172a;
}

html[data-theme="light"] .nav-item {
  color: #475569;
}

html[data-theme="light"] .nav-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-theme="light"] .nav-item.active {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  border-left-color: #2563eb;
}

html[data-theme="light"] .data-table th {
  background: #f8fafc;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}

html[data-theme="light"] .data-table td {
  border-bottom: 1px solid #e2e8f0;
}

html[data-theme="light"] .data-table tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

html[data-theme="light"] .form-control {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

html[data-theme="light"] .form-control:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

html[data-theme="light"] .form-label {
  color: #1e293b;
}

html[data-theme="light"] .kpi-card {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .kpi-card.clickable:hover {
  background: #f8fafc;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .kpi-card.active-filter {
  background: #f0f7ff;
}

html[data-theme="light"] .vehicle-preview-box,
html[data-theme="light"] .gap-diff-banner,
html[data-theme="light"] .audit-metrics-row {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html[data-theme="light"] .prefix-tag,
html[data-theme="light"] .cnh-cat-tag {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

html[data-theme="light"] .sec-badge {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

html[data-theme="light"] .metric-label {
  color: #475569;
  font-weight: 700;
}

html[data-theme="light"] .nav-badge {
  background: #e2e8f0;
  color: #334155;
}

html[data-theme="light"] .modal-overlay,
html[data-theme="light"] .modal-backdrop {
  background: rgba(15, 23, 42, 0.55);
}

html[data-theme="light"] .modal-card {
  background: #ffffff;
  color: #0f172a;
}

html[data-theme="light"] .btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

html[data-theme="light"] .btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

html[data-theme="light"] .fuel-mode-toggle {
  background: #e2e8f0;
}

html[data-theme="light"] .btn-mode.active {
  background: #ffffff;
  color: #0f172a;
}

html[data-theme="light"] .btn-fraction {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

html[data-theme="light"] .chip {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

html[data-theme="light"] .login-card {
  background: #ffffff;
}

/* Reset e Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Background Gradients */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(56, 189, 248, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #060911 0%, #0b1120 100%);
  z-index: -1;
  pointer-events: none;
}

/* Utilitários Visuais */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.font-mono {
  font-family: var(--font-mono);
}

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.35rem; }
.font-bold { font-weight: 700; }

.text-primary { color: var(--accent-cyan); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }

.d-none { display: none !important; }
.d-block { display: block !important; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.p-3 { padding: 1rem; }
.text-center { text-align: center; }

/* Barra Superior Institucional (Cabeçalho com Espaço de Logotipo e Sessão) */
#sim-control-bar {
  background: rgba(8, 13, 26, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  font-size: 0.85rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.institutional-header-content {
  max-width: 1540px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Espaço de Identidade Visual e Logotipo */
.brand-header-area {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.brand-logo-slot.is-clickable {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-logo-slot.is-clickable:hover,
.brand-logo-slot.is-clickable:focus-visible {
  transform: scale(1.02);
}

.brand-logo-img {
  max-height: 42px;
  max-width: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.brand-logo-placeholder {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px dashed rgba(56, 189, 248, 0.45);
  padding: 5px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.brand-logo-placeholder:hover {
  border-color: #38bdf8;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.brand-logo-crest {
  font-size: 1.25rem;
  line-height: 1;
}

.brand-logo-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #7dd3fc;
  text-transform: uppercase;
}

.brand-identity-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}

.brand-primary-name {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #f8fafc;
  text-transform: uppercase;
}

.brand-sub-title {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.btn-customize-logo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-customize-logo:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Área de Sessão à Direita */
.header-user-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 6px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
}

.header-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #0284c7);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3);
}

.header-user-details {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.header-user-name {
  font-size: 0.82rem;
  color: #f1f5f9;
  font-weight: 600;
}

.header-user-role {
  font-size: 0.68rem;
  color: #38bdf8;
  font-weight: 500;
}

.btn-mode-toggle {
  background: rgba(56, 189, 248, 0.15) !important;
  border: 1px solid #38bdf8 !important;
  color: #7dd3fc !important;
  font-weight: 600 !important;
}

.btn-mode-toggle:hover {
  background: #38bdf8 !important;
  color: #080d1a !important;
}

.btn-theme-toggle {
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-theme-toggle:hover {
  background: #334155;
  color: #fff;
}

.btn-institutional-logout {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #fca5a5 !important;
  font-weight: 600 !important;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-institutional-logout:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.header-guest-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  color: #6ee7b7;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Modal de Personalização de Marca (White-Label) */
.branding-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.branding-modal-card {
  background: #0b1329;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(56, 189, 248, 0.12);
  overflow: hidden;
  animation: modalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.branding-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.branding-modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.branding-modal-body {
  padding: 22px 24px;
  max-height: calc(85vh - 140px);
  overflow-y: auto;
}

.branding-upload-dropzone {
  border: 2px dashed rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.4);
  border-radius: 12px;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.branding-upload-dropzone:hover,
.branding-upload-dropzone.drag-over {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}

.branding-upload-icon {
  font-size: 2.2rem;
  margin-bottom: 6px;
}

.branding-preview-box {
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.branding-presets-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-preset-chip {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-preset-chip:hover {
  background: #334155;
  color: #fff;
  border-color: #38bdf8;
}

.branding-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Sidebar Logo Styling */
.sidebar-brand-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.sidebar-brand-img {
  max-height: 38px;
  max-width: 60px;
  object-fit: contain;
}

/* Layout Principal Responsivo (Full Fluid & Adaptive) */
#app-shell-wrapper {
  width: 100%;
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}

#app-main-viewport {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Botões do Sistema */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  padding: 10px 18px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #1e293b;
  color: #e2e8f0;
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: #334155;
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.4);
}

.btn-outline:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent-cyan);
}

.btn-outline-primary {
  background: rgba(37, 99, 235, 0.1);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
}

.btn-outline-primary:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

html[data-theme="light"] .btn-outline-primary {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

html[data-theme="light"] .btn-outline-primary:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.btn-outline-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-outline-danger:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

html[data-theme="light"] .btn-outline-danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fca5a5;
}

html[data-theme="light"] .btn-outline-danger:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.btn-warning {
  background: #d97706;
  color: #fff;
}
.btn-warning:hover {
  background: #f59e0b;
}

.btn-success {
  background: #059669;
  color: #fff;
}
.btn-success:hover {
  background: #10b981;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 14px 22px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

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

.btn-xs {
  padding: 4px 8px;
  font-size: 0.75rem;
}

.btn-disabled, .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Formulários */
.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.badge-required {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  font-weight: normal;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  background: #0e172a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #f8fafc;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
  background: #121e38;
}

.form-control.is-invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}

.form-control.is-valid {
  border-color: var(--success) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
}

.form-control-lg {
  padding: 14px 18px;
  font-size: 1.15rem;
}

.form-helper {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.input-unit {
  position: absolute;
  right: 14px;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

/* Modais do Sistema */
.modal-overlay:not(.d-none):not([style*="display: none"]),
.modal-backdrop:not(.d-none):not([style*="display: none"]) {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 2500;
  overflow-y: auto;
}

.modal-overlay.d-none,
.modal-backdrop.d-none {
  display: none !important;
}

.modal-card {
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}

.modal-card.modal-lg {
  max-width: 900px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.border-bottom {
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
}

.modal-close:hover {
  color: #fff;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.animate-fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.border-pulse-blue {
  animation: pulseGlow 2.5s infinite;
}

/* Badges e Semáforos */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background: var(--success-bg); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: var(--warning-bg); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger  { background: var(--danger-bg);  color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-info    { background: rgba(56, 189, 248, 0.15); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.3); }
.badge-blue    { background: var(--primary-light); color: #93c5fd; }

.cnh-cat-tag {
  background: #1e293b;
  border: 1px solid #475569;
  color: #f1f5f9;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
}

.sec-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #94a3b8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Tela de Login Governamental */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
}

.btn-login-theme-toggle {
  position: absolute;
  top: 18px;
  right: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-login-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

html[data-theme="light"] .btn-login-theme-toggle {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .btn-login-theme-toggle:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.login-card {
  max-width: 480px;
  width: 100%;
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

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

.login-brand-shield {
  width: 70px;
  height: 70px;
  margin: 0 auto 12px;
  filter: drop-shadow(0 4px 12px rgba(30, 58, 138, 0.4));
}

.login-brand-header h2 {
  font-size: 0.95rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  font-weight: 700;
  margin-bottom: 4px;
}

.login-brand-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

.login-brand-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.login-compliance-tags {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.login-compliance-badge {
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 600;
}

/* Abas de Modo de Acesso */
.login-mode-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid var(--border-subtle);
}

.login-mode-btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.login-mode-btn.active {
  background: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* Alerta de erro no login */
.login-alert-box {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: fadeIn 0.2s ease;
}

.login-input-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-password-wrap input {
  padding-right: 44px;
}

.btn-toggle-eye {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  font-size: 1rem;
}

/* Botão Gov.br */
.btn-govbr {
  background: #1351b4;
  color: #ffffff;
  font-weight: 600;
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.9rem;
}
.btn-govbr:hover {
  background: #0b3c8a;
}
.btn-govbr-badge {
  background: #ffffff;
  color: #1351b4;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.login-divider::before, .login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}
.login-divider span {
  padding: 0 10px;
}

/* Demo box */
.login-demo-container {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.login-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.login-demo-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}
.login-demo-card:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}
.login-demo-card strong {
  display: block;
  font-size: 0.82rem;
  color: var(--text-primary);
}
.login-demo-card small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Botões de Logout */
.btn-sidebar-logout, .btn-admin-logout {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-sidebar-logout:hover, .btn-admin-logout:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.btn-driver-logout {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.btn-driver-logout:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Light Mode Overrides for Login */
html[data-theme="light"] .login-card {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-color: #e2e8f0;
}
html[data-theme="light"] .login-demo-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}
html[data-theme="light"] .login-demo-card:hover {
  background: #f1f5f9;
  border-color: #3b82f6;
}
html[data-theme="light"] .login-mode-tabs {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
html[data-theme="light"] .login-compliance-badge {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

/* --- Media Queries Responsivas Globais --- */
@media (max-width: 768px) {
  #sim-control-bar {
    padding: 8px 12px;
  }
  .institutional-header-content {
    gap: 10px;
  }
  .brand-sub-title {
    display: none;
  }
  .btn-customize-logo span {
    display: none;
  }
  .btn-customize-logo {
    padding: 4px 8px;
  }
  .header-user-name {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .login-card {
    padding: 28px 20px;
  }
}

@media (max-width: 520px) {
  .form-row-2 {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .header-user-details {
    display: none;
  }
  .brand-primary-name {
    font-size: 0.8rem;
  }
  .brand-logo-img {
    max-height: 32px;
    max-width: 90px;
  }
  .brand-logo-placeholder {
    padding: 4px 8px;
  }
  .brand-logo-tag {
    font-size: 0.65rem;
  }
  .btn-mode-toggle {
    font-size: 0.72rem;
    padding: 4px 6px;
  }
  .btn-institutional-logout {
    font-size: 0.72rem;
    padding: 4px 6px;
  }
  .header-guest-badge .guest-text {
    display: none;
  }
  .modal-card {
    padding: 16px;
    border-radius: var(--radius-sm);
  }
}

/* Ações Rápidas de Link e Tags de Locais */
.btn-link-action {
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: opacity var(--transition-fast);
}
.btn-link-action:hover {
  opacity: 0.8;
  color: #fff;
}
html[data-theme="light"] .btn-link-action {
  color: #0284c7;
}
html[data-theme="light"] .btn-link-action:hover {
  color: #0369a1;
}

.badge-tipo-ambos {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
}
.badge-tipo-origem {
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.4);
  color: #38bdf8;
}
.badge-tipo-destino {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}
html[data-theme="light"] .badge-tipo-ambos {
  background: #f3e8ff;
  border-color: #d8b4fe;
  color: #7e22ce;
}
html[data-theme="light"] .badge-tipo-origem {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0369a1;
}
html[data-theme="light"] .badge-tipo-destino {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #15803d;
}

/* ============================================================
   CHIPS DE LOGIN RÁPIDO (DEMO)
============================================================ */
.login-quick-chips {
  margin-bottom: 18px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px dashed rgba(56, 189, 248, 0.35);
  padding: 12px;
  border-radius: var(--radius-md);
  text-align: left;
}

.quick-chip-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.quick-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-quick-chip {
  flex: 1;
  min-width: 140px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-quick-chip:hover {
  background: rgba(37, 99, 235, 0.2);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

html[data-theme="light"] .login-quick-chips {
  background: #f0fdf4;
  border-color: #86efac;
}

html[data-theme="light"] .btn-quick-chip {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #1e293b;
}

html[data-theme="light"] .btn-quick-chip:hover {
  background: #eff6ff;
  border-color: #3b82f6;
}

/* ============================================================
   TELA DE SELEÇÃO DE PAPEL DO GESTOR (ROLE SELECTION)
============================================================ */
.role-selection-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 32px 16px;
}

.role-selection-card {
  max-width: 960px;
  width: 100%;
  padding: 36px 36px 30px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  background: rgba(11, 17, 32, 0.85);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.role-brand-header {
  margin-bottom: 28px;
}

.role-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.role-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a, #0284c7);
  border: 2px solid #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
}

.role-user-headline {
  flex: 1;
  min-width: 0;
}

.role-pill-group {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.role-badge-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.role-badge-pill.admin {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.role-user-headline h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.role-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.role-welcome-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-top: 14px;
}

.welcome-alert-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.welcome-alert-text strong {
  display: block;
  font-size: 0.88rem;
  color: var(--accent-cyan);
  margin-bottom: 3px;
}

.welcome-alert-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

/* Grid de Seleção de Opções */
.role-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 26px;
}

.role-option-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-normal);
  cursor: pointer;
  user-select: none;
  outline: none;
}

.role-option-card:hover,
.role-option-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.role-card-admin:hover,
.role-card-admin:focus-visible {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.25);
}

.role-card-driver:hover,
.role-card-driver:focus-visible {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 16px 36px rgba(16, 185, 129, 0.22);
}

.role-card-top-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent-gold);
  margin-bottom: 14px;
}

.role-card-top-tag.tag-driver {
  color: #34d399;
}

.role-card-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.role-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.role-card-icon.admin {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.6), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.role-card-icon.driver {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.6), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.role-card-titles h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.role-card-titles span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.role-card-summary {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
  min-height: 52px;
}

.role-features-block {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 22px;
  flex: 1;
}

.features-block-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.role-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.role-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-main);
  line-height: 1.35;
}

.feat-ico {
  color: var(--accent-cyan);
  font-weight: 900;
  font-size: 0.85rem;
  line-height: 1;
  margin-top: 2px;
}

.feat-ico.green {
  color: #10b981;
}

.btn-role-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}

.btn-accent-emerald {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  border: 1px solid #34d399;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-accent-emerald:hover {
  background: linear-gradient(135deg, #047857, #059669);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.role-selection-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.role-footer-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tip-ico {
  font-size: 1.1rem;
}

.role-footer-bottom {
  text-align: center;
}

/* ============================================================
   BANNER DE GESTOR NA VISÃO DO MOTORISTA
============================================================ */
.driver-gestor-bar {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.25) 0%, rgba(15, 23, 42, 0.8) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.gestor-bar-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.gestor-bar-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.gestor-bar-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-cyan);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.gestor-bar-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.gestor-bar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}

.btn-gestor-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

/* ============================================================
   CARD DE ACESSO DO MOTORISTA NA SIDEBAR DO GESTOR
============================================================ */
.sidebar-driver-access-card {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.25) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 16px;
}

.driver-access-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.driver-access-icon {
  font-size: 1.2rem;
}

.driver-access-meta {
  display: flex;
  flex-direction: column;
}

.driver-access-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #34d399;
}

.driver-access-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.driver-access-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0 0 10px 0;
  line-height: 1.35;
}

.btn-sidebar-driver {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 10px;
}

.btn-topbar-drive {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

/* ============================================================
   AJUSTES PARA TEMA CLARO (LIGHT THEME)
============================================================ */
html[data-theme="light"] .role-selection-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .role-welcome-alert {
  background: #f0f9ff;
  border-color: #bae6fd;
}

html[data-theme="light"] .welcome-alert-text strong {
  color: #0369a1;
}

html[data-theme="light"] .role-option-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

html[data-theme="light"] .role-card-admin:hover,
html[data-theme="light"] .role-card-admin:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.15);
}

html[data-theme="light"] .role-card-driver:hover,
html[data-theme="light"] .role-card-driver:focus-visible {
  border-color: #10b981;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.15);
}

html[data-theme="light"] .role-features-block {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html[data-theme="light"] .role-footer-tip {
  background: #f8fafc;
  color: #475569;
}

html[data-theme="light"] .driver-gestor-bar {
  background: linear-gradient(90deg, #f0fdf4 0%, #ffffff 100%);
  border-color: #86efac;
}

html[data-theme="light"] .sidebar-driver-access-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border-color: #86efac;
}

/* ============================================================
   RESPONSIVIDADE (MOBILE / SMARTPHONE)
============================================================ */
@media (max-width: 768px) {
  .role-selection-card {
    padding: 24px 18px 20px;
  }

  .role-options-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .role-avatar-row {
    flex-direction: column;
    text-align: center;
  }

  .role-pill-group {
    justify-content: center;
  }

  .driver-gestor-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .gestor-bar-actions {
    justify-content: flex-end;
  }
}

/* ============================================================
   ESTILOS DE RESERVAS / AGENDAMENTOS NA TELA DO CONDUTOR
============================================================ */
.driver-agd-card {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.driver-agd-card:hover {
  transform: translateY(-2px);
  border-color: #38bdf8 !important;
}

.badge-cyan {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.5);
}

html[data-theme="light"] .driver-agd-card {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .driver-agd-card h4 {
  color: #0f172a !important;
}

html[data-theme="light"] .driver-agd-route {
  background: #f1f5f9 !important;
  color: #334155 !important;
}


