/* ============================================================================
   PROYECTA · ESTILO VISUAL NEO-SAAS CURVED (INSPIRADO EN SUGARCRM / DRIBBBLE)
   Paleta base oficial: #542063 · #6F2F82 · #7E3495 · #8A3EA0 · #454545
   Diseño de alta fidelidad: curvaturas orgánicas de 24px-32px, lienzo slate
   ultra suave (#EEF2F6), píldoras táctiles, modales flotantes y sombras ambientales.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* --- 1. BASE Y LIENZO --- */
body.theme-modern {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  background-color: #eef2f6 !important;
  color: #1e293b !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.theme-modern .shell {
  background-color: #eef2f6 !important;
  min-height: 100vh;
}

body.theme-modern main {
  padding: 32px 40px 60px !important;
  max-width: 1600px !important;
}

/* --- 2. BARRA LATERAL (ASIDE) --- */
body.theme-modern aside {
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.03) !important;
  padding: 24px 16px !important;
}

body.theme-modern .brand {
  padding: 8px 12px !important;
  border-radius: 18px !important;
  background: #f8fafc !important;
  border: 1px solid #edf2f7 !important;
  margin-bottom: 12px !important;
}

body.theme-modern .workspace {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  padding: 14px 18px !important;
  margin: 18px 0 16px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02) !important;
}

body.theme-modern nav button {
  border-radius: 50px !important;
  padding: 10px 18px !important;
  margin: 4px 0 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  color: #475569 !important;
  border: 1px solid transparent !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.theme-modern nav button:hover {
  background: #f1f5f9 !important;
  color: #542063 !important;
  transform: translateX(3px) !important;
}

body.theme-modern nav button.active {
  background: #542063 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 6px 16px rgba(84, 32, 99, 0.25) !important;
}

body.theme-modern nav button.active .navicon {
  color: #ffffff !important;
}

body.theme-modern .sidebottom {
  border-top: 1px solid #f1f5f9 !important;
  padding-top: 16px !important;
}

/* --- 3. ENCABEZADO SUPERIOR (HEADER) --- */
body.theme-modern header {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  height: 74px !important;
  padding: 0 40px !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.02) !important;
}

body.theme-modern #crumb {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #334155 !important;
  background: #f8fafc !important;
  padding: 8px 18px !important;
  border-radius: 50px !important;
  border: 1px solid #e2e8f0 !important;
  display: inline-flex !important;
  align-items: center !important;
}

body.theme-modern .demo {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 7px 40px !important;
  font-size: 11px !important;
  color: #64748b !important;
}

/* Widgets superiores en Header (Contador y Gráfico de Votos) */
body.theme-modern .top-countdown {
  border-radius: 50px !important;
  padding: 7px 18px !important;
  background: #eff6ff !important;
  border: 1.5px solid #bfdbfe !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08) !important;
}

