/* MegaSonic+ — App cliente (encapsulado, no afecta kiosk/panel) */

:root {
    --ms-bg-page: #f4f6f8;
    --ms-bg-soft: #eef2f6;
    --ms-bg-page-alt: #e8ecf1;
    --ms-surface-dark: #0f1117;
    --ms-surface-dark-2: #181b23;
    --ms-surface-graphite: #181b23;
    --ms-card: #ffffff;
    --ms-card-muted: #fafbfc;
    --ms-card-dark: #181b23;
    --ms-card-dark-alt: #232833;
    --ms-text: #101828;
    --ms-text-light: #ffffff;
    --ms-text-secondary: #667085;
    --ms-muted: #667085;
    --ms-border: rgba(15, 23, 42, 0.08);
    --ms-border-strong: rgba(15, 23, 42, 0.12);
    --ms-border-dark: rgba(255, 255, 255, 0.12);
    --ms-accent: #13EADA;
    --ms-accent-2: #7c3aed;
    --ms-accent-blue: #2563eb;
    --ms-accent-magenta: #c026d3;
    --ms-accent-soft: rgba(19, 234, 218, 0.12);
    --ms-accent-glow: rgba(19, 234, 218, 0.32);
    --ms-favorite: #C22591;
    --ms-favorite-soft: rgba(194, 37, 145, 0.18);
    --ms-favorite-border: rgba(194, 37, 145, 0.45);
    --ms-logout: #C22591;
    --ms-logout-soft: rgba(194, 37, 145, 0.12);
    --ms-logout-border: rgba(194, 37, 145, 0.32);
    --ms-success: #16a34a;
    --ms-danger: #dc2626;
    --ms-warning: #f59e0b;
    --ms-footer-bg: #0f1117;
    --ms-footer-bar-h: 72px;
    --ms-footer-lift: 12px;
    --ms-footer-h: calc(var(--ms-footer-bar-h) + var(--ms-footer-lift) + 12px);
    --ms-header-h: 56px;
    --ms-safe-bottom: env(safe-area-inset-bottom, 0px);
    --ms-safe-top: env(safe-area-inset-top, 0px);
    --ms-radius: 20px;
    --ms-radius-sm: 14px;
    --ms-radius-lg: 24px;
    --ms-radius-btn: 12px;
    --ms-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --ms-shadow-soft: 0 2px 10px rgba(15, 23, 42, 0.05);
    --ms-shadow-card: 0 10px 30px rgba(15, 23, 42, 0.08);
    --ms-shadow-float: 0 18px 50px rgba(15, 23, 42, 0.18);
    --ms-space-section: 16px;
    --ms-space-card: 22px;
    --ms-font: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --ms-z-header: 20;
    --ms-z-footer: 50;
    --ms-z-backdrop: 60;
    --ms-z-sheet: 70;
    --ms-z-toast: 90;
    --ms-z-fullscreen: 100;
    --ms-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ms-dur-fast: 0.15s;
    --ms-gradient-generic: conic-gradient(from 225deg at 50% 50%, rgba(194, 37, 145, 1) 0deg, rgba(19, 234, 218, 1) 120deg, rgba(66, 48, 229, 1) 240deg, rgba(194, 37, 145, 1) 360deg);
    --ms-gradient-generic-soft: linear-gradient(150deg, rgba(194, 37, 145, 0.18) 0%, rgba(19, 234, 218, 0.14) 50%, rgba(66, 48, 229, 0.18) 100%);
    --ms-dur-med: 0.28s;
    --ms-app-max: 480px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: var(--ms-font);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

body.ms-app-body {
    background: var(--ms-bg-page);
    color: var(--ms-text);
}

body.ms-app-body:not(.ms-login-body) {
    background:
        radial-gradient(900px 480px at 0% -10%, rgba(194, 37, 145, 0.06), transparent 55%),
        radial-gradient(700px 400px at 100% 0%, rgba(66, 48, 229, 0.04), transparent 50%),
        linear-gradient(180deg, #f8fafb 0%, var(--ms-bg-page) 50%, var(--ms-bg-soft) 100%);
}

.ms-app {
    min-height: 100vh;
    min-height: 100dvh;
    max-width: var(--ms-app-max);
    margin: 0 auto;
    padding-bottom: calc(var(--ms-footer-h) + var(--ms-safe-bottom) + 24px);
    position: relative;
}

/* Reset nativo de botones (baja especificidad: no pisa .ms-nav-btn, .ms-btn, etc.) */
:where(.ms-app) button,
:where(.ms-app) [type="button"],
:where(.ms-app) [type="submit"],
:where(.ms-app) [type="reset"] {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    border: none;
    background: none;
    box-shadow: none;
    font: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

:where(.ms-app) button:disabled {
    cursor: not-allowed;
}

/* ── Header oscuro premium ── */
.ms-app__header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(17, 19, 24, 0.92);
    backdrop-filter: blur(20px) saturate(1.2);
    border-bottom: 1px solid var(--ms-border-dark);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    color: #ffffff;
    width: 100%;
}

.ms-app__brand {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    flex: unset;
}

.ms-app__brand img {
    height: 28px;
    width: auto;
    filter: brightness(1.05);
}

.ms-app__header-greet {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.2;
}

.ms-app__header-greet strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
}

.ms-app__header-membership {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
    color: inherit;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.ms-app__header-membership:hover {
    opacity: 0.92;
}

.ms-app__header-membership:active {
    transform: scale(0.98);
}

.ms-app__header-membership:focus-visible {
    outline: 2px solid rgba(19, 234, 218, 0.55);
    outline-offset: 3px;
    border-radius: 8px;
}

.ms-app__header-membership .ms-badge {
    font-size: 11px;
    letter-spacing: 0.04em;
}

.ms-app__header-user {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 2px 0 2px 12px;
    margin: 0;
    cursor: pointer;
    text-align: right;
    line-height: 1.2;
    flex-shrink: 0;
    color: inherit;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s ease;
}

.ms-app__header-user:hover {
    opacity: 0.92;
}

.ms-app__header-user:active {
    transform: scale(0.98);
}

.ms-app__header-user:focus-visible {
    outline: 2px solid rgba(19, 234, 218, 0.55);
    outline-offset: 3px;
    border-radius: 8px;
}

.ms-app__header-user-label {
    display: block;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.2;
}

.ms-app__header-user-nick {
    display: block;
    margin: 2px 0 0;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.ms-app__header-actions {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 0;
}

.ms-app__avatar-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--ms-radius-btn);
    border: none;
    padding: 2px;
    overflow: hidden;
    background: var(--ms-gradient-generic);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ms-app__avatar-btn:active { transform: scale(0.96); }

.ms-app__avatar-btn img,
.ms-app__avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: calc(var(--ms-radius-btn) - 2px);
}

.ms-app__avatar-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 800;
    background: var(--ms-card-dark-alt);
    color: #fff;
    border-radius: calc(var(--ms-radius-btn) - 2px);
}

/* ── Main ── */
.ms-app__main {
    padding: 18px 16px 12px;
    max-width: 480px;
    margin: 0 auto;
}

.ms-section {
    display: none;
    animation: msFadeIn 0.28s ease;
}

.ms-section.is-active { display: block; }

@keyframes msFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.ms-section-head {
    margin-bottom: 18px;
}

.ms-section-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: var(--ms-space-section);
    padding: 16px 18px;
    border-radius: 22px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 55%, #f0f9ff 100%);
    border: 1px solid rgba(6, 182, 212, 0.14);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.ms-section-hero__main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.ms-section-hero__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    background: linear-gradient(145deg, #0891b2, #6366f1);
    box-shadow: 0 6px 18px rgba(6, 182, 212, 0.28);
}

.ms-section-hero__copy {
    min-width: 0;
    flex: 1;
}

.ms-section-hero__title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ms-text);
    line-height: 1.15;
}

.ms-section-hero__subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ms-muted);
    line-height: 1.45;
}

.ms-section-hero__metric {
    flex-shrink: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.ms-section-hero__metric-value {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #0891b2;
    line-height: 1;
}

.ms-section-hero__metric-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ms-muted);
}

.ms-page-title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ms-text);
}

.ms-page-sub {
    margin: 0;
    color: var(--ms-muted);
    font-size: 14px;
    line-height: 1.55;
}

.ms-page-sub--stats {
    font-weight: 700;
    color: var(--ms-text-secondary);
}

/* ── Cards ── */
.ms-card {
    background: var(--ms-card);
    border: 1px solid var(--ms-border);
    border-radius: var(--ms-radius);
    box-shadow: var(--ms-shadow-card);
    padding: var(--ms-space-card);
    margin-bottom: var(--ms-space-section);
}

.ms-card--dark {
    background: linear-gradient(145deg, #252a34 0%, #1b1f27 55%, #20242c 100%);
    border-color: var(--ms-border-dark);
    color: var(--ms-text-light);
    box-shadow: 0 16px 48px rgba(17, 19, 24, 0.25);
    position: relative;
    overflow: hidden;
}

.ms-card--dark::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -20%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(194, 37, 145, 0.15), transparent 70%);
    pointer-events: none;
}

.ms-card--profile .ms-card__membership-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
}

.ms-card--points {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdff 100%);
    border-color: rgba(19, 234, 218, 0.25);
}

.ms-card__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ms-muted);
}

.ms-card__title i {
    font-size: 14px;
    color: var(--ms-accent);
}

.ms-card--dark .ms-card__title { color: rgba(255, 255, 255, 0.55); }
.ms-card--dark .ms-card__title i { color: var(--ms-accent); }

/* ── Hero ── */
.ms-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.ms-hero__avatar {
    width: 76px;
    height: 76px;
    border-radius: 16px;
    padding: 3px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--ms-gradient-generic);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.ms-hero__avatar .ms-app__avatar,
.ms-hero__avatar .ms-app__avatar-fallback {
    border-radius: 13px;
}

/* .ms-card--dark .ms-hero__avatar { border-color: rgba(255, 255, 255, 0.2); } */

.ms-hero__greet {
    margin: 0 0 4px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.ms-hero__name {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.ms-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ms-badge--vip { color: #fde68a; background: rgba(253, 230, 138, 0.12); border-color: rgba(253, 230, 138, 0.3); }
.ms-badge--premium { color: #c4b5fd; background: rgba(196, 181, 253, 0.12); }
.ms-badge--basic { color: rgba(255, 255, 255, 0.7); }

.ms-customer-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.22rem 0.55rem;
    border-radius: 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.ms-customer-type-badge--sm {
    padding: 0.16rem 0.45rem;
    font-size: 0.62rem;
}

.ms-customer-type-badge__text {
    display: inline-block;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.ms-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 18px;
    position: relative;
    z-index: 1;
}

.ms-metric {
    padding: 14px;
    border-radius: var(--ms-radius-btn);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ms-card:not(.ms-card--dark) .ms-metric {
    background: var(--ms-card-muted);
    border-color: var(--ms-border);
}

.ms-metric__label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.ms-metric__label i { font-size: 12px; color: var(--ms-accent); }

.ms-card:not(.ms-card--dark) .ms-metric__label { color: var(--ms-muted); }

.ms-metric__value {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ms-card--dark .ms-metric__value { color: #fff; }

.ms-metric__value--accent {
    color: var(--ms-accent);
    text-shadow: 0 0 20px rgba(19, 234, 218, 0.3);
}

.ms-metapoints {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    background: rgba(255, 196, 24, 0.16);
    color: #ffe08a;
    border: 1px solid rgba(255, 196, 24, 0.36);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
}

.ms-metapoints .bi-stars {
    color: #ffd777;
}

/* ── MegaPoints highlight ── */
.ms-points-display {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ms-points-display__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 22px;
    color: #ffd777;
    background: rgba(255, 196, 24, 0.16);
    border: 1px solid rgba(255, 196, 24, 0.36);
    box-shadow: 0 8px 20px rgba(255, 196, 24, 0.18);
    flex-shrink: 0;
}

.ms-card--points .ms-card__title .bi-stars,
.ms-menu-item .bi-stars {
    color: #ffd777;
}

.ms-points-display__value {
    margin: 0 0 4px;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--ms-text);
    line-height: 1;
}

.ms-points-display__text {
    margin: 0;
    font-size: 13px;
    color: var(--ms-muted);
    line-height: 1.45;
}

/* ── Stats ── */
.ms-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--ms-border);
    font-size: 14px;
}

.ms-stat-row:last-child { border-bottom: 0; }

.ms-stat-row__label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ms-text-secondary);
}

.ms-stat-row__label i {
    width: 18px;
    text-align: center;
    color: var(--ms-accent);
    font-size: 14px;
}

.ms-stat-row span:last-child,
.ms-stat-row__value {
    font-weight: 700;
    text-align: right;
    color: var(--ms-text);
}

/* ── Tiles accesos rápidos ── */
.ms-tile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.ms-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px;
    min-height: 108px;
    border-radius: var(--ms-radius-sm);
    border: 1px solid var(--ms-border);
    background: var(--ms-card);
    box-shadow: var(--ms-shadow-soft);
    cursor: pointer;
    text-align: left;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.ms-tile:active {
    transform: scale(0.98);
    box-shadow: var(--ms-shadow-card);
}

.ms-tile__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 17px;
    background: var(--ms-accent-soft);
    color: #0891b2;
}

.ms-tile__icon--accent {
    background: linear-gradient(135deg, rgba(19, 234, 218, 0.2), rgba(99, 102, 241, 0.15));
    color: #6366f1;
}

.ms-tile__title {
    font-size: 14px;
    font-weight: 800;
    color: var(--ms-text);
    line-height: 1.2;
}

.ms-tile__desc {
    font-size: 11px;
    color: var(--ms-muted);
    line-height: 1.35;
}

/* legacy alias */
.ms-quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ms-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px;
    min-height: 88px;
    border-radius: var(--ms-radius-sm);
    border: 1px solid var(--ms-border);
    background: var(--ms-card);
    box-shadow: var(--ms-shadow-soft);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: var(--ms-text);
    transition: transform 0.15s ease;
}
.ms-quick-btn:active { transform: scale(0.98); }
.ms-quick-btn i { font-size: 18px; color: #0891b2; }
.ms-quick-btn span { font-size: 13px; font-weight: 800; }

/* ── Empty states ── */
.ms-empty {
    text-align: center;
    padding: 28px 16px;
}

.ms-empty__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 22px;
    background: var(--ms-card-muted);
    color: var(--ms-muted);
    border: 1px dashed var(--ms-border-strong);
}

