:root {
  --primary: #0e1f3d;          /* Azul Marino MAN */
  --primary-light: #162f5c;
  --accent: #f39200;           /* Naranja MAN Corporativo */
  --accent-hover: #d58000;
  --accent-light: rgba(243, 146, 0, 0.1);
  --bg: #f4f6f9;               /* Fondo gris claro de la captura */
  --card-bg: #ffffff;
  --text-main: #1e293b;        /* Slate oscuro para excelente legibilidad */
  --text-muted: #64748b;       /* Slate grisáceo para información secundaria */
  --border: #e2e8f0;
  --success: #10b981;          /* Verde esmeralda moderno para éxito */
  --success-light: rgba(16, 185, 129, 0.1);
  --danger: #ef4444;           /* Rojo moderno */
  --danger-light: rgba(239, 68, 68, 0.1);
  --warning: #f59e0b;          /* Ámbar de advertencia */
  --radius: 12px;              /* Bordes redondeados modernos */
  --radius-sm: 8px;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 10px 25px -5px rgba(14, 31, 61, 0.06), 0 8px 16px -6px rgba(14, 31, 61, 0.04);
  --shadow-lg: 0 25px 50px -12px rgba(14, 31, 61, 0.15);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset y Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Cabecera Premium Completa (Basada en captura.png) */
.app-header {
  background-color: var(--primary);
  width: 100%;
  color: #ffffff;
  padding: 1.75rem 2rem;
  box-shadow: 0 4px 20px rgba(14, 31, 61, 0.15);
  position: relative;
  z-index: 10;
}

.header-main {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.logo-title-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.title-meta h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 0.15rem;
}

.title-meta p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Bloque de estadísticas translúcidas de la cabecera */
.header-stats {
  display: flex;
  gap: 1rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius);
  text-align: center;
  min-width: 130px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.stat-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.stat-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.35rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Shell y Contenedor Principal */
.app-shell {
  max-width: 1000px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex-grow: 1;
}

/* Animaciones y Transiciones de Sección */
section:not(.hidden) {
  animation: fadeInUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

/* Tarjetas y Contenedores */
.entry-card, .admin-panel, .zone-list, .audit-card, .report-card {
  background: var(--card-bg);
  padding: 2.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Formularios, Inputs y Selects */
.login-row, .filter-row {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

input[type="text"],
input[type="password"],
input[type="date"],
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--text-main);
  background-color: #f8fafc;
  transition: var(--transition);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(243, 146, 0, 0.15);
}

/* Login Exclusivo */
#entryCard {
  max-width: 450px;
  margin: 4rem auto;
  border-top: 4px solid var(--accent);
}

.login-row input {
  background-color: #ffffff;
}

/* Botones Premium */
button {
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  transition: var(--transition);
  padding: 0.85rem 1.5rem;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#loginBtn, #createAuditBtn, #saveButton, #completeButton {
  background-color: var(--accent);
  color: #ffffff;
  width: 100%;
  box-shadow: 0 4px 12px rgba(243, 146, 0, 0.25);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

#loginBtn:hover, #createAuditBtn:hover, #saveButton:hover, #completeButton:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(243, 146, 0, 0.35);
}

#loginBtn:active, #createAuditBtn:active, #saveButton:active, #completeButton:active {
  transform: translateY(0);
}

/* Botones Pequeños y de Control */
.small-btn {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  background-color: #ffffff;
  color: var(--primary);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 6px;
  font-weight: 600;
}

.small-btn:hover {
  background-color: #f8fafc;
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

/* Botón Danger para Papelera y Cierre de Sesión */
.small-btn.btn-danger, button.btn-danger {
  background-color: #fee2e2;
  color: #ef4444;
  border: 1.5px solid #fca5a5;
}

.small-btn.btn-danger:hover, button.btn-danger:hover {
  background-color: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.small-btn.delete {
  color: #ef4444;
  border-color: #fecaca;
  background-color: #fff5f5;
}

.small-btn.delete:hover {
  background-color: #ef4444;
  color: white;
  border-color: #ef4444;
}

/* Botones de Finalización de Auditoría */
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}

#saveButton {
  background-color: var(--primary);
  box-shadow: 0 4px 12px rgba(14, 31, 61, 0.2);
}