body.theme-modern .top-votes-compare {
  border-radius: 18px !important;
  padding: 8px 18px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

body.theme-modern .top-votes-compare .bar-track,
body.theme-modern .top-votes-compare div[style*="height:6px"] {
  border-radius: 50px !important;
}

/* --- 4. PANELES, TARJETAS Y CONTENEDORES --- */
body.theme-modern .panel,
body.theme-modern .stat,
body.theme-modern .formcard,
body.theme-modern .v-map-panel,
body.theme-modern .paper {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 28px !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.04), 0 4px 10px -2px rgba(84, 32, 99, 0.02) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.theme-modern .panel:hover,
body.theme-modern .stat:hover,
body.theme-modern .formcard:hover {
  box-shadow: 0 16px 36px -6px rgba(84, 32, 99, 0.08), 0 4px 14px -2px rgba(0, 0, 0, 0.03) !important;
  border-color: #cbd5e1 !important;
}

body.theme-modern .panel {
  padding: 30px !important;
}

body.theme-modern .stat {
  padding: 24px 28px !important;
  position: relative !important;
  overflow: hidden !important;
}

body.theme-modern .stat::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, rgba(84, 32, 99, 0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

body.theme-modern .stat .label {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
  color: #64748b !important;
}

body.theme-modern .stat strong {
  font-size: 36px !important;
  font-weight: 800 !important;
  letter-spacing: -1.4px !important;
  color: #0f172a !important;
  margin: 14px 0 6px !important;
}

body.theme-modern .stat small {
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

/* --- 5. BOTONES Y LLAMADOS A LA ACCIÓN --- */
body.theme-modern button,
body.theme-modern .v-button {
  border-radius: 50px !important;
  padding: 10px 22px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #334155 !important;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.03) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.theme-modern button:hover,
body.theme-modern .v-button:hover {
  background: #f8fafc !important;
  color: #542063 !important;
  border-color: #542063 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(84, 32, 99, 0.12) !important;
}

body.theme-modern button.primary,
body.theme-modern .v-button.primary,
body.theme-modern button[type="submit"]:not(.tertiary) {
  background: linear-gradient(135deg, #542063 0%, #6f2f82 100%) !important;
  color: #ffffff !important;
  border: 1px solid #431750 !important;
  box-shadow: 0 4px 14px rgba(84, 32, 99, 0.28) !important;
}

body.theme-modern button.primary:hover,
body.theme-modern .v-button.primary:hover,
body.theme-modern button[type="submit"]:not(.tertiary):hover {
  background: linear-gradient(135deg, #652378 0%, #7e3495 100%) !important;
  box-shadow: 0 6px 20px rgba(84, 32, 99, 0.38) !important;
  transform: translateY(-2px) !important;
}

body.theme-modern button.mini {
  padding: 6px 14px !important;
  font-size: 11px !important;
  border-radius: 50px !important;
}

body.theme-modern button.tertiary {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body.theme-modern button.tertiary:hover {
  background: #f1f5f9 !important;
}

/* --- 6. INPUTS Y SELECTS (CÁPSULA) --- */
body.theme-modern input:not([type="checkbox"]):not([type="radio"]),
body.theme-modern select {
  border-radius: 50px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  padding: 10px 20px !important;
  font-size: 13px !important;
  color: #1e293b !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
  transition: all 0.2s ease !important;
}

body.theme-modern textarea {
  border-radius: 22px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  padding: 14px 20px !important;
  font-size: 13px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
}

body.theme-modern input:focus,
body.theme-modern select:focus,
body.theme-modern textarea:focus {
  outline: none !important;
  border-color: #542063 !important;
  box-shadow: 0 0 0 3px rgba(84, 32, 99, 0.15) !important;
}

/* --- 7. PESTAÑAS (TABS PÍLDORA) --- */
body.theme-modern .tabs {
  background: #e2e8f0 !important;
  padding: 5px !important;
  border-radius: 50px !important;
  display: inline-flex !important;
  gap: 4px !important;
  margin-bottom: 22px !important;
}

body.theme-modern .tabs button {
  background: transparent !important;
  border: 0 !important;
  border-radius: 50px !important;
  padding: 8px 18px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  box-shadow: none !important;
}

body.theme-modern .tabs button:hover {
  background: rgba(255, 255, 255, 0.6) !important;
  color: #1e293b !important;
  transform: none !important;
}

body.theme-modern .tabs button.active {
  background: #542063 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(84, 32, 99, 0.25) !important;
}

/* --- 8. BADGES Y PÍLDORAS --- */
body.theme-modern .pill,
body.theme-modern .badge {
  border-radius: 50px !important;
  padding: 5px 14px !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  letter-spacing: 0.3px !important;
}

body.theme-modern .badge {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #542063 !important;
}

/* --- 9. TABLAS ESTILO TARJETA MODERNA --- */
body.theme-modern .tablewrap {
  border-radius: 22px !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  overflow: hidden !important;
}

body.theme-modern th {
  background: #f8fafc !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
  padding: 16px 18px !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

body.theme-modern td {
  padding: 16px 18px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  color: #334155 !important;
}

body.theme-modern tr:last-child td {
  border-bottom: 0 !important;
}

body.theme-modern tr.clickable:hover {
  background: #f8fafc !important;
}

/* --- 10. MODALES (VENTANAS CURVADAS FLOTANTES) --- */
body.theme-modern .modalback {
  background: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(8px) !important;
}

body.theme-modern .modal {
  border-radius: 32px !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
  padding: 36px !important;
}

/* --- 11. MAPA Y RECORRIDOS --- */
body.theme-modern .v-map-wrap {
  border-radius: 24px !important;
  border: 1px solid #e2e8f0 !important;
}

body.theme-modern .v-map-controls button {
  border-radius: 50% !important;
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  margin-bottom: 6px !important;
}

/* Lista lateral de referentes en Recorridos territoriales */
body.theme-modern #territoryReferentesList div[onclick] {
  border-radius: 18px !important;
  border: 1px solid #e2e8f0 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.theme-modern #territoryReferentesList div[onclick]:hover {
  border-color: #542063 !important;
  box-shadow: 0 4px 12px rgba(84, 32, 99, 0.08) !important;
  transform: translateY(-1px) !important;
}

/* --- 12. TARJETAS DE NOTICIAS --- */
body.theme-modern article.panel {
  border-radius: 26px !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03) !important;
}

body.theme-modern article.panel:hover {
  border-color: #542063 !important;
  box-shadow: 0 12px 28px rgba(84, 32, 99, 0.08) !important;
  transform: translateY(-2px) !important;
}

/* ============================================================================
   14. GRÁFICOS Y BARRAS DE PROGRESO MODERNAS (NEO-SAAS)
   Reemplaza el rayado de wireframe y bordes negros por barras cápsula,
   gradientes Proyecta (#8A3EA0 -> #542063) y pistas redondeadas suaves.
   ============================================================================ */

/* Contenedor del gráfico de barras verticales */
body.theme-modern .chart {
  height: 200px !important;
  display: flex !important;
  gap: 20px !important;
  align-items: flex-end !important;
  border-bottom: 2px solid #e2e8f0 !important;
  padding: 25px 20px 0 !important;
  position: relative !important;
  margin: 25px 0 12px !important;
  background: repeating-linear-gradient(to top, transparent 0, transparent 48px, #f8fafc 49px, #f8fafc 50px) !important;
}

/* Columna de cada barra */
body.theme-modern .barwrap {
  flex: 1 !important;
  text-align: center !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  align-items: center !important;
  position: relative !important;
}

/* Barra vertical con cápsula superior y gradiente Proyecta */
body.theme-modern .bar {
  width: 46px !important;
  max-width: 65% !important;
  background: linear-gradient(180deg, #8A3EA0 0%, #542063 100%) !important;
  border: 0 !important;
  border-radius: 14px 14px 4px 4px !important;
  min-height: 8px !important;
  position: relative !important;
  box-shadow: 0 4px 14px rgba(84, 32, 99, 0.22) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.theme-modern .barwrap:hover .bar {
  background: linear-gradient(180deg, #A855F7 0%, #6F2F82 100%) !important;
  box-shadow: 0 8px 22px rgba(111, 47, 130, 0.35) !important;
  transform: translateY(-4px) !important;
}

/* Píldora con el valor numérico flotante */
body.theme-modern .bar span {
  position: absolute !important;
  top: -28px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: auto !important;
  min-width: 26px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  color: #542063 !important;
  background: #fdf4ff !important;
  border: 1px solid #f0abfc !important;
  border-radius: 50px !important;
  padding: 2px 7px !important;
  line-height: 1.25 !important;
  box-shadow: 0 2px 6px rgba(84, 32, 99, 0.08) !important;
}

/* Etiquetas del eje X */
body.theme-modern .xlabels {
  display: flex !important;
  justify-content: space-around !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #64748b !important;
  padding-top: 10px !important;
}

/* Barras horizontales de "Calidad de la base" */
body.theme-modern .qualityrow {
  margin: 18px 0 !important;
}

body.theme-modern .qualityrow > div:first-child {
  display: flex !important;
  justify-content: space-between !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  margin-bottom: 8px !important;
}

body.theme-modern .qualityrow strong {
  color: #0f172a !important;
  font-weight: 800 !important;
  font-size: 14px !important;
}

/* Pistas horizontales cápsula */
body.theme-modern .track {
  height: 10px !important;
  background: #e2e8f0 !important;
  border: 0 !important;
  border-radius: 50px !important;
  overflow: hidden !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

body.theme-modern .track i {
  display: block !important;
  height: 100% !important;
  border-radius: 50px !important;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Colorimetría semántica en las barras de calidad */
body.theme-modern .qualityrow:nth-of-type(1) .track i {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%) !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35) !important;
}

body.theme-modern .qualityrow:nth-of-type(2) .track i {
  background: linear-gradient(90deg, #fbbf24 0%, #d97706 100%) !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35) !important;
}

body.theme-modern .qualityrow:nth-of-type(3) .track i {
  background: linear-gradient(90deg, #f87171 0%, #dc2626 100%) !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35) !important;
}

/* Barras horizontales en sección Insights */
body.theme-modern .ins-htrack {
  height: 10px !important;
  background: #e2e8f0 !important;
  border: 0 !important;
  border-radius: 50px !important;
  overflow: hidden !important;
}

body.theme-modern .ins-htrack i {
  background: linear-gradient(90deg, #8A3EA0 0%, #542063 100%) !important;
  border-radius: 50px !important;
}

body.theme-modern .ins-hrow {
  margin: 16px 0 !important;
}

body.theme-modern .ins-hrow > div:first-child {
  font-weight: 600 !important;
  color: #334155 !important;
}

body.theme-modern .ins-hrow strong {
  color: #0f172a !important;
  font-weight: 800 !important;
}

body.theme-modern .ins-hrow small {
  background: #f1f5f9 !important;
  color: #64748b !important;
  padding: 2px 8px !important;
  border-radius: 50px !important;
  font-weight: 700 !important;
  margin-left: 6px !important;
}

/* Círculos de progreso */
body.theme-modern .progresscircle {
  border-width: 10px !important;
  border-color: #f1f5f9 !important;
  border-top-color: #542063 !important;
  border-left-color: #7E3495 !important;
  font-weight: 800 !important;
  color: #542063 !important;
}

/* --- HERO DASHBOARD: FONDO DE IMAGEN CON DESVANECIDO INFERIOR FUSIONADO --- */
.dashboard-hero {
  position: relative;
  margin: -32px -35px 25px -35px;
  padding: 32px 35px 25px 35px;
  background-image: 
    linear-gradient(to bottom, 
      rgba(238, 242, 246, 0.02) 0%, 
      rgba(238, 242, 246, 0.08) 30%, 
      rgba(238, 242, 246, 0.45) 60%, 
      rgba(238, 242, 246, 0.88) 85%, 
      #eef2f6 100%
    ),
    url('banner_final_verificado.png');
  background-position: left top;
  background-size: cover;
  background-repeat: no-repeat;
}

.dashboard-hero .heading {
  margin-bottom: 250px !important;
}

/* --- ENCABEZADOS DE TABLA COMO FILTROS DE ORDEN --- */
th.sortable-th {
  cursor: pointer !important;
  user-select: none !important;
  transition: background 0.15s ease, color 0.15s ease !important;
  position: relative;
  white-space: nowrap;
}

th.sortable-th:hover {
  background: #f3e8f8 !important;
  color: #542063 !important;
}

th.sortable-th.sort-active {
  background: #faf2fc !important;
  color: #542063 !important;
  border-bottom: 2px solid #542063 !important;
  font-weight: bold !important;
}

th.sortable-th .sort-icon {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  color: #9ca3af;
  margin-left: 5px;
  transition: transform 0.15s ease, color 0.15s ease;
}

th.sortable-th:hover .sort-icon {
  color: #7e3495;
}

th.sortable-th .sort-icon.active {
  color: #542063;
  font-weight: bold;
}