.ms-empty__title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ms-text);
}

.ms-empty__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ms-muted);
    max-width: 280px;
    margin-inline: auto;
}

/* ── QR cards ── */
.ms-qr-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: var(--ms-radius-sm);
    border: 1px solid var(--ms-border);
    background: var(--ms-card);
    margin-bottom: 12px;
    box-shadow: var(--ms-shadow-soft);
    transition: box-shadow 0.15s ease;
    flex-direction: column;
    border-style: dashed;
    border-color: rgba(17, 19, 24, 0.12);
    position: relative;
}

.ms-qr-card__top {
    display: flex;
    gap: 14px;
    width: 100%;
    align-items: flex-start;
}

.ms-qr-card__qr-wrap {
    width: 104px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    line-height: 0;
}

.ms-qr-card__qr-wrap img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--ms-border);
}

.ms-qr-card__qr-wrap:not(:has(img)) {
    width: 88px;
    min-height: 88px;
    display: grid;
    place-items: center;
    background: var(--ms-card-muted);
    border: 1px solid var(--ms-border);
    box-shadow: inset 0 0 0 1px rgba(17, 19, 24, 0.04);
}

.ms-qr-card__img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--ms-card-muted);
    flex-shrink: 0;
}

.ms-qr-card__img--placeholder {
    display: grid;
    place-items: center;
    font-size: 26px;
    color: var(--ms-muted);
}

.ms-discount-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 4px 7px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.ms-discount-badge--percentage {
    color: #fff;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.ms-discount-badge--extra_points {
    color: #1e1b4b;
    background: linear-gradient(135deg, #fde68a 0%, #fbbf24 100%);
}

.ms-discount-badge--extra_time {
    color: #fff;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.ms-qr-card__body { flex: 1; min-width: 0; }

.ms-qr-card__name {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.ms-qr-card__meta {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--ms-muted);
    line-height: 1.45;
}

.ms-qr-card__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.ms-tag {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--ms-accent-soft);
    color: #0891b2;
    border: 1px solid rgba(19, 234, 218, 0.2);
}

.ms-tag--used { background: #f3f4f6; color: #6b7280; border-color: transparent; }
.ms-tag--expired { background: rgba(239, 68, 68, 0.1); color: var(--ms-danger); border-color: transparent; }
.ms-tag--active { background: rgba(34, 197, 94, 0.12); color: #15803d; border-color: transparent; }
.ms-tag--drink { background: rgba(245, 158, 11, 0.12); color: #b45309; border-color: transparent; }

.ms-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--ms-text);
    margin-left: auto;
}

.ms-price--was {
    font-size: 12px;
    font-weight: 600;
    color: var(--ms-muted);
    text-decoration: line-through;
    margin-left: auto;
}

.ms-price--deal {
    color: #dc2626;
    margin-left: 0;
}

/* ── Filtros ── */
.ms-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 14px;
    scrollbar-width: none;
}

.ms-filters::-webkit-scrollbar { display: none; }

.ms-filter {
    flex-shrink: 0;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--ms-border);
    background: var(--ms-card);
    color: var(--ms-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: var(--ms-shadow-soft);
}

.ms-filter.is-active {
    background: var(--ms-surface-dark);
    border-color: var(--ms-surface-dark);
    color: #fff;
    box-shadow: 0 4px 12px rgba(17, 19, 24, 0.2);
}

/* ── Scanner QR ── */
.ms-scan { text-align: center; }

.ms-scan-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 16px;
}

.ms-scan-toolbar .ms-scan-status {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.ms-scan-retry {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--ms-border);
    background: var(--ms-card-muted);
    color: var(--ms-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ms-scan-retry:hover {
    background: var(--ms-accent-soft);
    border-color: rgba(8, 145, 178, 0.35);
    color: #0891b2;
}

.ms-scan-retry:active {
    transform: scale(0.96);
}

.ms-scan-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ms-muted);
    background: var(--ms-card-muted);
    border: 1px solid var(--ms-border);
}

.ms-scan-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--ms-muted);
}

.ms-scan-status.is-live { color: #15803d; background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.25); }
.ms-scan-status.is-live .ms-scan-status__dot { background: var(--ms-success); animation: msPulse 1.4s ease infinite; }
.ms-scan-status.is-loading { color: #0891b2; background: var(--ms-accent-soft); }
.ms-scan-status.is-loading .ms-scan-status__dot { background: var(--ms-accent); animation: msPulse 0.8s ease infinite; }
.ms-scan-status.is-error { color: var(--ms-danger); background: rgba(239, 68, 68, 0.08); }
.ms-scan-status.is-error .ms-scan-status__dot { background: var(--ms-danger); }
.ms-scan-status.is-ok { color: #15803d; background: rgba(34, 197, 94, 0.1); }
.ms-scan-status.is-ok .ms-scan-status__dot { background: var(--ms-success); }

@keyframes msPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.ms-scan__frame {
    position: relative;
    margin: 0 auto 20px;
    max-width: 300px;
    aspect-ratio: 1;
    border-radius: var(--ms-radius-lg);
    overflow: hidden;
    background: var(--ms-surface-graphite);
    box-shadow: var(--ms-shadow);
}

.ms-scan__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ms-scan__corners span {
    position: absolute;
    width: 28px;
    height: 28px;
    border-color: var(--ms-accent);
    border-style: solid;
    z-index: 3;
    pointer-events: none;
}

.ms-scan__corners span:nth-child(1) { top: 20px; left: 20px; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.ms-scan__corners span:nth-child(2) { top: 20px; right: 20px; border-width: 3px 3px 0 0; border-radius: 0 4px 0 0; }
.ms-scan__corners span:nth-child(3) { bottom: 20px; left: 20px; border-width: 0 0 3px 3px; border-radius: 0 0 0 4px; }
.ms-scan__corners span:nth-child(4) { bottom: 20px; right: 20px; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }

.ms-scan__line {
    position: absolute;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--ms-accent), transparent);
    box-shadow: 0 0 12px var(--ms-accent-glow);
    z-index: 2;
    opacity: 0;
    top: 30%;
}

.ms-scan__frame.is-live .ms-scan__line {
    opacity: 1;
    animation: msScanLine 2.2s ease-in-out infinite;
}

@keyframes msScanLine {
    0%, 100% { top: 22%; }
    50% { top: 72%; }
}

.ms-scan__frame.is-live::after {
    content: "";
    position: absolute;
    top: 12px;
    right: 12px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--ms-success);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
    z-index: 4;
    animation: msPulse 1.4s ease infinite;
}

.ms-scan__overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(17, 19, 24, 0.75);
    z-index: 5;
}

.ms-scan__frame.is-success .ms-scan__overlay { display: flex; }
.ms-scan__frame.is-success .ms-scan__video { filter: blur(4px); opacity: 0.6; }
.ms-scan__frame.is-success .ms-scan__line { opacity: 0; }

.ms-scan__success-text {
    margin: 12px 0 0;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

.ms-scan__check {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--ms-success);
    display: grid;
    place-items: center;
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 8px 32px rgba(34, 197, 94, 0.4);
}

.ms-scan__msg {
    min-height: 44px;
    font-size: 14px;
    color: var(--ms-muted);
    margin-bottom: 16px;
    line-height: 1.5;
    padding: 0 8px;
}

.ms-scan__msg.is-error { color: var(--ms-danger); font-weight: 600; }
.ms-scan__msg.is-ok { color: #15803d; font-weight: 600; }

/* ── Botones ── */
.ms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: var(--ms-radius-btn);
    border: 1px solid var(--ms-border);
    background: var(--ms-card);
    color: var(--ms-text);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.ms-btn:active { transform: scale(0.98); }
.ms-btn:focus-visible { outline: 2px solid var(--ms-accent); outline-offset: 2px; }

.ms-btn--primary {
    background: linear-gradient(135deg, #0891b2 0%, #6366f1 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 20px rgba(19, 234, 218, 0.28);
}

.ms-btn--ghost {
    background: transparent;
    border-color: var(--ms-border-strong);
    color: var(--ms-text-secondary);
}

.ms-btn--dark {
    background: var(--ms-surface-dark);
    border-color: var(--ms-surface-dark);
    color: #fff;
}

.ms-btn-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ms-btn--block { width: 100%; }
.ms-btn--sm { min-height: 38px; padding: 0 14px; font-size: 13px; }
.ms-mt-12 { margin-top: 12px; }

/* ── Ranking ── */
.ms-rank-list { display: flex; flex-direction: column; gap: 8px; }

.ms-rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--ms-radius-btn);
    background: var(--ms-card-muted);
    border: 1px solid var(--ms-border);
    transition: border-color 0.15s ease;
}

.ms-rank-item.is-me {
    border-color: rgba(19, 234, 218, 0.45);
    background: linear-gradient(90deg, rgba(19, 234, 218, 0.08), transparent);
    box-shadow: inset 3px 0 0 var(--ms-accent);
}

.ms-rank-list--compact { margin-top: 10px; }

.ms-rank-pos {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 36px;
    font-weight: 900;
    font-size: 12px;
    color: var(--ms-muted);
    text-align: center;
    flex-shrink: 0;
}

.ms-rank-pos i { font-size: 16px; line-height: 1; }

.ms-rank-pos--gold { color: #ca8a04; }
.ms-rank-pos--silver { color: #64748b; }
.ms-rank-pos--bronze { color: #c2410c; }

.ms-rank-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    padding: 2px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--ms-gradient-generic);
}

.ms-rank-avatar .ms-app__avatar,
.ms-rank-avatar .ms-app__avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.ms-rank-info { flex: 1; min-width: 0; }
.ms-rank-nick { font-size: 14px; font-weight: 800; color: var(--ms-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-rank-sub { font-size: 11px; color: var(--ms-muted); margin-top: 2px; }
.ms-rank-hours { font-size: 13px; font-weight: 800; color: #0891b2; }

.ms-rank-podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

/* ── Favoritos ── */
.ms-fav-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.ms-fav-item-wrap {
    position: relative;
}

.ms-fav-item {
    position: relative;
    text-align: center;
    border-radius: 16px;
    overflow: hidden;
    background: var(--ms-card-muted);
    border: 1px solid var(--ms-border);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    width: 100%;
    display: block;
}

.ms-fav-item__media {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(145deg, #1e293b, #0f172a);
}

.ms-fav-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ms-fav-item__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.35);
}

.ms-fav-item__title {
    display: block;
    padding: 8px 8px 10px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--ms-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-fav-item:active {
    transform: scale(0.98);
}

.ms-fav-item__delete {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 999px;
    background: rgba(17, 19, 24, 0.72);
    color: #fca5a5;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 11px;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ms-fav-item__delete:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.55);
    color: #ef4444;
}

.ms-fav-grid .ms-fav-item {
    height: 100%;
}

/* ── Perfil ── */
.ms-profile-grid { display: grid; gap: 10px; }

.ms-profile-field label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ms-muted);
    margin-bottom: 4px;
    font-weight: 600;
}

.ms-profile-field div {
    font-size: 15px;
    font-weight: 600;
    padding: 12px 14px;
    border-radius: var(--ms-radius-btn);
    background: var(--ms-card-muted);
    border: 1px solid var(--ms-border);
    color: var(--ms-text);
}

.ms-profile-avatar { display: flex; gap: 16px; align-items: flex-start; }
.ms-profile-avatar__preview { width: 88px; height: 88px; flex-shrink: 0; }
.ms-profile-avatar__body { flex: 1; min-width: 0; }
.ms-profile-avatar__upload { margin-top: 14px; }
.ms-profile-avatar__file { display: block; width: 100%; margin-bottom: 10px; font-size: 13px; color: var(--ms-muted); }
.ms-profile-avatar__hint { margin: 8px 0 0; min-height: 18px; font-size: 13px; color: var(--ms-muted); }
.ms-profile-avatar__hint.is-error { color: var(--ms-danger); }
.ms-profile-avatar__hint.is-ok { color: #15803d; }

/* ── Tabs ── */
.ms-tabs { display: flex; gap: 8px; margin-bottom: 14px; background: var(--ms-card-muted); padding: 4px; border-radius: 12px; border: 1px solid var(--ms-border); }

.ms-tab {
    flex: 1;
    padding: 10px 8px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: var(--ms-muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.ms-tab.is-active {
    background: var(--ms-card);
    color: var(--ms-text);
    box-shadow: var(--ms-shadow-soft);
}

.ms-tab:active,
.ms-filter:active {
    transform: scale(0.98);
}

[data-ms-tab-panel] { display: none; }
[data-ms-tab-panel].is-active { display: block; }

/* ── Footer nativo ── */
.ms-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    padding: var(--ms-footer-lift) 4px 0;
    padding-bottom: calc(6px + var(--ms-safe-bottom));
    background: transparent;
    pointer-events: none;
    color: #ffffff;
}

.ms-footer::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(var(--ms-footer-bar-h) + var(--ms-safe-bottom));
    background: var(--ms-footer-bg);
    border-top: 1px solid var(--ms-border-dark);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
    z-index: 0;
}

.ms-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding: 7px 2px 5px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    min-height: calc(var(--ms-footer-bar-h) - 10px);
    border-radius: var(--ms-radius-btn);
    transition: color var(--ms-dur-fast) ease, transform var(--ms-dur-fast) ease;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    font-family: inherit;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}

.ms-nav-btn span {
    text-decoration: none;
}

.ms-nav-btn i { font-size: 20px; }

.ms-nav-btn:hover,
.ms-nav-btn:focus-visible {
    color: var(--ms-accent);
}

.ms-nav-btn.is-active {
    color: var(--ms-accent);
}

.ms-nav-btn:active {
    transform: scale(0.98);
}

.ms-nav-btn--center .ms-nav-btn__pill {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #13EADA, #6366f1);
    color: #fff;
    font-size: 20px;
    border: 3px solid var(--ms-footer-bg);
    box-shadow: 0 4px 24px var(--ms-accent-glow), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.ms-nav-btn--center {
    z-index: 2;
    min-height: 0;
    padding-bottom: 0;
    transform: translateY(-10px);
    pointer-events: auto;
}

.ms-nav-btn--center span:last-child {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
}

.ms-nav-btn--center:hover span:last-child,
.ms-nav-btn--center.is-active span:last-child,
.ms-nav-btn--center:focus-visible span:last-child {
    color: var(--ms-accent);
}

/* ── Sidebar menú (izquierda) ── */
@keyframes msSidebarSlideIn {
    from { transform: translateX(-104%); }
    to { transform: translateX(0); }
}

@keyframes msSidebarGroupIn {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ms-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(17, 19, 24, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.38s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.ms-sidebar-backdrop.is-open { opacity: 1; pointer-events: auto; touch-action: none; }

.ms-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: var(--ms-z-sheet);
    width: min(300px, 88vw);
    background: #fff;
    transform: translateX(-104%);
    transition: transform 0.42s var(--ms-ease);
    padding-bottom: calc(8px + var(--ms-safe-bottom));
    overflow: hidden;
    box-shadow:
        12px 0 48px rgba(15, 23, 42, 0.18),
        1px 0 0 rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    touch-action: none;
}

.ms-sidebar.is-open {
    transform: translateX(0);
    touch-action: none;
    overscroll-behavior: contain;
}

.ms-sidebar__bar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: calc(12px + var(--ms-safe-top, 0px)) 14px 10px;
    border-bottom: 1px solid var(--ms-border);
    background: #fff;
}

.ms-sidebar__bar-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ms-text);
}

.ms-sidebar__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding: 10px 12px 8px;
}

