/* Hojas de estilo premium para Labra Ascensores */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg-base: #090d16;
  --bg-card: #151b26;
  --bg-card-hover: #1e2636;
  --border-color: rgba(255, 255, 255, 0.07);
  --color-primary: #f97316; /* Naranja Industrial */
  --color-primary-hover: #ea580c;
  --color-success: #10b981; /* Verde Operativo */
  --color-danger: #ef4444; /* Rojo Emergencia/Detenido */
  --color-info: #06b6d4; /* Cian Proyectos */
  --color-warning: #f59e0b; /* Amarillo Advertencia */
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-inverse: #090d16;
  --glass-bg: rgba(21, 27, 38, 0.7);
  --glass-border: rgba(255, 255, 255, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset general */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

#main-app-layout {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Encabezado */
header {
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.8rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  background: linear-gradient(135deg, var(--color-primary), #fb923c);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.4);
}

.logo-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(to right, #ffffff, #e5e7eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text span {
  font-size: 0.75rem;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  font-weight: 600;
  margin-top: -2px;
}

/* Conmutador de Roles */
.role-switch-container {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 0.25rem;
  border-radius: 30px;
}

.role-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.role-btn svg {
  width: 14px;
  height: 14px;
}

.role-btn.active {
  background: var(--color-primary);
  color: var(--text-inverse);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Layout Principal */
.app-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  overflow-x: hidden;
}

/* Secciones de Vistas */
.view-section {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.view-section.active {
  display: block;
}

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

/* Tarjetas */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-smooth);
}

.card:hover {
  background-color: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Títulos y Subtítulos */
h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

h2 svg {
  color: var(--color-primary);
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
  color: #fff;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  line-height: 1.45;
}

/* Vista Técnico: Diseño Mobile-First */
.tech-dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .tech-dashboard {
    grid-template-columns: 350px 1fr;
  }
}

/* Barra lateral de edificios */
.building-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.building-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.building-item:hover, .building-item.active {
  background-color: rgba(249, 115, 22, 0.05);
  border-color: var(--color-primary);
}

.building-info h4 {
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.building-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 20px;
}

.badge-pending {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Área de contenido de mantención */
.maintenance-workspace {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.no-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: var(--text-muted);
  text-align: center;
  gap: 1rem;
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  padding: 2rem;
}

.no-selection svg {
  width: 48px;
  height: 48px;
  color: rgba(255, 255, 255, 0.1);
}

/* Checklist de Tareas */
.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.checklist-item:has(input:checked) {
  border-color: rgba(16, 185, 129, 0.3);
  background-color: rgba(16, 185, 129, 0.02);
}

.checklist-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  margin-top: 0.1rem;
  cursor: pointer;
}

.checklist-item label {
  font-size: 0.9rem;
  color: var(--text-main);
  cursor: pointer;
  flex: 1;
}

.checklist-item input:checked + label {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Sección de Firmas */
.signatures-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .signatures-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.signature-pad-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.signature-pad-container label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.canvas-wrapper {
  position: relative;
  background-color: #ffffff;
  border: 2px solid #000000;
  border-radius: 8px;
  overflow: hidden;
  height: 150px;
}

.canvas-wrapper canvas {
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.canvas-controls {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.btn-text:hover {
  color: var(--color-danger);
  background-color: rgba(239, 68, 68, 0.05);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
  width: 100%;
}

@media (min-width: 480px) {
  .btn {
    width: auto;
  }
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.btn-primary:disabled {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-danger {
  background-color: var(--color-danger);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

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

.btn-success {
  background-color: var(--color-success);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background-color: #059669;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Vista Administrador: Layout de Rejilla */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Tarjetas de Estadísticas */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.orange {
  background-color: rgba(249, 115, 22, 0.1);
  color: var(--color-primary);
}

.stat-icon.green {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.stat-icon.red {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
}

.stat-icon.blue {
  background-color: rgba(6, 186, 212, 0.1);
  color: var(--color-info);
}

.stat-info h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  line-height: 1.2;
}

.stat-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Módulo Proyectos */
.projects-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Tablero Kanban para 11 Etapas con Scroll Horizontal fluido */
.kanban-board-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.kanban-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 1.25rem 0.25rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.kanban-board::-webkit-scrollbar {
  height: 8px;
}

.kanban-board::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.kanban-board::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.3);
  border-radius: 4px;
}

.kanban-board::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.5);
}

.kanban-col {
  min-width: 275px;
  max-width: 290px;
  flex: 0 0 275px;
  background-color: rgba(255, 255, 255, 0.015);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 420px;
  transition: all 0.2s ease;
}

.kanban-col-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-color);
}

.kanban-col-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-stage-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--color-info);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.kanban-count-badge {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

.kanban-col-header h3 {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
  min-height: 2.2rem;
  display: flex;
  align-items: center;
}

.kanban-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem;
  cursor: grab;
  transition: var(--transition-smooth);
}

