/* ============================================================
   Portal de Propietarios — dl-portal
   ============================================================ */

.dl-portal {
    font-family: inherit;
}

/* Tabs */
.dl-portal-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2rem;
}

.dl-portal-tab {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .2s, border-color .2s;
}

.dl-portal-tab.active,
.dl-portal-tab:hover {
    color: #d97706;
    border-bottom-color: #d97706;
}

/* Panels */
.dl-portal-panel h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.dl-portal-desc {
    color: #6b7280;
    margin-bottom: 1.5rem;
    font-size: .95rem;
}

/* Form */
.dl-portal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dl-field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.dl-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 576px) {
    .dl-field-row { grid-template-columns: 1fr; }
}

.dl-field label {
    font-size: .9rem;
    font-weight: 500;
    color: #374151;
}

.dl-field input[type="text"],
.dl-field input[type="email"],
.dl-field input[type="tel"],
.dl-field input[type="url"],
.dl-field input[type="password"],
.dl-field textarea {
    padding: .6rem .85rem;
    border: 1px solid #d1d5db;
    border-radius: .5rem;
    font-size: .95rem;
    width: 100%;
    transition: border-color .2s;
    box-sizing: border-box;
}

.dl-field input:focus,
.dl-field textarea:focus {
    outline: none;
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, .12);
}

.dl-field-check label {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
}

