/* ═══════════════════════════════════════════════════════════════
   CUENTAS 2.0 (VISTA ESTILO ESQUEMA Y BLOQUES MODULARES)
   ═══════════════════════════════════════════════════════════════ */

/* ── Cabecera de la vista Cuentas 2.0 ── */
.c2-cabecera-barra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.c2-resumen h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--paper);
}
.c2-resumen p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.c2-acciones {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Cuadrícula de cuentas 2.0 ── */
.c2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
  align-items: start;
}

/* ── Bloque rectangular / Tarjeta esquema ── */
.c2-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), border-color .22s, box-shadow .22s;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  animation: rise .45s cubic-bezier(.2,.8,.2,1) both;
}
.c2-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,122,26,.55);
  box-shadow: 0 12px 30px -6px rgba(255,94,0,.28), 0 0 0 1px rgba(255,122,26,.2);
}

/* ── Cabecera de la tarjeta: Título + Badge de número + Dominio ── */
.c2-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.c2-head-info {
  flex: 1;
  min-width: 0;
}
.c2-card-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.c2-card-badge-num {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(255,122,26,.12);
  border: 1px solid rgba(255,122,26,.3);
  padding: 2px 7px;
  border-radius: 6px;
  flex: none;
}
.c2-card-titulo {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--paper);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.c2-tienda-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.c2-dominio-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.c2-icon-globe {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255,122,26,.14);
  color: var(--amber);
  display: grid;
  place-items: center;
  flex: none;
}
.c2-icon-globe svg {
  width: 14px;
  height: 14px;
}
.c2-dominio-txt {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--paper);
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.c2-correo-vacio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #fbbf24;
  background: rgba(251,191,36,.1);
  border: 1px dashed rgba(251,191,36,.3);
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .16s;
}
.c2-correo-vacio:hover {
  background: rgba(251,191,36,.2);
  border-color: #fbbf24;
}
.c2-sub-row {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.c2-correo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  font-family: var(--mono);
  background: rgba(255,255,255,.04);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.06);
  cursor: pointer;
  transition: all .16s;
}
.c2-correo-chip:hover {
  background: var(--panel-2);
  color: var(--paper);
  border-color: rgba(255,122,26,.4);
}
.c2-correo-chip svg {
  width: 13px;
  height: 13px;
  color: var(--amber);
}

.c2-head-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
}
.c2-btn-edit {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 7px;
}
.c2-btn-del {
  appearance: none;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 18px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 6px;
  line-height: 1;
  transition: all .15s;
}
.c2-btn-del:hover {
  background: rgba(255,90,95,.15);
  color: #ff8a8d;
}

/* ── Estructura de Esquema Jerárquico (Árbol) ── */
.c2-esquema-arbol {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.c2-nodo {
  display: flex;
  align-items: stretch;
  gap: 10px;
  position: relative;
}
.c2-rama-linea {
  width: 14px;
  flex: none;
  border-left: 2px dashed rgba(255,122,26,.4);
  border-bottom: 2px dashed rgba(255,122,26,.4);
  border-bottom-left-radius: 8px;
  margin: 0 0 14px 4px;
}
.c2-nodo-contenido {
  flex: 1;
  min-width: 0;
}
.c2-etiqueta-nodo {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.c2-etiqueta-nodo::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}

/* ── Sub-bloque: Producto ── */
.c2-bloque-producto {
  background: rgba(255,255,255,.025);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.c2-prod-thumb-wrap {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  flex: none;
}
.c2-prod-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.c2-prod-detalles {
  flex: 1;
  min-width: 0;
}
.c2-prod-nombre {
  font-size: 13px;
  font-weight: 600;
  color: var(--paper);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.c2-prod-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.c2-meta-tag {
  background: rgba(255,122,26,.1);
  color: var(--naranja-claro);
  padding: 2px 7px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 10.5px;
}

/* ── Sub-bloque: Redes Sociales Vinculadas ── */
.c2-bloque-redes {
  background: rgba(255,255,255,.025);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.c2-redes-lista {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.c2-red-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid rgba(255,255,255,.04);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all .15s;
}
.c2-red-item:hover {
  border-color: rgba(255,122,26,.35);
  background: #252525;
}
.c2-red-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--paper);
  flex: none;
}
.c2-red-cred {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.c2-red-user {
  font-family: var(--mono);
  color: var(--paper);
  font-weight: 500;
}
.c2-red-email {
  color: var(--muted);
  font-size: 10.5px;
}
.c2-sin-redes {
  color: var(--muted);
  font-size: 11.5px;
  font-style: italic;
  padding: 4px 0;
}

/* ── Redes Común (correo único para las 3 redes) ── */
.c2-redes-comun-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.c2-redes-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.c2-red-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-2);
  border: 1px solid rgba(255,255,255,.07);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--paper);
}
.c2-redes-card-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.c2-redes-card-correo {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Contador de Días Activo y Alertas a los 15 días ── */
.c2-contador-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: var(--paper);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .16s ease;
}
.c2-contador-btn.sin-iniciar {
  background: rgba(255,122,26,.12);
  border-color: rgba(255,122,26,.38);
  color: var(--amber);
}
.c2-contador-btn.sin-iniciar:hover {
  background: rgba(255,122,26,.22);
  border-color: var(--amber);
  transform: scale(1.02);
}
.c2-contador-btn.activo {
  background: rgba(34,197,94,.12);
  border-color: rgba(34,197,94,.4);
  color: #4ade80;
}
.c2-contador-btn.activo:hover {
  background: rgba(34,197,94,.2);
  border-color: #4ade80;
}
.c2-contador-btn.alerta {
  background: rgba(239,68,68,.18);
  border-color: rgba(239,68,68,.55);
  color: #fca5a5;
  animation: c2-pulso-alerta 2s infinite ease-in-out;
}
@keyframes c2-pulso-alerta {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.4); }
  50% { box-shadow: 0 0 0 5px rgba(239,68,68,.12); }
}