.ms-sidebar__footer {
    flex-shrink: 0;
    padding: 6px 12px calc(8px + var(--ms-safe-bottom));
    border-top: 1px solid var(--ms-border);
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ms-sidebar-privacy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ms-muted);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.ms-sidebar-privacy:hover,
.ms-sidebar-privacy:focus-visible {
    color: var(--ms-text);
    background: var(--ms-bg-soft);
}

.ms-sidebar-privacy:active {
    transform: scale(0.98);
}

.ms-sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--ms-logout-border);
    background: var(--ms-logout-soft);
    color: var(--ms-logout);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.ms-sidebar-logout:hover,
.ms-sidebar-logout:focus-visible {
    background: rgba(194, 37, 145, 0.18);
    border-color: rgba(194, 37, 145, 0.45);
}

.ms-sidebar-logout:active {
    transform: scale(0.98);
    background: rgba(194, 37, 145, 0.24);
}

#msApp.ms-sidebar-lock {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    overflow: hidden !important;
    touch-action: none;
    overscroll-behavior: none;
}

.ms-sidebar__hero {
    position: relative;
    flex-shrink: 0;
    padding: calc(20px + var(--ms-safe-top, 0px)) 22px 22px;
    background: linear-gradient(145deg, #252a34 0%, #1b1f27 55%, #20242c 100%);
    color: var(--ms-text-light);
    overflow: hidden;
    touch-action: none;
}

.ms-sidebar__hero::before {
    content: "";
    position: absolute;
    top: -35%;
    right: -25%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(194, 37, 145, 0.2), transparent 68%);
    pointer-events: none;
}

.ms-sidebar__hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 22px;
    right: 22px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(19, 234, 218, 0.45), transparent);
}

.ms-sidebar__close {
    position: static;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--ms-border);
    background: var(--ms-card-muted);
    color: var(--ms-text);
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 2;
    transition: background 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.ms-sidebar__close:active { transform: scale(0.94); background: var(--ms-bg-soft); }

.ms-sidebar__profile {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-right: 44px;
}

.ms-sidebar__avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    padding: 3px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    background: var(--ms-gradient-generic);
}

.ms-sidebar__avatar .ms-app__avatar,
.ms-sidebar__avatar .ms-app__avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 13px;
}

.ms-sidebar__profile-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.ms-sidebar__greet {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.58);
    line-height: 1.2;
}

.ms-sidebar__nick {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-sidebar__badge {
    margin-top: 2px;
    font-size: 9px;
}

.ms-sidebar__tagline {
    position: relative;
    z-index: 1;
    margin: 14px 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.02em;
}

a.ms-menu-item {
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.ms-sidebar__nav {
    padding: 18px 16px 8px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.ms-sidebar__group {
    margin-bottom: 12px;
}

.ms-sidebar__group--footer {
    margin-top: 8px;
    margin-bottom: 0;
    padding-top: 16px;
    border-top: 1px solid var(--ms-border);
}

.ms-sidebar.is-open .ms-sidebar__group {
    animation: msSidebarGroupIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.ms-sidebar.is-open .ms-sidebar__group:nth-child(1) { animation-delay: 0.06s; }
.ms-sidebar.is-open .ms-sidebar__group:nth-child(2) { animation-delay: 0.1s; }
.ms-sidebar.is-open .ms-sidebar__group:nth-child(3) { animation-delay: 0.14s; }

.ms-sidebar__group-label {
    margin: 0 0 4px 4px;
    padding: 0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ms-muted);
}

.ms-menu-item--compact {
    padding: 9px 10px;
    margin-bottom: 4px;
    font-size: 14px;
    border-radius: 10px;
    gap: 10px;
    box-shadow: none;
}

.ms-menu-item--compact .ms-menu-item__icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 13px;
}

.ms-menu-item--compact .ms-menu-item__chevron {
    font-size: 10px;
}

.ms-drawer__close {
    width: 38px;
    height: 38px;
    border-radius: var(--ms-radius-btn);
    border: 1px solid var(--ms-border);
    background: var(--ms-card-muted);
    color: var(--ms-text);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.ms-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 14px;
    margin-bottom: 6px;
    border: 1px solid rgba(17, 19, 24, 0.06);
    border-radius: 14px;
    background: #fff;
    color: var(--ms-text);
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(17, 19, 24, 0.04);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.ms-menu-item__icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(19, 234, 218, 0.14), rgba(99, 102, 241, 0.1));
    color: #0891b2;
    font-size: 15px;
    flex-shrink: 0;
}

.ms-menu-item__icon i.bi { font-size: 17px; }

.ms-menu-item__label {
    flex: 1 1 auto;
    min-width: 0;
}

.ms-menu-item__chevron {
    font-size: 11px;
    color: rgba(17, 19, 24, 0.22);
    flex-shrink: 0;
    transition: transform 0.18s ease, color 0.18s ease;
}

.ms-menu-item:active {
    transform: scale(0.985);
    background: var(--ms-card-muted);
}

@media (hover: hover) {
    .ms-menu-item:hover {
        border-color: rgba(19, 234, 218, 0.28);
        box-shadow: 0 4px 14px rgba(19, 234, 218, 0.1);
    }

    .ms-menu-item:hover .ms-menu-item__chevron {
        color: #0891b2;
        transform: translateX(2px);
    }
}

.ms-menu-item--danger {
    color: var(--ms-danger);
    background: rgba(239, 68, 68, 0.04);
    border-color: rgba(239, 68, 68, 0.12);
}

.ms-menu-item--danger .ms-menu-item__icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--ms-danger);
}

.ms-menu-item--danger .ms-menu-item__chevron { display: none; }

body.ms-sidebar-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
    touch-action: none;
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
}

html.ms-sidebar-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
    touch-action: none;
}

.ms-note {
    padding: 14px 16px;
    border-radius: var(--ms-radius-btn);
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.18);
    font-size: 13px;
    color: var(--ms-text-secondary);
    line-height: 1.5;
    margin-bottom: 14px;
}

/* ── Modales ── */
.ms-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(17, 19, 24, 0.6);
    backdrop-filter: blur(4px);
    animation: msFadeIn 0.2s ease;
}

.ms-modal-backdrop.is-open { display: flex; }

.ms-modal {
    width: min(420px, 100%);
    max-height: 88vh;
    overflow: auto;
    border-radius: var(--ms-radius);
    background: var(--ms-card);
    border: 1px solid var(--ms-border);
    box-shadow: var(--ms-shadow);
    animation: msModalIn 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes msModalIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.ms-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--ms-border);
}

.ms-modal__title { margin: 0; font-size: 17px; font-weight: 800; }
.ms-modal__body { padding: 18px; }
.ms-modal__body--center { text-align: center; }

.ms-modal__qr-image {
    width: min(280px, 100%);
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--ms-border);
    padding: 8px;
}

/* ── Amigos ── */
.ms-friend-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--ms-radius-btn);
    border: 1px solid var(--ms-border);
    background: var(--ms-card);
    margin-bottom: 8px;
    box-shadow: var(--ms-shadow-soft);
}

.ms-friend-row.is-selected {
    border-color: rgba(19, 234, 218, 0.5);
    background: rgba(19, 234, 218, 0.06);
}

.ms-friend-row__avatar { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.ms-friend-row__info { flex: 1; min-width: 0; }
.ms-friend-row__name { font-size: 14px; font-weight: 800; }
.ms-friend-row__sub { font-size: 11px; color: var(--ms-muted); }
.ms-friend-row__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ms-friend-row__actions .ms-btn--sm { min-height: 34px; padding: 0 10px; }

.ms-qr-card__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
}

.ms-qr-card__actions .ms-qr-card__show {
    flex: 1;
    min-height: 40px;
}

.ms-btn--icon {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ms-btn--icon i {
    font-size: 16px;
    line-height: 1;
}

.ms-promo-card__buy {
    width: 100%;
    min-height: 48px;
    font-size: 15px;
    font-weight: 700;
}

.ms-promo-card__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: auto;
    width: 100%;
}

.ms-promo-card__actions .ms-promo-card__buy,
.ms-promo-card__actions .ms-promo-card__redeem {
    width: 100%;
    margin-top: 0;
    min-height: 48px;
    font-size: 14px;
    padding: 0 12px;
}

.ms-btn--redeem {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(245, 158, 11, 0.08) 100%);
    border-color: rgba(124, 58, 237, 0.22);
    color: #7c3aed;
    font-weight: 800;
}

.ms-btn--redeem:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.ms-promo-card__buy:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ms-section--promos .ms-promo-card__buy--nostock:disabled {
    opacity: 1;
    background: #e5e7eb;
    color: #6b7280;
    border-color: #d1d5db;
    box-shadow: none;
}

.ms-pay-summary__branch {
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ms-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ms-pay-summary__branch:empty {
    display: none;
}

.ms-pay-summary__branch::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0891b2;
    flex-shrink: 0;
}

.ms-modal__header--pay {
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ms-border);
}

.ms-pay-modal__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.ms-pay-modal__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    background: linear-gradient(145deg, #009ee3, #007eb5);
    box-shadow: 0 6px 18px rgba(0, 158, 227, 0.28);
}

.ms-pay-modal__lead {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--ms-muted);
    line-height: 1.4;
}

.ms-pay-modal__cancel {
    width: 100%;
    margin-top: 12px;
    min-height: 44px;
}

.ms-modal-backdrop--locked {
    cursor: default;
}

.ms-modal--pay .ms-modal__body {
    padding-bottom: 18px;
}

.ms-pay-summary {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(19, 234, 218, 0.08), rgba(99, 102, 241, 0.06));
    border: 1px solid rgba(19, 234, 218, 0.18);
}

.ms-pay-summary__label {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ms-muted);
}

.ms-pay-summary__item {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 800;
    color: var(--ms-text);
    line-height: 1.3;
}

.ms-pay-summary__amount {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--ms-text);
}

.ms-pay-summary__email {
    margin: 0;
    font-size: 13px;
    color: var(--ms-muted);
}

.ms-btn--mp {
    width: 100%;
    margin-top: 4px;
    min-height: 48px;
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #009ee3, #007eb5);
    border: none;
    box-shadow: 0 10px 24px rgba(0, 158, 227, 0.28);
}

.ms-btn--mp:disabled {
    opacity: 0.55;
    cursor: wait;
}

.ms-mp-brick-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 12px;
    color: var(--ms-muted);
    font-size: 14px;
}

.ms-mp-brick-loading.is-hidden {
    display: none;
}

.ms-mp-external-link {
    display: block;
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #7dd3fc;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ms-mp-external-link.is-hidden {
    display: none;
}

.ms-pay-thanks {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(19, 234, 218, 0.08));
    border: 1px solid rgba(74, 222, 128, 0.35);
    box-shadow: 0 12px 28px rgba(34, 197, 94, 0.12);
    animation: msPayThanksIn 0.45s ease;
}

.ms-pay-thanks.is-fading {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

@keyframes msPayThanksIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.ms-pay-thanks__icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #4ade80;
    background: rgba(34, 197, 94, 0.18);
}

.ms-pay-thanks__body {
    flex: 1;
    min-width: 0;
}

.ms-pay-thanks__title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 800;
    color: var(--ms-text);
}

.ms-pay-thanks__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ms-muted);
}

.ms-pay-thanks__close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--ms-muted);
    cursor: pointer;
}

.ms-pay-qr-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.ms-pay-qr-wrap img {
    width: min(260px, 100%);
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--ms-border);
    padding: 8px;
}

.ms-pay-loading { padding: 24px 0; }

.ms-qr-card__img--click { cursor: pointer; }

/* ── Saves cloud item ── */
.ms-save-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ms-save-card {
    display: flex;
    align-items: stretch;
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--ms-border);
    box-shadow: var(--ms-shadow-sm);
}

.ms-save-card__media {
    flex-shrink: 0;
    width: 72px;
    height: 96px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(145deg, #1e293b, #0f172a);
}

.ms-save-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ms-save-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.4);
}

.ms-save-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ms-save-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.ms-save-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--ms-text);
    line-height: 1.2;
}

.ms-save-card__badge {
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    background: rgba(6, 182, 212, 0.12);
    color: #0891b2;
    border: 1px solid rgba(6, 182, 212, 0.22);
}

.ms-save-card__meta {
    margin: 0;
    font-size: 12px;
    color: var(--ms-muted);
}

.ms-save-card__hint {
    margin: 2px 0 0;
    font-size: 11px;
    color: var(--ms-text-secondary);
    line-height: 1.4;
}

.ms-save-card__delete {
    flex-shrink: 0;
    align-self: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.06);
    color: var(--ms-danger);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.ms-save-card__delete:hover {
    background: rgba(239, 68, 68, 0.1);
}

.ms-save-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: var(--ms-radius-btn);
    background: var(--ms-card-muted);
    border: 1px solid var(--ms-border);
    margin-bottom: 8px;
}

.ms-save-item__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    font-size: 18px;
}

.ms-save-item__info { flex: 1; }
.ms-save-item__title { font-size: 14px; font-weight: 800; margin: 0 0 2px; }
.ms-save-item__meta { font-size: 12px; color: var(--ms-muted); margin: 0; }

