/* ==========================================================================
   DIMENSIONE - Sistema de Dimensionamento de Esteiras Transportadoras
   Estilos CSS Modernos - Design Industrial & Engenharia
   ========================================================================== */

:root {
  /* Paleta Tema Escuro (Padrão) */
  --bg-primary: #0a0f1d;
  --bg-secondary: #111827;
  --bg-card: #162032;
  --bg-card-hover: #1e2c45;
  --bg-input: #0d1525;
  
  --border-color: #24344d;
  --border-focus: #3b82f6;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
  --text-secondary: #cbd5e1;
  
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-red: #ef4444;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  
  --font-sans: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', 'Fira Code', monospace;
}

/* Tema Claro */
body.theme-light {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  
  --border-color: #cbd5e1;
  --border-focus: #2563eb;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-sub: #64748b;
  --text-secondary: #334155;
  
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Layout Container */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ==========================================================================
   SIDEBAR MODULAR
   ========================================================================== */
.sidebar {
  width: 290px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 20px 16px;
  gap: 24px;
}

.sidebar-header .brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent-blue);
}

.brand-app-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-app-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.brand-title {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-main);
}

.brand-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  padding: 2px 6px;
  border-radius: 4px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-sub);
  text-transform: uppercase;
}

.conveyor-types-list, .calc-modules-list, .conveyor-tree {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tree-item {
  display: flex;
  flex-direction: column;
}

.tree-parent-btn {
  position: relative;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.tree-parent-btn .chevron {
  margin-left: auto;
  font-size: 0.7rem;
  opacity: 0.65;
  transition: transform 0.25s ease;
  user-select: none;
  padding: 3px 5px;
  border-radius: 4px;
}

.tree-parent-btn:hover .chevron {
  opacity: 1;
  background: rgba(148, 163, 184, 0.15);
}

.tree-item.collapsed .chevron {
  transform: rotate(-90deg);
}

.tree-sub-list {
  margin-left: 18px;
  padding-left: 10px;
  border-left: 2px solid rgba(148, 163, 184, 0.25);
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, margin-top 0.2s ease;
}

.tree-item.collapsed .tree-sub-list {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
  margin-top: 0;
  border-left-color: transparent;
}

.tree-item.expanded .tree-sub-list {
  max-height: 500px;
  opacity: 1;
}

.sub-module-btn {
  font-size: 0.82rem;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--text-muted);
}

.sub-module-btn:hover {
  color: var(--text-main);
  background: rgba(148, 163, 184, 0.08);
}

.sub-module-btn .icon {
  font-size: 0.95rem;
}

.tree-sub-placeholder {
  padding: 8px 10px;
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
  background: rgba(148, 163, 184, 0.06);
  border-radius: 6px;
  margin: 3px 0;
}

.tree-sub-placeholder .badge-futuro {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.65rem;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-radius: 4px;
  margin-bottom: 5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.conveyor-type-btn, .module-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.conveyor-type-btn .icon, .module-btn .icon {
  font-size: 1.1rem;
}

.conveyor-type-btn .badge {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-sub);
}

.conveyor-type-btn.active, .module-btn.active {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
  color: var(--accent-blue);
  font-weight: 600;
}

.conveyor-type-btn .badge.active-badge {
  background: var(--accent-blue);
  color: #fff;
  font-weight: 600;
}

.status-dot.online {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  margin-left: auto;
  box-shadow: 0 0 8px var(--accent-green);
}

.conveyor-type-btn.disabled, .module-btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* Alternador de Tema (Acima de Tipos de Transportador) */
.sidebar-theme-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

body.theme-light .sidebar-theme-wrapper {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.theme-toggle-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  user-select: none;
}

.theme-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  font-size: 0.82rem;
}

.theme-mode-icon {
  font-size: 0.95rem;
  line-height: 1;
}

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

/* Switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #334155;
  transition: 0.3s;
  border-radius: 22px;
}

body.theme-light .slider {
  background-color: #cbd5e1;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

input:checked + .slider {
  background-color: var(--accent-blue);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

/* ==========================================================================
   CONTEÚDO PRINCIPAL & TOPBAR
   ========================================================================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

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

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Botões Gerais */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent-blue);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--accent-blue-hover);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border-color: rgba(59, 130, 246, 0.3);
}
.btn-secondary:hover {
  background-color: rgba(59, 130, 246, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-color);
}
.btn-outline:hover {
  background-color: rgba(148, 163, 184, 0.1);
  color: var(--text-main);
}

.btn-block {
  width: 100%;
}

/* Navegação por Abas */
.nav-tabs {
  display: flex;
  gap: 3px;
  padding: 8px 20px 0 20px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
  font-weight: 600;
}

/* Conteúdo das Abas */
.tab-content {
  display: none;
  padding: 24px 28px;
}

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

/* ==========================================================================
   ABA 1: GRID DE CÁLCULO & CARDS
   ========================================================================== */
.calc-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 24px;
  align-items: start;
}

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

.inputs-column, .results-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Cards Estilizados */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(59, 130, 246, 0.35);
}

.card-header {
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-header .badge,
.card-header .badge-tag-pratico,
.card-header .badge-tag-cema {
  margin-left: auto;
  flex-shrink: 0;
}

.card-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

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

.card-body {
  padding: 18px;
}

/* Formulários */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

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

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

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

.input-with-badge input {
  padding-right: 65px;
}

.unit-badge {
  position: absolute;
  right: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-sub);
  pointer-events: none;
  background: rgba(148, 163, 184, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.helper-text {
  font-size: 0.75rem;
  color: var(--text-sub);
}

.quick-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.chip-btn {
  padding: 3px 8px;
  font-size: 0.72rem;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
}

.chip-btn.active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
  font-weight: 600;
}

.mb-2 {
  margin-bottom: 8px;
}

/* Cabeçalho Retrátil com Checkbox */
.header-title-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-header.toggle-header {
  justify-content: space-between;
}

.checkbox-container {
  display: flex;
  align-items: center;
}

.custom-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--accent-blue);
  cursor: pointer;
  font-weight: 600;
}

/* ==========================================================================
   CARD HERO DE RESULTADOS (DESTAQUE)
   ========================================================================== */