.kanban-card:hover {
  border-color: var(--color-info);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.15);
}

.kanban-card h4 {
  font-size: 0.88rem;
  color: #fff;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.kanban-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* Timeline / Bitácora de Etapas en Modal */
.bitacora-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.bitacora-item {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid rgba(6, 182, 212, 0.3);
  margin-left: 0.5rem;
}

.bitacora-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-info);
  box-shadow: 0 0 8px var(--color-info);
}

.bitacora-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.bitacora-stage {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-info);
}

.bitacora-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.bitacora-text {
  font-size: 0.8rem;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  margin-top: 0.25rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.bitacora-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.bitacora-btn-action {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  font-size: 0.68rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.bitacora-btn-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

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

.bitacora-btn-edit:hover {
  background: rgba(6, 182, 212, 0.15);
  color: var(--color-info);
  border-color: rgba(6, 182, 212, 0.3);
}

.bitacora-edit-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(6, 182, 212, 0.35);
  border-radius: 8px;
  padding: 0.65rem;
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Barra de progreso */
.progress-bar-container {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.05);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  background: linear-gradient(to right, var(--color-info), #22d3ee);
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease-out;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.project-percent {
  font-weight: 700;
  color: var(--color-info);
}

/* Módulo Emergencias 24/7 */
.emergencies-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .emergencies-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.emergency-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.form-group input:not([type="radio"]):not([type="checkbox"]), .form-group select, .form-group textarea {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.75rem;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.form-group select {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.form-group select option, select option {
  background-color: #151b26; /* var(--bg-card) */
  color: #f3f4f6; /* var(--text-main) */
}


.form-group input:not([type="radio"]):not([type="checkbox"]):focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.15);
}

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

@media (min-width: 480px) {
  .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Selector de estado (Toggle) */
.elevator-status-toggle {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.status-toggle-btn {
  flex: 1;
  border: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  padding: 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.status-toggle-btn.active-operativo {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: var(--color-success);
  color: var(--color-success);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.1);
}

.status-toggle-btn.active-detenido {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: var(--color-danger);
  color: var(--color-danger);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.1);
}

/* Historial de Emergencias y Reparaciones */
.logs-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.log-item {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  position: relative;
  transition: var(--transition-smooth);
}

.log-item:hover {
  border-color: rgba(255,255,255,0.1);
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.log-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.log-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.log-body {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.log-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 0.5rem;
}

.log-tech {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
}

/* Gráficos en la vista Admin */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .charts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.chart-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.chart-container {
  position: relative;
  flex: 1;
  width: 100%;
  height: 220px;
}

/* Sub-navegación dentro de Admin/Técnico */
.tab-navigation {
  display: flex;
  gap: 0.5rem;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.35rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

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

.tab-btn:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.tab-btn.active.tab-tech {
  background-color: rgba(249, 115, 22, 0.1);
  color: var(--color-primary);
}

.tab-btn.active.tab-admin {
  background-color: rgba(6, 182, 212, 0.1);
  color: var(--color-info);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-container {
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

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

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

.modal-header h3 {
  font-size: 1.2rem;
  color: #fff;
}

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

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

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 576px) {
  .modal-footer {
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 1rem !important;
  }
  .modal-footer button, 
  .modal-footer .btn {
    flex: 1 1 calc(50% - 0.5rem) !important;
    min-width: 100px !important;
    margin: 0 !important;
    text-align: center !important;
    justify-content: center !important;
    font-size: 0.75rem !important;
    padding: 0.5rem 0.25rem !important;
    display: inline-flex !important;
    align-items: center !important;
  }
}

/* Firma generada (Preview de firmas) */
.signature-img-preview {
  max-height: 80px;
  border: 2px solid #000000;
  border-radius: 8px;
  background-color: #ffffff;
  padding: 0.25rem;
  object-fit: contain;
  width: 100%;
}

/* Detalle de Edificio Completado en Técnico */
.completed-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: rgba(16, 185, 129, 0.03);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 1.25rem;
}

.completed-info h4 {
  color: var(--color-success);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.completed-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.completed-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.signature-box-completed {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.signature-box-completed span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Notificación Flotante */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #1e293b;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1000000;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  font-weight: bold;
}

.toast-success .toast-icon { color: var(--color-success); }
.toast-error .toast-icon { color: var(--color-danger); }
.toast-info .toast-icon { color: var(--color-info); }

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Pantalla de Login Overlay */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(13, 20, 35, 0.98) 0%, rgba(5, 8, 15, 1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 1.5rem;
  overflow-y: auto;
  animation: fadeIn 0.4s ease-out forwards;
}

.login-card {
  background: rgba(21, 27, 38, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  padding: 2.5rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  text-align: center;
  animation: scaleUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

.login-logo {
  margin-bottom: 1.5rem;
}

.login-logo img {
  height: 60px;
  object-fit: contain;
}

.login-card h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: #fff;
  letter-spacing: -0.02em;
  display: block;
  text-align: center;
}

.login-card .subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

/* Tabs de selección de rol */
.login-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  padding: 0.3rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.login-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.login-tab-btn svg {
  width: 16px;
  height: 16px;
}

.login-tab-btn.active {
  background: var(--color-primary);
  color: var(--text-inverse);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Paneles de formulario */
.login-panel {
  display: none;
  text-align: left;
  animation: fadeIn 0.3s ease-out;
}

.login-panel.active {
  display: block;
}

.test-credentials {
  margin-top: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: 8px;
  text-align: center;
}

.test-credentials p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.test-credentials strong {
  color: var(--color-warning);
}

/* Tabla de Historial Administrativo */
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background-color: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.admin-table td {
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.admin-table tbody tr {
  transition: var(--transition-smooth);
}

.admin-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.015);
}

#admin-page-emergencies-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-height: none;
  overflow-y: visible;
  padding-right: 0;
}

@media (min-width: 1200px) {
  #admin-page-emergencies-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   SISTEMA DE DISEÑO DE MÉTRICAS Y REPORTES TÉCNICOS (ESTILO LABRA OSCURO)
   ========================================================================== */

/* Contenedor del panel de métricas */
.metrics-layout-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (min-width: 1024px) {
  .metrics-layout-wrapper {
    grid-template-columns: 360px 1fr;
    height: calc(100vh - 170px);
    align-items: stretch;
  }

  .metrics-editor-panel {
    overflow-y: auto;
    padding-right: 0.5rem;
  }

  .metrics-preview-panel {
    overflow: auto;
    background: #060911;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 3.5rem 1rem 1rem 1rem;
    display: block;
    min-height: 550px;
    position: relative;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
  }

  /* Controles de zoom premium */
  .metrics-zoom-controls {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.6rem;
    border-radius: 20px;
    z-index: 10;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  }

  .metrics-zoom-controls .zoom-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
  }

  .metrics-zoom-controls .zoom-btn:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.08);
  }

  .metrics-zoom-controls .zoom-btn svg {
    width: 16px;
    height: 16px;
  }

  .metrics-zoom-controls span {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    min-width: 38px;
    text-align: center;
  }
}

/* Acordeones del panel del editor */
.metrics-edit-details {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.metrics-edit-details summary {
  padding: 0.85rem 1.25rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  user-select: none;
  font-size: 0.9rem;
}

.metrics-edit-details[open] summary {
  border-bottom: 1px solid var(--border-color);
  background: rgba(249, 115, 22, 0.05);
  color: var(--color-primary);
}

.metrics-details-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.editor-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.editor-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.editor-divider {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-top: 0.5rem;
  border-bottom: 1px solid rgba(249, 115, 22, 0.2);
  padding-bottom: 0.25rem;
  letter-spacing: 0.05em;
}

.elevator-inputs-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
}

.elevator-input-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.elevator-input-item label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.elevator-input-item input {
  width: 100%;
  text-align: center;
  padding: 0.25rem;
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   VISTA PREVIA DEL INFORME TÉCNICO HORIZONTAL (1200px x 750px)
   -------------------------------------------------------------------------- */
.metrics-preview-card {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  overflow: hidden;
}

.metrics-landscape-report {
  width: 1120px;
  background-color: #0b0f19;
  color: #e5e7eb;
  font-family: 'Inter', sans-serif;
  padding: 20px;
  box-sizing: border-box;
  border: 2px solid #f97316;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  
  /* Ajuste de escala automático para la vista previa en la app */
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  transform-origin: top left;
}

/* Header del reporte */
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #f97316;
  padding-bottom: 10px;
}

.report-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 25%;
}

.report-logo-circle {
  border: 2px solid #f97316;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  position: relative;
  background-color: transparent;
}

.report-logo-circle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 2px;
  background-color: #f97316;
  transform: translate(-50%, -50%);
}

.report-logo-circle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 26px;
  background-color: #f97316;
  transform: translate(-50%, -50%);
}

.report-logo-circle .logo-cross {
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border: 1.5px solid #f97316;
  border-radius: 50%;
}

.report-header-logo-text {
  display: flex;
  flex-direction: column;
}

.report-header-logo-text .logo-bold {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: 0.05em;
}

.report-header-logo-text .logo-subtitle {
  font-size: 0.65rem;
  font-weight: 700;
  color: #f97316;
  line-height: 1;
  margin-top: 2px;
}

.report-header-center {
  text-align: center;
  width: 50%;
}

.report-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: 0.05em;
  font-family: 'Outfit', sans-serif;
}

.report-subtitle {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f2a325;
  margin: 2px 0 0 0;
  letter-spacing: 0.1em;
}

.report-period-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.3);
  padding: 3px 10px;
  border-radius: 6px;
  margin-top: 6px;
  font-size: 0.7rem;
  color: #fff;
  text-transform: uppercase;
}