.ms-save-item__delete {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.ms-save-item__delete:hover {
    background: rgba(239, 68, 68, 0.16);
}

.is-hidden { display: none !important; }

/* ── Login oscuro (misma línea visual que la app) ── */
body.ms-login-body {
    --ms-shell-bg: #07080d;
    --ms-shell-bg-soft: #0d1018;
    --ms-shell-card: #111520;
    --ms-shell-card-soft: #171b26;
    --ms-shell-text: #f8fafc;
    --ms-shell-muted: #9ca3af;
    --ms-shell-border: rgba(255, 255, 255, 0.08);
    --ms-shell-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    background: var(--ms-shell-bg);
    color: var(--ms-shell-text);
}

.ms-login {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px calc(24px + var(--ms-safe-bottom));
}

.ms-login__glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(600px 400px at 50% -5%, rgba(19, 234, 218, 0.12), transparent 60%),
        radial-gradient(500px 360px at 100% 100%, rgba(194, 37, 145, 0.1), transparent 55%);
}

.ms-login__header {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 380px;
    margin-bottom: 28px;
}

.ms-login__logo {
    max-width: 200px;
    width: min(200px, 70vw);
    height: auto;
    margin-bottom: 20px;
    filter: brightness(1.08);
}

.ms-login__subtitle {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ms-shell-muted);
}

.ms-login__card {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    padding: 28px 24px;
    border-radius: var(--ms-radius-lg);
    background: var(--ms-shell-card);
    color: var(--ms-shell-text);
    border: 1px solid var(--ms-shell-border);
    box-shadow: var(--ms-shell-shadow);
}

.ms-login__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.ms-login__submit { width: 100%; min-height: 50px; font-size: 16px; }
.ms-login__forgot { margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--ms-shell-border); }
.ms-login__forgot.is-hidden, #loginForm.is-hidden, #registerForm.is-hidden, .ms-login__switch.is-hidden { display: none; }
.ms-login__forgot-title { margin: 0 0 6px; font-size: 17px; font-weight: 800; color: var(--ms-shell-text); }
.ms-login__forgot-text { margin: 0 0 16px; font-size: 13px; color: var(--ms-shell-muted); line-height: 1.5; }
.ms-login__switch {
    margin: 18px 0 0;
    text-align: center;
    font-size: 14px;
    color: var(--ms-shell-muted);
}
.ms-login__register {
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--ms-shell-border);
}

body.ms-login-body .ms-field__label {
    color: var(--ms-shell-muted);
}

body.ms-login-body .ms-input {
    background: var(--ms-shell-card-soft);
    border-color: var(--ms-shell-border);
    color: var(--ms-shell-text);
}

body.ms-login-body .ms-input::placeholder {
    color: #6b7280;
}

body.ms-login-body .ms-field__icon,
body.ms-login-body .ms-field__toggle {
    color: var(--ms-shell-muted);
}

body.ms-login-body .ms-check {
    color: var(--ms-shell-muted);
}

body.ms-login-body .ms-link-btn {
    color: #13EADA;
}

body.ms-login-body .ms-link-btn:hover,
body.ms-login-body .ms-link-btn:focus-visible {
    color: #5eead4;
}

body.ms-login-body .ms-btn--ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--ms-shell-border);
    color: var(--ms-shell-text);
}

body.ms-login-body .ms-alert--success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.28);
    color: #86efac;
}
.ms-profile-form { display: grid; gap: 12px; margin-top: 14px; }
.ms-profile-form .ms-field { margin-bottom: 0; }
.ms-profile-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ms-border);
}
.ms-profile-stat__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ms-muted);
}
.ms-profile-stat__value {
    font-size: 16px;
    font-weight: 700;
    color: var(--ms-text);
}
.ms-profile-readonly {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ms-border);
}

.ms-field { margin-bottom: 18px; }
.ms-field__label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ms-muted);
}

.ms-field__control { position: relative; display: flex; align-items: center; }
.ms-field__icon { position: absolute; left: 14px; font-size: 15px; color: var(--ms-muted); pointer-events: none; }

.ms-input {
    width: 100%;
    min-height: 52px;
    padding: 0 44px 0 42px;
    border-radius: var(--ms-radius-btn);
    border: 1px solid var(--ms-border);
    background: var(--ms-card-muted);
    color: var(--ms-text);
    font-size: 16px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

.ms-input::placeholder { color: #9ca3af; }
.ms-input:focus { border-color: rgba(19, 234, 218, 0.6); box-shadow: 0 0 0 3px rgba(19, 234, 218, 0.15); }
.ms-input.is-invalid { border-color: rgba(239, 68, 68, 0.6); }

.ms-field__toggle {
    position: absolute;
    right: 8px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ms-muted);
    cursor: pointer;
}

.ms-field__error { margin: 6px 0 0; font-size: 12px; color: var(--ms-danger); font-weight: 600; }

.ms-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ms-muted);
    cursor: pointer;
}

.ms-check input { width: 17px; height: 17px; accent-color: var(--ms-accent); }

.ms-link-btn {
    border: 0;
    padding: 0;
    background: transparent;
    color: #0891b2;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.ms-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--ms-radius-btn);
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 18px;
}

.ms-alert--success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #15803d;
}

.ms-alert--success i { margin-top: 2px; }

/* ── Responsive ── */
.ms-header-search,
.ms-header-bell {
    position: relative;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, transform 0.15s ease;
}

.ms-header-search:active,
.ms-header-bell:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.1);
}

.ms-header-bell__badge,
.ms-nav-btn__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    padding: 1px 5px;
    border-radius: 999px;
    background: #13EADA;
    color: #000;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
}

.ms-nav-btn__icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ms-menu-item__badge {
    margin-left: auto;
    margin-right: 2px;
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--ms-accent, #13EADA);
    color: #000;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.ms-notifications__subtitle {
    margin: 0 0 6px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
}

.ms-notifications__hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(19, 234, 218, 0.08);
    border: 1px solid rgba(19, 234, 218, 0.22);
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.ms-notifications__hint strong {
    color: #ffffff;
    font-weight: 800;
}

.ms-notifications__hint i {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 15px;
    color: #13EADA;
}

.ms-notification-swipe {
    position: relative;
    margin-bottom: 10px;
    border-radius: 16px;
    overflow: hidden;
    transition: height 0.26s ease, margin 0.26s ease, opacity 0.26s ease;
}

.ms-notification-swipe.is-removing {
    pointer-events: none;
}

.ms-notification-swipe__actions {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    border-radius: 16px;
    overflow: hidden;
}