#saveButton:hover {
  background-color: var(--primary-light);
  box-shadow: 0 6px 18px rgba(14, 31, 61, 0.3);
}

#completeButton {
  background-color: var(--success);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

#completeButton:hover {
  background-color: #059669;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3);
}

#backButton, #backToDashboardBtn {
  background-color: var(--success);
  border: 1.5px solid var(--success);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

#backButton:hover, #backToDashboardBtn:hover {
  background-color: #059669;
  border-color: #059669;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

.nav-success-btn {
  background-color: var(--success) !important;
  border-color: var(--success) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2) !important;
}

.nav-success-btn:hover {
  background-color: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3) !important;
}

/* Dashboard Panel */
.dashboard-actions {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  margin-bottom: 2rem;
}

.dashboard-actions label {
  font-size: 0.85rem;
}

.dashboard-actions input[type="date"] {
  max-width: 250px;
  margin-right: 1rem;
  display: inline-block;
}

.dashboard-actions button {
  width: auto;
  vertical-align: middle;
}

.pending-list-wrap {
  margin-top: 2rem;
}

.pending-list-wrap h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 700;
  border-left: 3px solid var(--accent);
  padding-left: 0.5rem;
}

.pending-list-wrap ul {
  list-style: none;
}

.pending-list-wrap li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  font-weight: 500;
  font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.pending-list-wrap li:hover {
  border-color: var(--accent);
  transform: translateX(3px);
}

.pending-list-wrap li div {
  display: flex;
  gap: 0.5rem;
}

/* Zone Items - Listado de Zonas Premium */
.zone-item {
  display: flex;
  align-items: center;
  padding: 1.25rem;
  background: #ffffff;
  border-radius: 14px;
  margin-bottom: 1.25rem;
  border: 1.5px solid #e2e8f0;
  gap: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.zone-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--text-muted);
}

.zone-item.completed {
  border-color: #cbd5e1;
}

.zone-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background-color: #475569; /* Gris slate elegante de la página */
  color: #ffffff;
  border-radius: 12px;
  flex-shrink: 0;
  transition: var(--transition);
}

.zone-item:hover .zone-icon-container {
  background-color: var(--primary); /* Cambia al azul corporativo en hover */
}

.zone-icon-container svg {
  width: 24px;
  height: 24px;
}

.zone-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0; /* Permite truncar o ajustar texto si es necesario */
}

.zone-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.zone-item h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  line-height: 1.2;
}

.zone-completed-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--success-light);
  border: 2.5px solid var(--success);
  color: var(--success);
  flex-shrink: 0;
}

.zone-completed-check svg {
  width: 10px;
  height: 10px;
}

.zone-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0;
}

.zone-progress-container {
  width: 100%;
  height: 6px;
  background-color: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 0.4rem;
}