.report-period-box svg {
  width: 12px;
  height: 12px;
  color: #f97316;
}

.report-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  width: 25%;
  font-size: 0.8rem;
  font-weight: 600;
  color: #f2a325;
}

.report-header-right svg {
  width: 14px;
  height: 14px;
}

/* Grillas y Secciones */
.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.report-section {
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 6px;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #f97316;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(249, 115, 22, 0.2);
  padding-bottom: 4px;
}

.section-title .title-num {
  background-color: #f97316;
  color: #000;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 900;
}

/* KPI Box */
.report-kpis-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.section-emergencias .report-kpis-row {
  grid-template-columns: repeat(5, 1fr);
}

.report-kpi-box {
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.report-kpi-box svg {
  width: 14px;
  height: 14px;
  color: #f97316;
  margin-bottom: 2px;
}

.report-kpi-box svg.icon-danger {
  color: var(--color-danger);
}

.report-kpi-box svg.icon-orange {
  color: #f97316;
}

.report-kpi-box .kpi-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.report-kpi-box .kpi-value.value-danger {
  color: var(--color-danger);
}

.report-kpi-box .kpi-label {
  font-size: 5.8px;
  color: #9ca3af;
  font-weight: 700;
  margin-top: 3px;
  line-height: 1.1;
  text-transform: uppercase;
}

/* Sub-grillas */
.section-mpp-subgrid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 15px;
  flex: 1;
}

