/* v315 — restauración Pacarito / prelanzamiento / referidos / perfil */

/* —— Promo alianza DraviPy × Pacarito —— */
.promo-alianza-wrap {
    width: 100%;
}
.promo-alianza-wrap--app {
    margin: .55rem 0 .85rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
}
.promo-alianza-wrap--landing {
    margin: 0;
}
.promo-alianza {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #0F172A;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
    line-height: 0;
}
.promo-alianza-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
}
.promo-alianza--app {
    max-height: 72px;
}
.promo-alianza--app .promo-alianza-img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    object-position: center;
}
.promo-alianza-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 100%;
    min-height: 40px;
    font-weight: 600;
}
.promo-alianza-cta .bi { font-size: 1em; }
.promo-alianza--landing {
    border-radius: 16px;
    max-width: 920px;
    margin-inline: auto;
    box-shadow: var(--dp-shadow-md, 0 12px 32px rgba(15, 23, 42, .12));
}
.promo-alianza--landing .promo-alianza-img {
    max-height: 160px;
    object-fit: cover;
}
.home-promo-alianza {
    padding: 1.25rem 0 0;
    background: var(--dp-bg, #F1F5F9);
}
@media (min-width: 768px) {
    .promo-alianza--app { max-height: 84px; }
    .promo-alianza--app .promo-alianza-img { height: 84px; }
    .promo-alianza--landing .promo-alianza-img { max-height: 180px; }
    .home-promo-alianza { padding: 1.75rem 0 0; }
}
@media (max-width: 420px) {
    .promo-alianza--app { max-height: 64px; }
    .promo-alianza--app .promo-alianza-img { height: 64px; }
}


.promo-alianza[hidden] { display: none !important; }
.promo-alianza-close {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, .55);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
}
.promo-alianza-close:hover,
.promo-alianza-close:focus-visible {
    background: rgba(15, 23, 42, .8);
    outline: none;
}


/* —— Pre-lanzamiento post-registro —— */
.prelanzamiento {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    padding-bottom: 1.25rem;
}
.prelanzamiento-hero {
    background: linear-gradient(160deg, #0F172A 0%, #1E293B 55%, #0F172A 100%);
    color: #F8FAFC;
    border-radius: 16px;
    padding: 1.35rem 1.15rem 1.45rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
}
.prelanzamiento-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #FACC15;
    margin-bottom: .55rem;
}
.prelanzamiento-title {
    color: #fff;
    font-size: clamp(1.45rem, 4.5vw, 1.85rem);
    margin: 0 0 .35rem;
    line-height: 1.2;
}
.prelanzamiento-kicker {
    color: #FDE68A;
    font-weight: 600;
    margin: 0 0 .65rem;
}
.prelanzamiento-lead {
    color: #CBD5E1;
    font-size: .92rem;
    line-height: 1.55;
    margin: 0;
}
.prelanzamiento-card {
    background: var(--dp-surface);
    border: 1px solid var(--dp-border);
    border-radius: 14px;
    padding: 1rem 1.05rem;
    box-shadow: var(--dp-shadow);
}
.prelanzamiento-card h2 {
    font-size: 1.05rem;
    margin: 0 0 .55rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.prelanzamiento-card p { margin: 0 0 .55rem; color: var(--dp-text-2); font-size: .9rem; line-height: 1.55; }
.prelanzamiento-card p:last-child { margin-bottom: 0; }
.prelanzamiento-highlight {
    background: #FFFBEB;
    border-left: 3px solid var(--dp-accent);
    padding: .65rem .75rem;
    border-radius: 0 10px 10px 0;
    color: var(--dp-text) !important;
}
.prelanzamiento-community-flag {
    font-weight: 700;
    color: var(--dp-primary) !important;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.prelanzamiento-community-count {
    font-size: 1.05rem !important;
    color: var(--dp-text) !important;
}
.prelanzamiento-community-count strong {
    font-size: 1.35rem;
    color: var(--dp-primary);
}
.prelanzamiento-progress {
    height: 8px;
    background: #E2E8F0;
    border-radius: 999px;
    overflow: hidden;
    margin-top: .65rem;
}
.prelanzamiento-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #FACC15, #EAB308);
    border-radius: inherit;
}
.prelanzamiento-levels {
    display: grid;
    gap: .65rem;
    margin: .75rem 0;
}
.prelanzamiento-levels article {
    background: var(--dp-bg);
    border-radius: 12px;
    padding: .85rem .9rem;
}
.prelanzamiento-levels strong {
    display: block;
    font-size: 1.35rem;
    color: var(--dp-primary);
    margin: .25rem 0;
}
.prelanzamiento-level-badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: #FEF9C3;
    color: #854D0E;
    padding: .2rem .5rem;
    border-radius: 999px;
}
.prelanzamiento-actions {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.prelanzamiento-cta-primary {
    min-height: 52px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
}
.prelanzamiento-invite .sheet-title {
    display: flex;
    align-items: center;
    gap: .4rem;
}
.prelanzamiento-countdown {
    text-align: center;
}
.prelanzamiento-countdown-wait,
.prelanzamiento-countdown-label {
    font-weight: 700;
    color: var(--dp-primary) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
}
.prelanzamiento-countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .45rem;
    margin: .75rem 0;
}
.prelanzamiento-countdown-grid div {
    background: #0F172A;
    color: #fff;
    border-radius: 12px;
    padding: .65rem .35rem;
}
.prelanzamiento-countdown-grid strong {
    display: block;
    font-size: 1.25rem;
    font-variant-numeric: tabular-nums;
    color: #FACC15;
}
.prelanzamiento-countdown-grid span {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #94A3B8;
}
.prelanzamiento-continue { margin-top: .25rem; }
@media (min-width: 640px) {
    .prelanzamiento-levels { grid-template-columns: 1fr 1fr; }
    .prelanzamiento-hero { padding: 1.75rem 1.5rem; }
}