.zone-progress-bar {
  height: 100%;
  background-color: var(--accent); /* Naranja MAN corporativo */
  border-radius: 9999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.zone-item.completed .zone-progress-bar {
  background-color: var(--success); /* Verde éxito */
}

.zone-chevron {
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.zone-item:hover .zone-chevron {
  transform: translateX(4px);
  color: var(--primary);
}

.zone-chevron svg {
  width: 20px;
  height: 20px;
}

/* Formulario de Preguntas en la Auditoría */
.question-block {
  padding: 1.5rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  transition: var(--transition);
}

.question-block:hover {
  background-color: #ffffff;
  border-color: var(--accent-light);
  box-shadow: var(--shadow-sm);
}

.question-block label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.98rem;
  color: var(--text-main);
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

/* Selector de Estrellas Premium (Calificación 1 a 5) */
.star-rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.star-rating input {
  display: none;
}

.star-rating label {
  font-size: 2.2rem;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin: 0;
  line-height: 1;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
  color: #fbbf24;
  transform: scale(1.18);
  filter: drop-shadow(0 2px 4px rgba(251, 191, 36, 0.25));
}

.star-rating label:active {
  transform: scale(0.9);
}

/* Upload de Fotos */
.photo-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.photo-picker-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.photo-picker-btn {
  background-color: #ffffff;
  border: 2px dashed #cbd5e1;
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  color: var(--primary);
  cursor: pointer;
  font-weight: 700;
  transition: var(--transition);
}

.photo-picker-btn:hover:not(.disabled) {
  border-color: var(--accent);
  background-color: #fffdf9;
  color: var(--accent);
}

.photo-picker-btn.disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.camera-status {
  margin: 0.75rem 0 0;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 600;
}

.camera-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(14, 31, 61, 0.78);
}

.camera-card {
  width: min(720px, 100%);
  background: #ffffff;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 1rem;
}

#cameraPreview {
  display: block;
  width: 100%;
  max-height: 70vh;
  background: #0f172a;
  border-radius: 8px;
  object-fit: contain;
}