.hero-result-card {
  background: linear-gradient(145deg, #16243d 0%, #101c30 100%);
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  padding: 22px;
}

.hero-header .hero-subtitle {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

.hero-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
}

.hero-value-box {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 18px 0 10px 0;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  border-left: 4px solid var(--accent-cyan);
}

.hero-symbol {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--text-muted);
}

.hero-number {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: -1px;
}

.hero-unit {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-muted);
}

.hero-explanation {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 18px;
}

/* Grid de Métricas */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.metric-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.72rem;
  color: var(--text-sub);
  text-transform: uppercase;
  font-weight: 600;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: #f8fafc;
  margin-top: 2px;
}

.metric-sub {
  font-size: 0.68rem;
  color: var(--accent-blue);
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* Grid de Indicadores KPI (Módulo Potência e Cinemática) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-item, .kpi-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

body.theme-light .kpi-item,
body.theme-light .kpi-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.kpi-item.primary,
.kpi-card.highlight {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.08);
}

body.theme-light .kpi-item.primary,
body.theme-light .kpi-card.highlight {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.kpi-item.accent {
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.08);
}

body.theme-light .kpi-item.accent {
  background: #ecfeff;
  border-color: #a5f3fc;
}

.kpi-item.warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
}

body.theme-light .kpi-item.warning {
  background: #fffbeb;
  border-color: #fde68a;
}

.kpi-label {
  font-size: 0.72rem;
  color: var(--text-sub);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

body.theme-light .kpi-label {
  color: #64748b;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.25;
  margin-top: 2px;
}

body.theme-light .kpi-value {
  color: #0f172a;
}

.kpi-item.primary .kpi-value,
.kpi-card.highlight .kpi-value {
  color: #60a5fa;
}

body.theme-light .kpi-item.primary .kpi-value,
body.theme-light .kpi-card.highlight .kpi-value {
  color: #0284c7;
}

.kpi-item.accent .kpi-value {
  color: #22d3ee;
}

body.theme-light .kpi-item.accent .kpi-value {
  color: #0891b2;
}

.kpi-item.warning .kpi-value {
  color: #fbbf24;
}

body.theme-light .kpi-item.warning .kpi-value {
  color: #d97706;
}

.kpi-unit {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 3px;
}

body.theme-light .kpi-unit {
  color: #64748b;
}

.note-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

body.theme-light .note-box {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

/* Conferência */
.conferencia-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
}

.conferencia-icon {
  font-size: 1.2rem;
}

.conferencia-details {
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
}

.conferencia-details strong {
  color: var(--accent-green);
}

.conferencia-details span {
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Painel de Blocos Existentes */
.blocks-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.block-sum-item {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}

.block-sum-item .lbl {
  font-size: 0.72rem;
  color: var(--text-sub);
}

.block-sum-item strong {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--text-main);
}

.block-sum-item strong.highlight-green {
  color: var(--accent-green);
}

/* Barras de Atendimento */
.progress-section {
  margin-top: 10px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.progress-labels strong {
  font-family: var(--font-mono);
  color: var(--text-main);
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-bar-fill.fill-green {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.progress-bar-fill.fill-yellow {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.progress-bar-fill.fill-red {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

/* Diagnóstico Conclusivo */
.verdict-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-badge,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.2;
  transition: all 0.2s ease;
}

.badge-success {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

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

.badge-danger {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-info {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.verdict-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-main);
}

.check-item .icon {
  font-size: 1rem;
}

/* ==========================================================================
   ABA 2: CATÁLOGO DE ESTICADORES
   ========================================================================== */
.catalog-header {
  margin-bottom: 24px;
}

.catalog-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.catalog-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 22px;
}

.catalog-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

.catalog-card.featured {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.catalog-badge {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--accent-blue);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
}

.catalog-card-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-color);
}

.icon-circle {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalog-card-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.catalog-card-header .sub {
  font-size: 0.78rem;
  color: var(--text-sub);
}

.diagram-box {
  background: #090e1a;
  padding: 16px;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
}

.tensor-svg {
  width: 100%;
  max-width: 320px;
  height: auto;
}

.catalog-details {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.formula-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(59, 130, 246, 0.1);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-main);
}

.formula-chip strong {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

.pros-cons-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.pros-cons-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.8rem;
  line-height: 1.4;
}

.pros-cons-list li.pro::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: bold;
}

.pros-cons-list li.con::before {
  content: "✖";
  position: absolute;
  left: 0;
  color: var(--accent-red);
  font-weight: bold;
}

/* ==========================================================================
   ABA 3: GUIA DIDÁTICO & FÓRMULAS
   ========================================================================== */
.guide-container {
  max-width: 900px;
  margin: 0 auto;
}

.guide-header {
  margin-bottom: 24px;
}

.guide-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
}

.guide-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.guide-cards-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.guide-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.1);
}

.guide-body {
  padding: 20px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.math-box {
  background: #090e1a;
  border-left: 4px solid var(--accent-blue);
  padding: 12px 18px;
  border-radius: 4px;
  margin: 6px 0;
}

.math-box code {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: #38bdf8;
  font-weight: 600;
}

.tip-box {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.84rem;
  color: var(--text-main);
}

.table-criteria {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 0.85rem;
}

.table-criteria th, .table-criteria td {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.table-criteria th {
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-main);
}

.row-green { background: rgba(16, 185, 129, 0.08); }
.row-yellow { background: rgba(245, 158, 11, 0.08); }
.row-red { background: rgba(239, 68, 68, 0.08); }

/* ==========================================================================
   ABA 4: MEMORIAL DE CÁLCULO (RELATÓRIO & IMPRESSÃO A4)
   ========================================================================== */
.report-wrapper {
  max-width: 860px;
  margin: 0 auto;
}

.report-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  background: var(--bg-card);
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 14px;
}

.report-module-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.report-module-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
}

.report-filter-chips {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.25);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  gap: 4px;
}

body.theme-light .report-filter-chips {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.report-chip-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-family: inherit;
}

.report-chip-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

body.theme-light .report-chip-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.report-chip-btn.active {
  background: var(--accent-blue);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(59, 130, 246, 0.35);
}