.section-emergencias-subgrid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 10px;
  flex: 1;
}

.card-subtitle {
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px 0;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 3px 6px;
  border-left: 2.5px solid #f97316;
}

/* Tablas */
.table-scroll-container {
  max-height: 105px;
  overflow-y: auto;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 7px;
  color: #fff;
}

.report-table th {
  background-color: #d97706;
  color: #000;
  font-weight: 900;
  padding: 3px 4px;
  text-align: left;
}

.report-table td {
  padding: 3.5px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-weight: 600;
}

.report-table tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.01);
}

/* Contenedores de gráficos */
.chart-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.doughnut-wrapper {
  height: 165px;
}

.bar-horizontal-wrapper {
  height: 155px;
}

.bar-vertical-wrapper {
  height: 150px;
}

.report-grid-row1,
.report-grid-row-mid {
  margin-bottom: 15px;
}

/* Fila de Reporte 2 */
.report-grid-row2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.horizontal-bar-large {
  height: 155px;
}

.line-mtbe {
  height: 140px;
}

.doughnut-estab {
  height: 135px;
}

.indicator-tag {
  align-self: flex-start;
  font-size: 6.5px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  margin-top: -4px;
}

.mtbe-caption {
  font-size: 5.8px;
  color: #9ca3af;
  margin: 2px 0 0 0;
  line-height: 1.1;
}

