/* =========================================================
   Base / Reset
========================================================= */

:root {
    --sf-red: #f1063d;
    --sf-red-dark: #b0002c;
    --sf-bg: #f5f4f8;
    --sf-card-bg: #ffffff;
    --sf-gray: #777;
    --sf-container: min(1200px, 100%); /* fallback */
    --sf-gutter: clamp(16px, 3vw, 40px);
    --sf-container-max: 1200px;
    --sf-container-max-wide: 1440px;
}

html {
    position: relative;
    min-height: 100%;
    height: 100%;
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html, body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}

body {
    margin: 0;
    padding: 0;
    background: var(--sf-bg);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}


/* =========================================================
   Shell / Layout general (loggeado)
========================================================= */

.sf-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--sf-bg);
}

.sf-main {
    flex: 1;
    padding: clamp(16px, 2.5vw, 32px) var(--sf-gutter);
    width: 100%;
    max-width: min(var(--sf-container-max), 100%);
    margin: 0 auto;
}

@media (min-width: 992px) {
    .sf-main {
        max-width: 1200px;
        margin: 0 auto;
    }        
}

@media (min-width: 992px) {
    .sf-main:has(.sf-page--wide) {
        max-width: var(--sf-container-max-wide);
    }
}


/* =========================================================
   Header / Nav
========================================================= */

/*.sf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 50;
}

.sf-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}*/
.sf-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px var(--sf-gutter);
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

.sf-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sf-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
    color: inherit;
}

    .sf-brand:hover {
        text-decoration: none;
        color: inherit;
        opacity: .95;
    }

.sf-brand-logo {
    height: 34px;
    width: auto;
    display: block;
}