.ms-notification-swipe__action {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.ms-notification-swipe__action--read {
    justify-content: flex-start;
    background: linear-gradient(90deg, #0891b2 0%, #06b6d4 100%);
    color: #001018;
    opacity: 0.55;
    transition: opacity 0.18s ease;
}

.ms-notification-swipe__action--delete {
    justify-content: flex-end;
    background: linear-gradient(90deg, #b91c1c 0%, #ef4444 100%);
    color: #fff;
    opacity: 0.55;
    transition: opacity 0.18s ease;
}

.ms-notification-swipe.is-swipe-read .ms-notification-swipe__action--read,
.ms-notification-swipe.is-swipe-delete .ms-notification-swipe__action--delete {
    opacity: 1;
}

.ms-notification-swipe__panel {
    position: relative;
    z-index: 2;
    background: #131822;
    border-radius: 16px;
    touch-action: pan-y;
    will-change: transform;
    user-select: none;
    -webkit-user-select: none;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.ms-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: #131822;
    color: #ffffff;
    text-align: left;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ms-notification-item__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: #13EADA;
}

.ms-notification-item--qr_gift .ms-notification-item__icon {
    background: rgba(194, 37, 145, 0.18);
    color: #f472b6;
}

.ms-notification-item--friend_request .ms-notification-item__icon {
    background: rgba(66, 48, 229, 0.22);
    color: #a5b4fc;
}

.ms-notification-item--purchase_fulfilled .ms-notification-item__icon {
    background: rgba(19, 234, 218, 0.16);
    color: #13EADA;
}

.ms-notification-item__content {
    flex: 1;
    min-width: 0;
}

.ms-notification-item--unread {
    border-color: rgba(19, 234, 218, 0.45);
    box-shadow: 0 0 0 1px rgba(19, 234, 218, 0.12), 0 10px 28px rgba(0, 0, 0, 0.4);
}

.ms-notification-item__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.ms-notification-item__head strong {
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
}

.ms-notification-item__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #13EADA;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(19, 234, 218, 0.65);
}

.ms-notification-item__preview {
    margin: 0 0 8px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ms-notification-item__date {
    color: rgba(255, 255, 255, 0.58);
    font-size: 12px;
    font-weight: 600;
}

#msNotificationDetailCard {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

#msNotificationDetailCard .ms-card__title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 12px;
}

.ms-notifications__date {
    margin: 0 0 8px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
    font-weight: 600;
}

.ms-notifications__body {
    white-space: pre-line;
    color: rgba(255, 255, 255, 0.96);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.65;
    margin-bottom: 18px;
}

.ms-notifications__actions {
    display: flex;
    justify-content: flex-end;
}

.ms-btn--danger {
    color: #fca5a5;
}

@media (min-width: 768px) {
    .ms-app__main { padding-top: 24px; }
    .ms-tile-grid { gap: 12px; }
    .ms-login { padding-top: 48px; }
}

@media (max-width: 360px) {
    .ms-tile-grid { grid-template-columns: 1fr; }
    .ms-metrics { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   MegaSonic App 2026 — Premium layer
   ══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (min-width: 481px) {
    .ms-footer {
        left: 50%;
        right: auto;
        width: var(--ms-app-max);
        transform: translateX(-50%);
    }
}

/* ── Toasts ── */
.ms-toast-stack {
    position: fixed;
    left: 50%;
    bottom: calc(var(--ms-footer-h) + var(--ms-safe-bottom) + 12px);
    transform: translateX(-50%);
    z-index: var(--ms-z-toast);
    width: min(calc(100% - 24px), var(--ms-app-max) - 24px);
    max-height: min(36vh, 220px);
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    pointer-events: none;
    overflow: hidden;
}

.ms-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--ms-radius-sm);
    background: var(--ms-surface-dark);
    color: #fff;
    box-shadow: var(--ms-shadow-float);
    border: 1px solid var(--ms-border-dark);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    pointer-events: auto;
    animation: msToastIn 0.32s var(--ms-ease);
}

.ms-toast i { flex-shrink: 0; margin-top: 2px; font-size: 16px; }
.ms-toast--success { border-color: rgba(22, 163, 74, 0.45); }
.ms-toast--success i { color: #4ade80; }
.ms-toast--error { border-color: rgba(220, 38, 38, 0.45); }
.ms-toast--error i { color: #f87171; }
.ms-toast--warning { border-color: rgba(245, 158, 11, 0.45); }
.ms-toast--warning i { color: #fbbf24; }
.ms-toast--info { border-color: rgba(6, 182, 212, 0.45); }
.ms-toast--info i { color: var(--ms-accent); }

.ms-toast--out {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

@keyframes msToastIn {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Skeletons ── */
@keyframes msShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.ms-skeleton {
    background: linear-gradient(90deg, #eef2f6 0%, #f8fafc 40%, #eef2f6 80%);
    background-size: 200% 100%;
    animation: msShimmer 1.4s ease-in-out infinite;
    border-radius: 10px;
}

.ms-skeleton-line { height: 14px; margin-bottom: 10px; }
.ms-skeleton-line--sm { height: 10px; width: 60%; }
.ms-skeleton-line--lg { height: 22px; width: 80%; }
.ms-skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
.ms-skeleton-button { height: 44px; border-radius: var(--ms-radius-btn); }
.ms-skeleton-card {
    background: var(--ms-card);
    border: 1px solid var(--ms-border);
    border-radius: var(--ms-radius);
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: var(--ms-shadow-card);
}

/* ── Home hero premium ── */
.ms-home-hero {
    position: relative;
    padding: 22px;
    margin-bottom: var(--ms-space-section);
    border-radius: var(--ms-radius-lg);
    background: linear-gradient(145deg, #181b23 0%, #0f1117 55%, #1a2030 100%);
    color: #fff;
    box-shadow: var(--ms-shadow-float);
    overflow: hidden;
}

.ms-home-hero::before {
    content: "";
    position: absolute;
    top: -30%;
    right: -15%;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(19, 234, 218, 0.2), transparent 68%);
    pointer-events: none;
}

.ms-home-hero__top {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.ms-home-hero__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    padding: 3px;
    background: var(--ms-gradient-generic);
    flex-shrink: 0;
}

.ms-home-hero__avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: var(--ms-card-dark-alt);
}

.ms-home-hero__meta { flex: 1; min-width: 0; }
.ms-home-hero__greet { margin: 0; font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.55); }
.ms-home-hero__name { margin: 4px 0 8px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.ms-home-hero__rank { font-size: 12px; font-weight: 700; color: var(--ms-accent); }

.ms-home-hero__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 18px;
    position: relative;
    z-index: 1;
}

.ms-home-stat {
    padding: 14px;
    border-radius: var(--ms-radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ms-home-stat__label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.55);
    margin-bottom: 6px;
}

.ms-home-stat__value {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.ms-home-stat__value--accent {
    background: linear-gradient(135deg, #67e8f9, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ── Widgets home ── */
.ms-widget {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    margin-bottom: var(--ms-space-section);
    border-radius: var(--ms-radius);
    background: var(--ms-card);
    border: 1px solid var(--ms-border);
    box-shadow: var(--ms-shadow-card);
}

.ms-widget__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 20px;
    flex-shrink: 0;
    background: var(--ms-accent-soft);
    color: var(--ms-accent);
}

.ms-widget__body { flex: 1; min-width: 0; }
.ms-widget__title { margin: 0 0 4px; font-size: 15px; font-weight: 800; color: var(--ms-text); }
.ms-widget__text { margin: 0; font-size: 13px; color: var(--ms-muted); line-height: 1.45; }

.ms-featured-promo {
    margin-bottom: var(--ms-space-section);
    border-radius: var(--ms-radius-lg);
    overflow: hidden;
    background: var(--ms-card);
    border: 1px solid var(--ms-border);
    box-shadow: var(--ms-shadow-card);
}

.ms-featured-promo__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin: 16px 16px 0;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(124,58,237,0.15));
    color: var(--ms-accent-2);
}

.ms-featured-promo__body { padding: 12px 18px 18px; }
.ms-featured-promo__name { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.ms-featured-promo__price { margin: 0 0 12px; font-size: 26px; font-weight: 900; color: var(--ms-accent-2); letter-spacing: -0.02em; }
.ms-featured-promo__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.ms-tag--available { background: rgba(22, 163, 74, 0.12); color: var(--ms-success); }
.ms-tag--unavailable { background: rgba(220, 38, 38, 0.1); color: var(--ms-danger); }
.ms-tag--featured { background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(124,58,237,0.15)); color: var(--ms-accent-2); }

/* ── QR wallet ── */
.ms-qr-wallet-head {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.ms-qr-wallet-head__stat {
    padding: 14px 10px;
    border-radius: var(--ms-radius-sm);
    background: var(--ms-card);
    border: 1px solid var(--ms-border);
    box-shadow: var(--ms-shadow-soft);
    text-align: center;
}

.ms-qr-wallet-head__stat--active {
    background: linear-gradient(145deg, rgba(6, 182, 212, 0.1), rgba(124, 58, 237, 0.06));
    border-color: rgba(6, 182, 212, 0.22);
}

.ms-qr-wallet-head__value {
    display: block;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--ms-text);
    line-height: 1.1;
}

.ms-qr-wallet-head__stat--active .ms-qr-wallet-head__value {
    color: #0891b2;
}

.ms-qr-wallet-head__label {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ms-muted);
}

.ms-qr-tabs { margin-bottom: 14px; }

.ms-qr-card {
    border-radius: var(--ms-radius);
    background: var(--ms-card);
    border: 1px solid var(--ms-border);
    box-shadow: var(--ms-shadow-card);
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow var(--ms-dur-fast) ease, border-color var(--ms-dur-fast) ease;
}

.ms-qr-card[data-qr-status="active"] {
    border-color: rgba(22, 163, 74, 0.28);
    box-shadow: 0 10px 28px rgba(22, 163, 74, 0.08);
}

.ms-qr-card[data-qr-status="used"] { opacity: 0.78; }
.ms-qr-card[data-qr-status="expired"] { opacity: 0.62; filter: grayscale(0.35); }

.ms-qr-wallet-empty {
    border-style: dashed;
}

.ms-tag--used {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}

.ms-tag--expired {
    background: rgba(220, 38, 38, 0.08);
    color: var(--ms-danger);
}

/* ── QR fullscreen ── */
.ms-qr-fullscreen {
    position: fixed;
    inset: 0;
    z-index: var(--ms-z-fullscreen);
    background: rgba(15, 17, 23, 0.96);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    padding-bottom: calc(24px + var(--ms-safe-bottom));
}

.ms-qr-fullscreen.is-open { display: flex; animation: msFadeIn var(--ms-dur-med) ease; }

body.ms-qr-fullscreen-open {
    overflow: hidden;
}

.ms-qr-fullscreen__content {
    width: min(360px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ms-qr-fullscreen__close {
    position: absolute;
    top: calc(16px + var(--ms-safe-top));
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.ms-qr-fullscreen__title { color: #fff; font-size: 20px; font-weight: 800; margin: 0 0 6px; text-align: center; }

.ms-qr-fullscreen__code {
    margin: 0 0 18px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
}

.ms-qr-fullscreen__img {
    max-width: min(320px, 85vw);
    width: 100%;
    border-radius: var(--ms-radius);
    background: #fff;
    padding: 16px;
    box-shadow: var(--ms-shadow-float);
}

.ms-qr-fullscreen__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    max-width: 320px;
}

.ms-qr-fullscreen__meta-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
}

/* ── Scan intro ── */
.ms-scan-intro { text-align: center; padding: 8px 0 16px; }
.ms-scan-intro__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    font-size: 28px;
    background: linear-gradient(135deg, var(--ms-accent-soft), rgba(124,58,237,0.12));
    color: var(--ms-accent);
}

.ms-scan-intro__title { margin: 0 0 8px; font-size: 20px; font-weight: 800; }
.ms-scan-intro__text { margin: 0 0 18px; font-size: 14px; color: var(--ms-muted); line-height: 1.55; }
.ms-scan-camera.is-hidden { display: none !important; }
.ms-scan-fallback {
    padding: 16px;
    border-radius: var(--ms-radius-sm);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--ms-text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin-top: 12px;
}

/* ── Podium ── */
.ms-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 16px 8px 0;
}

.ms-podium__item {
    flex: 1;
    max-width: 110px;
    text-align: center;
    padding: 12px 8px;
    border-radius: var(--ms-radius-sm) var(--ms-radius-sm) 0 0;
    background: var(--ms-card-muted);
    border: 1px solid var(--ms-border);
    position: relative;
}

.ms-podium__item--tall { padding-bottom: 28px; background: linear-gradient(180deg, rgba(6,182,212,0.12), var(--ms-card-muted)); }
.ms-podium__item--mid { padding-bottom: 18px; }
.ms-podium__item--short { padding-bottom: 10px; }
.ms-podium__item.is-me { border-color: rgba(6, 182, 212, 0.45); box-shadow: inset 0 3px 0 var(--ms-accent); }

.ms-podium__medal { font-size: 18px; margin-bottom: 6px; }
.ms-podium__medal--gold { color: #fbbf24; }
.ms-podium__medal--silver { color: #94a3b8; }
.ms-podium__medal--bronze { color: #d97706; }

.ms-podium__avatar {
    width: 52px;
    height: 52px;
    margin: 0 auto 8px;
    border-radius: 50%;
    padding: 2px;
    overflow: hidden;
    background: var(--ms-gradient-generic);
}

.ms-podium__avatar .ms-app__avatar,
.ms-podium__avatar .ms-app__avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.ms-podium__nick { margin: 0; font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-podium__hours { margin: 4px 0 0; font-size: 11px; font-weight: 700; color: var(--ms-muted); }
.ms-podium__pos { position: absolute; top: 8px; right: 8px; font-size: 10px; font-weight: 800; color: var(--ms-muted); }

.ms-rank-you-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    border-radius: var(--ms-radius-sm);
    background: linear-gradient(90deg, rgba(6,182,212,0.1), transparent);
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.ms-rank-you-card__label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--ms-muted); }
.ms-rank-you-card__value { font-size: 18px; font-weight: 800; color: var(--ms-text); }

/* ── MegaPoints hero ── */
.ms-mp-hero {
    text-align: center;
    padding: 28px 20px;
    border-radius: var(--ms-radius-lg);
    background: linear-gradient(145deg, #ffffff 0%, #f0fdff 100%);
    border: 1px solid rgba(6, 182, 212, 0.2);
    box-shadow: var(--ms-shadow-card);
    margin-bottom: var(--ms-space-section);
}

.ms-mp-hero__value {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    background: linear-gradient(135deg, var(--ms-accent), var(--ms-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0 0 10px;
}

.ms-mp-hero__lead {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--ms-muted);
    line-height: 1.55;
}

.ms-mp-info__list {
    margin: 0;
    padding-left: 18px;
    color: var(--ms-text-secondary);
    font-size: 14px;
    line-height: 1.65;
}

.ms-mp-info__list li + li {
    margin-top: 6px;
}

.ms-mp-info__text {
    margin: 0;
    font-size: 14px;
    color: var(--ms-text-secondary);
    line-height: 1.55;
}

.ms-empty--compact {
    padding: 20px 16px;
}

.ms-profile-identity-card .ms-profile-identity {
    padding: 8px 0 4px;
}

.ms-mp-progress {
    height: 8px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.12);
    margin: 18px 0 10px;
    overflow: hidden;
}

.ms-mp-progress__bar {
    height: 100%;
    width: 35%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ms-accent), var(--ms-accent-2));
}

/* ── Profile identity ── */
.ms-profile-identity {
    text-align: center;
    padding: 8px 0 20px;
}

.ms-profile-identity__avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto 14px;
    border-radius: 50%;
    padding: 3px;
    background: var(--ms-gradient-generic);
}

.ms-profile-identity__avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: var(--ms-card-muted);
}

.ms-profile-identity__name { margin: 0 0 8px; font-size: 20px; font-weight: 800; }

.ms-input:focus {
    outline: none;
    border-color: rgba(6, 182, 212, 0.45);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

/* ── Bottom sheet modals ── */
.ms-modal-backdrop.is-sheet .ms-modal {
    position: fixed;
    left: 50%;
    bottom: 0;
    top: auto;
    transform: translate(-50%, 100%);
    width: min(var(--ms-app-max), 100%);
    max-height: 85vh;
    border-radius: var(--ms-radius-lg) var(--ms-radius-lg) 0 0;
    transition: transform 0.38s var(--ms-ease);
}

.ms-modal-backdrop.is-sheet.is-open .ms-modal {
    transform: translate(-50%, 0);
}

.ms-sidebar__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
    position: relative;
    z-index: 1;
}

.ms-sidebar__stat {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
}

.ms-sidebar__stat-label { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 4px; }
.ms-sidebar__stat-value { font-size: 16px; font-weight: 800; color: #fff; }

.ms-header-bell__badge.is-pulse { animation: msBellPulse 2s ease infinite; }

@keyframes msBellPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

.ms-section.is-entering {
    animation: msSectionIn var(--ms-dur-med) var(--ms-ease);
}

@keyframes msSectionIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ms-card--stagger > * { animation: msSectionIn 0.4s var(--ms-ease) backwards; }
.ms-card--stagger > *:nth-child(2) { animation-delay: 0.05s; }
.ms-card--stagger > *:nth-child(3) { animation-delay: 0.1s; }
.ms-card--stagger > *:nth-child(4) { animation-delay: 0.15s; }

.ms-empty__cta { margin-top: 14px; }

.ms-btn--buy {
    background: linear-gradient(135deg, #0891b2 0%, #7c3aed 100%);
    border-color: transparent;
    color: #fff;
    font-weight: 800;
}

/* ── Texto legal (privacidad) ── */
.ms-legal {
    font-size: 14px;
    line-height: 1.65;
    color: var(--ms-text-secondary);
}

.ms-legal__updated {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--ms-muted);
}

.ms-legal h2 {
    margin: 22px 0 8px;
    font-size: 15px;
    font-weight: 800;
    color: var(--ms-text);
    letter-spacing: -0.01em;
}

.ms-legal h2:first-of-type {
    margin-top: 0;
}

.ms-legal p {
    margin: 0 0 12px;
}

.ms-legal ul {
    margin: 0 0 12px;
    padding-left: 1.15rem;
}

.ms-legal li {
    margin-bottom: 6px;
}

.ms-legal a {
    color: var(--ms-accent-2);
    font-weight: 600;
    text-decoration: none;
}

.ms-legal a:hover {
    text-decoration: underline;
}

/* ── Confirm modal ── */
.ms-modal--confirm {
    width: min(380px, 100%);
}

.ms-modal--confirm .ms-modal__body--center {
    padding: 24px 20px 20px;
}

.ms-confirm__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 22px;
    background: rgba(6, 182, 212, 0.12);
    color: var(--ms-accent);
}

.ms-confirm__icon--danger {
    background: rgba(220, 38, 38, 0.1);
    color: var(--ms-danger);
}

.ms-confirm__text {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ms-text-secondary);
}

.ms-confirm__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ms-confirm__actions .ms-btn--danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-color: transparent;
    color: #fff;
}

/* ── Modal compra (cantidad antes de MP) ── */
.ms-modal--buy {
    width: min(400px, 100%);
}

.ms-buy-summary {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.ms-buy-summary__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ms-buy-summary__row--total {
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--ms-border);
}

.ms-buy-summary__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ms-muted);
    flex-shrink: 0;
}

.ms-buy-summary__value {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: right;
    color: var(--ms-text);
}

.ms-buy-summary__total {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ms-text);
    line-height: 1;
}

.ms-buy-summary__row--mp {
    align-items: center;
}

.ms-buy-summary__mp {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #ffffff;
    text-align: right;
}

.ms-redeem-alert {
    margin-top: 4px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--ms-text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ms-redeem-alert.is-error {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(248, 113, 113, 0.28);
}

.ms-buy-qty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ms-buy-qty__controls {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--ms-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--ms-card-muted);
}

.ms-buy-qty__btn {
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: var(--ms-text);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.ms-buy-qty__btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.ms-buy-qty__input {
    width: 52px;
    height: 40px;
    border: 0;
    border-left: 1px solid var(--ms-border);
    border-right: 1px solid var(--ms-border);
    background: transparent;
    color: var(--ms-text);
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    font-family: inherit;
    -moz-appearance: textfield;
}

.ms-buy-qty__input::-webkit-outer-spin-button,
.ms-buy-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ms-buy-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ms-buy-actions .ms-btn--primary:disabled,
#msRedeemConfirm:disabled {
    opacity: 0.42;
    pointer-events: none;
    box-shadow: none;
    cursor: not-allowed;
    filter: grayscale(0.35);
}

body.ms-app-dark .ms-buy-summary__row--total {
    border-top-color: var(--ms-shell-border);
}

body.ms-app-dark .ms-buy-summary__label {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-buy-summary__value {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-buy-summary__total {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-buy-qty__controls {
    background: var(--ms-shell-card-soft);
    border-color: var(--ms-shell-border);
}

body.ms-app-dark .ms-buy-qty__btn {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-buy-qty__input {
    color: var(--ms-shell-text);
    border-color: var(--ms-shell-border);
}
@media (prefers-reduced-motion: reduce) {
    .ms-skeleton {
        animation: none;
        background: #eef2f6;
    }

    .ms-toast {
        animation: none;
    }

    .ms-toast--out {
        transition: none;
    }

    .ms-section,
    .ms-sidebar,
    .ms-sidebar-backdrop,
    .ms-qr-fullscreen.is-open {
        animation: none !important;
    }
}

/* ── Home Juegos (Netflix-style) ── */
.ms-games-home {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding-bottom: 8px;
}

.ms-games-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ms-games-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--ms-border);
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    color: var(--ms-text);
    box-shadow: var(--ms-shadow-sm);
}

.ms-games-chip--profile,
.ms-games-chip--link {
    cursor: pointer;
    font: inherit;
}

.ms-games-chip__avatar {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    object-fit: cover;
}

.ms-games-chip__avatar--fallback {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--ms-accent), var(--ms-accent-2));
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ms-games-hero {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    height: 220px;
    max-height: 220px;
    background: #0f172a;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.ms-games-hero-carousel {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    height: 220px;
    max-height: 220px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.ms-games-hero-carousel__viewport {
    position: relative;
    height: 220px;
    max-height: 220px;
}

.ms-games-hero-carousel__track {
    position: relative;
    height: 220px;
    max-height: 220px;
}

.ms-games-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 320ms ease;
    height: 220px;
    max-height: 220px;
}

.ms-games-hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
    height: 220px;
    max-height: 220px;
}

.ms-games-hero-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 0;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ms-games-hero-carousel__nav--prev { left: 10px; }
.ms-games-hero-carousel__nav--next { right: 10px; }

