:root{
    --fd-bg:#f3f7ff;
    --fd-bg-soft:#eef4ff;
    --fd-card:#ffffff;
    --fd-card-2:#f8fbff;
    --fd-line:#dbe7ff;
    --fd-line-soft:#e9f0ff;
    --fd-text:#081226;
    --fd-text-2:#12213f;
    --fd-muted:#667694;
    --fd-blue:#155dfc;
    --fd-blue-2:#2563eb;
    --fd-blue-3:#0b1020;
    --fd-blue-soft:#e9f1ff;
    --fd-green:#16a34a;
    --fd-green-2:#22c55e;
    --fd-green-soft:#ecfdf3;
    --fd-red:#dc2626;
    --fd-gold:#eab308;
    --fd-shadow:0 16px 42px rgba(17,39,84,.10);
    --fd-shadow-soft:0 10px 28px rgba(17,39,84,.08);
    --fd-radius-xl:28px;
    --fd-radius-lg:22px;
    --fd-radius-md:18px;
}

*{box-sizing:border-box;}

html,body{
    margin:0;
    padding:0;
    background:
        radial-gradient(circle at top left, rgba(37,99,235,.08), transparent 28%),
        radial-gradient(circle at top right, rgba(34,197,94,.06), transparent 22%),
        linear-gradient(180deg, #f7faff 0%, #eef4ff 100%);
    color:var(--fd-text);
    font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
}

body,button,input,select,textarea{font-weight:600;}
h1,h2,h3,h4,h5,strong,b{font-weight:800 !important;letter-spacing:-.02em;color:var(--fd-text);}
p,span,small,div,a{color:inherit;}
.hidden{display:none !important;}
body.modal-open{overflow:hidden;}

.profile-loader-box{
    display:grid;
    gap:14px;
    justify-items:center;
}
.profile-loader-logo{
    width:84px;
    height:84px;
    border-radius:24px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,var(--fd-blue),#4f8cff);
    color:#fff;
    font-size:1.8rem;
    font-weight:900;
    box-shadow:0 16px 32px rgba(21,93,252,.24);
    animation:fdLoaderFloat 2.2s ease-in-out infinite;
}
.profile-loader-box strong{
    color:var(--fd-blue-3);
    font-size:1rem;
}
@keyframes fdLoaderFloat{
    0%{transform:translateY(0) scale(1);}
    50%{transform:translateY(-8px) scale(1.02);}
    100%{transform:translateY(0) scale(1);}
}

.page.page-light{
    max-width:520px;
    margin:0 auto;
    min-height:100vh;
    padding:18px 16px 118px;
    background:transparent;
}

.ft-topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:18px;
}
.icon-btn{
    width:46px;
    height:46px;
    border:none;
    border-radius:16px;
    background:rgba(255,255,255,.92);
    color:var(--fd-blue-2);
    box-shadow:var(--fd-shadow-soft);
    display:flex;
    align-items:center;
    justify-content:center;
    backdrop-filter:blur(14px);
}
.icon-btn svg{width:20px;height:20px;}
.ft-topbar-center h1{
    margin:0;
    font-size:1.22rem;
    text-align:center;
    color:var(--fd-text);
}

.home-user-card,
.panel-light,
.promo-banner,
.class-panel,
.profile-balance-card,
.profile-mini-kpi,
.referral-highlight-card,
.profile-data-card,
.profile-identity-card,
.affiliate-tier-hero,
.affiliate-range-card,
.affiliate-progress-box,
.affiliate-note-box{
    border:1px solid var(--fd-line);
    background:rgba(255,255,255,.94);
    box-shadow:var(--fd-shadow);
    backdrop-filter:blur(16px);
}