/* Prelanzamiento — banner app + ajustes */
.prelanzamiento-continue { margin-top: .25rem; }
.prelanzamiento-app-banner {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin: 0 0 .85rem;
    padding: .75rem .85rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: #F8FAFC;
    border: 1px solid rgba(250, 204, 21, .35);
}
.prelanzamiento-app-banner-body { flex: 1; min-width: 0; }
.prelanzamiento-app-banner strong {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #FACC15;
    font-size: .82rem;
}
.prelanzamiento-app-banner p {
    margin: .3rem 0 0;
    color: #CBD5E1;
    font-size: .82rem;
    line-height: 1.45;
}
.prelanzamiento-app-banner .btn {
    flex-shrink: 0;
    white-space: nowrap;
}
@media (min-width: 640px) {
    .prelanzamiento-levels { grid-template-columns: 1fr 1fr; }
    .prelanzamiento-hero { padding: 1.75rem 1.5rem; }
}


.prelanzamiento-app-banner .btn {
    flex-shrink: 0;
    white-space: nowrap;
}
.prelanzamiento-app-banner-actions {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    flex-shrink: 0;
}
@media (min-width: 480px) {
    .prelanzamiento-app-banner-actions { flex-direction: row; align-items: center; }
}
@media (min-width: 640px) {
    .prelanzamiento-levels { grid-template-columns: 1fr 1fr; }
    .prelanzamiento-hero { padding: 1.75rem 1.5rem; }
}


.prelanzamiento-community-live {
    margin-top: .45rem !important;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--dp-text) !important;
}