.report-select-input {
  display: none;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

@media (max-width: 820px) {
  .report-filter-chips {
    display: none;
  }
  .report-select-input {
    display: block;
    width: 100%;
  }
}

.toolbar-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Folha de Relatório */
.report-paper {
  background: #ffffff;
  color: #1e293b;
  border-radius: 4px;
  padding: 48px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  font-family: var(--font-sans);
  line-height: 1.5;
}

.report-paper-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.doc-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

.doc-meta {
  font-size: 0.85rem;
  color: #475569;
  margin-top: 4px;
}

.doc-stamp {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #2563eb;
}

.doc-stamp .date {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: normal;
}

.report-paper-body {
  font-size: 0.9rem;
  color: #1e293b;
}

/* Seções do Relatório */
.rep-section {
  margin-bottom: 20px;
}

/* Cabeçalho de Módulo Principal no Relatório */
.rep-module-header {
  background: #f8fafc;
  border-left: 5px solid #0284c7;
  padding: 10px 14px;
  margin: 22px 0 16px 0;
  border-radius: 4px;
}
.rep-module-header.module-capacidade {
  border-left-color: #0284c7;
  background: #f0f9ff;
}
.rep-module-header.module-potencia {
  border-left-color: #f59e0b;
  background: #fffbeb;
}
.rep-module-header.module-contrapeso {
  border-left-color: #10b981;
  background: #f0fdf4;
}
.rep-module-header.module-tensoes {
  border-left-color: #8b5cf6;
  background: #f5f3ff;
}
.rep-module-header.module-tambores {
  border-left-color: #06b6d4;
  background: #ecfeff;
}
.rep-module-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 2px;
}
.rep-module-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.rep-section-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 4px;
}

.rep-divider {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 16px 0;
}

.rep-table-params {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
}

.rep-table-params td {
  padding: 4px 6px;
  font-size: 0.88rem;
}

.rep-table-params td.lbl {
  color: #475569;
  font-weight: 500;
  width: 45%;
}

.rep-table-params td.val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #0f172a;
}

.rep-math-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 8px 0;
}

.rep-check-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: 6px;
}

.rep-conclusion-box {
  background: #f0fdf4;
  border-left: 4px solid #10b981;
  padding: 16px 20px;
  border-radius: 6px;
  margin-top: 14px;
  color: #0f172a !important;
}

.rep-conclusion-box p {
  color: #1e293b !important;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 6px;
}

.rep-conclusion-box p strong {
  color: #0f172a !important;
}

.rep-conclusion-box h4 {
  color: #065f46;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

/* Garante legibilidade máxima dos itens de verificação na folha branca do relatório */
.report-paper .check-item,
.rep-conclusion-box .check-item,
.rep-checklist-container .check-item {
  color: #065f46 !important;
  font-size: 0.88rem;
  line-height: 1.5;
}

.report-paper .check-item span,
.rep-conclusion-box .check-item span,
.rep-checklist-container .check-item span {
  color: #065f46 !important;
  font-weight: 600;
}

.report-paper .check-item.ok span,
.rep-conclusion-box .check-item.ok span,
.rep-checklist-container .check-item.ok span {
  color: #065f46 !important;
  font-weight: 600;
}

.report-paper .check-item.warning span,
.rep-conclusion-box .check-item.warning span,
.rep-checklist-container .check-item.warning span {
  color: #92400e !important;
  font-weight: 600;
}

.report-paper .check-item.danger span,
.rep-conclusion-box .check-item.danger span,
.rep-checklist-container .check-item.danger span {
  color: #991b1b !important;
  font-weight: 600;
}

/* Tabelas de Alta Legibilidade e Alto Contraste na Folha A4 do Relatório */
.report-paper .table-styled,
.report-paper .rep-table-comparison {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  margin-bottom: 14px;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px;
  overflow: hidden;
}

.report-paper .table-styled th,
.report-paper .rep-table-comparison th {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  border-bottom: 2px solid #cbd5e1 !important;
  padding: 10px 12px !important;
  text-align: left;
}

.report-paper .table-styled td,
.report-paper .rep-table-comparison td {
  background: #ffffff !important;
  color: #1e293b !important;
  font-size: 0.88rem !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 9px 12px !important;
  vertical-align: middle;
}

.report-paper .table-styled tr:nth-child(even) td,
.report-paper .rep-table-comparison tr:nth-child(even) td {
  background: #f8fafc !important;
}

.report-paper .table-styled td strong,
.report-paper .rep-table-comparison td strong {
  color: #0f172a !important;
}

.report-paper .table-styled td strong.val-highlight,
.report-paper .table-styled td .val-highlight,
.report-paper .rep-table-comparison td .val-highlight {
  color: #0284c7 !important;
  font-weight: 800 !important;
}

.report-paper .table-styled tr:hover td,
.report-paper .rep-table-comparison tr:hover td {
  background: #f1f5f9 !important;
}

/* Painel de Destaques / KPIs no Relatório Impresso / A4 */
.report-paper .rep-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 12px 0 16px 0;
}

.report-paper .rep-kpi-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
  text-align: center;
}

.report-paper .rep-kpi-card.highlight {
  background: #f0f9ff;
  border: 2px solid #0284c7;
}

.report-paper .rep-kpi-card.success {
  background: #f0fdf4;
  border: 2px solid #10b981;
}

.report-paper .rep-kpi-lbl {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  margin-bottom: 4px;
}

.report-paper .rep-kpi-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.report-paper .rep-kpi-card.highlight .rep-kpi-val {
  color: #0284c7;
}

.report-paper .rep-kpi-card.success .rep-kpi-val {
  color: #059669;
}

.report-paper .rep-kpi-unit {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
  margin-left: 2px;
}

.report-paper .rep-kpi-sub {
  display: block;
  font-size: 0.73rem;
  color: #64748b;
  margin-top: 4px;
}

/* Badges e Status de Alto Contraste no Relatório */
.report-paper .status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.report-paper .badge-success {
  background: #ecfdf5 !important;
  color: #065f46 !important;
  border: 1px solid #a7f3d0 !important;
}

.report-paper .badge-danger {
  background: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca !important;
}

.report-paper .badge-warning {
  background: #fffbeb !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
}