.home-user-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:18px;
    border-radius:var(--fd-radius-xl);
    margin-bottom:16px;
}
.home-user-left{
    display:flex;
    align-items:center;
    gap:14px;
    min-width:0;
}
.avatar-box{
    width:62px;
    height:62px;
    border-radius:20px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,var(--fd-blue),#0b1020);
    color:#fff;
    font-size:1.25rem;
    font-weight:900;
    box-shadow:0 14px 28px rgba(21,93,252,.24);
}
.user-main-meta{min-width:0;}
.user-main-meta h2{
    margin:0;
    font-size:1.08rem;
    line-height:1.05;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.user-main-meta p{
    margin:6px 0 0;
    color:var(--fd-muted);
    font-size:.9rem;
    font-weight:700;
}
.user-rank-row{margin-top:10px;}
.user-rank{
    display:inline-flex;
    align-items:center;
    gap:8px;
    border-radius:999px;
    padding:8px 12px;
    background:var(--fd-blue-soft);
    color:var(--fd-blue-3);
    font-size:.78rem;
    font-weight:800;
    max-width:100%;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.notification-pill{
    position:relative;
    min-width:46px;
    height:46px;
    border:none;
    border-radius:16px;
    background:linear-gradient(135deg,#ffffff,#edf4ff);
    color:var(--fd-blue-2);
    box-shadow:var(--fd-shadow-soft);
    display:flex;
    align-items:center;
    justify-content:center;
}
.notification-pill svg{width:20px;height:20px;}
.notification-pill span{
    position:absolute;
    top:-4px;
    right:-4px;
    min-width:22px;
    height:22px;
    border-radius:999px;
    padding:0 6px;
    background:linear-gradient(135deg,var(--fd-green),var(--fd-green-2));
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:.72rem;
    font-weight:900;
    border:2px solid #fff;
}

.profile-hero-card{
    background:
        radial-gradient(circle at top right, rgba(34,197,94,.10), transparent 24%),
        radial-gradient(circle at bottom left, rgba(21,93,252,.12), transparent 30%),
        linear-gradient(180deg,#ffffff 0%,#f6faff 100%);
}

.class-panel{
    padding:18px;
    border-radius:26px;
    margin-bottom:16px;
    background:
        radial-gradient(circle at top right, rgba(21,93,252,.10), transparent 26%),
        linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}
.class-panel-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    margin-bottom:16px;
}
.class-panel-top small{
    display:block;
    color:var(--fd-blue-2);
    text-transform:uppercase;
    letter-spacing:.08em;
    font-size:.72rem;
    font-weight:900;
    margin-bottom:8px;
}
.class-panel-top h3{
    margin:0;
    font-size:1.18rem;
    line-height:1.06;
}
.class-badge{
    width:48px;
    height:48px;
    border-radius:16px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,var(--fd-blue),var(--fd-blue-3));
    color:#fff;
    font-size:1rem;
    font-weight:900;
    box-shadow:0 14px 26px rgba(21,93,252,.20);
    flex:0 0 48px;
}
.class-progress-wrap{
    display:grid;
    grid-template-columns:56px 1fr 56px;
    gap:12px;
    align-items:center;
}
.class-medal-left,
.class-medal-right{
    width:56px;
    height:56px;
    border-radius:18px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
    font-size:1rem;
    box-shadow:var(--fd-shadow-soft);
}
.class-medal-left{
    background:linear-gradient(135deg,#dbeafe,#eff6ff);
    color:var(--fd-blue-3);
}
.class-medal-right{
    background:linear-gradient(135deg,#ecfdf3,#f0fdf4);
    color:#166534;
}
.class-progress-center{min-width:0;}
.class-progress-bar{
    height:12px;
    border-radius:999px;
    background:#e6eefc;
    overflow:hidden;
    box-shadow:inset 0 1px 2px rgba(17,39,84,.08);
}
.class-progress-bar span{
    display:block;
    height:100%;
    width:18%;
    border-radius:999px;
    background:linear-gradient(90deg,var(--fd-blue),var(--fd-green-2));
}
.class-progress-center strong{
    display:block;
    margin-top:10px;
    font-size:.9rem;
    color:var(--fd-text);
}

.promo-banner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    border-radius:26px;
    padding:18px;
    margin-bottom:16px;
    background:
        radial-gradient(circle at top right, rgba(234,179,8,.12), transparent 24%),
        radial-gradient(circle at bottom left, rgba(21,93,252,.10), transparent 28%),
        linear-gradient(180deg,#ffffff 0%,#f9fbff 100%);
}
.promo-copy{min-width:0;}
.promo-mini{
    display:block;
    color:var(--fd-blue-2);
    text-transform:uppercase;
    letter-spacing:.08em;
    font-size:.72rem;
    font-weight:900;
    margin-bottom:8px;
}
.promo-copy strong{
    display:block;
    font-size:1.6rem;
    line-height:1;
    margin-bottom:6px;
}
.promo-copy small{
    color:var(--fd-muted);
    font-size:.88rem;
    font-weight:700;
}
.promo-arrow{
    width:48px;
    height:48px;
    border:none;
    border-radius:16px;
    background:linear-gradient(135deg,var(--fd-blue),var(--fd-blue-3));
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 14px 28px rgba(21,93,252,.22);
    flex:0 0 48px;
}
.promo-arrow svg{width:20px;height:20px;}

.panel-light{
    padding:18px;
    border-radius:28px;
    margin-bottom:16px;
    background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}
.panel-light-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:14px;
}
.panel-light-head h3{
    margin:0;
    font-size:1.08rem;
}
.panel-mini-badge,
.mini-status-badge,
.badge,
.badge-success,
.badge-danger,
.badge-warning,
.badge-gray{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    padding:8px 12px;
    font-size:.74rem;
    font-weight:900;
    white-space:nowrap;
}
.panel-mini-badge,
.badge-gray{
    color:var(--fd-blue-3);
    background:var(--fd-blue-soft);
    border:1px solid #cfe0ff;
}
.mini-status-badge,
.badge-success{
    color:#166534;
    background:var(--fd-green-soft);
    border:1px solid #bbf7d0;
}
.badge-danger{
    color:#b91c1c;
    background:#fef2f2;
    border:1px solid #fecaca;
}
.badge-warning{
    color:#92400e;
    background:#fff7ed;
    border:1px solid #fed7aa;
}
.mini-link{
    color:var(--fd-blue-2);
    text-decoration:none;
    font-size:.84rem;
    font-weight:900;
}

.profile-identity-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}
.profile-identity-hero{
    grid-column:1 / -1;
    border-radius:26px;
    padding:18px;
    background:
        radial-gradient(circle at top right, rgba(21,93,252,.10), transparent 26%),
        radial-gradient(circle at bottom left, rgba(34,197,94,.10), transparent 24%),
        linear-gradient(180deg,#ffffff 0%,#f7fbff 100%);
}
.profile-identity-head{
    display:flex;
    align-items:center;
    gap:14px;
    margin-bottom:16px;
}
.profile-identity-avatar{
    width:64px;
    height:64px;
    border-radius:22px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,var(--fd-blue),#4f8cff);
    color:#fff;
    font-size:1.35rem;
    font-weight:900;
    box-shadow:0 14px 28px rgba(21,93,252,.22);
    flex:0 0 64px;
}
.profile-identity-copy small{
    display:block;
    color:var(--fd-blue-2);
    text-transform:uppercase;
    letter-spacing:.08em;
    font-size:.72rem;
    font-weight:900;
    margin-bottom:8px;
}
.profile-identity-copy strong{
    display:block;
    font-size:1.15rem;
    line-height:1.1;
    margin-bottom:6px;
}
.profile-identity-copy p{
    margin:0;
    color:var(--fd-muted);
    font-size:.9rem;
    line-height:1.45;
    font-weight:700;
}
.profile-identity-tags{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}
.identity-tag{
    display:inline-flex;
    align-items:center;
    border-radius:999px;
    padding:10px 14px;
    background:linear-gradient(180deg,#eef5ff 0%,#e4efff 100%);
    color:var(--fd-blue-3);
    border:1px solid #cfe0ff;
    font-size:.8rem;
    font-weight:900;
}

.profile-data-card{
    border-radius:22px;
    padding:16px;
    background:linear-gradient(180deg,#ffffff 0%,#f7fbff 100%);
}
.profile-data-card span{
    display:block;
    color:var(--fd-muted);
    font-size:.74rem;
    margin-bottom:8px;
    font-weight:800;
}
.profile-data-card strong{
    display:block;
    font-size:1rem;
    line-height:1.2;
    word-break:break-word;
}
.profile-data-card small{
    display:block;
    color:var(--fd-muted);
    margin-top:8px;
    font-size:.8rem;
    font-weight:700;
}

.profile-main-grid{
    display:grid;
    grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);
    gap:14px;
    margin-bottom:16px;
}
.profile-balance-card{
    border-radius:28px;
    padding:18px;
    background:linear-gradient(135deg,#0f4be8 0%,#113cb3 100%);
    color:#fff;
    box-shadow:0 18px 34px rgba(17,75,232,.24);
    position:relative;
    overflow:hidden;
}
.profile-balance-card::before{
    content:"";
    position:absolute;
    inset:auto -38px -38px auto;
    width:150px;
    height:150px;
    border-radius:50%;
    background:rgba(255,255,255,.08);
}
.profile-balance-head{
    position:relative;
    z-index:1;
}
.profile-balance-head h3{
    margin:0;
    font-size:2rem;
    line-height:1;
    color:#fff;
}
.profile-balance-head small{
    display:block;
    margin-top:8px;
    color:rgba(255,255,255,.82);
    font-size:.82rem;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.06em;
}
.profile-ring-wrap{
    display:flex;
    align-items:center;
    justify-content:center;
    padding:18px 0;
    position:relative;
    z-index:1;
}
.profile-ring{
    width:110px;
    height:110px;
    border-radius:50%;
    background:
        radial-gradient(circle at center, rgba(255,255,255,.14) 0 48%, transparent 49% 100%),
        conic-gradient(#fff 0 36%, rgba(255,255,255,.25) 36% 100%);
    box-shadow:inset 0 0 0 12px rgba(255,255,255,.10);
}
.profile-balance-legend{
    display:grid;
    gap:10px;
    position:relative;
    z-index:1;
}
.legend-row{
    display:flex;
    align-items:center;
    gap:10px;
    background:rgba(255,255,255,.10);
    border:1px solid rgba(255,255,255,.12);
    border-radius:16px;
    padding:12px;
}
.legend-dot{
    width:12px;
    height:12px;
    border-radius:50%;
    flex:0 0 12px;
}
.legend-dot.green{background:#4ade80;}
.legend-dot.gold{background:#facc15;}
.legend-dot.blue{background:#93c5fd;}
.legend-row small{
    display:block;
    color:rgba(255,255,255,.78);
    font-size:.72rem;
    margin-bottom:4px;
    font-weight:800;
}
.legend-row strong{
    color:#fff;
    font-size:.98rem;
}

.profile-side-stack{display:grid;gap:14px;}
.profile-mini-kpi{
    border-radius:24px;
    padding:16px;
    background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
    min-height:170px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
}
.profile-mini-kpi-top small{
    display:block;
    color:var(--fd-muted);
    font-size:.78rem;
    font-weight:800;
    margin-bottom:6px;
}
.profile-mini-kpi-top strong{
    display:block;
    font-size:1.42rem;
    line-height:1;
}
.profile-mini-placeholder{
    flex:1;
    border-radius:18px;
    margin:14px 0;
    background:
        radial-gradient(circle at 25% 35%, rgba(21,93,252,.14), transparent 24%),
        radial-gradient(circle at 70% 70%, rgba(34,197,94,.12), transparent 22%),
        linear-gradient(180deg,#f2f7ff 0%,#edf4ff 100%);
    border:1px solid var(--fd-line-soft);
}
.profile-mini-kpi-bottom strong{
    display:block;
    font-size:1rem;
    margin-bottom:4px;
}
.profile-mini-kpi-bottom span{
    color:var(--fd-muted);
    font-size:.82rem;
    font-weight:700;
}
.image-kpi{overflow:hidden;}
.profile-mini-image{
    flex:1;
    border-radius:18px;
    margin-bottom:14px;
    min-height:72px;
    background:
        radial-gradient(circle at top left, rgba(34,197,94,.18), transparent 26%),
        radial-gradient(circle at bottom right, rgba(21,93,252,.18), transparent 30%),
        linear-gradient(135deg,#dbeafe 0%,#eff6ff 100%);
    border:1px solid var(--fd-line-soft);
}

.referral-highlight-card{
    display:grid;
    gap:14px;
    border-radius:24px;
    padding:18px;
    margin-bottom:14px;
    background:
        radial-gradient(circle at top right, rgba(234,179,8,.12), transparent 24%),
        radial-gradient(circle at bottom left, rgba(21,93,252,.10), transparent 28%),
        linear-gradient(180deg,#ffffff 0%,#f9fbff 100%);
}
.referral-highlight-copy small{
    display:block;
    color:var(--fd-blue-2);
    text-transform:uppercase;
    letter-spacing:.08em;
    font-size:.72rem;
    font-weight:900;
    margin-bottom:8px;
}
.referral-highlight-copy strong{
    display:block;
    font-size:1.08rem;
    margin-bottom:8px;
}
.referral-highlight-copy p{
    margin:0;
    color:var(--fd-muted);
    font-size:.9rem;
    line-height:1.45;
    font-weight:700;
    word-break:break-word;
}
.referral-highlight-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
}
.small-action-btn{
    border:none;
    border-radius:16px;
    padding:14px 14px;
    background: linear-gradient(180deg, #ffc800, #d1b000);
    color:var(--fd-blue-3);
    font-weight:900;
    font-size:.93rem;
    box-shadow:0 10px 18px rgba(37,99,235,.08);
}
.small-action-btn.dark{
    background:linear-gradient(135deg,var(--fd-blue),var(--fd-blue-3));
    color:#fff;
    box-shadow:0 14px 28px rgba(21,93,252,.22);
}

.summary-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}
.summary-card{
    border-radius:20px;
    background:linear-gradient(180deg,#ffffff 0%,#f7fbff 100%);
    border:1px solid var(--fd-line-soft);
    box-shadow:0 8px 18px rgba(17,39,84,.05);
    padding:15px 14px;
}
.summary-card span{
    display:block;
    color:var(--fd-muted);
    font-size:.74rem;
    margin-bottom:8px;
    font-weight:800;
}
.summary-card strong{
    display:block;
    font-size:1.15rem;
    line-height:1.1;
}

.affiliate-program-panel{
    background:
        radial-gradient(circle at top right, rgba(21,93,252,.06), transparent 20%),
        radial-gradient(circle at bottom left, rgba(234,179,8,.10), transparent 24%),
        linear-gradient(180deg,#ffffff 0%,#f9fbff 100%);
}
.affiliate-tier-hero{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    border-radius:24px;
    padding:18px;
    margin-bottom:14px;
    background:
        radial-gradient(circle at top right, rgba(34,197,94,.12), transparent 24%),
        radial-gradient(circle at bottom left, rgba(21,93,252,.10), transparent 24%),
        linear-gradient(180deg,#ffffff 0%,#f7fbff 100%);
}
.affiliate-tier-copy small{
    display:block;
    color:var(--fd-blue-2);
    text-transform:uppercase;
    letter-spacing:.08em;
    font-size:.72rem;
    font-weight:900;
    margin-bottom:8px;
}
.affiliate-tier-copy strong{
    display:block;
    font-size:1.1rem;
    margin-bottom:8px;
}
.affiliate-tier-copy p{
    margin:0;
    color:var(--fd-muted);
    font-size:.9rem;
    line-height:1.5;
    font-weight:700;
}
.affiliate-tier-amount{
    min-width:118px;
    text-align:right;
}
.affiliate-tier-amount span{
    display:block;
    color:var(--fd-muted);
    font-size:.74rem;
    margin-bottom:8px;
    font-weight:800;
}
.affiliate-tier-amount strong{
    display:block;
    font-size:1.35rem;
    line-height:1;
    color:var(--fd-blue-3);
}

.affiliate-progress-box{
    border-radius:22px;
    padding:16px;
    margin-bottom:14px;
    background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}
.affiliate-progress-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:12px;
}
.affiliate-progress-top strong{
    font-size:.95rem;
}
.affiliate-progress-top span{
    color:var(--fd-blue-2);
    font-size:.8rem;
    font-weight:900;
    text-align:right;
}
.affiliate-progress-bar{
    height:12px;
    border-radius:999px;
    background:#e6eefc;
    overflow:hidden;
    box-shadow:inset 0 1px 2px rgba(17,39,84,.08);
}
.affiliate-progress-bar span{
    display:block;
    height:100%;
    width:6%;
    border-radius:999px;
    background:linear-gradient(90deg,var(--fd-blue),var(--fd-green-2));
}
.affiliate-progress-box p{
    margin:10px 0 0;
    color:var(--fd-muted);
    font-size:.86rem;
    line-height:1.45;
    font-weight:700;
}

.affiliate-kpi-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    margin-bottom:14px;
}
.affiliate-range-list{
    display:grid;
    gap:12px;
    margin-bottom:14px;
}
.affiliate-range-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    border-radius:20px;
    padding:15px;
    background:linear-gradient(180deg,#ffffff 0%,#f7fbff 100%);
    border:1px solid var(--fd-line-soft);
    box-shadow:0 10px 22px rgba(17,39,84,.05);
}
.affiliate-range-card.active{
    border-color:#cfe0ff;
    background:
        radial-gradient(circle at top right, rgba(21,93,252,.08), transparent 24%),
        linear-gradient(180deg,#eef5ff 0%,#f7fbff 100%);
}
.affiliate-range-card strong{
    display:block;
    font-size:.98rem;
    margin-bottom:5px;
}
.affiliate-range-card p{
    margin:0;
    color:var(--fd-muted);
    font-size:.84rem;
    line-height:1.45;
    font-weight:700;
}
.affiliate-range-card span{
    color:var(--fd-blue-3);
    font-size:.96rem;
    font-weight:900;
    white-space:nowrap;
}
.affiliate-note-box{
    border-radius:20px;
    padding:16px;
    background:
        radial-gradient(circle at top right, rgba(234,179,8,.12), transparent 24%),
        linear-gradient(180deg,#fffdf6 0%,#fffaf0 100%);
    border:1px solid #fde7b0;
}
.affiliate-note-box strong{
    display:block;
    margin-bottom:8px;
    color:#92400e;
    font-size:.95rem;
}
.affiliate-note-box p{
    margin:0;
    color:#9a6b18;
    font-size:.86rem;
    line-height:1.5;
    font-weight:700;
}

.referrals-list,
.account-list-light,
.stats-list{
    display:grid;
    gap:12px;
}
.referral-user-item,
.account-light-card,
.stats-row-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:14px;
    border-radius:20px;
    background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
    border:1px solid var(--fd-line-soft);
    box-shadow:0 10px 22px rgba(17,39,84,.05);
}
.referral-user-avatar{
    width:48px;
    height:48px;
    border-radius:16px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,var(--fd-blue),#4f8cff);
    color:#fff;
    font-size:1rem;
    font-weight:900;
    flex:0 0 48px;
    box-shadow:0 12px 24px rgba(21,93,252,.18);
}
.referral-user-copy,
.account-light-copy{
    min-width:0;
    flex:1;
}
.referral-user-copy strong,
.account-light-copy strong{
    display:block;
    font-size:.98rem;
    line-height:1.1;
}
.referral-user-copy p,
.account-light-copy p{
    margin:5px 0 0;
    color:var(--fd-muted);
    font-size:.84rem;
    line-height:1.45;
    font-weight:700;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.referral-user-meta,
.account-light-meta{
    text-align:right;
    display:grid;
    gap:6px;
    justify-items:end;
}
.referral-user-meta strong{
    font-size:.9rem;
}
.stats-row-left{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
}
.stats-icon-box{
    width:42px;
    height:42px;
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(180deg,#eef5ff 0%,#e4efff 100%);
    color:var(--fd-blue-3);
    font-size:1rem;
    font-weight:900;
    box-shadow:0 10px 18px rgba(37,99,235,.08);
    flex:0 0 42px;
}
.stats-row-left small{
    color:var(--fd-muted);
    font-size:.86rem;
    font-weight:800;
    line-height:1.4;
}
.stats-row-card strong{
    font-size:1rem;
    white-space:nowrap;
}

.empty-box{
    padding:20px 14px;
    text-align:center;
    color:var(--fd-muted);
    border:1px dashed var(--fd-line);
    border-radius:18px;
    background:#fbfdff;
    font-weight:700;
}

.logout-wrap{
    margin-top:8px;
    margin-bottom:16px;
}
.logout-light-btn{
    width:100%;
    border:none;
    border-radius:18px;
    padding:16px 18px;
    background:linear-gradient(135deg, #b000f9, #c2188b);
    color:#fff;
    font-weight:900;
    font-size:.98rem;
    box-shadow:0 16px 30px rgba(15,23,42,.18);
}

.toast-wrap{
    position:fixed;
    left:50%;
    bottom:92px;
    transform:translateX(-50%);
    width:min(92vw,420px);
    display:grid;
    gap:10px;
    z-index:80;
    pointer-events:none;
}
.toast{
    padding:14px 16px;
    border-radius:16px;
    color:#fff;
    font-size:.88rem;
    font-weight:800;
    box-shadow:0 16px 32px rgba(15,23,42,.24);
    transform:translateY(0);
    opacity:1;
    transition:all .24s ease;
    text-align:center;
}
.toast.info{background:#0f172a;}
.toast.success{background:linear-gradient(135deg,#16a34a,#15803d);}
.toast.error{background:linear-gradient(135deg,#dc2626,#b91c1c);}

.fd-modal{
    position:fixed;
    inset:0;
    z-index:1200;
}
.fd-modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(8,18,38,.48);
    backdrop-filter:blur(4px);
}
.fd-modal-dialog{
    position:relative;
    width:min(92vw,460px);
    margin:7vh auto 0;
    border-radius:28px;
    background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
    border:1px solid var(--fd-line);
    box-shadow:0 24px 48px rgba(15,23,42,.24);
    overflow:hidden;
}
.fd-modal-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    padding:18px 18px 12px;
}
.fd-modal-head small{
    display:block;
    color:var(--fd-blue-2);
    text-transform:uppercase;
    letter-spacing:.08em;
    font-size:.72rem;
    font-weight:900;
    margin-bottom:8px;
}
.fd-modal-head h3{
    margin:0;
    font-size:1.08rem;
}
.fd-modal-close{
    width:42px;
    height:42px;
    border:none;
    border-radius:14px;
    background:#eef5ff;
    color:var(--fd-blue-3);
    font-size:1.4rem;
    font-weight:900;
}
.fd-modal-body{
    padding:0 18px 16px;
}
.fd-form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}
.fd-field{
    display:grid;
    gap:8px;
}
.fd-field span{
    color:var(--fd-muted);
    font-size:.78rem;
    font-weight:800;
}
.fd-field input{
    width:100%;
    border:1px solid var(--fd-line);
    background:#fff;
    border-radius:16px;
    padding:13px 14px;
    color:var(--fd-text);
    font-size:.94rem;
    outline:none;
    box-shadow:inset 0 1px 2px rgba(17,39,84,.03);
}
.fd-field input:focus{
    border-color:#bfd4ff;
    box-shadow:0 0 0 4px rgba(37,99,235,.08);
}
.fd-form-note{
    margin-top:14px;
    padding:14px;
    border-radius:18px;
    background:#f7fbff;
    border:1px solid var(--fd-line-soft);
    color:var(--fd-muted);
    font-size:.84rem;
    line-height:1.5;
    font-weight:700;
}
.fd-modal-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    padding:0 18px 18px;
}

@media (max-width:420px){
    .page.page-light{
        padding-left:14px;
        padding-right:14px;
    }

    .profile-main-grid,
    .profile-identity-grid,
    .affiliate-kpi-grid{
        grid-template-columns:1fr;
    }

    .summary-grid,
    .referral-highlight-actions,
    .fd-form-grid,
    .fd-modal-actions{
        grid-template-columns:1fr 1fr;
    }

    .class-progress-wrap{
        grid-template-columns:48px 1fr 48px;
    }

    .class-medal-left,
    .class-medal-right{
        width:48px;
        height:48px;
        border-radius:16px;
    }

    .affiliate-tier-hero{
        flex-direction:column;
        align-items:flex-start;
    }

    .affiliate-tier-amount{
        min-width:0;
        text-align:left;
    }
}

@media (max-width:360px){
    .summary-grid,
    .referral-highlight-actions,
    .fd-form-grid,
    .fd-modal-actions{
        grid-template-columns:1fr;
    }

    .home-user-card,
    .promo-banner,
    .referral-user-item,
    .account-light-card,
    .stats-row-card{
        align-items:flex-start;
    }
}

.screen-loader{
    position:fixed;
    inset:0;
    display:flex;
    justify-content:center;
    align-items:center;
}

.screen-loader-inner{
    display:flex;
    flex-direction:column;   /* pone texto arriba y gif abajo */
    align-items:center;
    justify-content:center;
}

.screen-loader-text{
    display:block;
    width:100%;
    text-align:center;
    margin-bottom:14px;     /* separación del gif */
    color:#155dfc;
    font-size:16px;
    font-weight:800;
}

.screen-loader-logo{
    width:120px;
    height:auto;
}