:root{
    --profile-navy:#0a1a30;
    --profile-navy-soft:#102642;
    --profile-cyan:#10c4e3;
    --profile-cyan-dark:#0a7f96;
    --profile-gold:#f2b019;
    --profile-text:#0a1a30;
    --profile-muted:#62718a;
    --profile-border:rgba(10,26,48,.09);
    --profile-surface:#fff;
    --profile-soft:#f7f9fc;
    --profile-danger:#b42318;
}

.profile-settings-page{
    width:100%;
    max-width:1240px;
    margin:0 auto;
    padding:22px 28px 36px;
    color:var(--profile-text);
}

.profile-page-head,
.profile-tabs,
.profile-hero-main,
.profile-hero-meta,
.profile-actions,
.profile-card-head,
.profile-setting-row,
.profile-telegram-card,
.profile-save-bar,
.profile-result-head{
    display:flex;
    align-items:center;
}

.profile-page-head{justify-content:space-between;gap:16px;margin-bottom:18px}
.profile-page-head h1{margin:0;font:800 25px/1.15 "Sora","Manrope",sans-serif;letter-spacing:0}
.profile-page-head p{margin:5px 0 0;color:var(--profile-muted);font-size:13px;line-height:1.45}

.profile-tabs{gap:8px;flex-wrap:wrap;margin-bottom:18px}
.profile-tab{
    min-height:44px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 16px;
    border:1px solid var(--profile-border);
    border-radius:12px;
    background:var(--profile-surface);
    color:var(--profile-muted);
    font:700 13px/1 "Manrope",sans-serif;
    text-decoration:none;
}
.profile-tab[aria-current="page"]{background:var(--profile-navy);border-color:var(--profile-navy);color:#fff}

.profile-hero{
    overflow:hidden;
    border-radius:22px;
    padding:26px;
    color:#fff;
    background:radial-gradient(900px 320px at 12% -30%,rgba(16,196,227,.26),transparent 60%),linear-gradient(180deg,var(--profile-navy-soft),var(--profile-navy));
}
.profile-hero-main{gap:20px;flex-wrap:wrap}
.profile-avatar{
    flex:0 0 88px;
    width:88px;
    height:88px;
    border-radius:26px;
    display:grid;
    place-items:center;
    overflow:hidden;
    background:linear-gradient(135deg,#1170c4,#0a9fbb);
    color:#fff;
    font:800 28px/1 "Sora",sans-serif;
}
.profile-avatar img{width:100%;height:100%;object-fit:cover}
.profile-identity{min-width:0}
.profile-identity h2{margin:0;font:800 28px/1.15 "Sora","Manrope",sans-serif;letter-spacing:0;overflow-wrap:anywhere}
.profile-hero-meta{gap:10px;flex-wrap:wrap;margin-top:9px}
.profile-level-chip{
    min-height:30px;
    display:inline-flex;
    align-items:center;
    padding:0 13px;
    border:1px solid rgba(242,176,25,.34);
    border-radius:999px;
    background:rgba(242,176,25,.14);
    color:#ffd469;
    font-size:12px;
    font-weight:800;
}
.profile-journey{color:rgba(255,255,255,.64);font-size:12px;font-weight:700}
.profile-actions{gap:10px;margin-left:auto;flex-wrap:wrap}
.profile-action{
    min-height:44px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 18px;
    border:1px solid rgba(255,255,255,.2);
    border-radius:12px;
    background:rgba(255,255,255,.06);
    color:#fff;
    font:800 12px/1 "Manrope",sans-serif;
    text-decoration:none;
}
.profile-action.is-accent{border-color:rgba(16,196,227,.4);background:rgba(16,196,227,.18);color:#5fe6fb}
.profile-action:focus-visible,.profile-tab:focus-visible,.profile-button:focus-visible,.profile-settings-nav a:focus-visible,.profile-toggle input:focus-visible + span{outline:2px solid var(--profile-cyan);outline-offset:2px}

.profile-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:22px}
.profile-stat{
    min-width:0;
    padding:14px 18px;
    border:1px solid rgba(255,255,255,.1);
    border-radius:16px;
    background:rgba(255,255,255,.05);
}
.profile-stat.is-gold{border-color:rgba(242,176,25,.28);background:rgba(242,176,25,.1)}
.profile-stat span{display:block;color:rgba(255,255,255,.58);font-size:12px;font-weight:700;text-transform:uppercase}
.profile-stat.is-gold span{color:var(--profile-gold)}
.profile-stat strong{display:block;min-width:0;margin-top:4px;font:800 23px/1.15 "Sora",sans-serif;overflow-wrap:anywhere}

.profile-content-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:18px;margin-top:18px;align-items:start}
.profile-stack{display:grid;gap:16px}
.profile-card{
    min-width:0;
    padding:20px 22px;
    border:1px solid var(--profile-border);
    border-radius:20px;
    background:var(--profile-surface);
    box-shadow:0 10px 30px rgba(8,21,43,.05);
}
.profile-card-head{justify-content:space-between;gap:12px;margin-bottom:14px}
.profile-card h2,.profile-card h3{margin:0;font:800 16px/1.25 "Sora",sans-serif;letter-spacing:0}
.profile-card-kicker{color:#8493a8;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.profile-card-copy{margin:6px 0 0;color:var(--profile-muted);font-size:12px;line-height:1.55}
.profile-card-link{min-height:44px;display:inline-flex;align-items:center;color:var(--profile-cyan-dark);font-size:12px;font-weight:800;text-decoration:none}

.profile-metric-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.profile-metric{min-width:0;padding:14px;border:1px solid var(--profile-border);border-radius:15px;background:var(--profile-soft)}
.profile-metric span{display:block;color:var(--profile-muted);font-size:12px}
.profile-metric strong{display:block;margin-top:6px;font:800 18px/1.2 "Sora",sans-serif;overflow-wrap:anywhere}

.profile-results{display:grid;gap:10px}
.profile-result{padding:14px 16px;border:1px solid var(--profile-border);border-radius:16px;background:var(--profile-soft)}
.profile-result-head{align-items:flex-start;justify-content:space-between;gap:12px}
.profile-result strong{font-size:13px;line-height:1.35;overflow-wrap:anywhere}
.profile-result p{margin:5px 0 0;color:var(--profile-muted);font-size:12px;line-height:1.45}
.profile-result-status{flex:0 0 auto;color:var(--profile-cyan-dark);font-size:12px;font-weight:800}
.profile-result-status.is-wrong{color:var(--profile-danger)}

.profile-account-list{display:grid;gap:0}
.profile-account-row{display:grid;gap:4px;padding:13px 0;border-top:1px solid var(--profile-border)}
.profile-account-row:first-child{border-top:0;padding-top:0}
.profile-account-row span{color:var(--profile-muted);font-size:12px}
.profile-account-row strong{font-size:13px;line-height:1.4;overflow-wrap:anywhere}
.profile-status-chip{min-height:28px;width:max-content;max-width:100%;display:inline-flex;align-items:center;padding:0 10px;border-radius:999px;background:#e7f7f3;color:#15735c;font-size:12px;font-weight:800}
.profile-status-chip.is-muted{background:#edf0f5;color:var(--profile-muted)}

.profile-settings-grid{display:grid;grid-template-columns:230px minmax(0,1fr);gap:18px;align-items:start}
.profile-settings-nav{display:grid;gap:3px;padding:8px;border:1px solid var(--profile-border);border-radius:20px;background:#fff;box-shadow:0 10px 30px rgba(8,21,43,.05)}
.profile-settings-nav a{
    min-height:46px;
    display:flex;
    align-items:center;
    padding:0 14px;
    border-radius:12px;
    color:var(--profile-muted);
    font-size:13px;
    font-weight:700;
    text-decoration:none;
}
.profile-settings-nav a[aria-current="page"]{background:#f1f4f9;color:var(--profile-text);font-weight:800}
.profile-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.profile-field{display:grid;gap:7px}
.profile-field span{color:var(--profile-muted);font-size:12px;font-weight:700}
.profile-field output{min-height:46px;display:flex;align-items:center;padding:0 14px;border:1px solid rgba(10,26,48,.1);border-radius:12px;background:var(--profile-soft);font-size:13px;font-weight:700;overflow-wrap:anywhere}

.profile-setting-list{display:grid}
.profile-setting-row{min-height:66px;gap:14px;border-top:1px solid var(--profile-border)}
.profile-setting-row:first-child{border-top:0}
.profile-setting-copy{min-width:0}
.profile-setting-copy strong{display:block;font-size:13px}
.profile-setting-copy span{display:block;margin-top:3px;color:var(--profile-muted);font-size:12px;line-height:1.4}
.profile-toggle{position:relative;margin-left:auto;flex:0 0 52px;width:52px;height:44px;display:grid;place-items:center;cursor:pointer}
.profile-toggle input{position:absolute;opacity:0;pointer-events:none}
.profile-toggle span{position:relative;width:52px;height:30px;border-radius:999px;background:#e2e7ef;transition:background .18s ease}
.profile-toggle span::after{content:"";position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(10,26,48,.2);transition:transform .18s ease}
.profile-toggle input:checked + span{background:var(--profile-cyan)}
.profile-toggle input:checked + span::after{transform:translateX(22px)}
.profile-toggle input:disabled + span{opacity:.55}
.profile-save-bar{justify-content:flex-end;gap:10px;margin-top:18px}
.profile-button{
    min-height:46px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 20px;
    border:1px solid var(--profile-navy);
    border-radius:12px;
    background:var(--profile-navy);
    color:#fff;
    font:800 13px/1 "Manrope",sans-serif;
    cursor:pointer;
    text-decoration:none;
}
.profile-button.is-secondary{border-color:var(--profile-border);background:#fff;color:var(--profile-text)}
.profile-button:disabled{opacity:.55;cursor:not-allowed}
.profile-save-state{min-height:20px;margin:10px 0 0;color:var(--profile-muted);font-size:12px;text-align:right}
.profile-save-state.is-success{color:#15735c}.profile-save-state.is-error{color:var(--profile-danger)}
.profile-field input,.profile-field textarea{
    width:100%;
    border:1px solid rgba(10,26,48,.14);
    border-radius:12px;
    color:var(--profile-text);
    background:#fff;
    font:700 13px/1.5 "Manrope",sans-serif;
}
.profile-field input{min-height:46px;padding:0 14px}
.profile-field textarea{min-height:132px;padding:12px 14px;resize:vertical}
.profile-field input:focus-visible,.profile-field textarea:focus-visible{outline:2px solid var(--profile-cyan);outline-offset:2px}

.referral-hero{
    margin-bottom:18px;
    padding:28px;
    border-radius:22px;
    color:#fff;
    background:var(--profile-navy);
}
.referral-hero-copy span{color:#7ae8f8;font-size:12px;font-weight:800}
.referral-hero-copy h2{margin:6px 0 0;font:800 36px/1.1 "Sora",sans-serif;overflow-wrap:anywhere}
.referral-hero-copy p{max-width:760px;margin:12px 0 0;color:#d9e2ec;font-size:13px;line-height:1.6}
.referral-link{margin-top:20px;display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px}
.referral-link output{min-height:52px;padding:0 14px;display:flex;align-items:center;overflow:hidden;border:1px solid rgba(255,255,255,.12);border-radius:12px;color:#fff;background:rgba(255,255,255,.07);font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.referral-link .profile-button{min-height:52px;border-color:#fff;color:var(--profile-navy);background:#fff}
.referral-link .profile-button.is-secondary{border-color:rgba(255,255,255,.2);color:#fff;background:rgba(255,255,255,.07)}
.referral-stats{margin-top:18px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.referral-stats .profile-stat{border-color:rgba(255,255,255,.13);background:rgba(255,255,255,.08)}
.referral-stats .profile-stat span{color:#ccd7e4}.referral-stats .profile-stat strong{color:#fff}
.referral-stats .profile-stat.is-gold strong{color:#f5d979}
.referral-list,.support-thread-list{display:grid}
.referral-row{min-height:76px;padding:14px 0;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(90px,auto);align-items:center;gap:14px;border-top:1px solid var(--profile-border)}
.referral-row:first-child{border-top:0}
.referral-row div{min-width:0}.referral-row div strong,.referral-row div span{display:block;overflow-wrap:anywhere}
.referral-row div strong{font-size:13.5px}.referral-row div span{margin-top:4px;color:var(--profile-muted);font-size:12px;line-height:1.45}
.referral-reward{justify-self:end;color:#15735c;font:800 13px "Sora",sans-serif;white-space:nowrap}

.support-form-card form{display:grid;gap:14px;margin-top:18px}
.support-thread-card{padding:16px 0;border-top:1px solid var(--profile-border)}
.support-thread-card:first-child{border-top:0}
.support-thread-card.is-answered{margin:8px 0;padding:16px;border:0;border-radius:14px;background:#f9fdfa;box-shadow:inset 3px 0 #17a34a}
.support-thread-card header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.support-thread-card header div{min-width:0}.support-thread-card header strong,.support-thread-card header time{display:block;overflow-wrap:anywhere}
.support-thread-card header strong{font-size:13.5px}.support-thread-card header time{margin-top:4px;color:var(--profile-muted);font-size:12px}
.support-thread-card > p{margin:12px 0 0;display:-webkit-box;overflow:hidden;color:var(--profile-text);font-size:13px;line-height:1.55;overflow-wrap:anywhere;-webkit-box-orient:vertical;-webkit-line-clamp:6}
.support-reply{margin-top:14px;padding:14px;border:1px solid var(--profile-border);border-radius:12px;background:#fff}
.support-reply strong{color:#0a7f96;font-size:12px}.support-reply p{margin:6px 0 0;font-size:13px;line-height:1.55;overflow-wrap:anywhere}

.profile-telegram-card{gap:14px;padding:14px 16px;border-radius:16px;background:var(--profile-soft)}
.profile-telegram-icon{flex:0 0 40px;width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:#17212b;color:#6ab3f3;font-size:18px}
.profile-telegram-copy{min-width:0}.profile-telegram-copy strong{display:block;font-size:13px;overflow-wrap:anywhere}.profile-telegram-copy span{display:block;margin-top:3px;color:var(--profile-muted);font-size:12px;line-height:1.4}
.profile-telegram-card .profile-button{margin-left:auto}

.profile-empty,.profile-error{
    padding:24px;
    border:1px solid var(--profile-border);
    border-radius:20px;
    background:#fff;
    text-align:center;
}
.profile-empty h2,.profile-error h2{margin:0;font:800 18px/1.25 "Sora",sans-serif}
.profile-empty p,.profile-error p{max-width:540px;margin:8px auto 16px;color:var(--profile-muted);font-size:13px;line-height:1.55}
.profile-error h2{color:var(--profile-danger)}
.profile-error .profile-button{display:inline-flex;margin:4px;vertical-align:middle}

.awardix-hero{
    display:grid;
    grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);
    gap:24px;
    margin-bottom:18px;
    padding:28px;
    border-radius:24px;
    background:
        radial-gradient(circle at 12% 10%,rgba(212,175,55,.28),transparent 36%),
        var(--profile-navy);
    color:#fff;
    box-shadow:0 18px 44px rgba(10,26,48,.16);
}
.awardix-balance-copy{min-width:0}
.awardix-kicker{display:block;margin-bottom:8px;color:#f5d979;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.awardix-balance-value{display:flex;align-items:center;gap:12px}
.awardix-balance-value img{width:44px;height:44px;object-fit:contain}
.awardix-balance-value h2{margin:0;font:800 42px/1.1 "Sora",sans-serif;overflow-wrap:anywhere}
.awardix-balance-value small{font-size:16px}
.awardix-balance-copy p{max-width:650px;margin:16px 0 0;color:#d9e2ec;font-size:13px;line-height:1.6}
.awardix-stat-grid{display:grid;grid-template-columns:1fr;gap:10px}
.awardix-stat-grid .profile-stat{border-color:rgba(255,255,255,.13);background:rgba(255,255,255,.08)}
.awardix-stat-grid .profile-stat span{color:#ccd7e4}
.awardix-stat-grid .profile-stat strong{color:#fff;font-size:18px}
.awardix-stat-grid .profile-stat.is-gold strong{color:#f5d979}
.awardix-history{overflow:hidden}
.awardix-count{color:var(--profile-muted);font-size:12px;font-weight:800}
.awardix-transaction-list{display:grid}
.awardix-transaction{
    display:grid;
    grid-template-columns:150px minmax(0,1fr) minmax(150px,auto);
    align-items:center;
    gap:18px;
    min-height:76px;
    padding:14px 0;
    border-top:1px solid var(--profile-border);
}
.awardix-transaction:first-child{border-top:0}
.awardix-transaction time{color:var(--profile-muted);font-size:12px;line-height:1.45}
.awardix-transaction-copy{min-width:0}
.awardix-transaction-copy strong,.awardix-transaction-copy span{display:block;overflow-wrap:anywhere}
.awardix-transaction-copy strong{font-size:13px}
.awardix-transaction-copy span{margin-top:4px;color:var(--profile-muted);font-size:12px;line-height:1.5}
.awardix-amount{justify-self:end;font:800 14px/1.35 "Sora",sans-serif;white-space:nowrap}
.awardix-amount.is-positive{color:#15735c}
.awardix-amount.is-negative{color:var(--profile-danger)}
.awardix-empty{border:0;background:var(--profile-soft)}
.awardix-empty .profile-button{display:inline-flex}

.profile-loading{display:grid;gap:18px}
.profile-skeleton{position:relative;overflow:hidden;border-radius:20px;background:#e5eaf1}
.profile-skeleton::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.65),transparent);animation:profile-shimmer 1.3s infinite}
.profile-skeleton.is-hero{height:230px}.profile-skeleton.is-panel{height:360px}.profile-skeleton.is-rail{height:280px}
@keyframes profile-shimmer{to{transform:translateX(100%)}}

@media(max-width:900px){
    .profile-content-grid{grid-template-columns:1fr}
    .profile-settings-grid{grid-template-columns:1fr}
    .profile-settings-nav{display:flex;overflow-x:auto;scrollbar-width:none}
    .profile-settings-nav::-webkit-scrollbar{display:none}
    .profile-settings-nav a{flex:0 0 auto}
    .awardix-hero{grid-template-columns:1fr}
}

@media(max-width:760px){
    .profile-settings-page{padding:14px 12px calc(92px + env(safe-area-inset-bottom))}
    .profile-page-head{align-items:flex-start}
    .profile-page-head h1{font-size:22px}
    .profile-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
    .profile-tabs::-webkit-scrollbar{display:none}
    .profile-tab{flex:0 0 auto}
    .profile-hero{padding:16px}
    .profile-hero-main{align-items:flex-start}
    .profile-avatar{flex-basis:64px;width:64px;height:64px;border-radius:20px;font-size:22px}
    .profile-identity{flex:1 1 calc(100% - 92px)}
    .profile-identity h2{font-size:22px}
    .profile-actions{width:100%;margin-left:0}
    .profile-action{flex:1 1 140px}
    .profile-stat-grid{grid-template-columns:1fr 1fr}
    .profile-stat{padding:12px}
    .profile-stat strong{font-size:20px}
    .profile-metric-grid,.profile-field-grid{grid-template-columns:1fr}
    .profile-card{padding:16px}
    .profile-telegram-card{align-items:flex-start;flex-wrap:wrap}
    .profile-telegram-copy{flex:1 1 calc(100% - 54px)}
    .profile-telegram-card .profile-button{width:100%;margin-left:0}
    .profile-save-bar{align-items:stretch;flex-direction:column-reverse}
    .profile-save-bar .profile-button{width:100%}
    .profile-save-state{text-align:left}
    .awardix-hero{padding:16px}
    .awardix-balance-value h2{font-size:30px}
    .awardix-transaction{grid-template-columns:1fr auto;gap:8px 12px}
    .awardix-transaction time{grid-column:1/-1}
    .awardix-amount{align-self:start}
    .referral-hero{padding:16px}
    .referral-hero-copy h2{font-size:28px}
    .referral-link{grid-template-columns:1fr}
    .referral-link .profile-button{width:100%}
    .referral-stats{grid-template-columns:1fr}
    .referral-row{grid-template-columns:minmax(0,1fr) auto}
    .referral-reward{grid-column:1/-1;justify-self:start}
    .support-thread-card header{flex-wrap:wrap}
}

body.aq2-telegram .profile-settings-page{
    padding-top:max(14px,var(--awardiqs-tg-strip-gap,14px));
    padding-bottom:calc(126px + env(safe-area-inset-bottom));
}
body.aq2-telegram .profile-page-head{display:none}
body.aq2-telegram .profile-tabs{margin-top:4px}

@media(prefers-reduced-motion:reduce){
    .profile-skeleton::after{animation:none}
    .profile-toggle span,.profile-toggle span::after{transition:none}
}