.report-paper .badge-info {
  background: #f0f9ff !important;
  color: #0369a1 !important;
  border: 1px solid #bae6fd !important;
}

.report-paper-footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #cbd5e1;
}

.footer-sign-line {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 24px;
}

.sign-box {
  text-align: center;
}

.sign-underline {
  border-bottom: 1px solid #64748b;
  margin-bottom: 6px;
  height: 40px;
}

.sign-box span {
  font-size: 0.78rem;
  color: #475569;
}

.footer-footnote {
  text-align: center;
  font-size: 0.72rem;
  color: #94a3b8;
}

/* ==========================================================================
   CONFIGURAÇÃO DE IMPRESSÃO (@media print)
   ========================================================================== */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .app-header,
  header.app-header,
  .global-id-panel,
  #cardIdentificacaoGlobal,
  .sidebar,
  .topbar,
  .nav-tabs,
  .report-toolbar,
  .no-print,
  .toast-container {
    display: none !important;
  }

  .main-content {
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .tab-content {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #tab-relatorio {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .report-paper {
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border: none !important;
  }

  .rep-section {
    page-break-inside: avoid;
  }
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.25s ease;
}

.toast.toast-success {
  border-left: 4px solid var(--accent-green);
}

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

/* ==========================================================================
   ESTILOS ESPECÍFICOS: MÓDULO POTÊNCIA E ACIONAMENTO (MÉTODO PRÁTICO)
   ========================================================================== */
.table-faco-breakdown {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  margin-top: 10px;
}

.table-faco-breakdown th {
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  text-align: left;
  padding: 8px 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-color);
}

.table-faco-breakdown td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.table-faco-breakdown td.val {
  font-family: var(--font-mono);
  font-weight: 600;
  text-align: right;
  color: var(--accent-cyan);
}

.table-faco-breakdown tr.total-row {
  background: rgba(59, 130, 246, 0.1);
  font-weight: 700;
}

.table-faco-breakdown tr.total-row td {
  border-top: 2px solid var(--accent-blue);
  color: var(--text-main);
  font-size: 0.92rem;
}

.table-faco-breakdown tr.total-row td.val {
  color: #38bdf8;
  font-size: 1.05rem;
}

.table-compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  margin-top: 8px;
}

.table-compare th {
  background: rgba(15, 23, 42, 0.4);
  color: var(--text-muted);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.table-compare td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
  white-space: nowrap;
}

.table-compare td.mono {
  font-family: var(--font-mono);
  font-weight: 600;
}

.badge-tag-pratico,
.badge-tag-faco {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  white-space: nowrap;
  line-height: 1.2;
}

.badge-tag-cema {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  white-space: nowrap;
  line-height: 1.2;
}

.badge-backstop-yes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-backstop-no {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.8rem;
  font-weight: 700;
}

.highlight-power-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.highlight-power-box .lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.highlight-power-box .val-huge {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

/* =========================================================================
   MÓDULO DE CAPACIDADE DO TRANSPORTADOR (TABELAS 1-03 A 1-06)
   ========================================================================= */
.tabela-factors-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 14px;
}

.factor-mini-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 140px;
  flex: 1;
}

.factor-lbl {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.factor-val {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent-blue);
}

.installed-belt-card {
  border-left: 3px solid var(--accent-blue) !important;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%) !important;
}

.installed-header {
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.table-styled {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.table-styled th {
  background: rgba(30, 41, 59, 0.8);
  color: var(--text-secondary);
  padding: 10px 14px;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
}

.table-styled td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

.table-styled tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-styled td.highlight-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-green);
}

.formula-breakdown-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

/* ==========================================================================
   ILUSTRAÇÕES E DIAGRAMAS DA CALHA (CAPACIDADE E GUIA DIDÁTICO)
   ========================================================================== */
.calha-diagram-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 16px;
  box-shadow: var(--shadow-md);
}

.calha-diagram-header {
  padding: 12px 18px;
  background: rgba(15, 23, 42, 0.4);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.calha-diagram-header h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 8px;
}

.calha-view-toggle {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.calha-view-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.calha-view-btn.active, .calha-view-btn:hover {
  background: var(--accent-blue);
  color: #fff;
}

.calha-img-wrapper {
  padding: 16px;
  text-align: center;
  background: #ffffff;
  border-radius: var(--radius-md);
  margin: 14px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

body.theme-dark .calha-img-wrapper.manual-scan {
  background: #f8fafc;
  filter: contrast(1.05);
}

.calha-img-responsive {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 6px;
}

.calha-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  padding: 14px 18px 18px;
  background: rgba(15, 23, 42, 0.2);
  border-top: 1px solid var(--border-color);
}

.calha-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.calha-legend-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  white-space: nowrap;
}

.badge-beta { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.badge-alpha { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-dp { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-area { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-lambda { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }




/* ==========================================================================
   PAINEL GLOBAL DE IDENTIFICAÇÃO DO TRANSPORTADOR
   ========================================================================== */
.global-id-panel {
  margin: 16px 28px 0;
  padding: 14px 18px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: border-color 0.2s ease;
}

.global-id-panel:hover {
  border-color: rgba(59, 130, 246, 0.35);
}

.global-id-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
  gap: 8px;
}

.global-id-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.global-id-badge {
  background: linear-gradient(135deg, var(--accent-blue), #1d4ed8);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.global-id-heading {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.global-id-sub {
  margin: 2px 0 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.global-id-scope-pill {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 3px 10px;
  border-radius: 12px;
}

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

@media (max-width: 1100px) {
  .form-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .form-grid-4 {
    grid-template-columns: 1fr;
  }
  .global-id-panel {
    margin: 12px 14px 0;
  }
}

/* ==========================================================================
   BANNERS DE MÓDULO NO GUIA DIDÁTICO
   ========================================================================== */
.guide-nav-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.guide-nav-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.guide-nav-chip {
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.guide-nav-chip:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-blue);
  color: #fff;
  transform: translateY(-1px);
}

.guide-module-banner {
  padding: 18px 22px;
  border-radius: var(--radius-md);
  margin: 32px 0 16px;
  position: relative;
  overflow: hidden;
  border-left: 5px solid;
}

.guide-module-banner:first-of-type {
  margin-top: 8px;
}

.guide-module-banner.module-capacidade {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(15, 23, 42, 0.7));
  border-left-color: var(--accent-green);
  border-top: 1px solid rgba(16, 185, 129, 0.25);
  border-right: 1px solid rgba(16, 185, 129, 0.15);
  border-bottom: 1px solid rgba(16, 185, 129, 0.15);
}

.guide-module-banner.module-potencia {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.12), rgba(15, 23, 42, 0.7));
  border-left-color: #eab308;
  border-top: 1px solid rgba(234, 179, 8, 0.25);
  border-right: 1px solid rgba(234, 179, 8, 0.15);
  border-bottom: 1px solid rgba(234, 179, 8, 0.15);
}

.guide-module-banner.module-contrapeso {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(15, 23, 42, 0.7));
  border-left-color: var(--accent-blue);
  border-top: 1px solid rgba(59, 130, 246, 0.25);
  border-right: 1px solid rgba(59, 130, 246, 0.15);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.guide-module-banner.module-tensoes {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(15, 23, 42, 0.7));
  border-left-color: #8b5cf6;
  border-top: 1px solid rgba(139, 92, 246, 0.25);
  border-right: 1px solid rgba(139, 92, 246, 0.15);
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}
.module-tensoes .guide-module-pill {
  background: rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}


