/* ── Avisos ─────────────────────────────────────── */
.da-aviso {
  padding: 16px 20px;
  border-radius: 8px;
  background: #f0f4ff;
  border-left: 4px solid #3b82f6;
  margin: 16px 0;
  font-size: 15px;
}
.da-aviso.da-pendiente { background: #fffbeb; border-color: #f59e0b; }
.da-aviso.da-error     { background: #fef2f2; border-color: #ef4444; }
.da-aviso.da-ok        { background: #f0fdf4; border-color: #22c55e; }

/* ── Panel header ───────────────────────────────── */
.da-panel { font-family: -apple-system, sans-serif; max-width: 1100px; }

.da-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  background: #1e293b;
  color: #fff;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
}
.da-panel-header h2 { margin: 0 0 6px; font-size: 22px; }
.da-panel-header p  { margin: 0; opacity: .8; font-size: 14px; }
.da-codigo {
  background: rgba(255,255,255,.15);
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 16px;
  letter-spacing: 1px;
}

.da-link-base { flex: 1; min-width: 260px; }
.da-link-base label { display: block; font-size: 12px; opacity: .7; margin-bottom: 6px; }
.da-copy-row { display: flex; gap: 8px; }
.da-copy-row input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 13px;
}

/* ── Stats ──────────────────────────────────────── */
.da-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
@media(max-width:640px) { .da-stats-row { grid-template-columns: 1fr 1fr; } }

.da-stat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px 16px;
  text-align: center;
}
.da-stat.da-stat-money { border-color: #f59e0b; background: #fffbeb; }
.da-stat.da-stat-ok    { border-color: #22c55e; background: #f0fdf4; }
.da-stat-num { display: block; font-size: 26px; font-weight: 800; color: #1e293b; }
.da-stat-lbl { display: block; font-size: 12px; color: #64748b; margin-top: 4px; }

/* ── Tabs ───────────────────────────────────────── */
.da-tabs { display: flex; gap: 4px; border-bottom: 2px solid #e2e8f0; margin-bottom: 24px; }
.da-tab {
  background: none;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.da-tab.active { color: #e94560; border-bottom-color: #e94560; }

.da-tab-content { display: none; }
.da-tab-content.active { display: block; }
.da-tab-info { color: #64748b; font-size: 14px; margin-bottom: 20px; }

/* ── Grid productos ─────────────────────────────── */
.da-productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.da-producto-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.da-producto-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

.da-prod-img { aspect-ratio: 4/3; overflow: hidden; background: #f8fafc; }
.da-prod-img img { width: 100%; height: 100%; object-fit: cover; }

.da-prod-body { padding: 14px; }
.da-prod-nombre {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.da-prod-precio { font-size: 16px; font-weight: 800; color: #e94560; margin-bottom: 12px; }

.da-prod-acciones { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Botones ────────────────────────────────────── */
.da-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity .2s;
}
.da-btn:hover { opacity: .85; }
.da-btn-primary  { background: #e94560; color: #fff; padding: 12px 24px; font-size: 15px; border-radius: 8px; }
.da-btn-copy     { background: #1e293b; color: #fff; }
.da-btn-copy-link { background: #475569; color: #fff; }
.da-btn-wa       { background: #25d366; color: #fff; }
.da-btn-fb       { background: #1877f2; color: #fff; }

/* ── Tabla ──────────────────────────────────────── */
.da-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.da-table th { background: #f8fafc; padding: 10px 12px; text-align: left; font-weight: 600; color: #475569; border-bottom: 2px solid #e2e8f0; }
.da-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; }
.da-table tr:last-child td { border-bottom: none; }

/* ── Badges ─────────────────────────────────────── */
.da-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.da-badge-pendiente  { background: #fef9c3; color: #854d0e; }
.da-badge-activo     { background: #dcfce7; color: #166534; }
.da-badge-aprobada   { background: #dbeafe; color: #1e40af; }
.da-badge-pagada     { background: #d1fae5; color: #065f46; }
.da-badge-rechazada  { background: #fee2e2; color: #991b1b; }
.da-badge-suspendido { background: #f1f5f9; color: #475569; }

/* ── Empty ──────────────────────────────────────── */
.da-empty { text-align: center; padding: 40px; color: #94a3b8; font-size: 15px; }

/* ── Registro form ──────────────────────────────── */
.da-registro { max-width: 540px; }
.da-registro h2 { margin-top: 0; }
.da-form-group { margin-bottom: 20px; }
.da-form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: #374151; }
.da-form-group input,
.da-form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
}
.da-form-group input:focus,
.da-form-group textarea:focus { outline: none; border-color: #e94560; box-shadow: 0 0 0 3px rgba(233,69,96,.15); }
.da-form-info { background: #f0fdf4; border-radius: 8px; padding: 12px 16px; font-size: 13px; color: #166534; margin-bottom: 20px; }
.da-form-info p { margin: 0; }

/* ── Registro mejorado ──────────────────────────── */
.da-form-section-title {
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #64748b;
  margin-bottom: 16px;
}
.da-form-divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 24px 0;
}
.da-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media(max-width:480px) { .da-form-row { grid-template-columns: 1fr; } }
.da-optional { font-weight: 400; color: #94a3b8; font-size: 12px; }
.da-ya-cuenta { text-align: center; margin-top: 16px; font-size: 14px; color: #64748b; }
.da-ya-cuenta a { color: #e94560; font-weight: 600; }

/* ── Fase 2: nuevos estilos ─────────────────────── */

/* Badge comisión en el header */
.da-comision-badge {
  display: inline-block;
  margin-top: 10px;
  background: rgba(34,197,94,.2);
  color: #86efac;
  border: 1px solid rgba(34,197,94,.3);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 600;
}

/* Stat de tasa de conversión */
.da-stat.da-stat-pct { border-color: #818cf8; background: #eef2ff; }
.da-stat.da-stat-pct .da-stat-num { color: #4f46e5; }

/* Stats: 5 columnas en desktop */
.da-stats-row { grid-template-columns: repeat(5, 1fr); }
@media(max-width:900px) { .da-stats-row { grid-template-columns: repeat(3, 1fr); } }
@media(max-width:640px) { .da-stats-row { grid-template-columns: 1fr 1fr; } }

/* Badge de comisión sobre imagen del producto */
.da-prod-img { position: relative; }
.da-prod-comision-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #22c55e;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  pointer-events: none;
}

/* Tab Mi cuenta */
.da-cuenta-wrap { max-width: 540px; }
.da-cuenta-wrap h3 { color: #1e293b; margin: 0 0 8px; font-size: 16px; }
.da-form-cuenta { margin-bottom: 32px; }
.da-cuenta-info { margin-top: 8px; }
.da-table-info td { padding: 10px 12px; }
.da-table-info td:first-child { color: #64748b; width: 160px; }

/* ── Cómo funciona ──────────────────────────────── */
.da-como-funciona {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
@media(max-width:640px) { .da-como-funciona { grid-template-columns: 1fr; } }

.da-paso {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  position: relative;
  transition: box-shadow .2s;
}
.da-paso:hover { box-shadow: 0 4px 16px rgba(0,0,0,.07); }

.da-paso-icon {
  font-size: 32px;
  margin-bottom: 8px;
  line-height: 1;
}
.da-paso-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: #e94560;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}
.da-paso h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}
.da-paso p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.55;
}