.sf-logo {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.sf-logo-login {
    width: clamp(96px, 14vw, 150px);
    height: clamp(96px, 14vw, 150px);
    border-radius: 999px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    overflow: hidden;
}
    
    .sf-logo-login img {
        width: 70%;
        height: 70%;
        object-fit: contain;
        display: block;
        filter: drop-shadow(0 6px 14px rgba(0,0,0,.22));
    }


.sf-greeting-pill {
    display: inline-flex;
    align-self: flex-start;
    padding: 8px 16px;
    background: var(--sf-red);
    color: #fff;
    border-radius: 999px;
    font-weight: 600;
    margin-top: 4px;
}

.sf-greeting-pill {
    max-width: 42vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf-main-nav {
    display: flex;
    gap: 14px;
}

@media (max-width: 720px) {
    .sf-greeting-pill {
        display: none;
    }
    
    .sf-main-nav {
        display: none;
    }
    /* nav a hamburguesa luego */
}


.sf-nav-item {
    font-size: 14px;
    text-decoration: none;
    color: #555;
    padding: 6px 10px;
    border-radius: 999px;
}

    .sf-nav-item:hover {
        background: #f0f0f5;
    }

.sf-nav-item--active {
    background: #ffe4eb;
    color: var(--sf-red);
    font-weight: 600;
}

.sf-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sf-user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.sf-user-name {
    font-size: 14px;
    font-weight: 600;
}

.sf-user-tag {
    font-size: 11px;
    color: var(--sf-gray);
}

.sf-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}


/* =========================================================
   Footer
========================================================= */

.sf-footer {
    padding: 8px 24px;
    font-size: 12px;
    background: #fff;
}

.sf-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.sf-footer-copy {
    color: #666;
}

.sf-footer-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sf-footer-btn {
    font-size: 12px;
    border-radius: 999px;
    padding: 4px 10px;
    border: 1px solid #ddd;
    background: #f8f8f8;
    color: #555;
    text-decoration: none;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}

    .sf-footer-btn:hover {
        background: #ffe4eb;
        border-color: var(--sf-red);
        color: var(--sf-red-dark);
    }


/* =========================================================
   Utilidades / Contenedores de páginas
========================================================= */

/*.sf-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
}*/

.sf-page {
    width: 100%;
    max-width: min(var(--sf-container-max), 100%);
    margin: 0 auto;
    padding: 0;
}

.sf-page-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

    .sf-page-header h2 {
        margin: 0;
        font-size: 20px;
    }

.sf-page-sub {
    color: #777;
    font-size: 13px;
    margin: 2px 0 0 0;
}

.sf-panel {
    width: 100%;
    background: #fff;
    border-radius: 14px;
    padding: clamp(14px, 2vw, 22px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.sf-page--narrow {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.sf-page--wide {
    max-width: min(var(--sf-container-max-wide), 100%);
}


/* =========================================================
   Home Layout
========================================================= */

.sf-home-grid {
    display: grid;
    gap: 24px;
}

@media (min-width: 992px) {
    .sf-home-grid {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr);
        align-items: flex-start;
    }
}


/* =========================================================
   Tarjeta (estilo tarjeta física)
========================================================= */

.sf-card-wrapper {
    margin-bottom: 16px;
}

.sf-card {
    background: var(--sf-red);
    border-radius: 16px;
    padding: 10px 22px;
    color: #fff;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    box-shadow: 0 12px 24px rgba(0,0,0,0.18);
}

.sf-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.sf-card-name {
    font-size: 18px;
    font-weight: 600;
}

.sf-card-logo {
    width: 80px;
    height: 80px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sf-card-number {
    font-size: 20px;
    letter-spacing: 1px;
    word-spacing: 3px;
}

.sf-card-brand-logo {
    height: 80px;
    width: auto;
    display: block;
}


/* =========================================================
   Saldos / Balances
========================================================= */

.sf-balances {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.sf-balance-item {
    background: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.sf-balance-label {
    font-size: 13px;
    color: var(--sf-gray);
}

.sf-balance-value {
    display: block;
    margin-top: 4px;
    font-weight: 700;
    font-size: 18px;
}


/* =========================================================
   Acciones (cards clickeables)
========================================================= */

.sf-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 4px;
}

.sf-action-card {
    background: #f4f3f7;
    border-radius: 14px;
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}

    .sf-action-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    }

.sf-action-link {
    text-decoration: none;
    color: inherit;
}

    .sf-action-link:hover {
        text-decoration: none;
        color: inherit;
    }

.sf-action-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.sf-action-title {
    font-weight: 600;
    font-size: 14px;
}

.sf-action-sub {
    font-size: 12px;
    color: var(--sf-gray);
}


/* =========================================================
   Movimientos
========================================================= */

.sf-movimientos-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

    .sf-movimientos-header h3 {
        margin: 0;
        font-size: 18px;
    }

.sf-link-small {
    font-size: 13px;
    color: var(--sf-red);
    text-decoration: none;
}

.sf-movimiento-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sf-mov-row {
    display: flex;
    justify-content: space-between;    
    font-size: 13px;
    align-items: center;
    gap: 12px;    
    flex-wrap: wrap;
}

.sf-mov-row--meta {
    margin-top: 0;
    color: var(--sf-gray);
    font-size: 12px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sf-page--movs .sf-mov-points {
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0,161,82,.10);
}

.sf-page--movs .sf-mov-points--neg {
    background: rgba(211,47,47,.10);
}

/* Movimientos: layout pro en desktop */
@media (min-width: 900px) {
    .sf-page--movs .sf-movimiento-card {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 14px;
    }

    .sf-page--movs .sf-mov-row {
        justify-content: flex-start;
    }

    .sf-page--movs .sf-mov-row--meta {
        justify-content: flex-start;
        gap: 18px;
    }
}

.sf-mov-title {
    font-weight: 600;
}

.sf-mov-points {
    font-weight: 700;
    color: #00a152;
}

.sf-mov-points--neg {
    color: #d32f2f;
}

/* skeleton */
.sf-skeleton-pill {
    display: inline-block;
    width: 70px;
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, #eee, #ddd, #eee);
    background-size: 200% 100%;
    animation: sf-skeleton 1.1s linear infinite;
}

@keyframes sf-skeleton {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}


/* =========================================================
   Promos / Featured Grid (cupones + dinamicas + home featured)
========================================================= */

.sf-featured {
    margin-top: 20px;
}

.sf-featured-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

    .sf-featured-header h3 {
        margin: 0;
        font-size: 17px;
    }

.sf-featured-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

@media (max-width: 720px) {
    .sf-featured-grid {
        grid-template-columns: 1fr;
    }
}

.sf-featured-card {
    border: none;
    padding: 0;
    background: none;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: transform .12s ease, box-shadow .12s ease;
}

    .sf-featured-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.18);
    }

    .sf-featured-card img {
        display: block;
        width: 100%;
        aspect-ratio: 16 / 9;
        height: auto;
        object-fit: fill;
        background: #f1f1f1;
    }

.sf-featured-label {
    position: absolute;
    left: 10px;
    bottom: 10px;
    right: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 12px;
    text-align: center;
}


/* =========================================================
   Buttons
========================================================= */

.sf-btn {
    border: 1px solid #ddd;
    background: #f8f8f8;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: unset;  
    color:ButtonText;
}

    .sf-btn:hover {
        filter: brightness(0.98);
    }

.sf-btn-primary {
    border: none;
    background: var(--sf-red);
    color: #fff;
}

    .sf-btn-primary:hover {
        filter: brightness(0.95);
    }

.sf-btn-sm {
    padding: 6px 10px;
    font-size: 12px;
}

.sf-btn.is-active {
    border-color: var(--sf-red);
    box-shadow: 0 0 0 2px rgba(0,0,0,.08) inset;
    font-weight: 600;
    color: var(--sf-red);
}


/* =========================================================
   Badges / Pills
========================================================= */

.sf-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: #eee;
    color: #333;
    font-weight: 600;
}

.sf-badge--green {
    background: #e6fff1;
    color: #0a7a3b;
}

.sf-badge--red {
    background: #ffe6e6;
    color: #b00020;
}

.sf-badge--blue {
    background: #e7f2ff;
    color: #0b4aa6;
}

.sf-badge--purple {
    background: #efe7ff;
    color: #5b2aa6;
}

.sf-badge--gray {
    background: #f2f2f2;
    color: #444;
}

.sf-badge--orange {
    background: #fff1e6;
    color: #a64b00;
}

.sf-pill {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.sf-pill--green {
    background: #e6fff1;
    color: #0a7a3b;
}


/* =========================================================
   Modal (genérico)
========================================================= */

.sf-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

    .sf-modal.is-open {
        display: flex;
    }

.sf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.sf-modal-dialog {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 18px 20px;
    width: min(980px, 94vw);
    box-shadow: 0 10px 28px rgba(0,0,0,0.25);
    z-index: 1;
    max-height: min(88vh, 900px);
    overflow: hidden;
}

@media (min-width: 1200px) {
    .sf-modal-dialog {
        width: min(1100px, 92vw);
    }
}

.sf-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
}

.sf-modal-desc {
    font-size: 14px;
    margin-bottom: 8px;
}

.sf-modal-valid {
    font-size: 13px;
    color: #777;
}


/* =========================================================
   Promo modal content (cupones / dinamicas)
========================================================= */

.sf-promo-modal {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 80vh;
    overflow: auto;
    padding-right: 8px;
}

.sf-promo-modal-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    border: 1px solid #eee;
}