.guide-module-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.module-capacidade .guide-module-pill {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.module-potencia .guide-module-pill {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.module-contrapeso .guide-module-pill {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.guide-module-banner h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 6px 0;
  color: var(--text-main);
}

.guide-module-banner p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.guide-module-banner.module-tambores {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(15, 23, 42, 0.7));
  border-left-color: #06b6d4;
  border-top: 1px solid rgba(6, 182, 212, 0.25);
  border-right: 1px solid rgba(6, 182, 212, 0.15);
  border-bottom: 1px solid rgba(6, 182, 212, 0.15);
}
.module-tambores .guide-module-pill {
  background: rgba(6, 182, 212, 0.25);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.guide-module-banner.module-trajetoria {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.7));
  border-left-color: #f59e0b;
  border-top: 1px solid rgba(245, 158, 11, 0.25);
  border-right: 1px solid rgba(245, 158, 11, 0.15);
  border-bottom: 1px solid rgba(245, 158, 11, 0.15);
}
.module-trajetoria .guide-module-pill {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Container do Desenho SVG do Tambor */
.drum-svg-container {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(15, 23, 42, 0.65);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.drum-svg-container svg {
  width: 100%;
  height: auto;
  max-height: 480px;
  display: block;
}

body.theme-light .drum-svg-container {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Desenho do Tambor no Relatório Impresso */
.rep-drum-drawing-box {
  margin: 16px 0;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  text-align: center;
}

.rep-drum-drawing-box svg {
  width: 100%;
  max-width: 820px;
  height: auto;
  display: inline-block;
}

.rep-drum-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 0.78rem;
  color: #475569;
}

.rep-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.rep-legend-color {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

/* ==========================================================================
   CARDS DE PARECER TÉCNICO CONCLUSIVO (.verdict-card-box)
   ========================================================================== */
.verdict-card-box {
  margin-top: 15px;
  background: rgba(30, 41, 59, 0.6);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-green);
  transition: all 0.2s ease;
}

body.theme-light .verdict-card-box {
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  border-left: 4px solid #10b981 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.verdict-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.verdict-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.verdict-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-main);
}

body.theme-light .verdict-title {
  color: #065f46 !important;
}

.verdict-pct-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-cyan);
}

body.theme-light .verdict-pct-badge {
  color: #0284c7 !important;
}

.verdict-text {
  margin: 0;
  line-height: 1.6;
  color: var(--text-muted);
  font-size: 0.88rem;
}

body.theme-light .verdict-text {
  color: #1e293b !important;
}

.verdict-subtext {
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--text-sub);
}

body.theme-light .verdict-subtext {
  color: #475569 !important;
}

/* ==========================================================================
   TEMA CLARO - REGRAS ESPECÍFICAS DE ALTO CONTRASTE E VISIBILIDADE
   (Capacidade, Peso de Esticadores, Tensão e Carcaça, Tambores e Rolamentos)
   ========================================================================== */
