﻿@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
    --card: rgba(255, 255, 255, 0.78);
    --text: #0f172a;
    --muted: #475569;
    --primary: #dc2626;
    --primary-strong: #b91c1c;
    --line: #cbd5e1;
    --danger: #b91c1c;
    --ok: #065f46;
    --nav-bg: rgba(15, 23, 42, 0.72);
    --nav-border: rgba(255, 255, 255, 0.3);
    --nav-text: #ffffff;
    --nav-active: #ef4444;
}

* { box-sizing: border-box; }

body.page-auth {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: var(--text);
    background: url('../img/local/background.png') center center / cover no-repeat fixed;
    position: relative;
    overflow-x: hidden;
}

.wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px 14px;
}

body.page-auth .wrap {
    position: relative;
    z-index: 2;
}

body.page-auth .wrap::before {
    content: "";
    position: fixed;
    right: -380px;
    top: 16%;
    width: clamp(230px, 42vw, 380px);
    aspect-ratio: 1 / 1;
    background: url('../img/local/torpedo.webp') center center / contain no-repeat;
    opacity: 1;
    pointer-events: none;
    z-index: 1;
    animation: torpedo-pass-mid 6.6s linear infinite;
    animation-delay: 4s;
}

body.page-auth .wrap > * {
    position: relative;
    z-index: 2;
}

body.page-auth::before {
    content: "";
    position: fixed;
    right: -620px;
    top: 25%;
    width: clamp(360px, 82vw, 620px);
    aspect-ratio: 1 / 1;
    background: url('../img/local/torpedo.webp') center center / contain no-repeat;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
    animation: torpedo-pass 8s linear infinite;
}

body.page-auth::after {
    content: "";
    position: fixed;
    right: -320px;
    top: 8%;
    width: clamp(180px, 34vw, 320px);
    aspect-ratio: 1 / 1;
    background: url('../img/local/torpedo.webp') center center / contain no-repeat;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
    animation: torpedo-pass-top 5.8s linear infinite;
    animation-delay: 3s;
}

@keyframes torpedo-pass {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-260vw);
        opacity: 1;
    }
}

@keyframes torpedo-pass-top {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-240vw);
        opacity: 1;
    }
}

@keyframes torpedo-pass-mid {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-250vw);
        opacity: 1;
    }
}

.top-logo {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.top-logo img {
    width: min(280px, 72vw);
    height: auto;
    display: block;
}

.card {
    width: min(460px, 100%);
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(4px);
    padding: 22px;
}

h1 { margin: 0 0 16px; font-size: 22px; }

label {
    display: block;
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
}

.field {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.9);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.62);
    padding: 11px 12px;
    font-size: 15px;
    margin-bottom: 14px;
}

.pin-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.pin-digit {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.9);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.62);
    text-align: center;
    font-size: 20px;
    -webkit-text-security: disc;
}

.error { color: var(--danger); font-size: 14px; margin-bottom: 12px; }
.status { color: var(--ok); font-size: 14px; margin-bottom: 12px; }

button {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 12px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), #ef4444);
}