/* =========================================================
   Dinámicas: Top
========================================================= */

.sf-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.sf-top-wrap {
    margin-top: 12px;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px;
    background: #fafafa;
}

.sf-top-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}

.sf-top-hint {
    font-size: 12px;
    color: #666;
}

.sf-top-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.sf-top-row {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
}

.sf-top-rank {
    font-weight: 900;
}

.sf-top-name {
    font-weight: 700;
}

.sf-top-pts {
    font-weight: 800;
}

.sf-top-empty {
    color: #666;
    font-size: 13px;
    padding: 10px 0;
}


/* =========================================================
   Bases / Terms blocks
========================================================= */

.sf-bases-wrap {
    margin-top: 12px;
}

.sf-bases-pre {
    white-space: pre-wrap;
    word-break: break-word;
    background: #f7f7fb;
    border: 1px dashed #d9d9e6;
    border-radius: 12px;
    padding: 14px;
    font-size: 13px;
    line-height: 1.5;
    margin-top: 10px;
    max-height: 320px;
    overflow: auto;
}


/* =========================================================
   Ticket (modal detalles acumulación)
========================================================= */

.sf-ticket {
    background: #fff;
    border: 1px dashed #ddd;
    border-radius: 12px;
    padding: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    max-height: 70vh;
    overflow: auto;
    padding-right: 8px;
}

    .sf-ticket::-webkit-scrollbar {
        width: 10px;
    }

    .sf-ticket::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.2);
        border-radius: 999px;
    }

    .sf-ticket::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.06);
    }

.sf-ticket-head {
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ddd;
    margin-bottom: 10px;
}

.sf-ticket-brand {
    font-weight: 800;
    letter-spacing: 1px;
}