.required { color: #ef4444; }

/* Button */
.dl-portal-btn {
    background: #d97706;
    color: #fff;
    border: none;
    padding: .75rem 1.5rem;
    border-radius: .5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.dl-portal-btn:hover { background: #b45309; color: #fff; }

.dl-btn-outline {
    background: transparent;
    color: #d97706;
    border: 2px solid #d97706;
}

.dl-btn-outline:hover {
    background: #d97706;
    color: #fff;
}

/* Message */
.dl-portal-message {
    padding: .75rem 1rem;
    border-radius: .5rem;
    font-size: .9rem;
}

.dl-portal-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.dl-portal-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Dashboard header */
.dl-portal-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.dl-portal-header h2 { margin: 0; flex: 1; }

.dl-portal-plan,
.dl-portal-expires {
    font-size: .85rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: .25rem .75rem;
    border-radius: 999px;
}

/* Link */
.dl-portal-link {
    color: #d97706;
    font-size: .9rem;
    text-decoration: none;
}

.dl-portal-link:hover { text-decoration: underline; }

/* Footer row */
.dl-portal-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    font-size: .9rem;
    color: #6b7280;
}

/* Options list */
.dl-portal-options {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Admin status badges */
.dl-status-badge { padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.dl-status-pending  { background: #fef3c7; color: #92400e; }
.dl-status-approved { background: #d1fae5; color: #065f46; }
.dl-status-rejected { background: #fee2e2; color: #991b1b; }

/* ============================================================
   Sección de planes compacta en portal /mi-negocio/
   ============================================================ */

.dl-portal-plans {
    margin-bottom: 1.5rem;
}

.dl-portal-plans-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    text-align: center;
}

.dl-plan-card {
    border: 1px solid #e5e7eb;
    border-radius: .75rem;
    padding: 1.25rem 1rem;
    text-align: center;
    background: #fff;
    position: relative;
    transition: box-shadow .2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.dl-plan-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

.dl-plan-card--popular {
    border-color: #d97706;
    box-shadow: 0 2px 12px rgba(217, 119, 6, .15);
}

.dl-plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #d97706;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: .2rem .7rem;
    border-radius: 999px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.dl-plan-name {
    font-weight: 700;
    font-size: 1rem;
    color: #111827;
    margin-top: .5rem;
}

.dl-plan-price {
    font-size: 1.4rem;
    color: #111827;
    line-height: 1;
}

.dl-plan-period {
    font-size: .8rem;
    color: #6b7280;
}

.dl-plan-features {
    list-style: none;
    padding: 0;
    margin: .25rem 0 .5rem;
    text-align: left;
    font-size: .85rem;
    color: #4b5563;
    flex: 1;
}

.dl-plan-features li {
    padding: .2rem 0;
    padding-left: 1.1em;
    position: relative;
}

.dl-plan-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 700;
}

/* ============================================================
   Banner de alerta de vencimiento de plan
   ============================================================ */
.dl-plan-alert {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1.1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: .9rem;
    flex-wrap: wrap;
}

.dl-plan-alert--warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.dl-plan-alert--expired {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #991b1b;
}

.dl-plan-alert-icon {
    font-weight: 900;
    font-size: 1rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dl-plan-alert--warning .dl-plan-alert-icon {
    background: #f59e0b;
    color: #fff;
}

.dl-plan-alert--expired .dl-plan-alert-icon {
    background: #ef4444;
    color: #fff;
}

.dl-plan-alert > span:last-of-type {
    flex: 1;
}

.dl-plan-alert-btn {
    background: #d97706;
    color: #fff;
    border: none;
    padding: .4rem .9rem;
    border-radius: .4rem;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
    margin-left: auto;
}

.dl-plan-alert-btn:hover {
    background: #b45309;
    color: #fff;
}

.dl-plan-alert--expired .dl-plan-alert-btn {
    background: #dc2626;
}

.dl-plan-alert--expired .dl-plan-alert-btn:hover {
    background: #b91c1c;
    color: #fff;
}

/* ============================================================
   Widget de estadísticas del owner dashboard
   ============================================================ */
.dl-portal-stats {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
}

.dl-portal-stats-title {
    font-size: .95rem;
    font-weight: 700;
    color: #0369a1;
    margin: 0 0 1rem;
}

.dl-portal-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
}

@media (max-width: 600px) {
    .dl-portal-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.dl-stat-card {
    background: #fff;
    border: 1px solid #e0f2fe;
    border-radius: 8px;
    padding: .75rem;
    text-align: center;
}

.dl-stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: #0284c7;
    line-height: 1;
}

.dl-stat-label {
    display: block;
    font-size: .75rem;
    color: #64748b;
    margin-top: .25rem;
}

.dl-portal-stats-upsell {
    margin: .75rem 0 0;
    font-size: .85rem;
}

.dl-portal-upgrade-cta {
    color: #0369a1;
    font-weight: 600;
    text-decoration: none;
}

.dl-portal-upgrade-cta:hover { text-decoration: underline; }

/* Sección de upgrade con botones de plan */
.dl-upsell-intro {
    font-size: .82rem;
    color: #0369a1;
    margin: 0 0 .6rem;
    font-weight: 500;
}

.dl-upsell-btns {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.dl-upsell-btns .dl-plan-alert-btn {
    flex: 1;
    min-width: 140px;
    text-align: center;
    font-size: .82rem;
}

/* Estado loading del botón de checkout */
.dl-btn-loading {
    opacity: .65;
    cursor: wait;
    pointer-events: none;
}

.dl-plan-cta {
    background: #d97706;
    color: #fff;
    border: none;
    padding: .55rem 1rem;
    border-radius: .5rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    width: 100%;
    margin-top: auto;
}

.dl-plan-cta:hover { background: #b45309; }

.dl-portal-divider {
    margin: 0 0 1.75rem;
    border-color: #e5e7eb;
}

.dl-portal-plans-note {
    text-align: center;
    font-size: .85rem;
    color: #6b7280;
    margin-top: .5rem;
}

.dl-portal-plans-note a {
    color: #d97706;
    text-decoration: none;
}

/* Paso 0: claim vs registro */
.dl-portal-claim-path {
    display: flex;
    gap: 1rem;
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: .75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    align-items: flex-start;
}
.dl-portal-claim-path-icon {
    font-size: 1.4rem;
    color: #2563eb;
    flex-shrink: 0;
    margin-top: .1rem;
}
.dl-portal-claim-path-body {
    flex: 1;
}
.dl-portal-claim-path-body strong {
    display: block;
    font-size: .95rem;
    color: #1e3a5f;
    margin-bottom: .3rem;
}
.dl-portal-claim-path-body p {
    font-size: .83rem;
    color: #374151;
    margin: 0 0 .6rem;
    line-height: 1.5;
}
.dl-portal-claim-path-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    padding: .35rem .8rem;
    border: 1.5px solid #2563eb;
    border-radius: .5rem;
    transition: background .15s, color .15s;
}
.dl-portal-claim-path-link:hover {
    background: #2563eb;
    color: #fff;
}
.dl-portal-separator-text {
    text-align: center;
    font-size: .82rem;
    color: #9ca3af;
    margin: .5rem 0 1.25rem;
    position: relative;
}

/* Social proof badge */
.dl-portal-social-proof {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: .5rem;
    padding: .6rem 1rem;
    margin-bottom: 1.5rem;
    font-size: .88rem;
    color: #065f46;
}

.dl-portal-social-icon {
    background: #10b981;
    color: #fff;
    font-size: .75rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Steps list */
.dl-portal-steps {
    margin: 0 0 1.25rem;
    padding-left: 1.25rem;
    font-size: .88rem;
    color: #374151;
    line-height: 1.7;
}

.dl-portal-steps li {
    margin-bottom: .25rem;
}

.dl-portal-plans-note a:hover { text-decoration: underline; }

/* Plan radio selector en formulario de registro */
.dl-plan-radio-group {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top: .4rem;
}
.dl-plan-radio {
    display: flex;
    align-items: center;
    gap: .75rem;
    border: 2px solid #e5e7eb;
    border-radius: .5rem;
    padding: .65rem 1rem;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    font-size: .9rem;
}
.dl-plan-radio:hover {
    border-color: #2a9d5c;
    background: #f0faf4;
}
.dl-plan-radio--selected,
.dl-plan-radio:has(input:checked) {
    border-color: #2a9d5c;
    background: #f0faf4;
}
.dl-plan-radio input[type="radio"] {
    accent-color: #2a9d5c;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.dl-plan-radio-name {
    flex: 1;
    font-weight: 600;
    color: #1a1a2e;
}
.dl-plan-radio-price {
    font-weight: 700;
    color: #2a9d5c;
    font-size: .85rem;
}
.dl-field-hint {
    font-size: .78rem;
    color: #6b7280;
    margin-top: .4rem;
    margin-bottom: 0;
}

/* Campo bloqueado por plan */
.dl-field-locked textarea {
    opacity: .45;
    cursor: not-allowed;
    background: #f9fafb;
}

.dl-field-lock-badge {
    display: inline-block;
    font-size: .65rem;
    font-weight: 700;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 999px;
    padding: .1rem .5rem;
    margin-left: .4rem;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.dl-field-locked .dl-field-hint a {
    color: #d97706;
    font-weight: 600;
    text-decoration: none;
}

.dl-field-locked .dl-field-hint a:hover {
    text-decoration: underline;
}