.ms-games-hero-carousel__dots {
    position: absolute;
    left: 0;
    right: 88px;
    bottom: 18px;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    pointer-events: none;
}

.ms-games-hero-carousel__dots button {
    pointer-events: auto;
}

.ms-games-hero-carousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.ms-games-hero-carousel__dot.is-active {
    width: 22px;
    background: #fff;
}

.ms-games-hero__rank {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    background: rgba(6, 182, 212, 0.88);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.ms-games-hero__media {
    position: absolute;
    inset: 0;
    height: 100%;
}

.ms-games-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.ms-games-hero__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.35) 38%, rgba(2, 6, 23, 0.2) 100%),
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35) 0%, transparent 70%);
}

.ms-games-hero__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: rgba(255, 255, 255, 0.35);
}

.ms-games-hero__content {
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 0;
}

.ms-games-hero__title {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    width: calc(100% - 48px);
    max-width: 20rem;
    text-align: center;
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.65);
    pointer-events: none;
}

.ms-games-hero__desc {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82);
    max-width: 34rem;
}

.ms-games-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.ms-games-hero__actions {
    position: absolute;
    z-index: 4;
    right: 12px;
    bottom: 12px;
    margin: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.ms-games-hero__icon-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.ms-games-hero__icon-btn:active {
    transform: scale(0.94);
}

.ms-games-hero__icon-btn--fav.is-favorite-active {
    background: var(--ms-favorite);
    border-color: var(--ms-favorite-border);
    color: #fff;
}

.ms-games-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    background: rgba(56, 189, 248, 0.18);
    color: #7dd3fc;
    border: 1px solid rgba(125, 211, 252, 0.35);
}

.ms-games-hero .ms-games-badge {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.22);
}

.ms-btn--light {
    background: #fff;
    color: #0f172a;
    border: none;
    font-weight: 800;
}

.ms-btn--ghost-light {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-weight: 700;
}

.ms-games-row__title {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ms-games-row__head {
    margin-bottom: 12px;
}

.ms-games-row__hint,
.ms-games-row__empty {
    margin: 0;
    font-size: 12px;
    color: var(--ms-muted);
    line-height: 1.45;
}

.ms-games-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ms-games-track::-webkit-scrollbar {
    display: none;
}

.ms-games-poster {
    flex: 0 0 132px;
    width: 132px;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
    cursor: pointer;
    scroll-snap-align: start;
}

.ms-games-poster__media {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    overflow: hidden;
    background: #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.ms-games-poster__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ms-games-poster__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #94a3b8;
    background: linear-gradient(145deg, #eef2f7, #e2e8f0);
}

.ms-games-poster__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
}

.ms-games-poster__fav {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: var(--ms-favorite);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.ms-games-poster__title {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ms-text);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-games-poster__meta {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: var(--ms-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-games-empty-hero {
    border-radius: 22px;
    padding: 32px 20px;
    text-align: center;
    background: linear-gradient(145deg, #f8fafc, #eef2ff);
    border: 1px solid var(--ms-border);
}

.ms-games-empty-hero__icon {
    font-size: 36px;
    color: var(--ms-accent);
    margin-bottom: 10px;
}

.ms-games-empty-hero__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 800;
}

.ms-games-empty-hero__text {
    margin: 0;
    font-size: 13px;
    color: var(--ms-muted);
}

.ms-games-ranking-mini {
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--ms-border);
    box-shadow: var(--ms-shadow-sm);
}

.ms-games-ranking-mini__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.ms-games-ranking-mini__you {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--ms-muted);
}

.ms-games-quick {
    padding-bottom: 4px;
}

.ms-tile-grid--compact .ms-tile {
    min-height: 88px;
}

.ms-games-search {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 12px 24px;
}

.ms-games-search.is-open {
    display: flex;
}

.ms-games-search__panel {
    width: min(100%, 520px);
    background: #fff;
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    max-height: calc(100vh - 48px);
    overflow: auto;
}

.ms-games-search__head {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ms-games-search__close {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--ms-border);
    background: #fff;
}

.ms-games-search__input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--ms-border);
    border-radius: 14px;
    padding: 0 12px;
    min-height: 42px;
}

.ms-games-search__input-wrap input {
    border: 0;
    outline: none;
    width: 100%;
    font: inherit;
    font-size: 15px;
}

.ms-games-search__results {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ms-games-search__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 1px solid var(--ms-border);
    border-radius: 14px;
    padding: 8px;
    background: #fff;
    text-align: left;
}

.ms-games-search__thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e2e8f0;
}

.ms-games-search__thumb--empty {
    display: block;
}

.ms-games-search__copy strong {
    display: block;
    font-size: 14px;
}

.ms-games-search__copy small {
    color: var(--ms-muted);
    font-size: 12px;
}

.ms-games-search__feedback {
    margin: 10px 4px 0;
    font-size: 13px;
    color: var(--ms-muted);
}

.ms-game-sheet {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: none;
    pointer-events: none;
}

.ms-game-sheet.is-open {
    display: block;
    pointer-events: auto;
}

.ms-game-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.ms-game-sheet__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
}

@keyframes msGameSheetIn {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.ms-game-sheet__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 0;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
}

.ms-game-sheet__hero {
    height: 220px;
    background: #0f172a;
}

.ms-game-sheet__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ms-game-sheet__hero-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    color: rgba(255, 255, 255, 0.35);
}

.ms-game-sheet__body {
    padding: 18px 16px 28px;
}

.ms-game-sheet__category {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ms-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ms-game-sheet__title {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.ms-game-sheet__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0;
}

.ms-game-sheet__badges .ms-games-badge {
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
    border-color: rgba(99, 102, 241, 0.2);
}

.ms-game-sheet__desc,
.ms-game-sheet__activity,
.ms-game-sheet__disclaimer {
    font-size: 13px;
    line-height: 1.5;
    color: var(--ms-muted);
}

.ms-game-sheet__disclaimer {
    margin: 14px 0 16px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--ms-border);
}

body.ms-games-search-open,
body.ms-game-sheet-open {
    overflow: hidden;
}

@media (max-width: 380px) {
    .ms-games-poster {
        flex-basis: 118px;
        width: 118px;
    }

    .ms-games-hero__title {
        font-size: 24px;
    }
}

/* ── Home Juegos: modo oscuro Netflix + Player Card ── */
body.ms-home-dark:not(.ms-login-body),
body.ms-app-dark:not(.ms-login-body) {
    --ms-shell-bg: #07080d;
    --ms-shell-bg-soft: #0d1018;
    --ms-shell-card: #111520;
    --ms-shell-card-soft: #171b26;
    --ms-shell-text: #f8fafc;
    --ms-shell-muted: #9ca3af;
    --ms-shell-border: rgba(255, 255, 255, 0.08);
    --ms-shell-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    background: var(--ms-shell-bg);
    color: var(--ms-shell-text);
}

body.ms-home-dark .ms-app__main,
body.ms-app-dark .ms-app__main {
    background: var(--ms-shell-bg);
}

body.ms-app-dark .ms-section {
    margin-left: -16px;
    margin-right: -16px;
    padding: 12px 16px 8px;
    background: var(--ms-shell-bg);
    color: var(--ms-shell-text);
}