.sf-ticket-sub {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.sf-ticket-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sf-ticket-line {
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
}

.sf-ticket-desc {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.sf-ticket-meta {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 8px;
    font-size: 12px;
    color: #444;
    align-items: baseline;
}

.sf-ticket-line-total {
    font-weight: 800;
    text-align: right;
}

.sf-ticket-total {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.sf-ticket-foot {
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}


/* =========================================================
   Forms / Inputs (perfil, etc.)
========================================================= */

.sf-grid-2 {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr; /* mobile */
}

@media (min-width: 900px) {
    .sf-grid-2 {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

.sf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

    .sf-field label {
        font-size: 12px;
        color: #666;
    }

    .sf-field input {
        padding: 10px 12px;
        border: 1px solid #ddd;
        border-radius: 10px;
    }


/* =========================================================
   Public Layouts (Unsub / Survey / Legal)
========================================================= */

.sf-auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #d6002b;
    margin: 0;
}

.sf-auth-card {
    width: min(720px, 92vw);
    background: #fff;
    border-radius: 10px;
    padding: 44px;
    box-shadow: 0 18px 60px rgba(0,0,0,.25);
}

.sf-auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

    .sf-auth-logo img {
        height: 64px;
    }

.sf-auth-title {
    text-align: center;
    font-weight: 900;
    margin: 0;
}

.sf-auth-sub {
    text-align: center;
    color: #666;
    margin: 10px 0 24px;
}

.sf-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sf-label {
    font-weight: 800;
}

.sf-input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px;
    resize: vertical;
    max-width: 100%;
    box-sizing: border-box;
}

.sf-help {
    font-size: 12px;
    color: #666;
}

.sf-btn-full {
    width: 100%;
}

.sf-alert {
    border-radius: 10px;
    padding: 12px 14px;
    font-weight: 700;
}

.sf-alert--danger {
    background: #ffe9ea;
    border: 1px solid #ffb3b8;
    color: #8b0b15;
}

/* Legal pages publicas */
.sf-legal-shell {
    min-height: 100vh;
    background: #f6f6f8;
    padding: 32px 16px;
}

.sf-legal-card {
    width: min(980px, 94vw);
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 18px 60px rgba(0,0,0,.08);
}

.sf-legal-head {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.sf-legal-logo {
    height: 52px;
}

.sf-legal-head h1 {
    margin: 0;
    font-weight: 900;
}

.sf-legal-head p {
    margin: 0;
    color: #666;
}

.sf-legal-body {
    color: #1f1f1f;
    line-height: 1.65;
    font-size: 15px;
}

.sf-legal-list {
    padding-left: 18px;
}

.sf-legal-body p {
    margin: 0 0 14px;
}


/* Survey stars */
.sf-stars {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 10px 0 18px;
}

.sf-star {
    border: none;
    background: transparent;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    color: #3d4652;
    padding: 6px;
}

    .sf-star.is-on {
        color: #f5b301;
    }

.sf-success-box {
    margin-top: 16px;
    background: #c9f7d1;
    border-radius: 10px;
    padding: 22px;
    text-align: center;
}

.sf-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 10px;
    background: #2e7d32;
    color: #fff;
    font-size: 28px;
    font-weight: 900;
}

.sf-success-title {
    font-weight: 900;
    margin-bottom: 6px;
}

.sf-success-sub {
    color: #1f1f1f;
    opacity: .85;
}

/* ====== Card estilo app movil (rojo + gusanos) ====== */
.sf-card-wrapper {
    width: min(720px, 100%);
    margin: 0 auto 16px;
}

.sf-card {
    aspect-ratio: 1.75 / 1;
    overflow: hidden;
    position: relative;
    color: #fff;
    padding: clamp(18px, 2.2vw, 26px);
    border-radius: 18px;
    min-height: unset;
    height: auto;
    display: flex;
    background: linear-gradient(135deg, #f1063d 0%, #d6002b 70%, #b0002c 100%);
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 16px 30px rgba(0,0,0,.18);
}

.sf-card--pattern::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../img/gusanos.png");
    background-size: cover;
    background-position: center;
    opacity: .07;
    pointer-events: none;
}

.sf-card::after {
    content: "";
    position: absolute;
    inset: -40% -40% auto auto;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.20), rgba(255,255,255,0) 60%);
    transform: rotate(12deg);
    pointer-events: none;
}

.sf-card-top,
.sf-card-number {
    position: relative;
    z-index: 1;
}

.sf-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.sf-card-name {
    font-weight: 800;
    font-size: clamp(18px, 2.2vw, 28px);
    line-height: 1.08;
    max-width: 70%;
    text-shadow: 0 2px 10px rgba(0,0,0,.18);
}

.sf-card-logo {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    width: clamp(68px, 8vw, 96px);
    flex: 0 0 auto;
}

.sf-card-brand-logo {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,.22));
}