.c2-banner-alerta-15 {
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.38);
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.c2-alerta-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.c2-alerta-ico {
  font-size: 20px;
  line-height: 1.2;
  flex: none;
}
.c2-alerta-txt strong {
  color: #fca5a5;
  font-size: 13px;
  display: block;
}
.c2-alerta-txt p {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: var(--paper);
}
.c2-alerta-acciones {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.c2-dias-control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.c2-alerta-global-barra {
  margin-bottom: 18px;
  padding: 12px 16px;
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.35);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--paper);
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════
   MODAL CUENTAS 2.0 (SECCIONES ESTILO MOCKUP CHATGPT)
   ═══════════════════════════════════════════════════════════════ */
.c2-modal-dialog {
  max-width: 660px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,.8), 0 0 0 1px rgba(255,122,26,.15);
}
.c2-modal-header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.c2-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--paper);
}
.c2-modal-header p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.c2-modal-seccion {
  background: rgba(255,255,255,.025);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.c2-seccion-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.c2-seccion-ico {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,122,26,.14);
  color: var(--amber);
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid rgba(255,122,26,.25);
}
.c2-seccion-ico svg {
  width: 18px;
  height: 18px;
}
.c2-seccion-textos h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--paper);
}
.c2-seccion-textos p {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

/* Campos con icono integrado */
.c2-campo-icono {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}
.c2-campo-icono svg {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.c2-campo-icono input,
.c2-campo-icono select {
  padding-left: 36px !important;
  width: 100%;
}

/* Bloque Producto: Split subida imagen / datos Dropi */
.c2-prod-split {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  align-items: stretch;
}
.c2-subir-box {
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  cursor: pointer;
  transition: all .2s;
  background: rgba(0,0,0,.2);
  min-height: 110px;
  position: relative;
  overflow: hidden;
}
.c2-subir-box:hover {
  border-color: var(--amber);
  background: rgba(255,122,26,.06);
}
.c2-subir-preview {
  width: 100%;
  height: 100%;
  max-height: 110px;
  object-fit: cover;
  border-radius: 8px;
}
.c2-subir-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 10.5px;
}
.c2-subir-prompt svg {
  width: 24px;
  height: 24px;
  color: var(--amber);
  margin-bottom: 2px;
}
.c2-subir-prompt strong {
  color: var(--paper);
  font-size: 12px;
  font-weight: 500;
}
.c2-prod-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

/* Filas de Redes Sociales en el modal */
.c2-redes-form-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.c2-red-form-row {
  display: grid;
  grid-template-columns: 105px 1fr 1fr;
  gap: 8px;
  align-items: center;
}
.c2-red-label {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--paper);
}

.c2-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

@media(max-width: 600px) {
  .c2-prod-split {
    grid-template-columns: 1fr;
  }
  .c2-red-form-row {
    grid-template-columns: 1fr;
  }
}