/* Estabilización */
.estabilizacion-content {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 8px;
  align-items: center;
  flex: 1;
}

.estab-list-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.estab-list-title {
  font-size: 6px;
  font-weight: 700;
  color: #f2a325;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(242, 163, 37, 0.2);
  padding-bottom: 2px;
  margin-bottom: 2px;
}

.estab-item-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  padding: 4px;
}

.estab-item-row.green-status {
  border-left: 2px solid var(--color-success);
}

.estab-item-row.orange-status {
  border-left: 2px solid #f97316;
}

.estab-status-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.green-status .estab-status-icon {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
}

.orange-status .estab-status-icon {
  background-color: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.estab-status-icon svg {
  width: 8px;
  height: 8px;
}

.estab-status-info {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.estab-status-count {
  font-size: 7px;
  font-weight: 800;
  color: #fff;
}

.estab-status-names {
  font-size: 6px;
  color: #9ca3af;
  margin-top: 1.5px;
  font-weight: 700;
}

/* Fila de Reporte 3 */
.report-grid-row3 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 15px;
}

.findings-priorizados-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  flex: 1;
}

.finding-prior-box {
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 5px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.finding-prior-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.finding-prior-num {
  background-color: #f97316;
  color: #000;
  font-size: 8px;
  font-weight: 900;
  width: 13px;
  height: 13px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.finding-prior-eq {
  font-size: 8px;
  font-weight: 800;
  color: #fff;
}

.finding-prior-icon-wrapper {
  margin-left: auto;
  color: #f97316;
  display: flex;
  align-items: center;
}

.finding-prior-icon-wrapper svg {
  width: 12px;
  height: 12px;
}

.finding-prior-desc {
  font-size: 5.8px;
  color: #d1d5db;
  line-height: 1.15;
  margin: 0;
}

.resumen-bullet-list {
  margin: 0;
  padding-left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.resumen-bullet-list li {
  font-size: 6.2px;
  color: #e5e7eb;
  line-height: 1.25;
  font-weight: 500;
}

.resumen-bullet-list li::marker {
  color: #f97316;
}

/* ==========================================================================
   ESTILOS DE IMPRESIÓN PDF (MODO LANDSCAPE)
   ========================================================================== */
@media print {
  body {
    background-color: #0b0f19 !important;
    color: #e5e7eb !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .metrics-landscape-report {
    width: 100vw !important;
    height: 100vh !important;
    border: none !important;
    padding: 15px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    transform: none !important;
  }

  /* Ajustes en los tamaños para que quepa en un solo A4 apaisado */
  .report-header {
    padding-bottom: 6px !important;
  }

  .report-logo-circle {
    width: 38px !important;
    height: 38px !important;
  }
  
  .report-title {
    font-size: 1.3rem !important;
  }

  .report-subtitle {
    font-size: 1rem !important;
  }

  .report-kpi-box {
    padding: 4px 2px !important;
  }

  .report-kpi-box .kpi-value {
    font-size: 1rem !important;
  }

  .table-scroll-container {
    max-height: 130px !important;
  }

  .doughnut-wrapper {
    height: 150px !important;
  }

  .bar-horizontal-wrapper {
    height: 160px !important;
  }

  .bar-vertical-wrapper {
    height: 155px !important;
  }

  .horizontal-bar-large {
    height: 160px !important;
  }

  .line-mtbe {
    height: 145px !important;
  }

  .doughnut-estab {
    height: 140px !important;
  }

  /* Ocultar elementos innecesarios al imprimir */
  .metrics-editor-panel,
  .metrics-layout-wrapper > :first-child,
  header,
  nav,
  .btn,
  .card:not(.metrics-preview-card),
  .session-info-container {
    display: none !important;
  }
}

/* Spinner animation for loaders */
.spin {
  animation: rotation 1.2s linear infinite;
  display: inline-block;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.suggestions-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  margin-top: 4px;
}
.suggestion-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: #fff;
  transition: background 0.15s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  text-align: left;
}
.suggestion-item:last-child {
  border-bottom: none;
}
.suggestion-item:hover {
  background: var(--bg-card-hover);
}

@media (max-width: 768px) {
  .app-container {
    padding-bottom: 90px !important;
  }
}

@media (max-width: 576px) {
  header {
    padding: 0.4rem 0.75rem !important;
  }
  header .logo-container img {
    height: 40px !important;
  }
  #header-user-display {
    font-size: 0.75rem !important;
    gap: 0.25rem !important;
  }
  #btn-logout {
    font-size: 0.7rem !important;
    padding: 0.3rem 0.6rem !important;
  }
  .tab-navigation {
    margin-bottom: 0.75rem !important;
    padding: 0.25rem !important;
    border-radius: 8px !important;
  }
  .tab-btn {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.75rem !important;
  }
  .app-container h2 {
    font-size: 1.3rem !important;
    margin-top: 0.25rem !important;
    margin-bottom: 0.25rem !important;
    gap: 0.5rem !important;
  }
  .app-container .subtitle {
    font-size: 0.75rem !important;
    margin-bottom: 0.75rem !important;
  }
}

/* Premium Select for Elevator Selection */
.elevator-premium-select {
  border: 2px solid var(--color-primary) !important;
  background-color: rgba(249, 115, 22, 0.04) !important;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.3) !important;
  animation: premiumSelectPulse 3s infinite ease-in-out;
}

@keyframes premiumSelectPulse {
  0% {
    box-shadow: 0 0 6px rgba(249, 115, 22, 0.2);
    border-color: rgba(249, 115, 22, 0.8) !important;
  }
  50% {
    box-shadow: 0 0 14px rgba(249, 115, 22, 0.5);
    border-color: var(--color-primary) !important;
  }
  100% {
    box-shadow: 0 0 6px rgba(249, 115, 22, 0.2);
    border-color: rgba(249, 115, 22, 0.8) !important;
  }
}

.spin-slow {
  animation: rotation 8s linear infinite;
  display: inline-block;
}