button:hover { background: linear-gradient(135deg, var(--primary-strong), #dc2626); }

.links { margin-top: 14px; font-size: 14px; }
.links a { color: #0f4c81; text-decoration: none; }

.register-shell { width: min(520px, 100%); }
.register-shell .card { width: min(520px, 100%); }
.captcha-box {
    margin-bottom: 14px;
    border: 1px dashed #38bdf8;
    border-radius: 10px;
    background: rgba(236, 254, 255, 0.72);
    color: #0f766e;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 3px;
    padding: 10px;
}

.recover-shell { width: min(460px, 100%); }
.recover-shell p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }

/* Login special */
body.page-login .wrap {
    position: relative;
    overflow: visible;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: calc(32px + env(safe-area-inset-top)) 10px 10px;
}

.login-shell {
    width: min(460px, 100%);
    transform: translateY(-18px);
    position: relative;
    z-index: 5;
}

.login-shell .card {
    padding: 28px 24px 30px;
    min-height: 56vh;
}

body.page-login .top-logo img { width: min(340px, 86vw); }

body.page-login .field {
    border: 2px solid #dc2626;
    background: #ffffff;
}

.phone-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    margin-bottom: 14px;
}

.phone-prefix {
    min-width: 64px;
    border: 2px solid #dc2626;
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: #dc2626;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
}

.phone-group .field {
    margin-bottom: 0;
    border-radius: 0 10px 10px 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

body.page-login .pin-digit {
    height: 66px;
    border: 2px solid #dc2626;
    background: #ffffff;
    font-size: 36px;
    line-height: 1;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 14px;
}

body.page-login button {
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    padding: 16px 18px;
    font-weight: 900;
    font-size: 16px;
    letter-spacing: 0.5px;
    font-family: "Press Start 2P", "Arial Black", sans-serif;
}

body.page-login .links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

body.page-login .login-mario-float {
    position: fixed;
    right: max(10px, env(safe-area-inset-right));
    left: auto;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: clamp(170px, 40vw, 250px);
    pointer-events: none;
    opacity: 1;
    z-index: 30;
    margin: 0;
}

body.page-login .login-mario-float img {
    width: 100%;
    height: auto;
    max-height: 38vh;
    display: block;
    object-fit: contain;
}

/* Dashboard */
body.page-dashboard {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: url('../img/local/background.png') center center / cover no-repeat fixed;
    color: #ffffff;
}

body.page-profile {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: url('../img/local/background.png') center center / cover no-repeat fixed;
    color: #ffffff;
}

body.page-home {
    margin: 0;
    min-height: 100vh;
}

.home-screen {
    padding: 18px 6px 92px;
}

.home-page-title {
    margin: 0 auto 8px;
    width: calc(100vw - 12px);
    max-width: none;
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(2, 6, 23, 0.55);
}

.home-dynamic {
    max-width: none;
    width: calc(100vw - 12px);
    margin: 0 auto;
    min-height: calc(100vh - 178px);
    background: rgba(31, 41, 55, 0.72);
    border: 2px solid rgba(255, 255, 255, 0.58);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.home-panel {
    display: grid;
    gap: 12px;
    min-height: calc(100vh - 182px);
    align-content: start;
    position: relative;
}

.home-panel h1 {
    display: none;
}

.team-panel {
    gap: 10px;
}

.team-root {
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(15, 23, 42, 0.58);
    border-radius: 12px;
    padding: 10px 12px;
    display: grid;
    gap: 4px;
}

.team-root span {
    font-size: 12px;
    color: #dbeafe;
}

.team-root strong {
    font-size: 18px;
    letter-spacing: 0.4px;
    color: #ffffff;
}

.team-level-card {
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 12px;
    background: rgba(17, 24, 39, 0.62);
    padding: 10px;
    display: grid;
    gap: 8px;
}

.team-level-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.team-level-card__header h3 {
    margin: 0;
    font-size: 16px;
    color: #fef08a;
}

.team-level-card__header span {
    font-size: 12px;
    color: #e2e8f0;
}

.team-level-list {
    display: grid;
    gap: 8px;
}

.team-member {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.56);
    padding: 8px 10px;
    display: grid;
    gap: 3px;
}

.team-member__top,
.team-diagram-node__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.team-whatsapp-btn {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: #22c55e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.team-whatsapp-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.team-member p {
    margin: 0;
    font-size: 12px;
    color: #f8fafc;
    line-height: 1.25;
}

.team-member p:first-child {
    font-size: 14px;
    color: #ffffff;
}

.team-empty {
    margin: 0;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-size: 12px;
}

.team-actions {
    display: flex;
    justify-content: flex-end;
}

.team-diagram-btn {
    width: auto;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(220, 38, 38, 0.9);
    color: #ffffff;
    cursor: pointer;
}

.profile-modal__content--team {
    width: min(980px, 100%);
    max-height: min(82vh, 760px);
    overflow: auto;
}

.team-diagram-title {
    margin: 0 0 4px;
    text-align: center;
    color: #fde68a;
}

.team-diagram-subtitle {
    margin: 0 0 12px;
    text-align: center;
    font-size: 12px;
    color: #dbeafe;
}

.team-diagram-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    gap: 10px;
    min-width: 640px;
}

.team-diagram-col {
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.62);
    padding: 10px;
    position: relative;
}

.team-diagram-col h4 {
    margin: 0 0 8px;
    color: #fef08a;
    font-size: 14px;
    text-align: center;
}

.team-diagram-list {
    display: grid;
    gap: 8px;
}

.team-diagram-node {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    background: rgba(2, 6, 23, 0.45);
    padding: 8px;
    display: grid;
    gap: 3px;
}

.team-diagram-node strong {
    font-size: 13px;
    color: #ffffff;
}

.team-diagram-node span {
    font-size: 11px;
    color: #e2e8f0;
}

@media (min-width: 768px) {
    .team-level-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.profile-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 14px 12px 110px;
    display: grid;
    gap: 12px;
}

.profile-card {
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 14px;
    padding: 14px;
    position: relative;
    width: 100%;
    min-width: 0;
    justify-self: stretch;
    align-self: start;
}

.profile-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.profile-switch[data-portfolio-switch] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-switch[data-history-switch] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-switch__btn {
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    padding: 10px 12px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 0.5px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.profile-switch__btn.is-active {
    background: #dc2626;
    border-color: rgba(255, 255, 255, 0.95);
}

.profile-card h1,
.profile-card h2,
.profile-card h3 {
    margin: 0 0 12px;
}

.profile-cards-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.profile-cards-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-cards-counter {
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
    color: #fde68a;
    background: rgba(15, 23, 42, 0.55);
}

.profile-cards-desc {
    margin: 0 0 10px;
    font-size: 12px;
    color: #fde68a;
}

.profile-pin-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.9);
    background: radial-gradient(circle at 30% 30%, #fde68a, #f59e0b 65%, #d97706);
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.8);
    animation: pinBtnGlow 1.6s ease-in-out infinite;
}

@keyframes pinBtnGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(251, 191, 36, 0.55); transform: scale(1); }
    50% { box-shadow: 0 0 16px rgba(251, 191, 36, 0.95); transform: scale(1.03); }
}

.profile-add-btn,
.profile-delete-btn {
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.8);
    cursor: pointer;
}

.profile-add-btn:disabled {
    background: rgba(107, 114, 128, 0.9);
    cursor: not-allowed;
    opacity: 0.9;
}

.profile-delete-btn {
    width: auto;
    background: rgba(127, 29, 29, 0.95);
}

.profile-fav-btn {
    width: auto;
    border: 1px solid rgba(251, 191, 36, 0.55);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #f8fafc;
    background: rgba(31, 41, 55, 0.88);
    margin-bottom: 0;
}

.profile-fav-btn--active {
    background: rgba(245, 158, 11, 0.95);
    color: #111827;
    border-color: rgba(251, 191, 36, 1);
}