/* Referidos: invitación y QR */
.ref2-invite-banner .ref2-invite-code {
    font-weight: 700;
    letter-spacing: .08em;
    font-size: 1.05em;
}
.ref2-invite-input-locked {
    background: var(--dp-bg-2, #F8FAFC);
    color: var(--dp-text, #0F172A);
    font-weight: 600;
    letter-spacing: .08em;
    cursor: default;
}
.ref2-invite-banner {
    margin: 0 0 .85rem;
}
.ref2-invite-input {
    font-family: inherit;
}
.ref2-qr-wrap {
    display: flex;
    justify-content: center;
    margin: .75rem 0 1rem;
}
.ref2-qr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--dp-border, #E2E8F0);
    border-radius: 16px;
    min-width: 260px;
    min-height: 260px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}
.ref2-qr.is-loading .ref2-qr-placeholder,
.ref2-qr.is-empty .ref2-qr-placeholder {
    display: block;
    color: #64748B;
    font-size: .85rem;
    text-align: center;
    padding: 1rem;
}
.ref2-qr img,
.ref2-qr canvas,
.ref2-qr svg,
.ref2-qr table {
    display: block;
    width: 240px;
    height: 240px;
    max-width: 100%;
}
/* Evitar QR doble: la lib dibuja canvas + img; solo uno visible. */
.ref2-qr canvas + img {
    display: none !important;
}
.ref2-qr:has(canvas) img.ref2-qr-server {
    display: none !important;
}



/* —— Perfil: una sola lista continua (tipo Ajustes) —— */
/* —— Perfil: una sola lista continua (tipo Ajustes) —— */
.native-app .app-content:has(.profile-page) {
    display: block;
    flex: 1 1 auto;
    padding-top: .65rem;
    padding-bottom: 1rem;
}
.profile-page {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch;
    gap: .45rem !important;
    margin: 0 !important;
    padding: 0 0 .15rem !important;
    max-width: 100%;
    height: auto !important;
    min-height: 0 !important;
    flex: none !important;
}
.profile-page > .profile-hero {
    margin: 0 !important;
    padding: .8rem .9rem;
    gap: .7rem;
    flex: none !important;
}
.profile-page > .profile-hero .profile-avatar {
    width: 56px;
    height: 56px;
    border-width: 2px;
}
.profile-page > .profile-hero .profile-hero-info h2 {
    font-size: .98rem;
    margin: 0 0 .06rem;
}
.profile-page > .profile-hero .profile-email {
    margin: 0 0 .25rem;
    font-size: .74rem;
}
.profile-page > .profile-stats {
    margin: 0 !important;
    gap: .3rem;
    flex: none !important;
}
.profile-page > .profile-stats .profile-stat {
    padding: .45rem .25rem;
    box-shadow: none;
}
.profile-page > .profile-stats .profile-stat-value { font-size: .84rem; }
.profile-page > .profile-stats .profile-stat-label { font-size: .55rem; margin-top: .06rem; }

.profile-settings {
    margin: 0 !important;
    flex: none !important;
}
.profile-group-label {
    margin: 0;
    padding: .45rem .85rem .28rem;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--dp-text-3);
    background: rgba(148, 163, 184, .12);
    border-bottom: 1px solid var(--dp-border);
}
.profile-group-label:first-child {
    border-radius: 12px 12px 0 0;
}
.profile-panel {
    background: var(--dp-surface);
    border: 1px solid var(--dp-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none;
}
.profile-panel--pad { padding: .55rem .85rem; }
.profile-panel-row {
    padding: .55rem .85rem;
    border-bottom: 1px solid var(--dp-border);
}
.profile-panel-row:last-child,
.profile-settings > .profile-menu-item:last-child { border-bottom: 0; }
.profile-settings > .profile-menu-item { border-radius: 0; }
.profile-card-heading {
    display: flex;
    align-items: center;
    gap: .3rem;
    margin: 0 0 .2rem;
    font-size: .84rem;
    font-weight: 700;
    color: var(--dp-text);
}
.profile-card-heading .dp-icon { width: .9rem; height: .9rem; }
.profile-panel-row .text-muted-sm { margin: 0 0 .35rem; line-height: 1.3; }
.profile-panel-row .form-group { margin-bottom: .4rem; }
.profile-panel-row .btn + .btn { margin-top: .3rem; }
.profile-card-action { margin-top: .35rem; }
.profile-inline-msg { margin-top: .25rem !important; }
.profile-pending-thumb {
    width: 52px; height: 52px; object-fit: cover; border-radius: 50%;
    margin: .15rem 0 .25rem; display: block;
}
.profile-text-danger { color: #B91C1C !important; }

.profile-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .58rem .85rem;
    border: 0;
    border-bottom: 1px solid var(--dp-border);
    background: transparent;
    color: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    min-height: 44px;
}
.profile-menu-item:active { background: rgba(15, 23, 42, .04); }
.profile-menu-icon {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 7px;
    display: grid;
    place-items: center;
    background: #F1F5F9;
    color: var(--dp-primary);
    flex-shrink: 0;
}
.profile-menu-icon .dp-icon { width: .85rem; height: .85rem; }
.profile-menu-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0; }
.profile-menu-text strong { font-size: .86rem; font-weight: 700; color: var(--dp-text); line-height: 1.2; }
.profile-menu-text small { font-size: .66rem; color: var(--dp-text-3); line-height: 1.2; margin-top: .02rem; }
.profile-menu-chevron { color: var(--dp-text-3); opacity: .55; display: grid; place-items: center; }
.profile-menu-chevron .dp-icon { width: .75rem; height: .75rem; }
.profile-menu-item--danger .profile-menu-icon { background: #FEF2F2; color: #B91C1C; }
.profile-menu-item--danger .profile-menu-text strong { color: #B91C1C; }

.profile-danger-panel {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #FFF7F7;
}
.profile-danger-panel .form-group { margin-bottom: .4rem; }
.btn-danger-solid { background: #B91C1C !important; border-color: #B91C1C !important; color: #fff !important; }
.profile-stats--2 { grid-template-columns: repeat(2, 1fr); }
.profile-page .profile-dl { gap: .28rem; }
.profile-page .profile-dl dt { font-size: .62rem; }
.profile-page .profile-dl dd { font-size: .78rem; }
.profile-page .passkey-list { margin: 0 0 .4rem; gap: .25rem; }

.profile-reviews-inline .trip-sheet,
.profile-reviews-inline .profile-section {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.profile-reviews-inline .profile-reviews-title,
.profile-reviews-inline .sheet-title {
    display: none !important;
}
.profile-reviews-inline .feedback-list { display: grid; gap: .3rem; }
.profile-reviews-inline .feedback-card {
    padding: .45rem .55rem;
    margin: 0;
    border: 1px solid var(--dp-border);
    border-radius: 8px;
    box-shadow: none;
}

/* compat: por si queda markup viejo */
.profile-body { display: contents; }
.profile-block { margin: 0; }
.profile-block-title { display: none; }
.profile-menu {
    background: var(--dp-surface);
    border: 1px solid var(--dp-border);
    border-radius: 12px;
    overflow: hidden;
}
.profile-card {
    background: var(--dp-surface);
    border: 1px solid var(--dp-border);
    border-radius: 12px;
    padding: .55rem .85rem;
    box-shadow: none;
}

@media (max-width: 380px) {
    .profile-stats:not(.profile-stats--2) {
        grid-template-columns: repeat(2, 1fr);
    }
    .profile-stat-value { font-size: .8rem; }
}

[data-theme="dark"] .profile-group-label { background: rgba(148,163,184,.08); }
[data-theme="dark"] .profile-menu-icon { background: rgba(148,163,184,.12); }
[data-theme="dark"] .profile-menu-item:active { background: rgba(255,255,255,.04); }
[data-theme="dark"] .profile-danger-panel { background: rgba(127,29,29,.25); }
[data-theme="dark"] .profile-menu-item--danger .profile-menu-icon { background: rgba(127,29,29,.35); }


/* v315b — complementos faltantes */
.prelanzamiento-community {
    /* hereda .prelanzamiento-card; refuerzo visual comunidad */
    border-color: rgba(250, 204, 21, .35);
    background: linear-gradient(180deg, #FFFBEB 0%, var(--dp-surface) 42%);
}
.profile-hero-edit {
    margin-bottom: .85rem;
}
.profile-hero-edit .profile-hero-info h2 {
    margin: 0 0 .15rem;
}