body.theme-light .card {
  background-color: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.theme-light .card:hover {
  border-color: #94a3b8;
}

body.theme-light .card-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

body.theme-light .card-header h3 {
  color: #0f172a;
}

body.theme-light .form-control {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

body.theme-light .form-control:focus {
  background-color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

body.theme-light .form-group label {
  color: #1e293b;
  font-weight: 600;
}

body.theme-light .unit-badge {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

body.theme-light .helper-text,
body.theme-light .field-hint {
  color: #64748b;
}

body.theme-light .chip-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

body.theme-light .chip-btn:hover {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
}

body.theme-light .chip-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

body.theme-light .btn-outline {
  color: #334155;
  border-color: #cbd5e1;
  background: #ffffff;
}

body.theme-light .btn-outline:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

/* Card Hero de Resultados (Peso de Esticadores e Tambores) */
body.theme-light .hero-result-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%) !important;
  border: 1px solid #bfdbfe !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
}

body.theme-light .hero-header .hero-subtitle {
  color: #0284c7 !important;
}

body.theme-light .hero-header h2 {
  color: #0f172a !important;
}

body.theme-light .hero-value-box {
  background: #eff6ff !important;
  border-left-color: #2563eb !important;
  border: 1px solid #dbeafe !important;
  border-left-width: 4px !important;
}

body.theme-light .hero-symbol {
  color: #475569 !important;
}

body.theme-light .hero-number {
  color: #0284c7 !important;
}

body.theme-light .hero-unit {
  color: #475569 !important;
}

body.theme-light .hero-explanation {
  color: #334155 !important;
}

body.theme-light .metric-box {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

body.theme-light .metric-label {
  color: #64748b !important;
}

body.theme-light .metric-val {
  color: #0f172a !important;
}

body.theme-light .metric-sub {
  color: #0284c7 !important;
}

/* Conferência e Blocos Existentes */
body.theme-light .conferencia-box {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
}

body.theme-light .conferencia-details strong {
  color: #047857 !important;
}

body.theme-light .conferencia-details span {
  color: #065f46 !important;
}

body.theme-light .block-sum-item {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

body.theme-light .block-sum-item .lbl {
  color: #64748b !important;
}

body.theme-light .block-sum-item strong {
  color: #0f172a !important;
}

body.theme-light .block-sum-item strong.highlight-green {
  color: #059669 !important;
}

body.theme-light .progress-bar-container {
  background-color: #e2e8f0 !important;
}

body.theme-light .progress-labels {
  color: #475569 !important;
}

body.theme-light .progress-labels strong {
  color: #0f172a !important;
}

/* Tabelas Estilizadas (.table-styled, .table-compare, .table-faco-breakdown) */
body.theme-light .table-styled th,
body.theme-light .table-compare th,
body.theme-light .table-faco-breakdown th {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  border-bottom: 2px solid #cbd5e1 !important;
  font-weight: 700 !important;
}

body.theme-light .table-styled td,
body.theme-light .table-compare td,
body.theme-light .table-faco-breakdown td {
  border-bottom: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
}

body.theme-light .table-styled tr:hover td,
body.theme-light .table-compare tr:hover td {
  background: rgba(241, 245, 249, 0.7) !important;
}

body.theme-light .table-styled td.highlight-val {
  color: #059669 !important;
}

body.theme-light .table-styled td code {
  background: #f1f5f9;
  color: #0284c7;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

/* Fórmulas e Math Box */
body.theme-light .formula-breakdown-box {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

body.theme-light .formula-breakdown-box h4,
body.theme-light .checklist-box h4 {
  color: #334155 !important;
}

body.theme-light .math-box {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  border-left: 4px solid #0284c7 !important;
}

body.theme-light .math-box code {
  color: #0369a1 !important;
}

body.theme-light .math-box code strong {
  color: #0c4a6e !important;
}

body.theme-light .tip-box {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1e3a8a !important;
}

body.theme-light .check-item {
  color: #1e293b !important;
}

body.theme-light .check-item span {
  color: #1e293b !important;
}

/* Painel Global de ID Geral */
body.theme-light .global-id-panel {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.theme-light .global-id-header {
  border-bottom: 1px solid #e2e8f0 !important;
}

body.theme-light .global-id-heading {
  color: #0f172a !important;
}

body.theme-light .global-id-sub {
  color: #64748b !important;
}

/* Tambores: SVG e Tabela 1-44 */
.drum-svg-container {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
}

body.theme-light .drum-svg-container {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.02) !important;
}

.tabela-144-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.3);
  transition: all 0.2s ease;
}

body.theme-light .tabela-144-box,
body.theme-light #boxTabela144Dimensoes {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
}

/* Input readonly destacado */
.readonly-highlight {
  background: rgba(0, 0, 0, 0.2);
  font-weight: bold;
  color: var(--accent-cyan);
}

body.theme-light .readonly-highlight,
body.theme-light #lblPotenciaEfetivaCalc {
  background: #f1f5f9 !important;
  color: #0284c7 !important;
  border-color: #cbd5e1 !important;
}

/* Sidebar no Modo Claro */
body.theme-light .sidebar {
  background: #ffffff;
  border-right-color: #cbd5e1;
}

body.theme-light .conveyor-type-btn,
body.theme-light .module-btn {
  color: #475569;
}

body.theme-light .conveyor-type-btn:hover,
body.theme-light .module-btn:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #0f172a;
}

body.theme-light .conveyor-type-btn.active,
body.theme-light .module-btn.active {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
  color: #1d4ed8;
}

body.theme-light .sub-module-btn {
  color: #475569;
}

body.theme-light .sub-module-btn:hover {
  color: #0f172a;
  background: rgba(148, 163, 184, 0.1);
}

body.theme-light .sub-module-btn.active {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.08);
}

body.theme-light .tree-sub-placeholder {
  background: rgba(148, 163, 184, 0.1);
  color: #64748b;
}

body.theme-light .topbar {
  background: #ffffff;
  border-bottom-color: #cbd5e1;
}

body.theme-light .nav-tabs {
  background: #ffffff;
  border-bottom-color: #cbd5e1;
}

body.theme-light .tab-btn {
  color: #475569;
}

body.theme-light .tab-btn:hover {
  color: #0f172a;
}

body.theme-light .tab-btn.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

/* ==========================================================================
   ESTILOS ESPECÍFICOS: MÓDULO 6 - TRAJETÓRIA DE DESCARGA (FAÇO 1.84 A 1.87)
   ========================================================================== */
#tab-trajetoria .calc-grid {
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 1250px) {
  #tab-trajetoria .calc-grid {
    grid-template-columns: 1fr;
  }
}

/* Painel Hero de Parâmetros Físicos em Tamanho Grande */
.traj-hero-panel {
  background: linear-gradient(145deg, #16243d 0%, #0d1726 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-left: 6px solid var(--accent-orange) !important;
  border-radius: 12px;
  padding: 24px 26px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.traj-hero-subtitle {
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--accent-orange);
  text-transform: uppercase;
}

.traj-hero-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 4px 0 0 0;
  letter-spacing: -0.5px;
}

.traj-hero-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Grade de Parâmetros Físicos (Tamanho Grande e Alto Impacto) */
.traj-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

