/* ========================================================
   SISTEMA DE CONTROL DE ENTREGA DE CALZADO
   Estilos CSS Modernos, Limpios y Ejecutivos
   ======================================================== */

:root {
  /* Paleta de Colores Curada */
  --color-primary: #1e3a8a;        /* Azul Alcaldía Profundo */
  --color-primary-hover: #1d4ed8;
  --color-primary-light: #eff6ff;
  --color-secondary: #0f172a;      /* Pizarra Oscura */
  
  --color-success: #059669;        /* Verde Entregado */
  --color-success-subtle: #ecfdf5;
  --color-success-border: #a7f3d0;
  
  --color-warning: #d97706;        /* Ámbar Pendiente */
  --color-warning-subtle: #fffbeb;
  --color-warning-border: #fde68a;
  
  --color-danger: #dc2626;         /* Rojo Eliminar */
  --color-danger-subtle: #fef2f2;
  
  --color-purple: #7c3aed;
  --color-purple-subtle: #f5f3ff;
  
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  
  /* Sombras Modernas */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body { background-color: transparent !important;
  background: transparent !important;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Header Principal */
.top-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex-shrink: 1;
}

.brand-logo-badge {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.brand-text {
  min-width: 0;
}

.brand-text h1 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #93c5fd;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0.1rem 0 0 0;
  max-width: 480px;
}

@media (max-width: 1200px) {
  .brand-subtitle {
    max-width: 260px;
  }
}

@media (max-width: 1050px) {
  .brand-subtitle {
    display: none;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: #e2e8f0;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.pulse {
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Layout Principal */
.main-container {
  max-width: 1400px;
  margin: 1.5rem auto 3rem auto;
  padding: 0 1.25rem;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-card-subtle);
  border-color: #cbd5e1;
}

.btn-success {
  background-color: var(--color-success);
  color: #ffffff;
}

.btn-success:hover {
  background-color: #047857;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: var(--bg-card-subtle);
  border-color: #94a3b8;
}

.btn-text {
  background: none;
  border: none;
  color: var(--color-primary);
  padding: 0.25rem 0.5rem;
}

.btn-text:hover {
  text-decoration: underline;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
}

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

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

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card-success {
  border-color: var(--color-success-border);
}

.stat-card-warning {
  border-color: var(--color-warning-border);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bg-blue-subtle { background-color: var(--color-primary-light); }
.bg-green-subtle { background-color: var(--color-success-subtle); }
.bg-amber-subtle { background-color: var(--color-warning-subtle); }
.bg-purple-subtle { background-color: var(--color-purple-subtle); }

.text-blue { color: var(--color-primary); }
.text-green { color: var(--color-success); }
.text-amber { color: var(--color-warning); }
.text-purple { color: var(--color-purple); }

.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.stat-value {
  display: block;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
}

.stat-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.progress-wrap {
  width: 100%;
  height: 6px;
  background-color: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar {
  height: 100%;
  background-color: var(--color-success);
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.top-tallas-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0;
}

.talla-pill-mini {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-secondary);
}

/* Pestañas de Navegación */
.tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--color-primary);
  background: rgba(30, 58, 138, 0.04);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

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

/* Contenido de Pestañas */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

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

/* Panel de Filtros */
.filters-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

.search-box {
  position: relative;
  flex: 1 1 280px;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 0.6rem 2.2rem 0.6rem 2.4rem;
  font-family: inherit;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-card-subtle);
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--border-focus);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.clear-search-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.form-select, .form-input, .form-textarea {
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  color: var(--text-main);
  transition: var(--transition);
}

.form-select:focus, .form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Barra de Chips Rápidos */
.status-chips-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
}

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

.quick-status-pills {
  display: flex;
  gap: 0.4rem;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.pill-btn:hover {
  background: var(--bg-card-subtle);
  color: var(--text-main);
}

.pill-btn.active {
  background: var(--color-secondary);
  color: #ffffff;
  border-color: var(--color-secondary);
}

.pill-btn .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot.green { background-color: var(--color-success); }
.dot.amber { background-color: var(--color-warning); }

/* Tabla de Beneficiarios */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.data-table th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
  background-color: #f8fafc;
}

.data-table tbody tr.row-delivered {
  background-color: rgba(240, 253, 244, 0.4);
}

.data-table tbody tr.row-delivered:hover {
  background-color: rgba(236, 253, 245, 0.8);
}

/* Badges de Estado */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.badge-success {
  background-color: var(--color-success-subtle);
  color: #065f46;
  border: 1px solid var(--color-success-border);
}

.badge-warning {
  background-color: var(--color-warning-subtle);
  color: #92400e;
  border: 1px solid var(--color-warning-border);
}

.badge-primary {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid #bfdbfe;
}

.badge-talla {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-secondary);
}

.badge-talla.delivered {
  background: var(--color-success-subtle);
  border-color: var(--color-success);
  color: #065f46;
}

/* Celdas especiales */
.cell-doc {
  font-family: monospace;
  font-weight: 700;
  color: var(--color-secondary);
}

