/**
 * NEO360 - Estilos Unificados basados en DashboardProyectosConstruccion
 * Mismo diseño exacto que el componente de referencia
 */

/* ============================================================================
   CONTENEDOR PRINCIPAL
   ============================================================================ */
.neo360-view-container {
  padding: 20px;
  background: #f5f6fa;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ============================================================================
   HEADER DE PÁGINA
   ============================================================================ */
.neo360-page-hdr {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.neo360-page-hdr h1 {
  margin: 0 0 8px 0;
  font-size: 24px;
  color: #2c3e50;
  font-weight: 600;
}

.neo360-page-hdr p {
  margin: 0;
  font-size: 14px;
  color: #7f8c8d;
}

/* ============================================================================
   BARRA DE FILTROS
   ============================================================================ */
.neo360-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.neo360-filter-bar .fg {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.neo360-filter-bar label {
  font-size: 12px;
  color: #7f8c8d;
  font-weight: 500;
}

.neo360-filter-bar select,
.neo360-filter-bar input {
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  min-width: 150px;
  font-family: inherit;
}

.neo360-filter-bar select:focus,
.neo360-filter-bar input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.neo360-filter-bar .fbtns {
  display: flex;
  gap: 6px;
  align-items: flex-end;
}

/* ============================================================================
   BOTONES
   ============================================================================ */
.neo360-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: inherit;
}

.neo360-btn-pers {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.neo360-btn-pers:hover {
  background: linear-gradient(135deg, #2980b9, #1c6ea4);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.neo360-btn-crear {
  background: linear-gradient(135deg, #27ae60, #229954);
  color: white;
}

.neo360-btn-crear:hover {
  background: linear-gradient(135deg, #229954, #1c7a44);
}

.neo360-btn-fil {
  background: #3498db;
  color: white;
}

.neo360-btn-lim {
  background: #95a5a6;
  color: white;
}

.neo360-btn-secondary {
  background: white;
  color: #2c3e50;
  border: 1px solid #e0e0e0;
}

.neo360-btn-secondary:hover {
  background: #f5f6fa;
  border-color: #3498db;
}

/* ============================================================================
   KPI CARDS - ESTILO EXACTO DASHBOARDPROYECTOS
   ============================================================================ */
.neo360-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.neo360-kpi {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.2s;
}

.neo360-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.neo360-kpi-lbl {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #7f8c8d;
  font-weight: 500;
  margin-bottom: 12px;
}

.neo360-kpi-lbl span:first-child {
  font-size: 18px;
}

.neo360-kpi-val {
  font-size: 28px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 8px;
}

.neo360-kpi-val.blue { color: #3498db; }
.neo360-kpi-val.green { color: #27ae60; }
.neo360-kpi-val.orange { color: #f39c12; }
.neo360-kpi-val.red { color: #e74c3c; }

.neo360-kpi-delta {
  font-size: 12px;
  font-weight: 500;
}

.neo360-kpi-delta.up { color: #27ae60; }
.neo360-kpi-delta.down { color: #e74c3c; }

/* ============================================================================
   SECCIONES Y TARJETAS
   ============================================================================ */
.neo360-areas-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
}

.neo360-areas-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.neo360-areas-hdr span {
  font-size: 16px;
  font-weight: 600;
}

.neo360-areas-hdr-btns {
  display: flex;
  gap: 8px;
}

.neo360-areas-hdr-btns .neo360-btn {
  padding: 8px 16px;
  font-size: 13px;
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}

.neo360-areas-hdr-btns .neo360-btn:hover {
  background: rgba(255,255,255,0.3);
}

/* ============================================================================
   TABLAS - ESTILO EXACTO
   ============================================================================ */
.neo360-areas-tbl {
  width: 100%;
  border-collapse: collapse;
}

.neo360-areas-tbl thead {
  background: #f5f6fa;
  border-bottom: 2px solid #e0e0e0;
}

.neo360-areas-tbl th {
  padding: 14px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #2c3e50;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.neo360-areas-tbl th:hover {
  background: #e8ecef;
}

.neo360-areas-tbl tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

.neo360-areas-tbl tbody tr:hover {
  background: #f5f6fa;
}

.neo360-areas-tbl td {
  padding: 14px 16px;
  font-size: 14px;
  color: #2c3e50;
}

/* ============================================================================
   BADGES DE ESTADO
   ============================================================================ */
.neo360-est-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
}

.neo360-est-badge.activo,
.neo360-est-badge.eb-green {
  background: #d5f5e3;
  color: #27ae60;
}

.neo360-est-badge.planificacion,
.neo360-est-badge.eb-yellow {
  background: #fdebd0;
  color: #f39c12;
}

.neo360-est-badge.pausa,
.neo360-est-badge.eb-orange {
  background: #f9e79f;
  color: #f1c40f;
}

.neo360-est-badge.completado,
.neo360-est-badge.eb-blue {
  background: #d6eaf8;
  color: #3498db;
}

.neo360-est-badge.cancelado,
.neo360-est-badge.eb-red {
  background: #fadbd8;
  color: #e74c3c;
}

/* ============================================================================
   BOTONES DE ACCIÓN TÁCTIL
   ============================================================================ */
.neo360-tact-btns {
  display: flex;
  gap: 4px;
}

.neo360-tact-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #f5f6fa;
  color: #2c3e50;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 14px;
}

.neo360-tact-btn:hover {
  background: #3498db;
  color: white;
}

.neo360-tact-btn.danger:hover {
  background: #e74c3c;
}

/* ============================================================================
   NOTIFICACIONES
   ============================================================================ */
.neo360-erp-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 8px;
  font-weight: 500;
  z-index: 9999;
  animation: slideIn 0.3s ease;
  font-family: inherit;
}

.neo360-erp-notification.success {
  background: #d5f5e3;
  color: #27ae60;
  border: 1px solid #27ae60;
}

.neo360-erp-notification.error {
  background: #fadbd8;
  color: #e74c3c;
  border: 1px solid #e74c3c;
}

.neo360-erp-notification.info {
  background: #d6eaf8;
  color: #3498db;
  border: 1px solid #3498db;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================================================
   MODALES
   ============================================================================ */
.neo360-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.neo360-modal-content {
  background-color: white;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  position: relative;
}

.neo360-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.neo360-modal-header h2 {
  margin: 0;
  font-size: 18px;
  color: #333;
  font-family: inherit;
}

.neo360-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  padding: 0;
  line-height: 1;
}

.neo360-modal-body {
  padding: 20px;
}

/* ============================================================================
   FORMULARIOS
   ============================================================================ */
.neo360-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.neo360-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.neo360-form-group label {
  font-weight: 600;
  color: #333;
  font-size: 14px;
  font-family: inherit;
}

.neo360-form-group input,
.neo360-form-group select,
.neo360-form-group textarea {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}

.neo360-form-group input:focus,
.neo360-form-group select:focus,
.neo360-form-group textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 1400px) {
  .neo360-kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .neo360-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .neo360-page-hdr {
    flex-direction: column;
    gap: 16px;
  }
  
  .neo360-filter-bar {
    flex-direction: column;
  }
  
  .neo360-filter-bar .fg,
  .neo360-filter-bar select,
  .neo360-filter-bar input {
    width: 100%;
  }
}

/* ============================================================================
   UTILIDADES
   ============================================================================ */
.neo360-text-center { text-align: center; }
.neo360-text-right { text-align: right; }
.neo360-text-muted { color: #7f8c8d; }
.neo360-mt-4 { margin-top: 16px; }
.neo360-mb-4 { margin-bottom: 16px; }
.neo360-hidden { display: none; }