@media (max-width: 980px) {
  .traj-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .traj-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.traj-metric-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.traj-metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.traj-card-blue { border-top: 4px solid #38bdf8; }
.traj-card-cyan { border-top: 4px solid #06b6d4; }
.traj-card-emerald { border-top: 4px solid #10b981; }
.traj-card-amber { border-top: 4px solid #f59e0b; }
.traj-card-purple { border-top: 4px solid #a855f7; }
.traj-card-indigo { border-top: 4px solid #6366f1; }

.traj-metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.traj-metric-symbol {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 800;
  color: #fbbf24;
}

.traj-card-blue .traj-metric-symbol { color: #38bdf8; }
.traj-card-cyan .traj-metric-symbol { color: #06b6d4; }
.traj-card-emerald .traj-metric-symbol { color: #10b981; }
.traj-card-amber .traj-metric-symbol { color: #f59e0b; }
.traj-card-purple .traj-metric-symbol { color: #c084fc; }
.traj-card-indigo .traj-metric-symbol { color: #818cf8; }

.traj-metric-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: right;
}

.traj-metric-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 6px 0;
}

.traj-metric-value {
  font-family: var(--font-mono);
  font-size: 2.7rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  color: #38bdf8;
}

.traj-card-amber .traj-metric-value { color: #fbbf24; }
.traj-card-purple .traj-metric-value { color: #c084fc; }
.traj-card-emerald .traj-metric-value { color: #34d399; }

.traj-metric-unit {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-muted);
}

.traj-metric-formula, .traj-metric-status {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.35;
}

/* Banner de Caso Normativo Faço */
.traj-caso-banner {
  margin-top: 18px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-left: 5px solid var(--accent-orange);
  border-radius: 8px;
  padding: 16px 20px;
}

/* Container do SVG da Trajetória (Desenho Maior e mais Detalhado) */
.trajectory-svg-container {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 20% 30%, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.98) 100%);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.5);
  position: relative;
  min-height: 680px;
  padding: 10px;
}

.trajectory-svg-container svg {
  width: 100%;
  height: auto;
  min-height: 660px;
  max-height: 820px;
  display: block;
}

/* Tema Claro para Parâmetros Físicos e Desenho */
body.theme-light .traj-hero-panel {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #fed7aa;
  border-left: 6px solid #f59e0b !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.12);
}

body.theme-light .traj-hero-title {
  color: #0f172a;
}

body.theme-light .traj-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}

body.theme-light .traj-metric-value {
  color: #0284c7;
}

body.theme-light .traj-card-amber .traj-metric-value { color: #d97706; }
body.theme-light .traj-card-purple .traj-metric-value { color: #9333ea; }
body.theme-light .traj-card-emerald .traj-metric-value { color: #059669; }

body.theme-light .traj-metric-unit {
  color: #64748b;
}

body.theme-light .traj-metric-title {
  color: #64748b;
}

body.theme-light .traj-metric-formula,
body.theme-light .traj-metric-status {
  border-top-color: #f1f5f9;
  color: #475569;
}

body.theme-light .traj-caso-banner {
  background: #fffbeb;
  border-color: #fde68a;
  border-left-color: #f59e0b;
}

body.theme-light .trajectory-svg-container {
  background: radial-gradient(circle at 20% 30%, #ffffff 0%, #f1f5f9 100%);
  border-color: #cbd5e1;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.rep-trajectory-drawing-box {
  margin: 18px 0;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  text-align: center;
}

.rep-trajectory-drawing-box svg {
  width: 100%;
  max-width: 960px;
  height: auto;
  display: inline-block;
}

.trajectory-coords-wrapper {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-top: 12px;
}

.trajectory-coords-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  text-align: center;
}

.trajectory-coords-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-card);
  border-bottom: 2px solid var(--border-color);
  padding: 8px 10px;
  color: var(--text-main);
  font-weight: 700;
  z-index: 2;
}

.trajectory-coords-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
}

.trajectory-coords-table tr:hover td {
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-main);
}

body.theme-light .trajectory-coords-table thead th {
  background: #f8fafc;
  color: #0f172a;
  border-bottom-color: #cbd5e1;
}

body.theme-light .trajectory-coords-table td {
  border-bottom-color: #e2e8f0;
  color: #334155;
}

.trajectory-legend-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 6px;
  font-size: 0.82rem;
  margin-top: 10px;
}

body.theme-light .trajectory-legend-bar {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.trajectory-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

/* ==========================================================================
   ESTILOS ESPECÍFICOS: MÓDULOS 7 E 8 - OPERAÇÃO & MANUTENÇÃO PREVENTIVA
   ========================================================================== */
.guide-module-banner.module-operacao {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(15, 23, 42, 0.95));
  border-left-color: #0284c7;
}

.guide-module-banner.module-manutencao {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16), rgba(15, 23, 42, 0.95));
  border-left-color: #ef4444;
}

/* Checklist Operacional Interativo */
.op-phase-card {
  border-left: 4px solid var(--accent-blue);
  margin-bottom: 20px;
}

.op-checklist {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.op-check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.op-check-item:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
}

.op-check-item input[type="checkbox"] {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: var(--accent-blue);
  cursor: pointer;
}

.op-check-content {
  flex: 1;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-main);
}

.op-check-item.completed {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
}

.op-check-item.completed .op-check-content {
  color: var(--text-muted);
}

body.theme-light .op-check-item {
  background: #ffffff;
  border-color: #e2e8f0;
}

body.theme-light .op-check-item:hover {
  background: #f0f9ff;
  border-color: #bae6fd;
}

body.theme-light .op-check-item.completed {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

/* Barra de Filtros e Busca de Falhas (Manutenção Faço 9.23 a 9.28) */
.maint-filter-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 22px;
}

.maint-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 16px;
}

.maint-search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.92rem;
}

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

.maint-chip-btn {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.maint-chip-btn:hover {
  color: var(--text-main);
  border-color: var(--accent-blue);
}

.maint-chip-btn.active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* Cards dos 19 Defeitos da Faço */
.maint-cases-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.maint-case-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.maint-case-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.maint-case-header {
  padding: 14px 18px;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.maint-case-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.maint-case-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.maint-case-heading {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.maint-case-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.88rem;
  line-height: 1.6;
}

.maint-cause-item {
  background: rgba(15, 23, 42, 0.5);
  border-left: 3px solid #f59e0b;
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 8px;
}

.maint-cause-item strong {
  color: #fbbf24;
}

.maint-fix-box {
  margin-top: 6px;
  padding-left: 10px;
  color: var(--text-main);
}

.maint-fix-box strong {
  color: #34d399;
}

body.theme-light .maint-case-header {
  background: #f8fafc;
}

body.theme-light .maint-cause-item {
  background: #fffbeb;
  border-left-color: #f59e0b;
}

body.theme-light .maint-cause-item strong {
  color: #b45309;
}

body.theme-light .maint-fix-box strong {
  color: #059669;
}

/* Tabela de Lubrificação e Plano Preventivo */
.maint-lub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  margin-top: 10px;
}

.maint-lub-table th {
  background: var(--bg-card);
  padding: 10px 12px;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-main);
  font-weight: 700;
}

.maint-lub-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
}

.maint-lub-table tr:hover td {
  background: rgba(59, 130, 246, 0.06);
  color: var(--text-main);
}

body.theme-light .maint-lub-table th {
  background: #f1f5f9;
  color: #0f172a;
  border-bottom-color: #cbd5e1;
}

body.theme-light .maint-lub-table td {
  border-bottom-color: #e2e8f0;
  color: #334155;
}

/* ==========================================================================
   CAMADA DE AUTENTICAÇÃO, CONTROLE DE ACESSO E GESTÃO DE USUÁRIOS
   ========================================================================== */

/* Bloqueio da Aplicação enquanto não autenticado */
body.auth-locked {
  overflow: hidden !important; /* Trava o scroll da página de trás */
}

body.auth-locked .app-container {
  filter: blur(8px) saturate(0.8);
  pointer-events: none;
  user-select: none;
  transition: filter 0.4s ease;
}

/* Overlay Principal de Autenticação */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(10, 15, 29, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: flex-start; /* Permite rolar do topo sem cortar nada */
  justify-content: center;
  padding: 30px 16px;
  overflow-y: auto !important; /* Habilita a barra de rolagem vertical */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  box-sizing: border-box;
}

.auth-overlay::-webkit-scrollbar {
  width: 8px;
}
.auth-overlay::-webkit-scrollbar-track {
  background: transparent;
}
.auth-overlay::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
}
.auth-overlay::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