.cards-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

.profile-card[data-profile-panel="tarjetas"] {
    min-height: 420px;
}

.user-card-item {
    position: relative;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 16px;
    background:
        linear-gradient(140deg, rgba(2, 6, 23, 0.28), rgba(15, 23, 42, 0.18)),
        url('../img/local/tarjeta.png') center center / cover no-repeat;
    padding: 14px 14px 12px;
    min-height: 196px;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 8px 18px rgba(2, 6, 23, 0.45);
}

.user-card-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: -36%;
    width: 42%;
    height: 100%;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.14) 50%, transparent 100%);
    transform: skewX(-18deg);
    animation: cardShine 4.6s ease-in-out infinite;
    pointer-events: none;
}

.user-card-line {
    margin: 0 0 6px;
    font-size: 13px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(2, 6, 23, 0.8);
    letter-spacing: 0.2px;
    padding-left: 25%;
}

.user-card-row--top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.user-card-line--bank,
.user-card-line--key {
    font-size: 12px;
    padding-left: 25%;
}

.user-card-line--name {
    font-size: 16px;
    font-weight: 700;
    margin-top: 2px;
}

.user-card-line--number {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 1.2px;
    margin-top: 2px;
    margin-bottom: 10px;
}

.user-card-line strong {
    color: #fbbf24;
    font-weight: 800;
}

.user-card-line--bank,
.user-card-line--key,
.user-card-line--name,
.user-card-line--number {
    color: #f8fafc;
}

.user-card-item .profile-delete-btn {
    border-color: rgba(248, 113, 113, 0.7);
    background: rgba(127, 29, 29, 0.92);
}

.user-card-actions {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

@keyframes cardShine {
    0% { transform: translateX(0) skewX(-18deg); opacity: 0; }
    20% { opacity: 0.6; }
    45% { transform: translateX(320%) skewX(-18deg); opacity: 0; }
    100% { transform: translateX(320%) skewX(-18deg); opacity: 0; }
}

.profile-empty {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.profile-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 14px;
    z-index: 70;
}

.profile-modal.is-open {
    display: flex;
}

.profile-modal__content {
    width: min(460px, 100%);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 14px;
    padding: 14px;
    position: relative;
}

.profile-modal__content--favorite {
    text-align: center;
}

.profile-modal__content--favorite h3 {
    margin: 6px 0 10px;
    color: #fef3c7;
    font-size: 18px;
}

.favorite-star-wrap {
    width: min(190px, 56vw);
    margin: 0 auto;
    position: relative;
    border-radius: 14px;
}

.favorite-star-wrap img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.85));
}

.favorite-star-wrap::before {
    content: "";
    position: absolute;
    inset: -10px;
    background: conic-gradient(from 0deg, rgba(251, 191, 36, 0), rgba(251, 191, 36, 0.75), rgba(251, 191, 36, 0));
    clip-path: polygon(
        50% 0%,
        61% 35%,
        98% 35%,
        68% 57%,
        79% 91%,
        50% 70%,
        21% 91%,
        32% 57%,
        2% 35%,
        39% 35%
    );
    filter: blur(6px);
    animation: favoriteStarShine 2s linear infinite;
    pointer-events: none;
}

@keyframes favoriteStarShine {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.profile-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: auto;
    border-radius: 8px;
    padding: 6px 8px;
    background: rgba(220, 38, 38, 0.9);
}

.profile-form .field {
    margin-bottom: 10px;
}

.profile-inline-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.profile-inline-col {
    min-width: 0;
}

.profile-ine-box {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    padding: 10px;
    margin-bottom: 10px;
}

.profile-avatar-block {
    display: grid;
    justify-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.profile-avatar-ring {
    width: 120px;
    height: 120px;
    border-radius: 999px;
    border: 2px solid #dc2626;
    padding: 4px;
    background: rgba(2, 6, 23, 0.55);
    position: relative;
    overflow: visible;
}

.profile-avatar-ring::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 999px;
    border: 3px solid transparent;
    border-top-color: #22c55e;
    animation: profileSpin 2s linear infinite;
}

.profile-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.profile-identity-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.profile-identity-item {
    display: grid;
    gap: 6px;
}

.profile-identity-thumb-wrap {
    position: relative;
}

.profile-identity-item span {
    font-size: 12px;
    font-weight: 700;
    color: #f8fafc;
}

