/* === Soul de Loto – Frontend CSS === */
:root {
    --sdl-primary:   #8B4A6B;
    --sdl-accent:    #C9956A;
    --sdl-success:   #2e7d32;
    --sdl-warning:   #e65100;
    --sdl-bg:        #fdf8f5;
    --sdl-border:    #e8ddd5;
    --sdl-text:      #2c1810;
    --sdl-muted:     #8a7a72;
}

/* Dashboard */
.sdl-dashboard { max-width: 900px; }
.sdl-dashboard__header {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 24px; padding: 20px;
    background: var(--sdl-bg); border-radius: 12px;
    border: 0.5px solid var(--sdl-border);
}
.sdl-dashboard__header h2 { margin: 0 0 6px; font-size: 20px; color: var(--sdl-text); }
.sdl-dashboard__logo { height: 56px; object-fit: contain; }
.sdl-dashboard__role { margin: 0; }
.sdl-dashboard__desc { margin: 8px 0 0; font-size: 13px; color: var(--sdl-muted); line-height: 1.45; }

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

.sdl-stat-card {
    background: #fff; border: 0.5px solid var(--sdl-border);
    border-radius: 12px; padding: 18px 16px; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.sdl-stat-card--success { border-color: #a5d6a7; background: #f1f8e9; }
.sdl-stat-card__icon  { font-size: 24px; }
.sdl-stat-card__value { font-size: 22px; font-weight: 700; color: var(--sdl-primary); }
.sdl-stat-card__label { font-size: 12px; color: var(--sdl-muted); }
.sdl-stat-card__sub   { font-size: 11px; color: var(--sdl-muted); }

/* Link box */
.sdl-link-box {
    background: var(--sdl-bg); border: 1.5px solid var(--sdl-accent);
    border-radius: 12px; padding: 20px; margin-bottom: 28px;
}
.sdl-link-box__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--sdl-muted); margin-bottom: 8px; }
.sdl-link-box__url { display: flex; gap: 8px; }
.sdl-link-box__url input {
    flex: 1; border: 1px solid var(--sdl-border); border-radius: 6px; padding: 8px 12px;
    font-size: 13px; background: #fff; color: var(--sdl-text);
}
.sdl-link-box__code { font-size: 13px; color: var(--sdl-muted); margin-top: 8px; }
.sdl-btn-copy { background: var(--sdl-primary); color: #fff; border: none; border-radius: 6px; padding: 8px 16px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.sdl-btn-copy:hover { opacity: .85; }

/* Section */
.sdl-section h3 { font-size: 16px; color: var(--sdl-text); margin-bottom: 12px; border-bottom: 1.5px solid var(--sdl-border); padding-bottom: 8px; }
.sdl-empty { color: var(--sdl-muted); font-style: italic; padding: 20px 0; }

/* Table */
.sdl-table-wrapper { overflow-x: auto; }
.sdl-commissions-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sdl-commissions-table th { background: var(--sdl-primary); color: #fff; padding: 10px 12px; text-align: left; }
.sdl-commissions-table td { padding: 10px 12px; border-bottom: 0.5px solid var(--sdl-border); }
.sdl-commissions-table tr:last-child td { border-bottom: none; }
.sdl-commissions-table tr:hover td { background: var(--sdl-bg); }

/* Status pills */
.sdl-status { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.sdl-status--pending  { background: #fff3e0; color: #e65100; }
.sdl-status--paid     { background: #e8f5e9; color: #2e7d32; }
.sdl-status--cancelled{ background: #f5f5f5; color: #757575; }

/* Attribution */
.sdl-attr { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; }
.sdl-attr--referral { background: #e0f2f1; color: #00695c; }
.sdl-attr--direct   { background: #fff8e1; color: #f57f17; }

/* Profile pills */
.sdl-profile { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.sdl-profile--comisionista  { background: #e8eaf6; color: #283593; }
.sdl-profile--asesora       { background: #f3e5f5; color: #6a1b9a; }
.sdl-profile--intermediaria { background: #f3e5f5; color: #6a1b9a; }
.sdl-profile--revendedora   { background: #fce4ec; color: #880e4f; }

/* Registration form */
.sdl-register-wrap { max-width: 620px; }
.sdl-notice { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.sdl-notice--success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.sdl-notice--error   { background: #fce4ec; color: #880e4f; border: 1px solid #f48fb1; }
.sdl-notice--info    { background: #e3f2fd; color: #0d47a1; border: 1px solid #90caf9; }

.sdl-register-form { display: flex; flex-direction: column; gap: 16px; }
.sdl-form-row { display: flex; flex-direction: column; gap: 16px; }
.sdl-form-row--2col { flex-direction: row; }
@media (max-width: 480px) { .sdl-form-row--2col { flex-direction: column; } }
.sdl-form-field { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.sdl-form-field label { font-size: 13px; font-weight: 600; color: var(--sdl-text); }
.sdl-form-field input, .sdl-form-field select { border: 1px solid var(--sdl-border); border-radius: 6px; padding: 9px 12px; font-size: 14px; }
.required { color: var(--sdl-primary); }

/* Registration intro */
.sdl-register-intro { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 0.5px solid var(--sdl-border); }
.sdl-register-intro h2 { font-size: 22px; color: var(--sdl-primary); margin: 0 0 6px; }
.sdl-register-intro p  { margin: 0; color: var(--sdl-muted); font-size: 14px; }

/* Profile cards */
.sdl-profile-cards { display: flex; flex-direction: column; gap: 10px; }
.sdl-profile-card { cursor: pointer; }
.sdl-profile-card input[type=radio] { position: absolute; opacity: 0; }
.sdl-profile-card__inner { display: flex; align-items: center; gap: 14px; border: 1.5px solid var(--sdl-border); border-radius: 10px; padding: 16px 18px; transition: border-color .15s, background .15s; }
.sdl-profile-card input:checked + .sdl-profile-card__inner { border-color: var(--sdl-primary); background: #fdf0f5; }
.sdl-profile-card__rate { font-size: 24px; font-weight: 800; color: var(--sdl-primary); min-width: 50px; }
.sdl-profile-card__body { display: flex; flex-direction: column; gap: 3px; }
.sdl-profile-card__name { font-size: 15px; font-weight: 700; color: var(--sdl-text); }
.sdl-profile-card__desc { font-size: 12.5px; color: var(--sdl-muted); line-height: 1.4; }
.sdl-checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--sdl-muted); cursor: pointer; }
.sdl-checkbox input { margin-top: 2px; flex-shrink: 0; }
.sdl-submit-btn { background: var(--sdl-primary); color: #fff; border: none; border-radius: 8px; padding: 13px 28px; font-size: 15px; font-weight: 600; cursor: pointer; align-self: flex-start; transition: opacity .15s; }
.sdl-submit-btn:hover { opacity: .85; }

/* === Widget de asesora en producto === */
.sdl-pw { margin: 22px 0; padding: 18px 20px; border-radius: 12px; border: 1.5px solid var(--sdl-accent); background: linear-gradient(135deg, var(--sdl-bg) 0%, #fff 100%); max-width: 480px; }
.sdl-pw__header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.sdl-pw__title  { font-size: 15px; font-weight: 700; color: var(--sdl-primary); }
.sdl-pw__intro  { margin: 0 0 14px; font-size: 13px; color: var(--sdl-muted); line-height: 1.45; }
.sdl-pw__advisor { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 14px; background: #fff; border-radius: 10px; border: 0.5px solid var(--sdl-border); }
.sdl-pw__avatar { width: 56px !important; height: 56px !important; border-radius: 50%; object-fit: cover; border: 2px solid var(--sdl-accent); }
.sdl-pw__advisor-info { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.sdl-pw__advisor-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--sdl-muted); font-weight: 600; }
.sdl-pw__advisor-name  { font-size: 16px; font-weight: 700; color: var(--sdl-text); }
.sdl-pw__advisor-code  { font-size: 12px; color: var(--sdl-muted); }
.sdl-pw__btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 18px; border: none; border-radius: 10px; cursor: pointer; font-size: 15px; font-weight: 600; text-decoration: none; transition: opacity .15s, transform .15s; }
.sdl-pw__btn--wa { background: #25D366; color: #fff; }
.sdl-pw__btn--wa:hover { opacity: .9; transform: translateY(-1px); color: #fff; }
.sdl-pw__btn svg { flex-shrink: 0; }

/* ── Pending dashboard ─────────────────────────── */
.sdl-pending-box { background: #fff8e1; border: 1px solid #ffe082; border-radius: 12px; padding: 32px 24px; text-align: center; margin-bottom: 24px; }
.sdl-pending-box__icon { font-size: 48px; margin-bottom: 12px; }
.sdl-pending-box h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; color: #5d4037; }
.sdl-pending-box p { color: #6d4c41; margin-bottom: 6px; }
.sdl-pending-box__sub { font-size: 13px; opacity: .75; }
.sdl-checklist { list-style: none; padding: 0; margin: 0; }
.sdl-checklist li { padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 15px; }
.sdl-checklist li:last-child { border-bottom: none; }
.sdl-profile--pending { background: #fff3e0; color: #e65100; padding: 3px 10px; border-radius: 20px; font-size: 13px; font-weight: 600; }

/* ═══════════════════════════════════════════════════
   SDL Dashboard v2 — rediseño completo
   ═══════════════════════════════════════════════════ */

.woocommerce-account .entry-title,
.woocommerce-account h1.page-title { display: none !important; }
.sdl-asesora-dashboard .woocommerce-MyAccount-navigation { display: none !important; }
.sdl-db { max-width: 860px; font-family: inherit; }

/* ── Hero ─────────────────────────────────────────── */
.sdl-db__hero {
    background: linear-gradient(135deg, #fce4f2 0%, #fdf0e6 100%);
    border: 1px solid #f0d0e4; border-radius: 16px;
    padding: 28px 32px; margin-bottom: 20px;
    display: flex; align-items: center; justify-content: space-between;
}
.sdl-db__hero-left { display: flex; align-items: center; gap: 20px; min-width: 0; }
.sdl-db__logo { height: 52px; object-fit: contain; flex-shrink: 0; }
.sdl-db__greeting { min-width: 0; }
.sdl-db__greeting h2 { margin: 0 0 8px; font-size: 22px; font-weight: 700; color: #3d1a2b; line-height: 1.2; overflow-wrap: break-word; }

/* Badges */
.sdl-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.sdl-badge--comisionista { background: #e8eaf6; color: #283593; border: 1px solid #c5cae9; }
.sdl-badge--asesora      { background: #f3e5f5; color: #6a1b9a; border: 1px solid #ce93d8; }
.sdl-badge--pending      { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }

/* ── Logout ───────────────────────────────────────── */
.sdl-db__logout-btn { display: inline-block; padding: 7px 16px; border: 1px solid #c9a0b8; border-radius: 20px; font-size: 12px; font-weight: 600; color: #7a3d5d; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.sdl-db__logout-btn:hover { background: #8B4A6B; color: #fff; border-color: #8B4A6B; }

/* ── Stats ────────────────────────────────────────── */
.sdl-db__stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 640px) { .sdl-db__stats { grid-template-columns: repeat(2,1fr); } }
.sdl-db__stat { background: #fff; border: 1px solid #f0e8e3; border-radius: 14px; padding: 20px 16px; text-align: center; transition: box-shadow .15s; }
.sdl-db__stat:hover { box-shadow: 0 4px 16px rgba(139,74,107,.1); }
.sdl-db__stat--success { background: linear-gradient(135deg, #f0faf0 0%, #e8f5e9 100%); border-color: #c8e6c9; }
.sdl-db__stat-icon  { font-size: 26px; margin-bottom: 8px; }
.sdl-db__stat-val   { font-size: 24px; font-weight: 800; color: #3d1a2b; margin-bottom: 4px; line-height: 1; }
.sdl-db__stat--success .sdl-db__stat-val { color: #2e7d32; }
.sdl-db__stat-label { font-size: 11px; color: #8a7a72; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.sdl-db__stat-sub   { font-size: 11px; color: #b0a09a; margin-top: 4px; }

/* ── Referral box ─────────────────────────────────── */
.sdl-db__refbox { background: linear-gradient(135deg, #fdf6f0 0%, #fff 100%); border: 1.5px solid #C9956A; border-radius: 14px; padding: 22px 24px; margin-bottom: 24px; }
.sdl-db__refbox-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sdl-db__refbox-label { font-size: 14px; font-weight: 700; color: #3d1a2b; margin-bottom: 4px; }
.sdl-db__refbox-code  { font-size: 12px; color: #8a7a72; }
.sdl-db__refbox-url input { width: 100%; border: 1px solid #e8ddd5; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #5a4a42; background: #fff; box-sizing: border-box; }
.sdl-db__copy-btn { background: #8B4A6B; color: #fff; border: none; border-radius: 8px; padding: 10px 18px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s; flex-shrink: 0; }
.sdl-db__copy-btn:hover { background: #7a3d5d; }
#sdl-copy-msg { margin-top: 10px; font-size: 13px; color: #2e7d32; font-weight: 600; }

/* ── Message box ──────────────────────────────────── */
.sdl-db__msgbox { background: linear-gradient(135deg, #fdf0f7 0%, #fff 100%); border: 1.5px solid #8B4A6B; border-radius: 14px; padding: 22px 24px; margin-bottom: 24px; }
.sdl-db__msgbox-label { font-size: 14px; font-weight: 700; color: #3d1a2b; margin-bottom: 12px; }
.sdl-db__msgbox textarea { width: 100%; border: 1px solid #e8ddd5; border-radius: 8px; padding: 12px 14px; font-size: 14px; line-height: 1.6; color: #3d1a2b; background: #fafafa; box-sizing: border-box; resize: none; font-family: inherit; }
.sdl-db__msgbox-footer { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
#sdl-msg-copied { font-size: 13px; color: #2e7d32; font-weight: 600; }

/* ── Section ──────────────────────────────────────── */
.sdl-db__section-title { font-size: 15px; font-weight: 700; color: #3d1a2b; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid #f0e8e3; text-transform: uppercase; letter-spacing: .04em; }

/* ── Empty state ──────────────────────────────────── */
.sdl-db__empty { text-align: center; padding: 40px 20px; background: #fdf8f5; border-radius: 12px; border: 1px dashed #e8ddd5; }
.sdl-db__empty span { font-size: 36px; display: block; margin-bottom: 10px; }
.sdl-db__empty p { color: #8a7a72; margin: 0; font-size: 14px; }

/* ── Table ────────────────────────────────────────── */
.sdl-db__table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid #f0e8e3; }
.sdl-db__table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
.sdl-db__table thead tr { background: #3d1a2b; }
.sdl-db__table th { padding: 12px 14px; text-align: left; color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.sdl-db__table td { padding: 12px 14px; border-bottom: 1px solid #faf5f2; color: #3d1a2b; vertical-align: middle; }
.sdl-db__table tbody tr:last-child td { border-bottom: none; }
.sdl-db__table tbody tr:hover td { background: #fdf8f5; }

/* Tags */
.sdl-tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.sdl-tag--pending   { background: #fff3e0; color: #e65100; }
.sdl-tag--paid      { background: #e8f5e9; color: #2e7d32; }
.sdl-tag--cancelled { background: #f5f5f5; color: #757575; }
.sdl-tag--referral  { background: #e0f2f1; color: #00695c; }
.sdl-tag--direct    { background: #fce4ec; color: #880e4f; }

/* ── Pending card ─────────────────────────────────── */
.sdl-db__pending-card { background: linear-gradient(135deg, #fffbf0 0%, #fff8e1 100%); border: 1.5px solid #ffe082; border-radius: 16px; padding: 36px 32px; text-align: center; margin-bottom: 24px; }
.sdl-db__pending-icon { font-size: 48px; margin-bottom: 14px; }
.sdl-db__pending-card h3 { font-size: 20px; font-weight: 800; color: #3d1a2b; margin: 0 0 12px; }
.sdl-db__pending-card p { color: #6d4c41; margin: 0 0 8px; font-size: 14px; line-height: 1.6; }
.sdl-db__pending-sub { font-size: 12px !important; opacity: .7; }

/* ── Checklist ────────────────────────────────────── */
.sdl-db__checklist { display: flex; flex-direction: column; gap: 2px; }
.sdl-db__check-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 10px; font-size: 14px; color: #3d1a2b; transition: background .12s; }
.sdl-db__check-item:hover { background: #fdf8f5; }
.sdl-db__check-icon { font-size: 20px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════
   Overrides de tema VamTam — Dashboard asesora
   ═══════════════════════════════════════════════════ */

/* ── 1. Eliminar título de la página ─────────────── */
.sdl-asesora-dashboard #sub-header,
.sdl-asesora-dashboard .sub-header,
.sdl-asesora-dashboard .page-header,
.sdl-asesora-dashboard .meta-header,
.sdl-asesora-dashboard .entry-title,
.sdl-asesora-dashboard h1.page-title,
.sdl-asesora-dashboard .woocommerce > h1,
.sdl-asesora-dashboard .woocommerce > h2:first-child,
.sdl-asesora-dashboard .elementor-page-title {
    display: none !important;
}

/* ── 2. Ocultar nav WooCommerce ──────────────────── */
.sdl-asesora-dashboard .woocommerce-MyAccount-navigation {
    display: none !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── 3. Contenido full-width ─────────────────────── */
.sdl-asesora-dashboard .woocommerce-MyAccount-content {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* ── 4. Wrappers VamTam sin restricción ──────────── */
.sdl-asesora-dashboard .woocommerce,
.sdl-asesora-dashboard .vgblk-rw-wrapper,
.sdl-asesora-dashboard .page-content {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ── 5. Dashboard con margen lateral cómodo ──────── */
.sdl-asesora-dashboard .sdl-db {
    max-width: 100% !important;
    width: 100% !important;
    padding: 32px 72px !important;
    box-sizing: border-box !important;
}

/* ── 6. Fix texto vertical VamTam ────────────────── */
.sdl-db, .sdl-db * {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    letter-spacing: normal !important;
}

/* ── 7. Hero espacioso ───────────────────────────── */
.sdl-db__hero {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    padding: 32px 40px !important;
    box-sizing: border-box !important;
    margin-bottom: 28px !important;
}

.sdl-db__hero-left {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 24px !important;
    flex: 1 !important;
    min-width: 0 !important;
}

/* ── 8. Logo más grande ──────────────────────────── */
.sdl-db__logo {
    flex-shrink: 0 !important;
    height: 88px !important;
    max-height: 88px !important;
    width: auto !important;
    max-width: 240px !important;
    object-fit: contain !important;
}

/* ── 9. Nombre + badge en la misma línea ─────────── */
.sdl-db__greeting {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
    flex-wrap: wrap !important;
    min-width: 0 !important;
}

.sdl-db__greeting h2 {
    font-size: 28px !important;
    writing-mode: horizontal-tb !important;
    white-space: normal !important;
    word-break: normal !important;
    margin: 0 !important;
}

.sdl-db__logout-btn {
    writing-mode: horizontal-tb !important;
    white-space: nowrap !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

/* ── 10. Stats y cajas con más respiro ───────────── */
.sdl-db__stats { gap: 16px !important; margin-bottom: 28px !important; }
.sdl-db__stat  { padding: 24px 20px !important; }
.sdl-db__refbox, .sdl-db__msgbox { padding: 24px 28px !important; }
.sdl-db__table-wrap { width: 100% !important; }

/* ── 11. Mobile ──────────────────────────────────── */
@media (max-width: 768px) {
    .sdl-asesora-dashboard .sdl-db { padding: 20px 28px !important; }
}
@media (max-width: 640px) {
    .sdl-asesora-dashboard .sdl-db { padding: 16px 20px !important; }
    .sdl-db__stats        { grid-template-columns: 1fr 1fr !important; }
    .sdl-db__hero         { padding: 20px !important; }
    .sdl-db__logo         { height: 60px !important; max-width: 160px !important; }
    .sdl-db__greeting     { flex-direction: column !important; align-items: flex-start !important; gap: 8px !important; }
    .sdl-db__greeting h2  { font-size: 22px !important; }
    .sdl-db__refbox,
    .sdl-db__msgbox       { padding: 16px !important; }
    .sdl-db__refbox-top   { flex-direction: column !important; }
    .sdl-db__copy-btn     { width: 100% !important; text-align: center !important; }
}