.cell-doc .doc-type {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.cell-name {
  font-weight: 700;
  color: var(--text-main);
}

.cell-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.table-actions {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.action-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.action-btn:hover {
  background: var(--bg-card-subtle);
  color: var(--text-main);
}

.action-btn.btn-action-deliver {
  background-color: var(--color-success);
  color: #ffffff;
  border-color: var(--color-success);
  width: auto;
  padding: 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  gap: 0.35rem;
}

.action-btn.btn-action-deliver:hover {
  background-color: #047857;
}

.action-btn.btn-action-print {
  color: var(--color-primary);
}

.action-btn.btn-action-print:hover {
  background-color: var(--color-primary-light);
  border-color: #bfdbfe;
}

.action-btn.btn-action-delete:hover {
  background-color: var(--color-danger-subtle);
  color: var(--color-danger);
  border-color: #fecaca;
}

.table-footer {
  padding: 0.85rem 1.25rem;
  background-color: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
}

.legend {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
}

/* ==============================================
   FORMULARIO DE REGISTRO DE BENEFICIARIO
   ============================================== */
.form-container-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  max-width: 900px;
  margin: 0 auto;
}

.form-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.form-header-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.form-section {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed var(--border-color);
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

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

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

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

label.required::after {
  content: " *";
  color: var(--color-danger);
}

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

/* Selector Visual de Tallas */
.shoe-size-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.size-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  border: 1.5px solid var(--border-color);
  background: #ffffff;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.size-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.size-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.3);
}

.custom-size-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.custom-size-input {
  max-width: 100px;
  text-align: center;
  font-weight: 700;
}

/* Switch de Entrega Inmediata */
.delivery-toggle-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.toggle-control {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.custom-switch {
  width: 22px;
  height: 22px;
  accent-color: var(--color-success);
  cursor: pointer;
  margin-top: 2px;
}

.switch-label {
  cursor: pointer;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ==============================================
   PESTAÑA DE ESTADÍSTICAS Y MÉTRICAS
   ============================================== */
.stats-dashboard {
  max-width: 1200px;
  margin: 0 auto;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.stats-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.stats-box.span-2 {
  grid-column: span 2;
}

.stats-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.stats-box-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.tallas-bars-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.talla-bar-item {
  display: grid;
  grid-template-columns: 70px 1fr 110px;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.talla-bar-label {
  font-weight: 700;
  color: var(--color-secondary);
}

.talla-bar-track {
  width: 100%;
  height: 12px;
  background-color: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
  display: flex;
}

.talla-bar-delivered {
  height: 100%;
  background-color: var(--color-success);
}

.talla-bar-pending {
  height: 100%;
  background-color: var(--color-warning);
}

.talla-bar-values {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.type-stats-list, .demographic-stats {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.type-stat-card {
  padding: 0.75rem 1rem;
  background: var(--bg-card-subtle);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.type-stat-card .type-name {
  font-weight: 600;
  font-size: 0.88rem;
}

.type-stat-card .type-count {
  font-weight: 800;
  color: var(--color-primary);
}

.neighborhood-table-wrap {
  overflow-x: auto;
}

.simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.simple-table th {
  padding: 0.6rem 0.85rem;
  background-color: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.simple-table td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

/* ==============================================
   PESTAÑA DE IMPORTACIÓN Y RESPALDO
   ============================================== */
.import-container-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.card-header {
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.85rem;
}

.card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.upload-area {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: var(--transition);
}

.upload-area:hover, .upload-area.dragover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.upload-area svg {
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.backup-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
}

.divider {
  border: 0;
  height: 1px;
  background-color: var(--border-color);
  margin: 1.25rem 0;
}

.info-box {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  color: #1e40af;
}

.max-h-300 {
  max-height: 280px;
  overflow-y: auto;
}

/* ==============================================
   MODALES (DIALOG NATIVO ESTILIZADO)
   ============================================== */
.app-modal {
  border: none;
  background: transparent;
  padding: 0;
  margin: auto;
  max-width: 600px;
  width: 90%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.app-modal.modal-lg {
  max-width: 820px;
}

.app-modal::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-secondary);
}

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

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

.modal-body {
  padding: 1.5rem;
  max-height: 75vh;
  overflow-y: auto;
}

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

/* Resumen del Beneficiario en Modal */
.beneficiary-summary-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.summary-item .label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.summary-item .value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-secondary);
}

/* Sección de Firma Digital */
.signature-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

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

.signature-canvas-wrap {
  position: relative;
  border: 2px dashed #94a3b8;
  border-radius: var(--radius-md);
  background-color: #ffffff;
  height: 150px;
  overflow: hidden;
  cursor: crosshair;
}

.signature-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #94a3b8;
  font-size: 0.85rem;
  pointer-events: none;
  user-select: none;
}

/* ==============================================
   ACTA OFICIAL IMPRIMIBLE (DOCUMENTO OFICIAL)
   ============================================== */
.printable-acta {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 2.5rem;
  border-radius: var(--radius-sm);
  color: #0f172a;
}

.acta-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.acta-logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.acta-header-titles h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #475569;
}

.acta-header-titles h3 {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.acta-header-titles p {
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

.acta-header-titles .sub {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

.acta-number-box {
  border: 1.5px solid #0f172a;
  padding: 0.6rem 0.85rem;
  text-align: center;
  border-radius: var(--radius-sm);
  background: #f8fafc;
}

.acta-number-box .title {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  color: #475569;
}

.acta-number-box .code {
  display: block;
  font-size: 1.1rem;
  font-weight: 900;
  color: #1e3a8a;
  font-family: monospace;
}

.acta-number-box .date {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.acta-legal-notice {
  font-size: 0.8rem;
  background-color: #f1f5f9;
  border-left: 3px solid #1e3a8a;
  padding: 0.6rem 0.85rem;
  margin-bottom: 1.25rem;
  line-height: 1.4;
  color: #334155;
}

.acta-subtitle {
  font-size: 0.85rem;
  font-weight: 800;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.acta-table-section {
  margin-bottom: 1.25rem;
}

.acta-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.acta-data-table td, .acta-data-table th {
  border: 1px solid #cbd5e1;
  padding: 0.5rem 0.75rem;
}

.acta-data-table .thead-row th {
  background-color: #f1f5f9;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.acta-statement {
  font-size: 0.8rem;
  color: #475569;
  text-align: justify;
  margin-bottom: 1.75rem;
  line-height: 1.4;
}

.acta-signatures-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: 1.25rem;
  margin-top: 2rem;
}

.signature-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.signature-img-container {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.signature-img-container img {
  max-height: 75px;
  max-width: 100%;
  object-fit: contain;
}

.signature-line {
  border-top: 1.5px solid #0f172a;
  margin-bottom: 0.4rem;
}

.signature-box strong {
  font-size: 0.8rem;
  display: block;
}

.signature-box .sub-text {
  font-size: 0.75rem;
  color: #64748b;
}

.fingerprint-slot {
  height: 80px;
  width: 70px;
  margin: 0 auto 0.4rem auto;
  border: 1.5px dashed #64748b;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.fingerprint-slot span {
  font-size: 0.6rem;
  color: #94a3b8;
  font-weight: 700;
  line-height: 1.2;
}

/* ==============================================
   TOASTS DE NOTIFICACIÓN
   ============================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 280px;
  max-width: 420px;
  animation: slideInRight 0.3s ease-out;
}

.toast.toast-success {
  border-left: 4px solid var(--color-success);
  color: #065f46;
}

.toast.toast-error {
  border-left: 4px solid var(--color-danger);
  color: #991b1b;
}

.toast.toast-info {
  border-left: 4px solid var(--color-primary);
  color: #1e40af;
}

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

/* Spinner */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(37, 99, 235, 0.15);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Clases de Utilidad */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.72rem; }
.text-large { font-size: 1.2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.85rem; }
.mt-4 { margin-top: 1.25rem; }
.mb-3 { margin-bottom: 0.85rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.d-block { display: block; }

/* ==============================================
   ESTILOS DE IMPRESIÓN OFICIAL (@media print)
   ============================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .top-header,
  .tabs-nav,
  .stats-grid,
  .filters-panel,
  .status-chips-bar,
  .table-card,
  .modal-header,
  .modal-footer,
  .toast-container,
  #mainContent {
    display: none !important;
  }

  dialog {
    display: block !important;
    position: static !important;
    max-width: 100% !important;
    width: 100% !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .modal-card {
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .modal-body {
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .printable-acta {
    border: none !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .acta-header {
    border-bottom: 2px solid #000000 !important;
  }

  .acta-number-box {
    border: 1.5px solid #000000 !important;
  }

  .acta-data-table td, .acta-data-table th {
    border: 1px solid #000000 !important;
  }

  .signature-line {
    border-top: 1.5px solid #000000 !important;
  }
}

/* Responsividad para Móviles */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .stats-row {
    grid-template-columns: 1fr;
  }

  .stats-box.span-2 {
    grid-column: span 1;
  }

  .import-container-grid {
    grid-template-columns: 1fr;
  }

  .acta-signatures-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ==========================================================
   PANTALLA DE ACCESO INSTITUCIONAL (LOGIN)
   Estética Verde Esmeralda / Ondas Suaves / Escudo Institucional
   ========================================================== */

.login-wrapper {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2rem 1rem;
  background-color: #0b1a10;
  background-image: url('../img/fondo_infraestructura_maquinaria.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}

.login-wrapper::before {
  content: '';
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(9, 29, 18, 0.55) 0%, rgba(15, 23, 42, 0.65) 100%);
  backdrop-filter: blur(1.5px);
  z-index: 2;
  pointer-events: none;
}

.login-background-art {
  display: none !important;
}

.bg-wave {
  display: none !important;
}

.login-card-container {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: 440px;
  margin: auto;
  padding: 0.5rem;
  opacity: 1;
  visibility: visible;
  display: block;
}

.login-card {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2.5rem 2.25rem 2rem 2.25rem;
  box-shadow: 
    0 25px 60px -10px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 25;
  opacity: 1;
  visibility: visible;
}

.login-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.15rem;
}

.institutional-emblem {
  filter: drop-shadow(0 4px 6px rgba(22, 101, 52, 0.1));
  transition: transform 0.3s ease;
}

.institutional-emblem:hover {
  transform: scale(1.04);
}

.login-header-text {
  text-align: center;
  margin-bottom: 1.6rem;
}

.institutional-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #166534;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.login-header-text h2 {
  font-size: 1.18rem;
  font-weight: 700;
  color: #27272a;
  letter-spacing: -0.01em;
}

.login-alert {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
  animation: shakeAlert 0.3s ease;
}

@keyframes shakeAlert {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.login-group {
  margin-bottom: 1.15rem;
  text-align: left;
}

.login-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
}

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

.login-input-wrapper .input-icon {
  position: absolute;
  left: 0.85rem;
  color: #9ca3af;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.login-input {
  width: 100%;
  height: 44px;
  padding: 0.6rem 2.6rem 0.6rem 2.6rem;
  border: 1.5px solid #d1d5db;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  color: #1f2937;
  background-color: #ffffff;
  transition: var(--transition);
}

.login-input:focus {
  outline: none;
  border-color: #166534;
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.15);
}

.btn-toggle-password {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-toggle-password:hover {
  color: #166534;
}

.btn-login-submit {
  width: 100%;
  height: 44px;
  background-color: #166534;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.6rem;
  box-shadow: 0 4px 14px rgba(22, 101, 52, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-login-submit:hover {
  background-color: #14532d;
  box-shadow: 0 6px 18px rgba(22, 101, 52, 0.35);
  transform: translateY(-1px);
}

.btn-login-submit:active {
  transform: translateY(1px);
}

.login-forgot-wrap {
  text-align: center;
  margin-top: 1.1rem;
}

.forgot-link {
  color: #166534;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.forgot-link:hover {
  text-decoration: underline;
  color: #14532d;
}

.login-card-footer {
  text-align: center;
  margin-top: 1.75rem;
  border-top: 1px solid #f3f4f6;
  padding-top: 1.15rem;
}

.login-card-footer p {
  font-size: 0.72rem;
  color: #9ca3af;
  font-weight: 500;
}

/* Control de Sesión en el Header */
.user-session-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: #ffffff;
  backdrop-filter: blur(6px);
}

.user-avatar-circle {
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6ee7b7;
}

.user-name-text {
  font-weight: 700;
  color: #ffffff;
}

.btn-logout {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  margin-left: 0.25rem;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: #ef4444;
  color: #ffffff;
}

/* ==========================================================
   PANEL DE ACCESO INSTITUCIONAL (HUB DE MÓDULOS)
   Portal Oficial Alcaldía de Pijao (Quindío)
   3 Módulos Activos: Calzado, Insumos e Infraestructura, Estadísticas y Analítica
   ========================================================== */

.hub-wrapper {
  min-height: 100vh;
  background-color: #f8fafc;
  display: flex;
  flex-direction: column;
}

/* Header Oscuro Institucional de Lujo (Fiel a Imagen 2) */
.hub-header {
  background: #092338;
  border-bottom: 3px solid #166534;
  padding: 0.85rem 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  color: #ffffff;
}

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

.hub-brand-left {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.hub-shield-box {
  width: 52px;
  height: 58px;
  background: #ffffff;
  border-radius: 14px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.hub-shield-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hub-brand-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hub-brand-badges {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.1rem;
}

.badge-portal {
  font-size: 0.68rem;
  font-weight: 800;
  background: #059669;
  color: #ffffff;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
}

.badge-sync {
  font-size: 0.74rem;
  font-weight: 600;
  color: #86efac;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.dot-green {
  width: 7.5px;
  height: 7.5px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  display: inline-block;
  animation: pulse-green 2s infinite;
}

.hub-header-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.hub-header-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 500;
}

.hub-user-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.hub-user-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
}

.hub-user-titles {
  text-align: right;
}

.user-role-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.user-dep-title {
  display: block;
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.2;
}

.user-avatar-fa {
  width: 32px;
  height: 32px;
  background: #166534;
  border: 1.5px solid #22c55e;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.btn-logout-icon {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 0.42rem 0.95rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.btn-logout-icon:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.logout-label {
  font-size: 0.8rem;
  font-weight: 700;
}

/* Contenedor del Cuerpo del Hub */
.hub-body-container {
  max-width: 1240px;
  margin: 1.35rem auto 2.25rem auto;
  padding: 0 1.35rem;
  width: 100%;
  box-sizing: border-box;
}

.hub-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.4rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e2e8f0;
}

.modules-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.modules-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.active-modules-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Grid de las 3 Tarjetas (Ajuste Perfecto a la Pantalla) */
.hub-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

.hub-module-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.5rem 1.4rem 1.4rem 1.4rem;
  border: 1px solid #e2e8f0;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.hub-module-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
  border-color: #cbd5e1;
}

.hub-module-card.card-calzado {
  border-top: 4px solid #1d4ed8;
}

.hub-module-card.card-insumos {
  border-top: 4px solid #15803d;
}

.hub-module-card.card-analytics {
  border-top: 4px solid #7c3aed;
}

.hub-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.15rem;
}

.hub-icon-round {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.icon-round-blue {
  background: #eff6ff;
  color: #1d4ed8;
}

.icon-round-green {
  background: #f0fdf4;
  color: #15803d;
}

.icon-round-purple {
  background: #faf5ff;
  color: #7c3aed;
}

.card-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.pill-blue {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
}

.pill-green {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #dcfce7;
}

.pill-purple {
  background: #faf5ff;
  color: #7c3aed;
  border: 1px solid #f3e8ff;
}

.hub-card-titles h2 {
  font-size: 1.02rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.32;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.hub-card-subtitle {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}

.sub-blue {
  color: #1d4ed8;
}

.sub-green {
  color: #15803d;
}

.sub-purple {
  color: #6d28d9;
}

.hub-card-body p {
  font-size: 0.83rem;
  line-height: 1.5;
  color: #475569;
  margin-bottom: 1.35rem;
}

.hub-card-footer {
  margin-top: auto;
}

.btn-hub-action {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #ffffff;
}

.btn-hub-blue {
  background: #1e3a5f;
  box-shadow: 0 3px 10px rgba(30, 58, 95, 0.2);
}

.btn-hub-blue:hover {
  background: #0f243e;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(30, 58, 95, 0.3);
}

.btn-hub-green {
  background: #15803d;
  box-shadow: 0 3px 10px rgba(21, 128, 61, 0.2);
}

.btn-hub-green:hover {
  background: #14532d;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(21, 128, 61, 0.3);
}

.btn-hub-purple {
  background: #6d28d9;
  box-shadow: 0 3px 10px rgba(109, 40, 217, 0.2);
}

.btn-hub-purple:hover {
  background: #5b21b6;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(109, 40, 217, 0.3);
}

.btn-hub-action:active {
  transform: translateY(1px);
}

/* Acceso rápido a Diagnóstico de BD */
.hub-db-diag-bar {
  margin-top: 2.5rem;
  text-align: center;
}

.link-db-diag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  background: #ffffff;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}

.link-db-diag:hover {
  color: #166534;
  border-color: #86efac;
  background: #f0fdf4;
}

/* Botón Regresar al Hub en los Módulos */
.btn-back-hub {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  margin-right: 0.5rem;
}

.btn-back-hub:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.header-infra {
  background: linear-gradient(135deg, #064e3b 0%, #166534 100%) !important;
}

.badge-green-glow {
  background: rgba(255, 255, 255, 0.15);
  color: #6ee7b7;
}

.header-pijao-shield {
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.escudo-pijao-img {
  display: block;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(22, 101, 52, 0.12));
}

.sub-cred {
  font-size: 0.72rem;
  color: #15803d;
  font-weight: 600;
  margin-top: 0.2rem;
}

/* ==========================================================
   TARJETA DE VERIFICACIÓN TELEFÓNICA (CÓDIGO OTP / SMS)
   ========================================================== */
.otp-verification-card {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.25s ease;
}

.otp-verification-card.verified {
  border-color: #86efac;
  background: #f0fdf4;
}

.otp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.15rem;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.otp-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.otp-icon-round {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.otp-card-header h4 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.badge-otp {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
}

.badge-otp-pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-otp-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.otp-card-body {
  padding: 1.15rem;
}

.otp-phone-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.phone-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background: #ffffff;
  overflow: hidden;
}

.phone-flag {
  padding: 0.5rem 0.65rem;
  background: #f1f5f9;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  border-right: 1px solid #cbd5e1;
  white-space: nowrap;
}

.phone-input-wrap input {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.otp-send-btn-wrap button {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.otp-generated-box {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  background: #ffffff;
  border: 1.5px dashed #93c5fd;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.otp-code-highlight {
  display: flex;
  flex-direction: column;
}

.otp-code-val {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #1e3a5f;
  line-height: 1.2;
}

.otp-quick-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-otp-action {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-otp-whatsapp {
  background: #25d366;
  color: #ffffff;
}

.btn-otp-whatsapp:hover {
  background: #128c7e;
  color: #ffffff;
}

.btn-otp-copy {
  background: #e2e8f0;
  color: #1e293b;
}

.btn-otp-copy:hover {
  background: #cbd5e1;
}

.otp-validate-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.otp-input-code {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.15em !important;
  text-align: center !important;
  background: #ffffff !important;
}

.otp-verify-btn-wrap button {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.otp-success-banner {
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

@media (max-width: 992px) {
  .hub-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
  }
}

@media (max-width: 680px) {
  .hub-header {
    padding: 0.75rem 1rem;
  }
  .hub-header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }
  .hub-user-meta {
    width: 100%;
    justify-content: space-between;
  }
  .hub-cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .hub-section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.15rem;
  }
}




/* Estado OTP: codigo enviado */
.badge-otp-sent { background: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; }
.otp-input-code:disabled { background: #f0fdf4; color: #15803d; font-weight: 700; }



/* ==========================================================
   MÓDULO DE INFRAESTRUCTURA Y BANCO DE MATERIALES
   Formulario de Registro en Línea • Alcaldía de Pijao
   ========================================================== */

/* Subnavegación horizontal */
.infra-subnav-bar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 1.75rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.infra-subnav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 0.85rem;
  align-items: center;
  flex-wrap: wrap;
}

.infra-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.35rem;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.infra-tab-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.infra-tab-pill.active {
  background: #15803d;
  color: #ffffff;
  border-color: #166534;
  box-shadow: 0 4px 14px rgba(21, 128, 61, 0.25);
}

.infra-pill-badge {
  background: rgba(0, 0, 0, 0.12);
  color: inherit;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.infra-tab-pill.active .infra-pill-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Vistas conmutables */
.infra-view-pane {
  display: none;
}

.infra-view-pane.active {
  display: block;
  animation: infraFadeIn 0.3s ease;
}

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

/* Tarjeta Principal del Formulario */
.infra-form-card {
  max-width: 1400px;
  margin: 1.25rem auto 3rem;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.07);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

/* Banner Superior Institucional (Fiel a Imagen 1) */
.infra-banner {
  background: linear-gradient(135deg, #e6f9f0 0%, #e0f2fe 45%, #d1fae5 100%);
  border-bottom: 2px solid #a7f3d0;
  padding: 1.15rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  min-height: 110px;
  gap: 1.5rem;
  overflow: hidden;
}

.infra-banner-art-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.infra-cityhall-svg {
  height: 95px;
  width: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

.infra-banner-center {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.infra-banner-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #064e3b;
  margin: 0 0 0.35rem 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.infra-banner-sub {
  font-size: 0.95rem;
  font-weight: 600;
  color: #047857;
  margin: 0;
  line-height: 1.3;
}

.infra-banner-art-right {
  display: flex;
  align-items: flex-end;
  flex-shrink: 0;
  height: 100px;
}

.infra-mountains-svg {
  height: 95px;
  width: 220px;
}

/* Cuerpo del Formulario */
.infra-form-body {
  padding: 2rem 2.25rem;
  display: flex;
  gap: 2.25rem;
  align-items: flex-start;
}

.infra-form-main-content {
  flex: 1;
  min-width: 0;
}

.infra-form-heading {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 1.25rem 0;
  letter-spacing: -0.01em;
}

/* Stepper en Chevrons / Flechas */
.infra-stepper {
  display: flex;
  align-items: center;
  margin: 0 0 1.85rem 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.infra-step {
  flex: 1;
  min-width: 140px;
  padding: 0.65rem 1rem 0.65rem 1.6rem;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
  clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%, 15px 50%);
  background: #e2e8f0;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.infra-step:first-child {
  padding-left: 1.25rem;
  clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%);
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.infra-step:last-child {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 15px 50%);
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.infra-step.active {
  background: #2b6cb0;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(43, 108, 176, 0.3);
}

.infra-step.completed {
  background: #bbf7d0;
  color: #14532d;
}

/* Columnas del Formulario */
.infra-form-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.infra-form-col {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.infra-col-title {
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.infra-field-group {
  display: flex;
  flex-direction: column;
}

/* Inputs en forma de píldora redondeada (Exacto a Imagen 1) */
.infra-pill-input {
  width: 100%;
  border-radius: 9999px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  padding: 0.68rem 1.35rem;
  font-size: 0.92rem;
  font-family: inherit;
  color: #1e293b;
  transition: all 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.infra-pill-input:focus {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.infra-input-with-icon {
  position: relative;
}

.infra-input-with-icon .infra-field-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  pointer-events: none;
}

.infra-input-with-icon .infra-pill-input {
  padding-left: 2.85rem;
}

/* Grupo de Materiales Solicitados */
.infra-materials-group {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 0.95rem 1.25rem;
}

.infra-group-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.6rem;
}

.infra-group-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
}

.infra-checkboxes-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

.infra-check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.infra-check-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0284c7;
  cursor: pointer;
}

/* Textarea Redondeado */
.infra-textarea-group {
  margin-top: 0.25rem;
}

.infra-pill-textarea {
  width: 100%;
  border-radius: 16px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: #1e293b;
  resize: vertical;
  min-height: 110px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.infra-pill-textarea:focus {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Carga de Documentos */
.infra-upload-section {
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid #e2e8f0;
}

.infra-dropzone {
  border: 2px dashed #93c5fd;
  border-radius: 16px;
  background: #f8fafc;
  padding: 1.35rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.infra-dropzone:hover, .infra-dropzone.dragover {
  border-color: #2563eb;
  background: #eff6ff;
}

.infra-upload-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #dcfce7;
  color: #15803d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.45rem;
}

.infra-drop-text {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.infra-drop-hint {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
}

.infra-files-list {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.infra-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  color: #334155;
}

.infra-file-item button {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.95rem;
  padding: 0 4px;
}

/* Pie del Formulario y Botones de Acción */
.infra-form-footer {
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.infra-cert-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.infra-cert-label input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: #0284c7;
  cursor: pointer;
}

.infra-footer-buttons {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-infra-submit {
  padding: 0.75rem 2.25rem;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316 0%, #2563eb 100%);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
}

.btn-infra-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-infra-draft {
  padding: 0.7rem 1.75rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #475569;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-infra-draft:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

/* Sidebar Lateral de Ayuda */
.infra-help-sidebar {
  width: 270px;
  flex-shrink: 0;
}

.infra-help-box {
  background: #eef7f3;
  border: 1px solid #c7e8d8;
  border-radius: 16px;
  padding: 1.35rem;
  position: sticky;
  top: 1rem;
}

.infra-help-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #064e3b;
  margin: 0 0 0.65rem 0;
}

.infra-help-text {
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.45;
  margin: 0 0 1rem 0;
}

.infra-help-contact {
  font-size: 0.82rem;
  color: #1e293b;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.infra-help-link {
  color: #0284c7;
  font-weight: 700;
  text-decoration: none;
  display: block;
  word-break: break-all;
  margin: 0.25rem 0;
}

.infra-help-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #dcfce7;
  color: #166534;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid #86efac;
}

.infra-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  display: inline-block;
}

/* Tarjeta de Radicado Oficial */
.radicado-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1.5px solid #86efac;
  padding: 1.35rem;
  box-shadow: 0 4px 16px rgba(22, 101, 52, 0.08);
}

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

.radicado-number {
  font-size: 1.4rem;
  font-weight: 800;
  color: #15803d;
  letter-spacing: 0.05em;
  font-family: monospace;
}

.radicado-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.88rem;
  border-bottom: 1px dashed #f1f5f9;
}

.radicado-label {
  color: #64748b;
  font-weight: 600;
}

.radicado-val {
  color: #0f172a;
  font-weight: 700;
  text-align: right;
}

/* Adaptación Responsiva */
@media (max-width: 992px) {
  .infra-form-body {
    flex-direction: column;
    padding: 1.5rem 1.25rem;
  }
  .infra-help-sidebar {
    width: 100%;
  }
  .infra-banner {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1.25rem 1rem;
  }
  .infra-banner-center {
    text-align: center;
  }
  .infra-form-columns {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* ==========================================================
   MÓDULO DE ESTADÍSTICAS Y ANALÍTICA POBLACIONAL
   Dashboard de Información con Gráficas Oficiales
   ========================================================== */
.header-stats {
  background: #1e1b4b !important;
  border-bottom: 3px solid #7c3aed !important;
}

.stats-dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stats-box-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.stats-box-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.neighborhood-table-wrap {
  overflow-x: auto;
  max-height: 380px;
}

@media print {
  #estadisticasScreen .top-header,
  #btnRefrescarStatsScreen,
  #btnPrintEstadisticas,
  .btn-back-hub,
  .btn-logout {
    display: none !important;
  }

  #estadisticasScreen {
    display: block !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .stats-module-hero {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
  }

  .stats-module-hero h2,
  .stats-module-hero p {
    color: #0f172a !important;
  }
}


/* ==========================================================
   FONDO INSTITUCIONAL GLOBAL DE MAQUINARIA E INFRAESTRUCTURA
   Ajustado para óptima visualización en Web y Móviles
   ========================================================== */
.app-global-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-image: url('../img/fondo_infraestructura_maquinaria.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  z-index: -2;
  pointer-events: none;
  transform: translateZ(0);
}

.app-global-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78) 0%, rgba(9, 29, 18, 0.82) 50%, rgba(15, 23, 42, 0.86) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: -1;
  pointer-events: none;
}

/* Ajustes a pantallas con fondo translúcido y legible */
.hub-wrapper {
  background: transparent !important;
  min-height: 100vh;
  min-height: 100dvh;
}

.main-container {
  position: relative;
  z-index: 10;
}

/* Tarjeta de Administración en el Hub */
.hub-module-card.card-admin {
  border-top: 4px solid #ea580c;
  background: rgba(255, 255, 255, 0.98);
}

.hub-module-card.card-disabled {
  opacity: 0.65;
  filter: grayscale(0.6);
  cursor: not-allowed;
  pointer-events: auto;
}

.icon-round-orange {
  background: #fff7ed;
  color: #ea580c;
}

.pill-orange {
  background: #ffedd5;
  color: #c2410c;
}

.sub-orange {
  color: #ea580c !important;
}

.btn-hub-orange {
  background: #ea580c;
  color: #ffffff;
}

.btn-hub-orange:hover {
  background: #c2410c;
}

.btn-admin-portal {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(234, 88, 12, 0.2);
  border: 1px solid rgba(234, 88, 12, 0.5);
  color: #fed7aa;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-admin-portal:hover {
  background: #ea580c;
  color: #ffffff;
  border-color: #ea580c;
}

/* ==========================================================
   PANEL DE ADMINISTRACIÓN Y CONTROL DE ACCESOS
   Estilos Ejecutivos y Responsivos
   ========================================================== */
.admin-wrapper {
  position: relative !important;
  z-index: 20 !important;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.header-admin {
  background: linear-gradient(135deg, #1c1917 0%, #431407 50%, #7c2d12 100%) !important;
  border-bottom: 3px solid #ea580c !important;
}

.admin-main-container {
  max-width: 1360px;
  margin: 1.5rem auto;
  padding: 0 1.25rem 3rem 1.25rem;
  width: 100%;
}

.admin-content-layout {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: start;
}

.admin-right-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.admin-panel-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  padding: 1.5rem;
  box-sizing: border-box;
}

.admin-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.admin-panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-panel-badge-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.badge-icon-orange {
  background: #fff7ed;
  border-color: #fed7aa;
}

.badge-icon-blue {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.admin-panel-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

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

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

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

.input-prefix {
  position: absolute;
  left: 0.85rem;
  color: #94a3b8;
  font-weight: 700;
}

.input-with-icon input {
  padding-left: 2rem !important;
}

.input-with-button {
  display: flex;
  gap: 0.35rem;
  position: relative;
}

.input-with-button input {
  flex: 1;
}

.btn-toggle-input-pass,
.btn-gen-pass {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 0.65rem;
  cursor: pointer;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-toggle-input-pass:hover,
.btn-gen-pass:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.form-hint {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.25rem;
  display: block;
}

/* Caja de Habilitación de Módulos */
.modules-permission-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.1rem;
  margin-top: 0.5rem;
}

.permission-box-header {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.permission-icon {
  font-size: 1.25rem;
}

.permission-box-header h4 {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.permission-box-header p {
  font-size: 0.76rem;
  color: #64748b;
  margin: 0.15rem 0 0 0;
}

.permission-checkboxes-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.permission-checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.permission-checkbox-card:hover {
  border-color: #3b82f6;
  background: #f0f7ff;
}

.permission-checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  cursor: pointer;
  accent-color: #1d4ed8;
}

.perm-card-content {
  display: flex;
  flex-direction: column;
}

.perm-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
}

.perm-desc {
  font-size: 0.72rem;
  color: #64748b;
}

.form-actions-admin {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-save-user {
  flex: 1;
  padding: 0.75rem 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
}

/* Tarjeta Cambio de Clave Maestra de Administrador */
.admin-password-card {
  border-left: 4px solid #ea580c;
  background: linear-gradient(180deg, #ffffff 0%, #fffbf5 100%);
}

.admin-change-pass-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.change-pass-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.change-pass-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.change-pass-note {
  font-size: 0.78rem;
  color: #9a3412;
  flex: 1;
}

.btn-update-pass {
  background: #ea580c;
  color: #ffffff;
  border: none;
  font-weight: 700;
  padding: 0.65rem 1.35rem;
}

.btn-update-pass:hover {
  background: #c2410c;
}

/* Tabla de Usuarios */
.admin-users-table-card {
  overflow: hidden;
}

.admin-table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.admin-badge-module {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  margin: 0.15rem;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.admin-badge-module.mod-calzado {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.admin-badge-module.mod-insumos {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.admin-badge-module.mod-estadisticas {
  background: #faf5ff;
  color: #7c3aed;
  border-color: #e9d5ff;
}

.badge-role-admin {
  background: #ffedd5;
  color: #9a3412;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.badge-role-op {
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.admin-actions-cell {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
}

.btn-table-action {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-table-action:hover {
  background: #e2e8f0;
}

.btn-action-delete:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* Adaptación Responsiva para Móvil */
@media (max-width: 1024px) {
  .admin-content-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .form-row-2,
  .change-pass-row {
    grid-template-columns: 1fr;
  }

  .admin-panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .table-search-box {
    width: 100%;
  }

  .table-search-box input {
    width: 100% !important;
  }

  .app-global-bg {
    background-attachment: scroll;
  }
}

/* Fix móvil para login y visualización correcta */
@media (max-width: 768px) {
  .login-wrapper {
    background-attachment: scroll !important;
    background-size: cover !important;
    background-position: center center !important;
    padding: 1.25rem 0.75rem !important;
  }
}


/* ========================================================
   ESTILOS PREMIUM Y ALTA LEGIBILIDAD: FORM-CONTROL Y TEXTOS
   ======================================================== */
.form-control {
  width: 100% !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
  font-size: 0.88rem !important;
  padding: 0.65rem 0.85rem !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  transition: all 0.2s ease !important;
  line-height: 1.4 !important;
}

.form-control:focus {
  outline: none !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
  background-color: #ffffff !important;
}

select.form-control {
  cursor: pointer !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 1rem !important;
  padding-right: 2rem !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.admin-user-form label {
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin-bottom: 0.35rem !important;
  display: block !important;
}

.admin-panel-title-wrap h2 {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.01em !important;
}

.admin-panel-title-wrap p {
  font-size: 0.8rem !important;
  color: #475569 !important;
  font-weight: 500 !important;
  margin-top: 0.2rem !important;
}

.input-with-button input {
  min-width: 0 !important;
}

.btn-toggle-input-pass,
.btn-gen-pass {
  flex-shrink: 0 !important;
  padding: 0 0.75rem !important;
  font-size: 1rem !important;
}

.admin-content-layout {
  display: grid !important;
  grid-template-columns: minmax(440px, 480px) 1fr !important;
  gap: 1.5rem !important;
  margin-top: 1.5rem !important;
  align-items: start !important;
}

@media (max-width: 1100px) {
  .admin-content-layout {
    grid-template-columns: 1fr !important;
  }
}