.camera-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.photo-preview {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.photo-thumb {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 8px;
  overflow: visible;
  box-shadow: var(--shadow-sm);
  border: 2px solid #ffffff;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.photo-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.photo-remove:hover {
  background-color: #b91c1c;
  transform: scale(1.1);
}

/* Report Modal (Frosted Glass Overlay) */
.report-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(14, 31, 61, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  padding: 2rem 1rem;
  z-index: 1000;
}

.report-card {
  width: 100%;
  max-width: 850px;
  margin-top: 1rem;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: #ffffff;
  animation: modalEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 1rem;
}

.report-header h2 {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Report & Admin Tables */
.report-table, .admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.report-table th, .admin-table th {
  background-color: var(--primary);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  padding: 1rem;
}

.report-table td, .admin-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  font-weight: 500;
  background-color: #ffffff;
}

.report-table tr:last-child td, .admin-table tr:last-child td {
  border-bottom: none;
}

.report-table tr:nth-child(even) td, .admin-table tr:nth-child(even) td {
  background-color: #f8fafc;
}

.report-chart {
  max-width: 650px;
  margin: 0 auto 2.5rem auto;
  background-color: #f8fafc;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.report-chart h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--primary);
}

.report-details {
  border-top: 1.5px solid #f1f5f9;
  padding-top: 1.5rem;
}

.report-details h3 {
  font-family: 'Outfit', sans-serif;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.report-details h4 {
  font-family: 'Outfit', sans-serif;
  color: var(--primary-light);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

/* Admin Tabs styling */
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1.5rem;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  box-shadow: none;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--primary);
  background-color: #f8fafc;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

/* Admin Filters */
.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  background-color: #f8fafc;
  padding: 1.5rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  margin-bottom: 2rem;
}

.admin-filters .filter-row {
  flex: 1 1 200px;
  margin-bottom: 0;
}

.admin-actions-row {
  flex: 1 1 100%;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
}

.admin-actions-row button {
  margin-bottom: 0;
  margin-right: 0;
}

.admin-list-wrap {
  margin-top: 1.5rem;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  min-width: 760px;
}

.admin-summary {
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Badge States */
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-pending {
  background-color: #fef3c7;
  color: #d97706;
}

.badge-completed {
  background-color: var(--success-light);
  color: var(--success);
}

/* System Messages / Alerts */
.system-msg {
  padding: 1rem 1.5rem;
  background-color: #fffbeb;
  border-left: 4px solid var(--warning);
  color: #b45309;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.system-msg .close-btn {
  background: none;
  border: none;
  color: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  font-size: 0.85rem;
}

/* Custom Scrollbar for modern touch */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Print utility styles */
@media print {
  body {
    background: white;
    color: black;
  }
  .app-header, button, .actions, .admin-filters, .dashboard-actions, #backButton {
    display: none !important;
  }
  .report-modal {
    position: static;
    background: none;
    padding: 0;
  }
  .report-card {
    box-shadow: none;
    border: none;
    margin-top: 0;
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .app-header {
    padding: 1.25rem 1rem;
  }
  
  .header-main {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-stats {
    width: 100%;
    justify-content: space-between;
  }
  
  .stat-card {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.5rem;
  }
  
  .stat-val {
    font-size: 1.3rem;
  }
  
  .stat-label {
    font-size: 0.65rem;
  }
  
  .app-shell {
    margin: 1rem auto;
    padding: 0 0.75rem;
  }
  
  .entry-card, .admin-panel, .zone-list, .audit-card, .report-card {
    padding: 1rem;
    border-radius: 8px;
  }

  .admin-panel h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }

  .admin-tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    border-bottom: none;
    margin-bottom: 1rem;
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .tab-btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-content: flex-start;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.7rem 0.85rem;
    background-color: #ffffff;
    font-size: 0.9rem;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.2;
  }

  .tab-btn.active {
    border-color: var(--accent);
    background-color: #fff7ed;
    box-shadow: var(--shadow-sm);
  }

  .tab-btn svg {
    flex: 0 0 auto;
    margin-right: 0.35rem !important;
  }
  
  .actions {
    grid-template-columns: 1fr;
  }
  
  .dashboard-actions input[type="date"] {
    max-width: 100%;
    margin-right: 0;
    margin-bottom: 1rem;
  }
  
  .dashboard-actions button {
    width: 100%;
  }
  
  .admin-filters {
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
  }

  .admin-filters .filter-row {
    flex: 1 1 auto;
    width: 100%;
  }

  .filter-row label,
  .login-row label {
    font-size: 0.78rem;
  }

  .admin-filters select,
  .admin-filters input {
    width: 100%;
    min-height: 42px;
  }
  
  .admin-actions-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    margin-top: 0.35rem;
    padding-top: 0.85rem;
  }
  
  .admin-actions-row button {
    width: 100%;
    margin-right: 0;
  }

  .admin-list-wrap {
    margin-top: 1rem;
  }

  .admin-summary {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .admin-table-wrap {
    margin-left: -1rem;
    margin-right: -1rem;
    width: calc(100% + 2rem);
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .admin-table {
    min-width: 720px;
  }

  #adminWorkshopsSection .admin-table {
    min-width: 420px;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.7rem 0.75rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .admin-table td:first-child,
  .admin-table th:first-child {
    padding-left: 1rem;
  }

  .admin-table td:last-child,
  .admin-table th:last-child {
    padding-right: 1rem;
  }

  .admin-table .small-btn {
    min-height: 36px;
    margin-bottom: 0;
    white-space: nowrap;
  }

  #adminWorkshopsSection .users-header-row,
  #adminUsersSection .users-header-row {
    align-items: stretch !important;
    margin-bottom: 1rem !important;
  }

  #adminWorkshopsSection .users-header-row > div {
    width: 100%;
  }

  #newWorkshopName {
    width: 100%;
    min-width: 0 !important;
  }

  #createWorkshopBtn,
  #adminCreateUserBtn {
    width: 100%;
    justify-content: center;
    margin-right: 0 !important;
  }
}

/* Estilos para iconos en cabeceras de auditoría y reporte */
.audit-title-icon-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background-color: var(--primary);
  color: #ffffff;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.audit-title-icon-container svg {
  width: 20px;
  height: 20px;
}

#auditTitle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.report-zone-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Outfit', sans-serif;
  color: var(--primary-light);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.report-zone-icon-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: #475569;
  color: #ffffff;
  border-radius: 6px;
  flex-shrink: 0;
}

.report-zone-icon-container svg {
  width: 16px;
  height: 16px;
}

/* Utilidades generales */
.hidden {
  display: none !important;
}

/* Estilos premium para las fotos en el informe */
.report-photo {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.report-photo img {
  width: 180px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.report-photo img:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow);
}