.auth-overlay.active {
  opacity: 1;
  visibility: visible;
}

body.theme-light .auth-overlay {
  background: rgba(241, 245, 249, 0.88);
}

/* Card de Login e Solicitação */
.auth-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 26px 24px;
  margin: auto; /* Centraliza verticalmente se couber, e permite rolar se ultrapassar a tela */
  animation: authCardPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

body.theme-light .auth-card {
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
  background: #ffffff;
}

@keyframes authCardPop {
  0% { transform: scale(0.94) translateY(12px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.auth-header {
  text-align: center;
  margin-bottom: 18px;
}

.auth-logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}

.auth-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  object-fit: cover;
}

.auth-brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-main);
  line-height: 1.2;
  margin: 0;
}

.auth-brand-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  background: rgba(59, 130, 246, 0.18);
  color: var(--accent-blue);
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 2px;
}

.auth-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 6px 0 0;
  line-height: 1.4;
}

/* Abas Segmentadas do Auth */
.auth-tabs {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 20px;
}

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

.auth-tab-btn:hover {
  color: var(--text-main);
}

.auth-tab-btn.active {
  background: var(--bg-card);
  color: var(--accent-blue);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

body.theme-light .auth-tab-btn.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Campos de Entrada do Auth */
.auth-form-panel {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.auth-field label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 12px;
  font-size: 0.95rem;
  pointer-events: none;
  opacity: 0.75;
}

.auth-input-wrapper input {
  padding-left: 38px;
  padding-right: 38px;
  width: 100%;
  height: 38px;
  font-size: 0.86rem;
  border-radius: 8px;
  box-sizing: border-box;
}

.auth-toggle-pass {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  opacity: 0.7;
  padding: 4px;
  border-radius: 4px;
  transition: opacity 0.2s;
}

.auth-toggle-pass:hover {
  opacity: 1;
}

/* Linha de Opções (Lembrar Sessão / Esqueci Senha) */
.auth-options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.auth-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-muted);
}

.auth-checkbox-label input {
  cursor: pointer;
}

.auth-link {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s;
}

.auth-link:hover {
  text-decoration: underline;
}

/* Mensagens de Alerta / Feedback */
.auth-alert-box {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.4;
  text-align: left;
  animation: fadeIn 0.25s ease;
}

.auth-alert-box.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

body.theme-light .auth-alert-box.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.auth-alert-box.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

body.theme-light .auth-alert-box.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
}

.auth-alert-box.info {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

body.theme-light .auth-alert-box.info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.auth-alert-box.warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

body.theme-light .auth-alert-box.warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.auth-submit-btn {
  height: 44px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 4px;
}

.auth-switch-mode {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.auth-link-bold {
  color: var(--accent-blue);
  font-weight: 600;
  text-decoration: none;
}

.auth-link-bold:hover {
  text-decoration: underline;
}

.auth-footer-info {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 0.7rem;
  color: var(--text-sub);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ==========================================================================
   PERFIL DE USUÁRIO NA SIDEBAR
   ========================================================================== */
.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

body.theme-light .sidebar-user-card {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.user-avatar-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.user-info-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.user-actions {
  display: flex;
  gap: 4px;
}

.user-action-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  color: var(--text-muted);
}

.user-action-btn:hover {
  background: var(--bg-input);
  border-color: var(--border-color);
  color: var(--text-main);
}

.user-action-btn.logout:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* ==========================================================================
   MODAL DE GERENCIAMENTO DE ACESSOS E USUÁRIOS (ADMIN)
   ========================================================================== */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999998;
  background: rgba(10, 15, 29, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

body.theme-light .admin-modal-overlay {
  background: rgba(241, 245, 249, 0.8);
}

.admin-modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: authCardPop 0.3s ease;
}

body.theme-light .admin-modal-card {
  background: #ffffff;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

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

.admin-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.admin-modal-header p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-close-modal:hover {
  background: var(--bg-input);
  color: var(--text-main);
}

.admin-modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  padding: 0 20px;
  gap: 8px;
  background: var(--bg-primary);
}

body.theme-light .admin-modal-tabs {
  background: #f8fafc;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.admin-tab-btn:hover {
  color: var(--text-main);
}

.admin-tab-btn.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
  font-weight: 700;
}

.badge-count {
  display: inline-block;
  background: var(--accent-blue);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.admin-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.admin-panel-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-empty-state {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.admin-requests-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-request-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.theme-light .admin-request-card {
  background: #f8fafc;
}

.admin-req-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-req-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

.admin-req-date {
  font-size: 0.72rem;
  color: var(--text-sub);
}

.admin-req-details {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.admin-req-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
}

body.theme-light .admin-user-row {
  background: #f8fafc;
}

.admin-user-col-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-user-col-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-role-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
}

.admin-role-badge.master {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.admin-new-user-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}