.sf-card-number {
    margin-top: clamp(22px, 4vw, 48px);
    font-weight: 700;
    font-size: clamp(16px, 1.7vw, 22px);
    letter-spacing: .04em;   
    word-break: break-word;
    text-shadow: 0 2px 10px rgba(0,0,0,.18);
}

@media (max-width: 480px) {
    .sf-card-name {
        max-width: 64%;
    }

    .sf-card-number {
        margin-top: 18px;
    }
}

/* =========================================================
   Contacto (solo esta página)
========================================================= */

.sf-page.sf-page--contact {
    max-width: min(920px, 100%);
    margin: 0 auto;
}

    .sf-page.sf-page--contact .sf-panel.sf-contact-panel {
        padding: clamp(18px, 2.2vw, 28px);
    }

    .sf-page.sf-page--contact .sf-grid-2 {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

@media (max-width: 720px) {
    .sf-page.sf-page--contact .sf-grid-2 {
        grid-template-columns: 1fr;
    }
}


/* Terms toggle */
.sf-terms {
    margin-top: 12px;
}

    .sf-terms > summary {
        list-style: none;
        cursor: pointer;
        user-select: none;
    }

.sf-terms-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

    .sf-terms-btn::after {
        content: "";
        width: 8px;
        height: 8px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        transition: transform .15s ease;
        margin-left: 2px;
    }

.sf-terms[open] .sf-terms-btn::after {
    transform: rotate(-135deg);
}

/* =========================================================
   Login
========================================================= */

.sf-login-shell {
    min-height: 100vh;
    background: #f1063d;
    display: flex;
    flex-direction: column;
}

.sf-login-grid {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(320px, 520px) minmax(320px, 520px);
    justify-content: center;
    align-items: center;
    padding: clamp(18px, 3.5vw, 45px);
    max-width: 1200px;
    margin: 0 auto;
    gap: clamp(24px, 4vw, 64px);
}


.sf-login-left {
    display: flex;
    justify-content: center;
}

.sf-login-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.sf-login-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sf-login-biglogo {
    width: min(520px, 44vw);
    height: auto;
    display: block;
    opacity: .95;
    filter: drop-shadow(0 12px 30px rgba(0,0,0,.18));
}

/* footer legal */
.sf-login-footer {
    padding: 14px clamp(18px, 3.5vw, 48px) 18px;
    color: rgba(255,255,255,.9);
    text-align: center;
}

.sf-login-legal-links {
    display: flex;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.sf-login-legal-link {
    color: rgba(255,255,255,.92);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

    .sf-login-legal-link:hover {
        text-decoration: underline;
    }

.sf-login-divider {
    height: 1px;
    width: min(980px, 92vw);
    margin: 0 auto 12px;
    background: rgba(255,255,255,.35);
}

.sf-login-copy {
    font-size: 12px;
    color: rgba(255,255,255,.85);
}

/* Mobile: esconder logo grande y centrar card */
@media (max-width: 820px) {   
    .sf-login-grid {
        grid-template-columns: 1fr;
        padding: 18px 12px;
    }

    .sf-login-card {
        max-width: 520px;
        width: 100%;
    }
    .sf-login-right {
        display: none;
    }
}

.sf-login-appcallout {
    margin-top: 16px;
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.sf-login-appcallout-title {
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 6px;
}

.sf-login-appcallout-sub {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
}

.sf-login-store-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.sf-store-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    min-width: 110px;
    border: 1px solid rgba(0,0,0,.12);
    transition: transform .10s ease, filter .12s ease;
    gap: 10px;
}

    .sf-store-btn:hover {
        transform: translateY(-1px);
        filter: brightness(.98);
    }

.sf-store-btn--google {
    background: #111;
    color: #fff;
    border-color: #111;
}

.sf-store-btn--apple {
    background: #111;
    color: #fff;
    border-color: #111;
}

.sf-login-appcallout-foot {
    margin-top: 10px;
    font-size: 12px;
    color: #777;
}

.sf-store-badge {
    height: 24px; /* tamaño real en UI */
    width: auto;
    display: block;
}