.profile-ine-thumb {
    width: 100%;
    height: 82px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.profile-identity-item .field {
    margin-bottom: 0;
    padding: 6px 8px;
    font-size: 12px;
}

.profile-file-input {
    display: none;
}

.profile-image-edit {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: rgba(220, 38, 38, 0.95);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.profile-avatar-ring > .profile-image-edit {
    top: auto;
    bottom: -8px;
    right: -8px;
}

.profile-ine-status,
.profile-ine-lock {
    margin: 0 0 8px;
    font-size: 12px;
    color: #f8fafc;
}

.profile-ine-lock {
    color: #fecaca;
    font-weight: 700;
}

@keyframes profileSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.profile-form button[disabled] {
    background: #6b7280;
    cursor: not-allowed;
    opacity: 0.9;
}

.profile-pin-grid .pin-digit {
    height: 52px;
    font-size: 28px;
}

@media (max-width: 820px) {
    .cards-list {
        grid-template-columns: 1fr;
    }

    .profile-inline-row {
        grid-template-columns: 1fr;
    }

    .profile-card[data-profile-panel="tarjetas"] {
        min-height: 340px;
    }
}

.bank-picker {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    padding: 10px;
    margin-bottom: 12px;
}

.bank-picker__search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bank-picker__icon {
    font-size: 12px;
    font-weight: 700;
    color: #e2e8f0;
    min-width: 56px;
}

.bank-picker__search,
.bank-picker__select {
    margin-bottom: 8px !important;
}

.bank-picker__search {
    margin-bottom: 0 !important;
}

.bank-picker__hint {
    margin: 0;
    font-size: 11px;
    color: #cbd5e1;
}

.client-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.client-products-banner {
    position: relative;
    width: 100%;
    border-radius: 0;
    overflow: hidden;
    border: 0;
    margin: 0 0 10px;
}

.client-products-banner img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.client-products-banner p {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    margin: 0;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.6px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
    font-family: "Press Start 2P", "Arial Black", sans-serif;
}

.client-product-card {
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    padding: 10px;
    color: #ffffff;
    box-shadow: 0 10px 18px rgba(2, 6, 23, 0.35);
}

.client-product-card--lvl-1 { background: linear-gradient(180deg, #dc2626, #991b1b); }
.client-product-card--lvl-2 { background: linear-gradient(180deg, #22c55e, #15803d); }
.client-product-card--lvl-3 { background: linear-gradient(180deg, #2563eb, #1d4ed8); }
.client-product-card--lvl-4 { background: linear-gradient(180deg, #ec4899, #be185d); }
.client-product-card--lvl-5 { background: linear-gradient(180deg, #facc15, #ca8a04); color: #111827; }
.client-product-card--lvl-6 { background: linear-gradient(180deg, #a855f7, #7e22ce); }
.client-product-card--lvl-7 { background: linear-gradient(180deg, #fb923c, #c2410c); }
.client-product-card--lvl-8 { background: linear-gradient(180deg, #d1d5db, #9ca3af); color: #111827; }
.client-product-card--lvl-9 { background: linear-gradient(180deg, #f59e0b, #b45309); color: #111827; }
.client-product-card--lvl-10 { background: linear-gradient(180deg, #38bdf8, #2563eb); }

.client-product-photo-wrap {
    width: 100%;
    aspect-ratio: 3 / 2;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.75);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
}

.client-product-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.client-product-cart-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    padding: 4px 7px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.client-product-title {
    margin: 8px 0 6px;
    font-size: 16px;
    font-weight: 900;
}

.client-product-meta {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
}

.client-product-buy-btn {
    width: 100%;
    margin-top: 8px;
    border: 2px solid #ffffff;
    border-radius: 10px;
    padding: 10px 8px;
    font-family: "Press Start 2P", "Arial Black", sans-serif;
    font-size: 11px;
    letter-spacing: 0.3px;
    background: linear-gradient(180deg, #60a5fa, #1d4ed8);
    color: #ffffff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
    box-shadow: 0 3px 0 #0b3b9f;
}

.client-product-buy-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #0b3b9f;
}

.client-product-buy-btn--disabled,
.client-product-buy-btn:disabled {
    background: linear-gradient(180deg, #9ca3af, #6b7280);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 2px 0 #4b5563;
    cursor: not-allowed;
}

.profile-modal__content--product {
    width: min(520px, 100%);
    padding-top: 12px;
    max-height: 92svh;
    overflow-y: auto;
}

.favorite-star-wrap--product {
    width: 88px;
    margin-bottom: 8px;
}

.product-detail-modal-title {
    margin: 0 0 8px;
    text-align: center;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.3px;
    color: #ffffff;
}

.profile-modal__content--product.product-lvl-1 { background: linear-gradient(180deg, #dc2626, #991b1b); }
.profile-modal__content--product.product-lvl-2 { background: linear-gradient(180deg, #22c55e, #15803d); }
.profile-modal__content--product.product-lvl-3 { background: linear-gradient(180deg, #2563eb, #1d4ed8); }
.profile-modal__content--product.product-lvl-4 { background: linear-gradient(180deg, #ec4899, #be185d); }
.profile-modal__content--product.product-lvl-5 { background: linear-gradient(180deg, #facc15, #ca8a04); color: #111827; }
.profile-modal__content--product.product-lvl-6 { background: linear-gradient(180deg, #a855f7, #7e22ce); }
.profile-modal__content--product.product-lvl-7 { background: linear-gradient(180deg, #fb923c, #c2410c); }
.profile-modal__content--product.product-lvl-8 { background: linear-gradient(180deg, #d1d5db, #9ca3af); color: #111827; }
.profile-modal__content--product.product-lvl-9 { background: linear-gradient(180deg, #f59e0b, #b45309); color: #111827; }
.profile-modal__content--product.product-lvl-10 { background: linear-gradient(180deg, #38bdf8, #2563eb); }

.profile-modal__content--product.product-lvl-5 .product-detail-modal-title,
.profile-modal__content--product.product-lvl-8 .product-detail-modal-title,
.profile-modal__content--product.product-lvl-9 .product-detail-modal-title {
    color: #111827;
}

.product-detail-head {
    width: 100%;
    aspect-ratio: 3 / 2;
    min-height: 180px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.65);
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.product-detail-head img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center;
    display: block;
}

.product-detail-info p {
    margin: 0 0 6px;
    font-size: 13px;
    color: #f8fafc;
}

.product-detail-info {
    display: grid;
    gap: 6px;
    margin-bottom: 4px;
}

.product-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.16);
    padding: 8px 10px;
}

.product-detail-row--pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.product-detail-pair-item {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.product-detail-label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    opacity: 0.95;
}

.product-detail-value {
    font-size: 13px;
    font-weight: 800;
    text-align: right;
}

.profile-modal__content--product.product-lvl-5 .product-detail-row,
.profile-modal__content--product.product-lvl-8 .product-detail-row,
.profile-modal__content--product.product-lvl-9 .product-detail-row {
    border-color: rgba(17, 24, 39, 0.35);
    background: rgba(255, 255, 255, 0.34);
}

.profile-modal__content--product.product-lvl-5 .product-detail-label,
.profile-modal__content--product.product-lvl-8 .product-detail-label,
.profile-modal__content--product.product-lvl-9 .product-detail-label,
.profile-modal__content--product.product-lvl-5 .product-detail-value,
.profile-modal__content--product.product-lvl-8 .product-detail-value,
.profile-modal__content--product.product-lvl-9 .product-detail-value,
.profile-modal__content--product.product-lvl-5 .product-detail-subtitle,
.profile-modal__content--product.product-lvl-8 .product-detail-subtitle,
.profile-modal__content--product.product-lvl-9 .product-detail-subtitle {
    color: #111827;
}

.product-detail-subtitle {
    margin: 10px 0 8px;
    font-size: 14px;
    color: #fde68a;
}

.product-gain-switch {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
}

.product-gain-switch button {
    width: 100%;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 8px;
    padding: 7px 6px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
}

.product-gain-switch button.is-active {
    background: #dc2626;
}

.product-gain-result {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    padding: 8px;
    margin-bottom: 10px;
}

.product-gain-amount {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 900;
    color: #fef3c7;
    text-align: center;
}

.product-gain-loss {
    margin: 0;
    font-size: 12px;
    color: #fecaca;
    text-align: center;
}

.product-gain-note {
    margin: 0 0 10px;
    font-size: 12px;
    text-align: center;
    color: #e2e8f0;
}

.product-payment-box {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.42);
    padding: 8px;
    margin: 0 0 10px;
}

.product-payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
    color: #f8fafc;
}

.product-payment-row strong {
    color: #fde68a;
    font-size: 13px;
}

.product-payment-row--total {
    margin-bottom: 0;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.product-payment-label {
    display: block;
    margin: 4px 0 6px;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
}

.product-payment-input-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.product-payment-input {
    margin-bottom: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #111827 !important;
}

.product-payment-max-btn {
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: linear-gradient(180deg, #dc2626, #991b1b);
    color: #ffffff;
    font-family: "Press Start 2P", "Arial Black", sans-serif;
    font-size: 11px;
    font-weight: 900;
    padding: 0 12px;
    cursor: pointer;
    margin-bottom: 6px;
}

.product-payment-hint {
    margin: 0 0 6px;
    font-size: 11px;
    color: #fde68a;
}

.product-level-warning {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(252, 165, 165, 0.7);
    background: rgba(127, 29, 29, 0.5);
    color: #fee2e2;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.portfolio-hero {
    display: grid;
    justify-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.portfolio-hero__phone {
    margin: 0;
    font-family: "Press Start 2P", "Arial Black", sans-serif;
    font-size: 14px;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(2, 6, 23, 0.7);
    text-align: center;
}

.portfolio-hero__coin-wrap {
    position: relative;
    width: 90px;
    height: 90px;
    display: grid;
    place-items: center;
}

.portfolio-hero__coin {
    width: 78px;
    height: 78px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.55));
}

.portfolio-hero__coin-glow {
    position: absolute;
    inset: 10px;
    border-radius: 999px;
    background: conic-gradient(
        from 0deg,
        #ef4444,
        #f59e0b,
        #fde047,
        #22c55e,
        #38bdf8,
        #8b5cf6,
        #ec4899,
        #ef4444
    );
    filter: blur(10px);
    opacity: 0.9;
    animation: portfolioRainbowSpin 2.4s linear infinite;
}

.portfolio-hero__level {
    margin: 0;
    font-family: "Press Start 2P", "Arial Black", sans-serif;
    font-size: 12px;
    color: #fde68a;
    text-shadow: 0 2px 6px rgba(2, 6, 23, 0.7);
    text-align: center;
}

.portfolio-invite-box {
    margin-top: 2px;
    display: grid;
    justify-items: center;
    gap: 8px;
}

.portfolio-invite-box__id {
    margin: 0;
    font-size: 12px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(2, 6, 23, 0.65);
}

.portfolio-invite-btn {
    position: relative;
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    padding: 10px 14px;
    background: linear-gradient(180deg, #16a34a, #15803d);
    color: #ffffff;
    font-family: "Press Start 2P", "Arial Black", sans-serif;
    font-size: 11px;
    cursor: pointer;
    z-index: 1;
    box-shadow: 0 4px 0 #14532d;
}

.portfolio-invite-btn::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #fde047, #22c55e, #38bdf8, #8b5cf6, #ef4444);
    background-size: 240% 100%;
    animation: rainbowShift 2.1s linear infinite;
    filter: blur(5px);
    opacity: 0.88;
    z-index: -1;
}

.portfolio-invite-btn.is-copied {
    background: linear-gradient(180deg, #22c55e, #16a34a);
}

@keyframes portfolioRainbowSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.portfolio-finance-grid {
    display: grid;
    gap: 10px;
}

.portfolio-finance-card {
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.55);
    padding: 10px 12px;
}

.portfolio-finance-card p {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: #fde68a;
    text-transform: uppercase;
}

.portfolio-finance-card h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
}

.portfolio-finance-row-small {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.portfolio-finance-card--small h3 {
    font-size: 18px;
}

.reclamable-live-wrap {
    position: relative;
    min-height: 28px;
}

.portfolio-claim-btn {
    margin-top: 8px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    padding: 6px 8px;
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.4px;
}

.portfolio-claim-btn:disabled {
    opacity: 0.45;
}

.portfolio-pending-claim-btn {
    margin-top: 8px;
    width: 100%;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.portfolio-pending-claim-btn.is-waiting {
    background: rgba(100, 116, 139, 0.6);
    color: #e2e8f0;
}

.portfolio-pending-claim-btn.is-ready {
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.7);
}


.portfolio-tasks {
    display: grid;
    gap: 10px;
}

.portfolio-task {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.52);
    padding: 10px;
}

.portfolio-task--done {
    border-color: rgba(74, 222, 128, 0.85);
    background: rgba(22, 163, 74, 0.2);
}

.portfolio-task__title {
    margin: 0 0 5px;
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
}

.portfolio-task__value {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 900;
    color: #fde68a;
}

.portfolio-task__bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.portfolio-task__bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #84cc16);
}

.portfolio-task__status {
    margin: 6px 0 0;
    font-size: 11px;
    font-weight: 700;
    color: #e2e8f0;
}

.portfolio-task__line {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: center;
}

.portfolio-task__reward-right {
    margin: 0;
    font-size: 11px;
    text-align: right;
    color: #86efac;
    font-weight: 800;
}

@media (max-width: 820px) {
    .portfolio-task__line {
        grid-template-columns: 1fr;
    }

    .portfolio-task__reward-right {
        text-align: left;
    }
}

.portfolio-login-bonus-extra {
    margin: 0 0 8px;
    font-size: 12px;
    color: #22c55e;
    font-weight: 900;
}

.global-star-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.portfolio-wallet-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.portfolio-gold-btn--wide {
    grid-column: 1 / -1;
}

.portfolio-gold-btn {
    width: 100%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    padding: 12px 10px;
    font-family: "Press Start 2P", "Arial Black", sans-serif;
    font-size: 12px;
    color: #ffffff;
    background: linear-gradient(90deg, #f59e0b, #fde047, #22c55e, #38bdf8, #8b5cf6, #f59e0b);
    background-size: 220% 100%;
    animation: rainbowShift 2.2s linear infinite;
    box-shadow: 0 4px 0 rgba(146, 64, 14, 0.9);
}

.portfolio-gold-btn:disabled {
    filter: grayscale(1);
    opacity: 0.7;
    cursor: not-allowed;
}

.portfolio-logout-form {
    margin: 0;
}

.portfolio-gold-btn--logout {
    background: linear-gradient(90deg, #ef4444, #b91c1c);
    box-shadow: 0 4px 0 rgba(127, 29, 29, 0.95);
}

.portfolio-support-fab {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: linear-gradient(180deg, #dc2626, #991b1b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.45);
    z-index: 12;
}

.portfolio-notice-fab {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.95));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.45);
    z-index: 12;
}

.portfolio-notice-fab::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 14px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #fde047, #22c55e, #38bdf8, #8b5cf6, #ef4444);
    background-size: 240% 100%;
    animation: rainbowShift 2.3s linear infinite;
    filter: blur(6px);
    opacity: 0.85;
    z-index: -1;
}

.portfolio-notice-fab svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.portfolio-support-fab::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #fde047, #22c55e, #38bdf8, #8b5cf6, #ef4444);
    background-size: 240% 100%;
    animation: rainbowShift 2.1s linear infinite;
    filter: blur(5px);
    opacity: 0.9;
    z-index: -1;
}

.portfolio-notice-modal {
    max-width: 460px;
    width: min(92vw, 460px);
}

.portfolio-notice-box {
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(15, 23, 42, 0.35);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
}

.portfolio-notice-box h4 {
    margin: 0 0 8px;
    font-size: 13px;
    color: #fde68a;
    font-family: "Press Start 2P", "Arial Black", sans-serif;
    line-height: 1.4;
}

.portfolio-notice-schedule {
    display: grid;
    gap: 6px;
}

.portfolio-notice-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 12px;
    color: #ffffff;
}

.portfolio-notice-row strong {
    color: #f8fafc;
    text-align: right;
}

.portfolio-notice-row strong.is-open {
    color: #86efac;
}

.portfolio-notice-row strong.is-closed {
    color: #fca5a5;
}

.portfolio-support-fab svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.portfolio-support-fab__badge {
    position: absolute;
    top: -5px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: #facc15;
    color: #111827;
    font-size: 10px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.portfolio-support-fab__badge.is-hidden {
    display: none;
}

.portfolio-support__messages {
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.5);
    padding: 10px;
    display: grid;
    gap: 8px;
    max-height: 44vh;
    overflow: auto;
}

.portfolio-support__bubble {
    max-width: 90%;
    width: fit-content;
    border-radius: 12px;
    padding: 8px 10px;
    display: grid;
    gap: 4px;
}

.portfolio-support__bubble.is-user {
    justify-self: end;
    background: rgba(220, 38, 38, 0.32);
    border: 1px solid rgba(252, 165, 165, 0.6);
}

.portfolio-support__bubble.is-admin {
    justify-self: start;
    background: rgba(59, 130, 246, 0.28);
    border: 1px solid rgba(147, 197, 253, 0.6);
}

.portfolio-support__bubble p {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.portfolio-support__bubble small {
    font-size: 10px;
    opacity: 0.86;
}

.portfolio-support__bubble.is-system {
    justify-self: center;
    max-width: 80%;
    background: rgba(250, 204, 21, 0.16);
    border: 1px solid rgba(250, 204, 21, 0.6);
}

.portfolio-support__status {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #fde68a;
}

.portfolio-support__img {
    width: 220px;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.portfolio-support__form {
    margin-top: 10px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: end;
}

.portfolio-support__input {
    min-height: 64px;
    max-height: 140px;
    resize: vertical;
}

.portfolio-support__clip {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.portfolio-support__file-name {
    grid-column: 1 / -1;
    font-size: 11px;
    color: #dbeafe;
    min-height: 16px;
}

.portfolio-support-online {
    margin: 8px 0 0;
    font-size: 12px;
    color: #fde68a;
}

@media (max-width: 820px) {
    .portfolio-support__messages {
        padding: 8px;
        gap: 6px;
        max-height: 38vh;
    }

    .portfolio-support__bubble {
        padding: 6px 8px;
        max-width: 92%;
    }

    .portfolio-support__bubble p {
        font-size: 12px;
        line-height: 1.25;
    }

    .portfolio-support__bubble small,
    .portfolio-support__status {
        font-size: 9px;
    }

    .portfolio-support__img {
        width: 160px;
    }

    .portfolio-support__input {
        min-height: 52px;
        font-size: 12px;
    }

    .portfolio-support__clip {
        width: 34px;
        height: 34px;
    }
}

.portfolio-pending {
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.45);
    padding: 10px;
}

.portfolio-pending h4 {
    margin: 0 0 8px;
    font-size: 12px;
    color: #fde68a;
    font-weight: 900;
}

.portfolio-pending-item {
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.portfolio-pending-item:last-child {
    margin-bottom: 0;
}

.portfolio-pending-item p {
    margin: 0 0 4px;
    font-size: 11px;
    color: #ffffff;
}

.portfolio-history-list {
    margin-top: 10px;
    max-height: min(52svh, 420px);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.45);
    padding: 8px;
}

.portfolio-history-item {
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    padding: 8px;
    margin-bottom: 8px;
}

.portfolio-history-item:last-child {
    margin-bottom: 0;
}

.portfolio-history-item p {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.portfolio-history-item p:last-child {
    margin-bottom: 0;
}

@keyframes rainbowShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.client-product-buy-btn--cancel {
    background: linear-gradient(180deg, #ef4444, #b91c1c);
    box-shadow: 0 3px 0 #7f1d1d;
}

.screen {
    min-height: 100vh;
    padding-bottom: 96px;
}

.mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    background: var(--nav-bg);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--nav-border);
    z-index: 50;
}

.mobile-bottom-nav__form {
    margin: 0;
}

.mobile-bottom-nav__item {
    text-decoration: none;
    color: var(--nav-text);
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 10px 4px;
    background: rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.mobile-bottom-nav__item--logout {
    width: 100%;
    cursor: pointer;
    background: rgba(239, 68, 68, 0.2);
}

.mobile-bottom-nav__item--active {
    background: var(--nav-active);
    border-color: rgba(255, 255, 255, 0.65);
}

.home-page-title.is-hidden {
    display: none;
}

@media (max-width: 820px) {
    .wrap {
        padding: 10px 10px;
    }

    .card {
        padding: 14px;
        border-radius: 14px;
    }

    h1 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .field {
        padding: 9px 10px;
        font-size: 14px;
        margin-bottom: 10px;
    }

    .pin-digit {
        height: 42px;
        font-size: 18px;
    }

    body.page-login .wrap {
        padding: calc(12px + env(safe-area-inset-top)) 8px 8px;
    }

    .login-shell {
        transform: translateY(0);
    }

    .login-shell .card {
        min-height: auto;
        padding: 14px 12px 16px;
    }

    body.page-login .top-logo img {
        width: min(260px, 76vw);
    }

    .phone-prefix {
        min-width: 56px;
        font-size: 14px;
    }

    .phone-group .field {
        font-size: 18px;
    }

    body.page-login .pin-digit {
        height: 54px;
        font-size: 30px;
    }

    body.page-login button {
        padding: 12px 14px;
        font-size: 12px;
    }

    body.page-login .login-mario-float {
        width: clamp(140px, 34vw, 200px);
        bottom: max(8px, env(safe-area-inset-bottom));
    }

    .home-screen {
        padding: 8px 6px 80px;
    }

    .home-page-title {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .home-dynamic {
        width: calc(100vw - 12px);
        min-height: calc(100svh - 132px);
        border-radius: 12px;
        padding: 10px;
    }

    .home-panel {
        min-height: auto;
        gap: 8px;
    }

    .portfolio-hero {
        gap: 4px;
        margin-bottom: 0;
    }

    .portfolio-hero__phone {
        font-size: 11px;
    }

    .portfolio-hero__coin-wrap {
        width: 70px;
        height: 70px;
    }

    .portfolio-hero__coin {
        width: 62px;
        height: 62px;
    }

    .portfolio-hero__level {
        font-size: 10px;
    }

    .portfolio-invite-box__id {
        font-size: 11px;
    }

    .portfolio-invite-btn {
        font-size: 10px;
        padding: 9px 12px;
    }

    .profile-card {
        padding: 10px;
        border-radius: 12px;
    }

    .profile-switch__btn {
        height: 38px;
        font-size: 11px;
    }

    .profile-switch[data-portfolio-switch] {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .portfolio-gold-btn {
        font-size: 9px;
        padding: 10px 6px;
    }

    .profile-avatar-ring {
        width: 98px;
        height: 98px;
    }

    .profile-ine-thumb {
        height: 68px;
    }

    .client-products-banner img {
        height: 98px;
    }

    .client-products-banner p {
        font-size: 14px;
        bottom: 8px;
    }

    .product-payment-max-btn {
        height: 34px;
        font-size: 9px;
        padding: 0 10px;
    }

    .client-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .client-product-card {
        padding: 8px;
    }

    .client-product-title {
        font-size: 13px;
        margin: 6px 0 4px;
    }

    .client-product-meta {
        font-size: 11px;
        margin-bottom: 3px;
    }

    .client-product-buy-btn {
        font-size: 9px;
        padding: 8px 6px;
        margin-top: 6px;
    }

    .profile-modal {
        padding: 8px;
    }

    .profile-modal__content {
        width: 100%;
        max-height: 94svh;
        overflow: auto;
        padding: 10px;
    }

    .product-detail-modal-title {
        font-size: 16px;
    }

    .mobile-bottom-nav {
        gap: 6px;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    }

    .mobile-bottom-nav__item {
        font-size: 11px;
        padding: 9px 3px;
    }
}

@media (max-width: 420px) {
    .cards-list {
        grid-template-columns: 1fr;
    }

    .client-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .client-products-banner img {
        height: 112px;
    }

    .client-products-banner p {
        left: 50%;
        bottom: 8px;
        transform: translateX(-50%);
        font-size: 12px;
        letter-spacing: 0.2px;
        width: 100%;
        text-align: center;
    }

    .client-product-card {
        padding: 8px;
    }

    .client-product-title {
        font-size: 13px;
    }

    .client-product-meta {
        font-size: 11px;
    }

    .client-product-buy-btn {
        font-size: 9px;
        padding: 9px 6px;
    }

    .product-gain-switch {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-detail-row--pair {
        grid-template-columns: 1fr;
    }

    .portfolio-finance-row-small {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .profile-modal {
        padding: 8px;
    }

    .profile-modal__content--product {
        padding: 10px;
        max-height: 94svh;
    }

    .product-detail-modal-title {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .favorite-star-wrap--product {
        width: 62px;
        margin-bottom: 6px;
    }

    .product-detail-head {
        aspect-ratio: 16 / 8;
        min-height: 120px;
        margin-bottom: 8px;
    }

    .product-detail-row {
        padding: 6px 8px;
    }

    .product-detail-label {
        font-size: 11px;
    }

    .product-detail-value {
        font-size: 12px;
    }

    .product-detail-subtitle {
        margin: 8px 0 6px;
        font-size: 13px;
    }

    .product-gain-result {
        padding: 7px;
        margin-bottom: 8px;
    }

    .product-gain-amount {
        font-size: 14px;
    }

    .product-gain-loss,
    .product-gain-note,
    .product-payment-row,
    .product-payment-label,
    .product-payment-hint {
        font-size: 11px;
    }

    .card { padding: 16px; border-radius: 14px; }
    .pin-digit { height: 44px; font-size: 18px; }
    .top-logo img { width: min(250px, 82vw); }

    body.page-register .wrap {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 6px 10px 10px;
    }
    body.page-register .register-shell {
        margin-top: 2px;
    }
    body.page-register .top-logo {
        margin-bottom: 4px;
    }
    body.page-register .top-logo img {
        width: min(220px, 64vw);
    }
    body.page-register .card {
        padding: 10px 10px;
        border-radius: 12px;
    }
    body.page-register h1 {
        margin-bottom: 8px;
        font-size: 18px;
    }
    body.page-register .field {
        margin-bottom: 8px;
        padding: 9px 10px;
        font-size: 14px;
    }
    body.page-register .pin-grid {
        margin-bottom: 8px;
        gap: 6px;
    }
    body.page-register .pin-digit {
        height: 36px;
        font-size: 16px;
    }
    body.page-register .captcha-box {
        margin-bottom: 8px;
        padding: 6px;
        font-size: 18px;
        letter-spacing: 2px;
    }
    body.page-register button {
        padding: 10px;
    }
    body.page-register .links {
        margin-top: 8px;
        font-size: 13px;
    }

    body.page-login .wrap { padding: calc(32px + env(safe-area-inset-top)) 10px 10px; }
    body.page-login h1 { margin: 0 0 10px; font-size: 20px; }
    body.page-login .top-logo { margin: 0 0 6px; }
    body.page-login .top-logo img { width: min(300px, 84vw); }
    body.page-login .login-shell { transform: translateY(-18px); margin-top: 0; }
    body.page-login .card { min-height: 54svh; }
    body.page-login .phone-group { margin-bottom: 10px; }
    body.page-login .pin-grid { margin-bottom: 10px; }
    body.page-login .pin-digit { height: 56px; font-size: 30px; }
    body.page-login .remember { margin-bottom: 10px; }
    body.page-login .links { margin-top: 10px; font-size: 13px; }
    body.page-login .login-mario-float {
        width: clamp(170px, 48vw, 230px);
        right: max(6px, env(safe-area-inset-right));
        left: auto;
        bottom: max(10px, env(safe-area-inset-bottom));
        opacity: 1;
    }
    body.page-login .login-mario-float img { max-height: 34vh; }
    body.page-login button { font-size: 16px; padding: 14px 14px; }
}