.ms-section--games {
    --ms-games-bg: var(--ms-shell-bg, #07080d);
    --ms-games-bg-soft: var(--ms-shell-bg-soft, #0d1018);
    --ms-games-card: var(--ms-shell-card, #111520);
    --ms-games-card-soft: var(--ms-shell-card-soft, #171b26);
    --ms-games-text: var(--ms-shell-text, #f8fafc);
    --ms-games-muted: var(--ms-shell-muted, #9ca3af);
    --ms-games-border: var(--ms-shell-border, rgba(255, 255, 255, 0.08));
    --ms-games-shadow: var(--ms-shell-shadow, 0 16px 40px rgba(0, 0, 0, 0.45));
}

.ms-games-home {
    gap: 20px;
}

/* Player Card */
.ms-player-card {
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(23, 27, 38, 0.96) 0%, rgba(17, 21, 32, 0.98) 100%);
    border: 1px solid var(--ms-games-border);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
    overflow: hidden;
}

.ms-player-card__identity {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px 8px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.ms-player-card__identity:active {
    background: rgba(255, 255, 255, 0.03);
}

.ms-player-card__avatar-wrap {
    flex-shrink: 0;
    padding: 2px;
    border-radius: 18px;
    background: var(--ms-gradient-generic);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
}

.ms-player-card__avatar {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    object-fit: cover;
    background: #111520;
}

.ms-player-card__avatar--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}

.ms-player-card__copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ms-player-card__greet {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-player-card__greet-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--ms-games-muted);
    flex-shrink: 0;
}

.ms-player-card__nick {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ms-games-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-player-card__membership {
    display: flex;
    align-items: center;
    margin-top: 2px;
}

.ms-player-card__badge {
    font-size: 9px;
}

.ms-player-card__chevron {
    flex-shrink: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
}

.ms-player-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 10px 10px;
}

.ms-player-card__stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid var(--ms-games-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ms-games-text);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.ms-player-card__stat--static {
    cursor: default;
}

.ms-player-card__stat--accent {
    border-color: rgba(19, 234, 218, 0.35);
    background: rgba(19, 234, 218, 0.1);
    color: #7dd3fc;
}

.ms-player-card__stat:active:not(.ms-player-card__stat--static) {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.08);
}

.ms-player-card__stat i {
    font-size: 13px;
    color: #13EADA;
}

.ms-account-stat--infinite {
    display: inline-flex;
    align-items: center;
    font-size: 1.05em;
    line-height: 1;
    color: #13EADA;
}

.ms-mp-hero__value--na {
    letter-spacing: 0.08em;
    opacity: 0.72;
}

/* Carruseles oscuros + fade edges */
.ms-section--games .ms-games-row {
    position: relative;
}

.ms-section--games .ms-games-row::before,
.ms-section--games .ms-games-row::after {
    content: "";
    position: absolute;
    top: 28px;
    bottom: 4px;
    width: 28px;
    z-index: 2;
    pointer-events: none;
}

.ms-section--games .ms-games-row::before {
    left: 0;
    background: linear-gradient(to right, var(--ms-games-bg), transparent);
}

.ms-section--games .ms-games-row::after {
    right: 0;
    background: linear-gradient(to left, var(--ms-games-bg), transparent);
}

.ms-section--games .ms-games-row__title {
    color: var(--ms-games-text);
}

.ms-section--games .ms-games-row__hint,
.ms-section--games .ms-games-row__empty {
    color: var(--ms-games-muted);
}

.ms-section--games .ms-games-poster__media {
    background: #1a2030;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ms-section--games .ms-games-poster:active .ms-games-poster__media {
    transform: scale(0.98);
}

.ms-section--games .ms-games-poster__title {
    color: var(--ms-games-text);
}

.ms-section--games .ms-games-poster__meta {
    color: var(--ms-games-muted);
}

.ms-section--games .ms-games-poster__placeholder {
    background: linear-gradient(145deg, #171b26, #111520);
    color: #64748b;
}

.ms-section--games .ms-games-hero-carousel {
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.55);
}

.ms-section--games .ms-games-hero__shade {
    background: linear-gradient(to top, rgba(7, 8, 13, 0.98) 0%, rgba(7, 8, 13, 0.72) 42%, rgba(7, 8, 13, 0.2) 100%);
}

.ms-section--games .ms-games-ranking-mini {
    background: var(--ms-games-card);
    border-color: var(--ms-games-border);
    box-shadow: var(--ms-games-shadow);
}

.ms-section--games .ms-games-ranking-mini__you {
    color: var(--ms-games-muted);
}

.ms-section--games .ms-games-ranking-mini .ms-rank-list {
    background: transparent;
}

.ms-section--games .ms-games-ranking-mini .ms-rank-item {
    background: var(--ms-games-card-soft);
    border-color: var(--ms-games-border);
}

.ms-section--games .ms-games-ranking-mini .ms-rank-item.is-me {
    border-color: rgba(19, 234, 218, 0.45);
    background: linear-gradient(90deg, rgba(19, 234, 218, 0.14), rgba(23, 27, 38, 0.92));
    box-shadow: inset 3px 0 0 var(--ms-accent);
}

.ms-section--games .ms-games-ranking-mini .ms-rank-nick {
    color: var(--ms-games-text);
}

.ms-section--games .ms-games-ranking-mini .ms-rank-sub {
    color: var(--ms-games-muted);
}

.ms-section--games .ms-games-ranking-mini .ms-rank-hours {
    color: #13EADA;
}

.ms-section--games .ms-games-ranking-mini .ms-rank-avatar {
    border-color: var(--ms-games-border);
}

.ms-section--games .ms-games-ranking-mini__you strong {
    color: var(--ms-games-text);
}

.ms-section--games .ms-games-ranking-mini .ms-btn--ghost {
    color: var(--ms-games-muted);
    border-color: var(--ms-games-border);
}

.ms-section--games .ms-games-ranking-mini .ms-games-row__empty {
    color: var(--ms-games-muted);
}

.ms-section--games .ms-tile {
    background: var(--ms-games-card-soft);
    border-color: var(--ms-games-border);
    color: var(--ms-games-text);
}

.ms-section--games .ms-tile__title {
    color: var(--ms-games-text);
}

.ms-section--games .ms-games-empty-hero {
    background: var(--ms-games-card);
    border-color: var(--ms-games-border);
    color: var(--ms-games-text);
}

.ms-section--games .ms-games-empty-hero__text {
    color: var(--ms-games-muted);
}

/* Ficha + buscador oscuros */
.ms-games-search {
    background: rgba(7, 8, 13, 0.82);
    backdrop-filter: blur(8px);
}

.ms-games-search__panel {
    background: #111520;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.ms-games-search__close,
.ms-games-search__input-wrap {
    background: #171b26;
    border-color: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.ms-games-search__input-wrap input {
    background: transparent;
    color: #f8fafc;
}

.ms-games-search__input-wrap input::placeholder {
    color: #6b7280;
}

.ms-games-search__item {
    background: #171b26;
    border-color: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.ms-games-search__copy small {
    color: #9ca3af;
}

.ms-games-search__thumb {
    background: #1a2030;
}

.ms-games-search__feedback {
    color: #9ca3af;
}

.ms-game-sheet__backdrop {
    background: rgba(7, 8, 13, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.ms-game-sheet__panel {
    background: #111520;
    color: #f8fafc;
    box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.55);
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    animation: none;
}

.ms-game-sheet__panel.is-visible {
    transform: translateY(0);
}

.ms-game-sheet__title {
    color: #f8fafc;
}

.ms-game-sheet__section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ms-game-sheet__section.is-hidden {
    display: none;
}

.ms-game-sheet__section-title {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
}

.ms-game-sheet__desc,
.ms-game-sheet__activity,
.ms-game-sheet__saves {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #cbd5e1;
}

.ms-game-sheet__activity--empty {
    color: #9ca3af;
    font-style: italic;
}

.ms-game-sheet__disclaimer {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #9ca3af;
}

.ms-game-sheet__badges .ms-games-badge {
    background: rgba(19, 234, 218, 0.12);
    color: #7dd3fc;
    border-color: rgba(125, 211, 252, 0.25);
}

#msGameSheetFavoriteBtn.is-favorite-active {
    background: var(--ms-favorite);
    border-color: var(--ms-favorite-border);
}

[data-ms-section="favorites"] .ms-empty__icon {
    color: var(--ms-favorite);
    background: var(--ms-favorite-soft);
    border-color: var(--ms-favorite-border);
}

.ms-tile[data-ms-goto="favorites"] .ms-tile__icon {
    background: var(--ms-favorite-soft);
    color: var(--ms-favorite);
}

body.ms-app-dark .ms-menu-item[data-ms-goto="favorites"] .ms-menu-item__icon {
    background: var(--ms-favorite-soft);
    color: var(--ms-favorite);
}

.js-ms-game-fav-toggle.is-fav-pulse i {
    animation: msFavPulse 0.42s ease;
}

@keyframes msFavPulse {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.35); }
}

@media (prefers-reduced-motion: reduce) {
    .ms-game-sheet__panel {
        transition: none;
    }
    .ms-section--games .ms-games-poster__media {
        transition: none;
    }
}

/* ── Tema oscuro unificado (todas las secciones; promos visuales sin tocar) ── */
body.ms-app-dark .ms-section-head {
    margin-bottom: 18px;
}

body.ms-app-dark .ms-page-title {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-page-sub,
body.ms-app-dark .ms-page-sub--stats {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-section-hero {
    background: linear-gradient(145deg, rgba(23, 27, 38, 0.96) 0%, rgba(17, 21, 32, 0.98) 100%);
    border-color: var(--ms-shell-border);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

body.ms-app-dark .ms-section-hero__title {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-section-hero__subtitle {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-section-hero__metric-value {
    color: #13EADA;
}

body.ms-app-dark .ms-section-hero__metric-label {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-card {
    background: linear-gradient(145deg, rgba(23, 27, 38, 0.96) 0%, rgba(17, 21, 32, 0.98) 100%);
    border-color: var(--ms-shell-border);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-card--points {
    background: linear-gradient(145deg, rgba(17, 21, 32, 0.98) 0%, rgba(8, 145, 178, 0.14) 100%);
    border-color: rgba(19, 234, 218, 0.2);
}

body.ms-app-dark .ms-card__title {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-card:not(.ms-card--dark) .ms-metric {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--ms-shell-border);
}

body.ms-app-dark .ms-card:not(.ms-card--dark) .ms-metric__label {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-card:not(.ms-card--dark) .ms-metric__value {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-branch-picker,
body.ms-app-dark .ms-promos-branch,
body.ms-app-dark .ms-shop-branch {
    background: linear-gradient(145deg, rgba(23, 27, 38, 0.96) 0%, rgba(17, 21, 32, 0.98) 100%);
    border-color: var(--ms-shell-border);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

body.ms-app-dark .ms-branch-picker__icon,
body.ms-app-dark .ms-promos-branch__icon {
    background: rgba(19, 234, 218, 0.12);
    color: #13EADA;
}

body.ms-app-dark .ms-branch-picker__label,
body.ms-app-dark .ms-promos-branch__label,
body.ms-app-dark .ms-shop-branch__label {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-branch-picker__select,
body.ms-app-dark .ms-promos-branch__select,
body.ms-app-dark .ms-shop-branch__select {
    background: var(--ms-shell-card-soft);
    border-color: var(--ms-shell-border);
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-branch-picker__meta,
body.ms-app-dark .ms-promos-branch__meta {
    border-top-color: var(--ms-shell-border);
}

body.ms-app-dark .ms-branch-picker__name,
body.ms-app-dark .ms-promos-branch__name {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-filter {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--ms-shell-border);
    color: var(--ms-shell-muted);
    box-shadow: none;
}

body.ms-app-dark .ms-filter.is-active {
    background: linear-gradient(135deg, rgba(19, 234, 218, 0.22) 0%, rgba(124, 58, 237, 0.2) 100%);
    border-color: rgba(19, 234, 218, 0.35);
    color: #f8fafc;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

body.ms-app-dark .ms-empty__icon {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--ms-shell-border);
    color: #13EADA;
}

body.ms-app-dark [data-ms-section="favorites"] .ms-empty__icon {
    color: var(--ms-favorite);
    background: var(--ms-favorite-soft);
    border-color: var(--ms-favorite-border);
}

body.ms-app-dark .ms-empty__title {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-empty__text {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-qr-wallet-head__stat {
    background: var(--ms-shell-card-soft);
    border-color: var(--ms-shell-border);
    box-shadow: none;
}

body.ms-app-dark .ms-qr-wallet-head__stat--active {
    background: linear-gradient(145deg, rgba(19, 234, 218, 0.12), rgba(124, 58, 237, 0.08));
    border-color: rgba(19, 234, 218, 0.28);
}

body.ms-app-dark .ms-qr-wallet-head__value {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-qr-wallet-head__stat--active .ms-qr-wallet-head__value {
    color: #13EADA;
}

body.ms-app-dark .ms-qr-wallet-head__label {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-qr-card {
    background: linear-gradient(145deg, rgba(23, 27, 38, 0.96) 0%, rgba(17, 21, 32, 0.98) 100%);
    border-color: var(--ms-shell-border);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

body.ms-app-dark .ms-qr-card__name {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-qr-card__meta {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-qr-card__qr-wrap {
    background: transparent;
    border: none;
}

body.ms-app-dark .ms-qr-card__qr-wrap img {
    border-color: var(--ms-shell-border);
}

body.ms-app-dark .ms-qr-card__qr-wrap:not(:has(img)) {
    background: var(--ms-shell-card-soft);
    border-color: var(--ms-shell-border);
}

body.ms-app-dark .ms-pay-thanks {
    background: linear-gradient(145deg, rgba(23, 27, 38, 0.98) 0%, rgba(17, 21, 32, 0.98) 100%);
    border-color: rgba(34, 197, 94, 0.28);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

body.ms-app-dark .ms-pay-thanks__title {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-pay-thanks__text {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-note {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-scan-intro__title {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-scan-intro__text {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-scan-intro__icon {
    background: rgba(19, 234, 218, 0.12);
    color: #13EADA;
}

body.ms-app-dark .ms-scan-fallback {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.22);
    color: #fcd34d;
}

body.ms-app-dark .ms-rank-item {
    background: var(--ms-shell-card-soft);
    border-color: var(--ms-shell-border);
}

body.ms-app-dark .ms-rank-item.is-me {
    background: rgba(19, 234, 218, 0.1);
    border-color: rgba(19, 234, 218, 0.28);
}

body.ms-app-dark .ms-rank-nick {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-rank-sub {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-rank-hours {
    color: #13EADA;
}

body.ms-app-dark .ms-rank-you-card {
    background: linear-gradient(90deg, rgba(19, 234, 218, 0.12), rgba(124, 58, 237, 0.06));
    border-color: rgba(19, 234, 218, 0.28);
}

body.ms-app-dark .ms-rank-you-card__label {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-rank-you-card__value {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-podium__nick {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-podium__hours,
body.ms-app-dark .ms-podium__pos {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-mp-hero {
    background: linear-gradient(145deg, rgba(23, 27, 38, 0.96) 0%, rgba(17, 21, 32, 0.98) 100%);
    border-color: rgba(19, 234, 218, 0.2);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

body.ms-app-dark .ms-mp-hero__lead {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-mp-info__list,
body.ms-app-dark .ms-mp-info__text {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-profile-identity__name {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-profile-stat {
    border-bottom-color: var(--ms-shell-border);
}

body.ms-app-dark .ms-profile-stat__label,
body.ms-app-dark .ms-profile-field label,
body.ms-app-dark .ms-field__label {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-profile-stat__value,
body.ms-app-dark .ms-profile-field div {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-profile-readonly {
    border-bottom-color: var(--ms-shell-border);
}

body.ms-app-dark .ms-input,
body.ms-app-dark .ms-profile-avatar__file {
    background: var(--ms-shell-card-soft);
    border-color: var(--ms-shell-border);
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-input::placeholder {
    color: #6b7280;
}

body.ms-app-dark .ms-field__icon,
body.ms-app-dark .ms-profile-avatar__hint {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-notifications__hint {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--ms-shell-border);
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-notifications__date {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-notifications__body {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-legal {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-legal h2 {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-legal a {
    color: #13EADA;
}

body.ms-app-dark .ms-btn--ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--ms-shell-border);
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-modal {
    background: linear-gradient(145deg, rgba(23, 27, 38, 0.98) 0%, rgba(17, 21, 32, 0.99) 100%);
    border-color: var(--ms-shell-border);
    color: var(--ms-shell-text);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

body.ms-app-dark .ms-modal__header {
    border-bottom-color: var(--ms-shell-border);
}

body.ms-app-dark .ms-modal__title {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-modal__body {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-modal__qr-image {
    background: var(--ms-shell-card-soft);
    border-color: var(--ms-shell-border);
}

body.ms-app-dark .ms-confirm__text {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-confirm__icon {
    background: rgba(19, 234, 218, 0.12);
    color: #13EADA;
}

body.ms-app-dark .ms-confirm__icon--danger {
    background: var(--ms-logout-soft);
    color: #f0abfc;
}

body.ms-app-dark .ms-confirm__actions .ms-btn--danger {
    background: var(--ms-logout);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 18px rgba(194, 37, 145, 0.28);
}

body.ms-app-dark .ms-confirm__actions .ms-btn--danger:active {
    background: #a21caf;
}

body.ms-app-dark .ms-drawer__close {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--ms-shell-border);
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-tabs {
    background: var(--ms-shell-card-soft);
    border-color: var(--ms-shell-border);
}

body.ms-app-dark .ms-tab {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-tab.is-active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-tile {
    background: var(--ms-shell-card-soft);
    border-color: var(--ms-shell-border);
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-tile__title {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-promos-mp-banner {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.22);
    color: #fcd34d;
}

body.ms-app-dark .ms-promos-footnote {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--ms-shell-border);
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-promos-footnote i {
    color: #13EADA;
}

body.ms-app-dark .ms-promos-empty-card {
    background: linear-gradient(145deg, rgba(23, 27, 38, 0.96) 0%, rgba(17, 21, 32, 0.98) 100%);
    border-color: var(--ms-shell-border);
}

body.ms-app-dark .ms-alert--success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.22);
    color: #86efac;
}

body.ms-app-dark .ms-sidebar-backdrop {
    background: rgba(0, 0, 0, 0.65);
}

body.ms-app-dark .ms-sidebar {
    background: linear-gradient(165deg, rgba(17, 21, 32, 0.99) 0%, rgba(7, 8, 13, 0.99) 100%);
    box-shadow:
        12px 0 48px rgba(0, 0, 0, 0.55),
        1px 0 0 var(--ms-shell-border);
}

body.ms-app-dark .ms-sidebar__bar,
body.ms-app-dark .ms-sidebar__footer {
    background: rgba(17, 21, 32, 0.98);
    border-color: var(--ms-shell-border);
}

body.ms-app-dark .ms-sidebar__bar-title {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-sidebar__close {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--ms-shell-border);
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-sidebar__close:active {
    background: rgba(255, 255, 255, 0.1);
}

body.ms-app-dark .ms-sidebar__scroll {
    background: transparent;
}

body.ms-app-dark .ms-sidebar__group-label {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-sidebar__group--footer {
    border-top-color: var(--ms-shell-border);
}

body.ms-app-dark .ms-menu-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--ms-shell-border);
    color: var(--ms-shell-text);
    box-shadow: none;
}

body.ms-app-dark .ms-menu-item:active {
    background: rgba(255, 255, 255, 0.08);
}

@media (hover: hover) {
    body.ms-app-dark .ms-menu-item:hover {
        background: rgba(255, 255, 255, 0.07);
        border-color: rgba(255, 255, 255, 0.14);
        box-shadow: none;
    }

    body.ms-app-dark .ms-menu-item:hover .ms-menu-item__chevron {
        color: var(--ms-shell-muted);
    }
}

body.ms-app-dark .ms-menu-item__icon {
    background: rgba(255, 255, 255, 0.06);
    color: #13EADA;
}

body.ms-app-dark .ms-menu-item__chevron {
    color: rgba(255, 255, 255, 0.28);
}

body.ms-app-dark .ms-menu-item--danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.22);
    color: #fca5a5;
}

body.ms-app-dark .ms-menu-item--danger .ms-menu-item__icon {
    background: rgba(239, 68, 68, 0.14);
    color: #f87171;
}

body.ms-app-dark .ms-sidebar-privacy {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-sidebar-privacy:hover,
body.ms-app-dark .ms-sidebar-privacy:focus-visible {
    color: var(--ms-shell-text);
    background: rgba(255, 255, 255, 0.06);
}

body.ms-app-dark .ms-sidebar-logout {
    background: rgba(194, 37, 145, 0.14);
    border-color: rgba(194, 37, 145, 0.38);
    color: #f0abfc;
}

body.ms-app-dark .ms-sidebar-logout:hover,
body.ms-app-dark .ms-sidebar-logout:focus-visible {
    background: rgba(194, 37, 145, 0.22);
    border-color: rgba(194, 37, 145, 0.5);
    color: #fdf4ff;
}

body.ms-app-dark .ms-sidebar-logout:active {
    background: rgba(194, 37, 145, 0.3);
}

body.ms-app-dark .ms-friend-row {
    background: var(--ms-shell-card-soft);
    border-color: var(--ms-shell-border);
    box-shadow: none;
}

body.ms-app-dark .ms-friend-row.is-selected {
    background: rgba(19, 234, 218, 0.1);
    border-color: rgba(19, 234, 218, 0.28);
}

body.ms-app-dark .ms-friend-row__name {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-friend-row__sub {
    color: var(--ms-shell-muted);
}

body.ms-app-dark .ms-fav-item {
    background: var(--ms-shell-card-soft);
    border-color: var(--ms-shell-border);
}

body.ms-app-dark .ms-fav-item__title {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-save-card {
    background: var(--ms-shell-card-soft);
    border-color: var(--ms-shell-border);
}

body.ms-app-dark .ms-save-card__title {
    color: var(--ms-shell-text);
}

body.ms-app-dark .ms-save-card__meta,
body.ms-app-dark .ms-save-card__hint {
    color: var(--ms-shell-muted);
}

/* ── Selector sede compartido (Promos + QRs) ── */
.ms-branch-picker,
.ms-promos-branch,
.ms-shop-branch {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(6, 182, 212, 0.12);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.ms-branch-picker--qrs {
    margin-bottom: 16px;
}

.ms-branch-picker__main,
.ms-promos-branch__main,
.ms-shop-branch__main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ms-branch-picker__icon,
.ms-promos-branch__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #0891b2;
    background: rgba(6, 182, 212, 0.1);
}

.ms-branch-picker__field,
.ms-promos-branch__field {
    flex: 1;
    min-width: 0;
}

.ms-branch-picker__label,
.ms-promos-branch__label,
.ms-shop-branch__label {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ms-muted);
}

.ms-shop-branch__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--ms-text);
    margin-bottom: 8px;
}

.ms-branch-picker__select,
.ms-promos-branch__select,
.ms-shop-branch__select {
    width: 100%;
    padding: 10px 36px 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--ms-border);
    background: #fff;
    color: var(--ms-text);
    font-size: 15px;
    font-weight: 700;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%230891b2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    font-family: inherit;
    cursor: pointer;
}

.ms-branch-picker__select:disabled,
.ms-promos-branch__select:disabled,
.ms-shop-branch__select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ms-branch-picker__meta,
.ms-promos-branch__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.ms-branch-picker__name,
.ms-promos-branch__name {
    font-size: 13px;
    font-weight: 700;
    color: var(--ms-text);
}

.ms-branch-picker__mp,
.ms-promos-branch__mp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.ms-branch-picker__mp--on,
.ms-promos-branch__mp--on {
    background: rgba(22, 163, 74, 0.1);
    color: #15803d;
}

.ms-branch-picker__mp--off,
.ms-promos-branch__mp--off {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

/* ── Promociones (marketplace premium) ── */
.ms-section--promos {
    --ms-promo-media-ratio: 16 / 10;
}

.ms-promos-mp-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.08), rgba(251, 191, 36, 0.06));
    border: 1px solid rgba(245, 158, 11, 0.22);
    color: #92400e;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.ms-promos-mp-banner i {
    margin-top: 2px;
    flex-shrink: 0;
}

.ms-promos-mp-banner p {
    margin: 0;
}

.ms-promos-filters {
    margin-bottom: 16px;
    padding-bottom: 4px;
    mask-image: linear-gradient(to right, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, #000 92%, transparent);
}

.ms-section--promos .ms-promos-filter.is-active {
    background: linear-gradient(135deg, #0891b2 0%, #6366f1 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 18px rgba(6, 182, 212, 0.28);
}

.ms-promos-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 18px;
}

.ms-section--promos .ms-promo-card--visual {
    grid-column: span 1;
}

.ms-section--promos .ms-promo-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 2px;
    margin-bottom: 0;
    border-radius: 22px;
    border: none;
    background: var(--promo-shell-gradient, var(--ms-gradient-generic));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    overflow: visible;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ms-section--promos .ms-promo-card--featured {
    position: relative;
    z-index: 1;
    transition: none;
    animation: ms-promo-featured-pulse 3.4s ease-in-out infinite;
    will-change: transform, box-shadow, filter;
}

.ms-section--promos .ms-promo-card--featured::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 26px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    opacity: 0;
    pointer-events: none;
    z-index: 4;
    animation: ms-promo-featured-ring 3.4s ease-in-out infinite;
}

.ms-section--promos .ms-promo-card--featured .promo-visual-card--featured {
    animation: none;
    filter: none;
    box-shadow: none;
}

@keyframes ms-promo-featured-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 12px 32px rgba(0, 0, 0, 0.35),
            0 0 0 0 rgba(255, 255, 255, 0),
            0 0 0 0 rgba(255, 255, 255, 0);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.005);
        box-shadow:
            0 12px 32px rgba(0, 0, 0, 0.35),
            0 0 0 2px rgba(255, 255, 255, 0.72),
            0 0 22px rgba(255, 255, 255, 0.38),
            0 0 44px rgba(255, 255, 255, 0.16);
        filter: brightness(1.03);
    }
}

@keyframes ms-promo-featured-ring {
    0%, 100% {
        opacity: 0;
        transform: scale(0.992);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
    50% {
        opacity: 0.82;
        transform: scale(1);
        box-shadow:
            0 0 18px rgba(255, 255, 255, 0.42),
            0 0 36px rgba(255, 255, 255, 0.18);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ms-section--promos .ms-promo-card--featured,
    .ms-section--promos .ms-promo-card--featured::after {
        animation: none;
        transform: none;
        filter: none;
    }

    .ms-section--promos .ms-promo-card--featured::after {
        opacity: 0.75;
        border-color: rgba(255, 255, 255, 0.9);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.28);
    }
}

.ms-section--promos .ms-promo-card__shell {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    min-width: 0;
    padding: 12px;
    border-radius: 20px;
    background: linear-gradient(165deg, rgba(23, 27, 38, 0.98) 0%, rgba(17, 21, 32, 0.99) 100%);
    overflow: hidden;
}

.ms-section--promos .ms-promo-card__actions--single {
    grid-template-columns: 1fr;
}

.ms-section--promos .ms-promo-card--drink .ms-promo-card__media {
    aspect-ratio: auto;
    max-height: 150px;
    height: auto;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: #fff;
}

.ms-section--promos .ms-promo-card--drink .ms-promo-card__img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    background: #fff;
}

.ms-section--promos .ms-promo-card--visual .ms-promo-card__body {
    padding: 12px 0 0;
}

.ms-section--promos .ms-promo-card--visual .ms-promo-card__name {
    font-size: 14px;
    margin-bottom: 4px;
}

.ms-section--promos .ms-promo-card--visual .ms-promo-card__meta,
.ms-section--promos .ms-promo-card:not(.ms-promo-card--visual) .ms-promo-card__meta {
    padding: 0 0 10px;
}

.ms-section--promos .ms-promo-card--drink .ms-promo-card__meta {
    justify-content: flex-end;
}

.ms-section--promos .ms-promo-card--visual .ms-promo-card__media {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: none;
}

.ms-section--promos .ms-promo-card:not(.ms-promo-card--visual) .ms-promo-card__media {
    border-radius: 14px;
    overflow: hidden;
}

.ms-section--promos .ms-promo-card:not(.ms-promo-card--visual) .ms-promo-card__body {
    padding: 14px 0 0;
}

.ms-section--promos .ms-promo-card:active {
    transform: scale(0.995);
}

.ms-section--promos .ms-promo-card__buy {
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    font-weight: 700;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.05);
}

.ms-section--promos .ms-promo-card__buy:not(:disabled) {
    background: linear-gradient(135deg, rgba(194, 37, 145, 0.22) 0%, rgba(124, 58, 237, 0.18) 100%);
    border-color: rgba(244, 114, 182, 0.35);
    color: #fdf2f8;
}

.ms-section--promos .ms-promo-card__buy:disabled {
    opacity: 1;
}

.ms-section--promos .ms-promo-card__buy--nostock:disabled {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ms-shell-muted, #9ca3af);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.ms-section--promos .ms-promo-card__redeem {
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-weight: 700;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.05);
}

.ms-section--promos .ms-promo-card__redeem:not(:disabled) {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.22) 0%, rgba(194, 37, 145, 0.18) 100%);
    border-color: rgba(196, 181, 253, 0.35);
    color: #f5f3ff;
}

.ms-section--promos .ms-promo-card__redeem:disabled {
    opacity: 0.65;
}

.ms-section--promos .ms-promo-card__name {
    color: var(--ms-shell-text, #f8fafc);
}

.ms-section--promos .ms-promo-card__desc {
    color: var(--ms-shell-muted, #9ca3af);
}

.ms-section--promos .ms-promo-card__price-main {
    color: var(--ms-shell-text, #f8fafc);
}

/* Selector sede en promos (fix capas claras / líneas cyan) */
.ms-section--promos .ms-branch-picker {
    background: linear-gradient(145deg, rgba(23, 27, 38, 0.96) 0%, rgba(17, 21, 32, 0.98) 100%);
    border: 1px solid var(--ms-shell-border, rgba(255, 255, 255, 0.08));
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

.ms-section--promos .ms-branch-picker__icon {
    background: rgba(19, 234, 218, 0.12);
    color: #13EADA;
}

.ms-section--promos .ms-branch-picker__label {
    color: var(--ms-shell-muted, #9ca3af);
}

.ms-section--promos .ms-branch-picker__select {
    background-color: var(--ms-shell-card-soft, #171b26);
    border: 1px solid var(--ms-shell-border, rgba(255, 255, 255, 0.08));
    color: var(--ms-shell-text, #f8fafc);
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.ms-section--promos .ms-branch-picker__select:focus {
    border-color: rgba(19, 234, 218, 0.35);
    box-shadow: 0 0 0 2px rgba(19, 234, 218, 0.12);
}

.ms-section--promos .ms-branch-picker__select:focus-visible {
    outline: none;
}

.ms-section--promos .ms-branch-picker__meta {
    border-top: 1px solid var(--ms-shell-border, rgba(255, 255, 255, 0.08));
}

.ms-section--promos .ms-branch-picker__name {
    color: var(--ms-shell-text, #f8fafc);
}

.ms-promo-card__media {
    position: relative;
    aspect-ratio: var(--ms-promo-media-ratio);
    background: linear-gradient(145deg, #eef2ff 0%, #ecfeff 55%, #f5f3ff 100%);
    overflow: hidden;
}

.ms-promo-card__media--visual {
    aspect-ratio: auto;
    max-height: 200px;
    height: auto;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: #000;
}

.ms-promo-card__media .ms-promo-card__img,
.ms-promo-card__media .promo-visual-card__uploaded {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.ms-promo-card__media .promo-visual-card {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    max-height: var(--promo-card-max-height, 150px);
}

.ms-promo-card__media .ms-discount-badge {
    top: 10px;
    left: 10px;
}

.ms-promo-card__placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, rgba(6, 182, 212, 0.12) 0%, rgba(99, 102, 241, 0.1) 100%);
    color: #6366f1;
    font-size: 42px;
}

.ms-promo-card__placeholder--drink {
    background: #000;
    color: rgba(251, 191, 36, 0.85);
}

.ms-section--promos .ms-promo-card--drink .ms-promo-card__placeholder {
    background: #000;
    color: rgba(251, 191, 36, 0.85);
}

.ms-section--promos .ms-promo-card--drink .ms-promo-card__name,
.ms-section--promos .ms-promo-card--drink .ms-promo-card__price-main {
    color: var(--ms-shell-text, #f8fafc);
}

.ms-section--promos .ms-promo-card--drink .ms-promo-card__drink-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    margin-bottom: 6px;
}

.ms-section--promos .ms-promo-card--drink .ms-promo-card__name {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-weight: 600;
    line-height: 1.25;
    display: flex;
    align-items: center;
}

.ms-section--promos .ms-promo-card--drink .ms-promo-card__price-row {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0;
    text-align: right;
}

.ms-section--promos .ms-promo-card--drink .ms-promo-card__price-main {
    display: inline-flex;
    align-items: center;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.ms-section--promos .ms-promo-card--drink .ms-promo-card__price-main .promo-visual-card__currency {
    font-size: 0.5em;
    font-weight: 600;
    line-height: 1;
    align-self: center;
    margin-right: 0.04em;
}

.ms-section--promos .ms-promo-card--drink .ms-promo-card__price-main .promo-visual-card__num {
    font-weight: 800;
}

.ms-section--promos .ms-promo-card--drink .ms-promo-card__price-main .promo-visual-card__text {
    font-weight: 600;
}

.ms-section--promos .ms-promo-card--drink .ms-promo-card__desc {
    color: var(--ms-shell-muted, #9ca3af);
    font-weight: 600;
}

.ms-section--promos .ms-promo-card--drink .ms-price--was {
    color: var(--ms-shell-muted, #9ca3af);
}

.ms-section--promos .ms-promo-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.ms-section--promos .ms-promo-card__name {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.ms-section--promos .ms-promo-card__desc {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--ms-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ms-section--promos .ms-promo-card__price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 0 0 8px;
}

.ms-section--promos .ms-promo-card__price-main {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--ms-text);
    line-height: 1;
}

.ms-section--promos .ms-price--was {
    margin-left: 0;
    font-size: 14px;
}

.ms-promo-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 8px;
}

.ms-section--promos .ms-promo-card__machine-label {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #ffffff;
    text-align: left;
    line-height: 1.3;
}

.ms-section--promos .ms-promo-card__mp-estimate {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin: 0;
    margin-left: auto;
    padding: 0;
    border-radius: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: var(--promo-shell-gradient, var(--ms-gradient-generic));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    border: none;
    text-align: right;
}

.ms-section--promos .ms-promo-card--drink .ms-promo-card__mp-estimate {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: #ffffff;
    color: #ffffff;
}

.ms-section--promos .ms-promo-card--visual .promo-visual-card__highlight-duration,
.ms-section--promos .ms-promo-card--visual .promo-visual-card__highlight-price {
    font-size: 1em;
}

.ms-section--promos .ms-promo-card--visual .promo-visual-card__highlight-text {
    font-size: 1em;
}

.ms-section--promos .ms-promo-card--visual .promo-visual-card__header {
    color: #fff;
    font-size: clamp(9px, 7.5cqi, 15px);
}

.ms-promos-footnote {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(6, 182, 212, 0.06);
    border: 1px solid rgba(6, 182, 212, 0.12);
    font-size: 12px;
    font-weight: 600;
    color: var(--ms-muted);
    line-height: 1.5;
}

.ms-promos-footnote i {
    color: #0891b2;
    margin-right: 4px;
}

.ms-promos-empty-card {
    border-radius: 22px;
    overflow: hidden;
}

.ms-promos-filter-empty {
    margin-top: 8px;
}

.ms-empty--compact {
    padding: 24px 16px;
}

.ms-empty--compact .ms-empty__icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.ms-empty--compact .ms-empty__title {
    font-size: 15px;
}

