/* =================================================================== */
/* ===     BLACK & ORANGE PROFILE — COMPACT BENTO EDITION (FIXED)   === */
/* ===     Использует переменные из global.css                      === */
/* =================================================================== */

/* Локальные размеры/шрифт, которых нет в global */
.profile-layout,
#profile-view {
    --p-mono: 'JetBrains Mono', 'Monaco', 'Consolas', monospace;
    --p-gap: 14px;
}

/* ===== АНИМАЦИИ ===== */
@keyframes p-fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes p-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes p-pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ===== КОНТЕЙНЕР ===== */
#profile-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px;
    background: var(--bg-main);
    scroll-behavior: smooth;
}

#profile-view::-webkit-scrollbar { width: 6px; }
#profile-view::-webkit-scrollbar-track { background: transparent; }
#profile-view::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb), 0.3);
    border-radius: 10px;
}
#profile-view::-webkit-scrollbar-thumb:hover { background: rgba(var(--primary-rgb), 0.5); }

/* Универсальный кастомный скроллбар */
.custom-scrollbar::-webkit-scrollbar { width: 5px; }
.custom-scrollbar::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 8px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(var(--primary-rgb), 0.35); border-radius: 8px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(var(--primary-rgb), 0.6); }

.profile-layout {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--p-gap);
    padding-bottom: 40px;
}

/* Каскадное появление секций */
.profile-layout > * { animation: p-fadeIn 0.45s ease-out backwards; }
.profile-layout > *:nth-child(1) { animation-delay: 0.02s; }
.profile-layout > *:nth-child(2) { animation-delay: 0.08s; }
.profile-layout > *:nth-child(3) { animation-delay: 0.14s; }
.profile-layout > *:nth-child(4) { animation-delay: 0.20s; }
.profile-layout > *:nth-child(5) { animation-delay: 0.26s; }
.profile-layout > *:nth-child(6) { animation-delay: 0.32s; }
.profile-layout > *:nth-child(7) { animation-delay: 0.38s; }

/* ===== БАЗОВАЯ КАРТОЧКА ===== */
.bento-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    position: relative;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    min-width: 0;
}

.bento-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.bento-title {
    font-size: 0.7rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 800;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bento-title::before {
    content: '';
    width: 3px;
    height: 12px;
    background: var(--primary);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--primary-glow);
    flex-shrink: 0;
}

/* ===== ГЛАВНАЯ КАРТОЧКА ЮЗЕРА ===== */
.user-main-card {
    padding: 22px;
}

/* PRO версия — золотой акцент */
.user-main-card.is-vip {
    background:
        linear-gradient(135deg, rgba(var(--primary-rgb), 0.08) 0%, transparent 60%),
        linear-gradient(180deg, #1a1206 0%, var(--bg-main) 100%) !important;
    border: 1px solid rgba(var(--primary-rgb), 0.35) !important;
    box-shadow:
        0 12px 32px -8px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(var(--primary-rgb), 0.15) !important;
    overflow: hidden;
}

.vip-bg-decor {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(var(--primary-rgb), 0.08) 1px, transparent 1.5px),
        radial-gradient(circle, rgba(var(--primary-rgb), 0.05) 1px, transparent 1.5px);
    background-size: 12px 12px;
    background-position: 0 0, 6px 6px;
    opacity: 0.6;
    mask-image: radial-gradient(ellipse at top right, rgba(0,0,0,1) 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at top right, rgba(0,0,0,1) 0%, transparent 70%);
}

.user-main-card.is-vip::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        110deg, transparent 30%,
        rgba(var(--primary-rgb), 0.06) 50%,
        transparent 70%
    );
    background-size: 200% 100%;
    animation: p-shimmer 6s linear infinite;
    pointer-events: none;
}

.user-main-card.is-vip .user-header-wrap,
.user-main-card.is-vip .progress-box,
.user-main-card.is-vip .shop-badges-wrapper {
    position: relative;
    z-index: 2;
}

/* ===== ШАПКА: АВАТАР + ИНФО ===== */
.user-header-wrap {
    display: flex;
    gap: 18px;
    align-items: center;
    width: 100%;
}

.user-info-wrap {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    min-width: 0;
}

/* Аватар */
.avatar-container {
    width: 80px;
    height: 80px;
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-main);
    transition: var(--transition);
}

.avatar-img.vip-glow {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.avatar-container:hover .avatar-img { transform: scale(1.03); }

.avatar-edit-btn {
    position: absolute;
    bottom: -2px; right: -2px;
    background: var(--primary);
    border: 2px solid var(--bg-main);
    border-radius: 50%;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    z-index: 3;
    transition: var(--transition);
    color: var(--bg-main);
}
.avatar-edit-btn svg { width: 14px; height: 14px; fill: currentColor; }
.avatar-container:hover .avatar-edit-btn {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Строка имени + действий */
.user-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.user-name-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.user-name-line h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: -0.5px;
    line-height: 1.2;
    word-break: break-word;
}

/* Бейджи LVL и PRO */
.badge-lvl, .badge-pro {
    font-weight: 800;
    text-transform: uppercase;
    height: 22px;
    padding: 0 9px;
    border-radius: 6px;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.badge-lvl {
    background: var(--primary);
    color: var(--bg-main);
    box-shadow: 0 2px 8px var(--primary-glow);
}
.badge-pro {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb), 0.4);
}

/* Мета-инфо */
.user-meta-line { margin-top: 2px; }
.meta-id-date {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: var(--p-mono);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== БЕЙДЖИ ДОСТИЖЕНИЙ ===== */
.profile-badges-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.user-badge-tag {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    transition: var(--transition);
    line-height: 1.3;
}
.user-badge-tag:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
}

.badge-gray { background: rgba(75, 85, 99, 0.25); color: #d4d4d8; }
.badge-green { background: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.3); color: #86efac; }
.badge-blue { background: rgba(var(--primary-rgb), 0.1); border-color: rgba(var(--primary-rgb), 0.3); color: #fde68a; }
.badge-cyan { background: rgba(var(--primary-rgb), 0.08); border-color: rgba(var(--primary-rgb), 0.25); color: #fcd34d; }
.badge-purple { background: rgba(168, 85, 247, 0.15); border-color: rgba(168, 85, 247, 0.3); color: #e9d5ff; }
.badge-pink { background: rgba(236, 72, 153, 0.15); border-color: rgba(236, 72, 153, 0.3); color: #fbcfe8; }
.badge-red { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.3); color: #fecaca; }
.badge-gold {
    background: rgba(var(--gold-rgb), 0.15);
    border-color: rgba(var(--gold-rgb), 0.5);
    color: var(--gold);
}
.badge-rainbow {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.3), rgba(239, 68, 68, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* ===== ПРАВЫЙ ВЕРХ: ТГ + КОЛОКОЛЬЧИК ===== */
.top-right-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tg-wrap { display: flex; align-items: center; gap: 6px; }

.tg-channel-btn {
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(var(--primary-rgb), 0.3) !important;
    color: var(--primary);
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}
.tg-channel-btn:hover {
    background: rgba(var(--primary-rgb), 0.1) !important;
    border-color: var(--primary) !important;
    transform: translateY(-1px);
}
.tg-channel-btn.empty {
    border-style: dashed !important;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.3) !important;
}

.edit-tg-btn {
    cursor: pointer;
    color: var(--primary);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}
.edit-tg-btn svg { width: 14px; height: 14px; fill: currentColor; }
.edit-tg-btn:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: rgba(var(--primary-rgb), 0.4);
}

.bell-btn {
    background: var(--button-sm);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    width: 36px; height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
    position: relative;
    top: auto;
    right: auto;
}
.bell-btn svg { width: 18px; height: 18px; fill: currentColor; }
.bell-btn:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
}

/* ===== ЗНАЧКИ ИЗ МАГАЗИНА ===== */
.shop-badges-wrapper {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    width: 100%;
}
.shop-badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.shop-badge-item {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
}
.shop-badge-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.shop-badge-item:hover { transform: scale(1.12) translateY(-3px); }

/* ===== ПРОГРЕСС-БАР XP ===== */
.progress-box {
    background: var(--progress-bar);
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
    z-index: 2;
    margin-top: 16px;
}
.progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.68rem;
    margin-bottom: 7px;
}
.progress-labels .lbl {
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.progress-labels .val {
    color: var(--text-main);
    font-family: var(--p-mono);
    font-weight: bold;
    font-size: 0.7rem;
    white-space: nowrap;
}
.progress-track {
    height: 6px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    transition: width 0.8s ease;
    box-shadow: 0 0 10px var(--primary-glow);
    border-radius: 3px;
}

/* ===== СЕТКА КНОПОК ДЕЙСТВИЙ ===== */
.profile-row-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.action-btn {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-main);
    position: relative;
    overflow: hidden;
    min-height: 120px;
}

.action-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition);
}

.action-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--primary-rgb), 0.3);
    box-shadow: 0 8px 20px -8px rgba(var(--primary-rgb), 0.15);
}
.action-btn:hover::before { opacity: 1; }

.action-btn > * { position: relative; z-index: 1; }

.action-btn .tit {
    font-weight: 800;
    font-size: 0.8rem;
    margin-bottom: 2px;
}
.action-btn .dsc {
    font-size: 0.62rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-btn .ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
    transition: var(--transition);
    flex-shrink: 0;
}
.action-btn .ico svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 2px 6px currentColor);
}

.action-btn:hover .ico {
    transform: scale(1.1);
    background: rgba(var(--primary-rgb), 0.18);
    border-color: rgba(var(--primary-rgb), 0.4);
}

/* Заблокированная кнопка */
.action-btn.locked:hover { transform: none; box-shadow: none; border-color: var(--border-color); }
.action-btn.locked:hover::before { opacity: 0; }
.action-btn.locked:hover .ico { transform: none; }

/* Главная кнопка баланса */
.btn-balance {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), rgba(20, 20, 20, 0.8));
    border-color: rgba(var(--primary-rgb), 0.3);
}

/* Account Center — current Workshop AI profile shell. Legacy selectors above remain
   temporarily for dialogs that have not yet been migrated into their profile panes. */
#profile-view {
    padding: clamp(12px, 2vw, 28px);
    background: var(--app-canvas-background);
    background-size: var(--app-canvas-size);
}

.profile-hub {
    display: grid;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    grid-template-columns: minmax(0, 1fr);
}

.workshop-glass-panel,
.profile-section-stage {
    border: 1px solid color-mix(in srgb, var(--border-color) 70%, var(--primary) 30%);
    border-radius: var(--radius-panel);
    background: color-mix(in srgb, var(--glass-bg) 94%, transparent);
    box-shadow: var(--shadow-panel);
    backdrop-filter: blur(18px);
}
.profile-avatar-control { position: relative; display: block; width: 108px; height: 108px; margin: 0; padding: 0; border: 1px solid rgba(var(--primary-rgb), .5); border-radius: 50%; background: transparent; cursor: pointer; }
.profile-avatar-control img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.profile-avatar-control span { position: absolute; right: 1px; bottom: 1px; display: grid; width: 32px; height: 32px; border: 3px solid var(--bg-main); border-radius: 50%; place-items: center; background: var(--primary); color: var(--text-on-accent); font-size: .8rem; }
.profile-identity-copy { min-width: 0; padding-right: 38px; }
.profile-overview-identity.has-admin-actions .profile-identity-copy { padding-right: 92px; }
.profile-avatar-control:focus-visible,
.profile-section-nav button:focus-visible,
.profile-primary-action:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.profile-kicker { color: var(--primary); font-family: 'Bowler', var(--font-family); font-size: .68rem; letter-spacing: .12em; }
.profile-identity-copy h1,
.profile-workspace-heading h2,
.profile-pane-heading h3,
.profile-achievement-wall h2 { margin: 5px 0 0; font-family: 'Bowler', var(--font-family); line-height: 1.05; }
.profile-identity-copy h1 { overflow-wrap: break-word; font-size: clamp(1.25rem, 2vw, 1.72rem); }
.profile-level-line { display: flex; margin-top: 9px; gap: 7px; flex-wrap: wrap; }
.profile-level-line > * { padding: 6px 9px; border: 1px solid var(--border-color); border-radius: var(--radius-control); background: var(--surface-control); color: var(--text-secondary); font-size: .72rem; }
.profile-level-line b { color: var(--text-main); }
.profile-channel-actions { position: absolute; top: 16px; right: 16px; display: flex; margin: 0; gap: 8px; align-items: center; }
.profile-channel-actions button,
.profile-logout,
.profile-legal-link { display: flex; min-height: 46px; padding: 0 15px; gap: 10px; align-items: center; justify-content: center; border: 1px solid var(--border-color); border-radius: var(--radius-control); background: var(--surface-control); color: var(--text-main); cursor: pointer; text-align: center; text-decoration: none; }
.profile-channel-actions button { width: 44px; min-height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
.profile-channel-actions button { background: var(--surface-control); color: var(--text-secondary); }
.profile-channel-actions button:hover { border-color: rgba(var(--primary-rgb), .35); background: var(--surface-control-hover); color: var(--text-main); }
.profile-channel-actions button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.profile-channel-actions #profile-assistant-toggle { border-color: rgba(var(--primary-rgb), .4); }
.profile-channel-actions #profile-assistant-toggle img { width: 26px; height: 26px; object-fit: contain; filter: grayscale(1); opacity: .55; }
.profile-channel-actions #profile-assistant-toggle.is-enabled { background: rgba(var(--primary-rgb), .12); box-shadow: 0 0 14px rgba(var(--primary-rgb), .12); }
.profile-channel-actions #profile-assistant-toggle.is-enabled img { filter: none; opacity: 1; }
@media (max-width: 850px) {
    #profile-view .profile-channel-actions { position: static; grid-column: 1 / -1; justify-content: flex-end; gap: 8px; }
    #profile-view .profile-overview-identity.has-admin-actions .profile-identity-copy { padding-right: 24px; }
}
.profile-achievement-wall { position:relative; min-height:190px; padding:22px; overflow:hidden; border:1px solid rgba(var(--primary-rgb),.35); border-radius:var(--radius-panel); background:linear-gradient(90deg,rgba(5,5,5,.82),rgba(5,5,5,.34)),url('../../../img/profile/achievement-wall.webp') center/cover; box-shadow:var(--shadow-panel); }
.profile-achievement-wall header { position:relative; z-index:1; display:flex; gap:16px; align-items:center; justify-content:space-between; }
.profile-achievement-wall h2 { font-size: 1.25rem; }
.profile-achievement-wall header .profile-secondary-action span { display:inline-grid; min-width:20px; height:20px; margin-left:5px; place-items:center; border-radius:99px; background:rgba(var(--primary-rgb),.15); color:var(--primary); font-size:.66rem; }
.profile-achievement-grid { position:relative; z-index:1; display:flex; min-height:96px; margin-top:12px; padding:4px 12px 4px 0; gap:4px; align-items:center; overflow-x:auto; overflow-y:hidden; scrollbar-width:thin; scrollbar-color:rgba(var(--primary-rgb),.35) transparent; }
.profile-achievement-grid > img { width:76px; height:86px; flex:0 0 76px; object-fit:contain; filter:drop-shadow(0 10px 10px rgba(0,0,0,.65)); }
.profile-achievement-empty { display: grid; min-height: 155px; grid-column: 1 / -1; place-content: center; justify-items: center; color: var(--text-secondary); text-align: center; }
.profile-achievement-empty i { margin-bottom: 12px; color: var(--primary); font-size: 2rem; }
.profile-achievement-empty span { margin-top: 5px; font-size: .75rem; }
.profile-logout,
.profile-legal-link { color: var(--text-secondary); }
.profile-workspace { display:grid; width:100%; height:100%; min-width:0; min-height:0; align-items:stretch; grid-template-columns:72px minmax(0,1fr); overflow:hidden; }
.profile-hub,
.profile-workspace,
.profile-pane { background: transparent !important; box-shadow: none !important; }
.profile-section-nav { height:100%; min-height:0; margin:0; overflow-y:auto; scrollbar-width:none; }
.profile-section-nav::-webkit-scrollbar { display:none; }
.profile-section-nav .profile-account-nav-button { display:grid; }

.profile-section-stage { min-width:0; min-height:0; padding:18px; overflow-y:auto; border:0; border-radius:0; background:transparent !important; box-shadow:none !important; }
.profile-pane { display: none; }
.profile-pane.is-active { display: block; animation: p-fadeIn var(--motion-normal); }
.profile-account-pane { min-height:0; }
.profile-overview { display:grid; gap:18px; }
.profile-overview-hero { display:grid; gap:18px; grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr); }
.profile-overview-identity { position:relative; display:grid; min-height:220px; padding:24px; gap:22px; align-items:center; grid-template-columns:108px minmax(0,1fr); }
.profile-overview-facts { display:grid; margin:18px 0 0; gap:1px; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:hidden; border:1px solid var(--border-color); border-radius:var(--radius-control); background:var(--border-color); }
.profile-overview-facts div { min-width:0; padding:10px 12px; background:var(--surface-control); }
.profile-overview-facts dt { color:var(--text-muted); font-size:.68rem; }
.profile-overview-facts dd { margin:4px 0 0; overflow:hidden; color:var(--text-main); font-size:.8rem; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.profile-overview-progress { display:flex; min-height:220px; padding:24px; flex-direction:column; justify-content:space-between; background-color:#101010; background-image:linear-gradient(90deg,rgba(5,5,5,.78),rgba(5,5,5,.28)),url('../../../img/profile/level-progress.webp'); background-position:center; background-size:cover; background-repeat:no-repeat; }
.profile-overview-progress header { display:flex; gap:16px; align-items:flex-start; justify-content:space-between; }
.profile-overview-progress h2,.profile-overview-section h2,.profile-overview-summary-card h2,.profile-achievement-dialog h2 { margin:5px 0 0; font-family:'Bowler',var(--font-family); line-height:1.08; }
.profile-overview-progress h2 { color:#fff; }
.profile-overview-progress .profile-kicker,
.profile-overview-progress header > strong { color:#ffbb45; }
.profile-overview-progress header > strong { font-family:'Bowler',var(--font-family); font-size:1.5rem; }
.profile-overview-progress dl { display:grid; margin:18px 0; gap:1px; grid-template-columns:repeat(3,minmax(0,1fr)); overflow:hidden; border:1px solid rgba(255,255,255,.16); border-radius:var(--radius-control); background:rgba(255,255,255,.16); }
.profile-overview-progress dl div { min-width:0; padding:10px; background:rgba(17,17,17,.82); }
.profile-overview-progress dt { color:rgba(255,255,255,.7); font-size:.62rem; line-height:1.3; }
.profile-overview-progress dd { margin:5px 0 0; color:#fff; font-size:.84rem; font-weight:700; }
.profile-overview-progress__bar { height:8px; overflow:hidden; border-radius:99px; background:rgba(255,255,255,.18); }
.profile-overview-progress__bar span { display:block; height:100%; border-radius:inherit; background:#ffbb45; box-shadow:0 0 16px rgba(255,187,69,.28); }
.profile-overview-quick-grid { display:grid; gap:18px; grid-template-columns:repeat(3,minmax(0,1fr)); }
.profile-overview-quick-grid > * { min-width:0; }
.profile-overview-quick-grid .profile-achievement-wall { display:flex; min-height:198px; flex-direction:column; }
.profile-overview-quick-grid > * > header { display:flex; gap:12px; align-items:flex-start; justify-content:space-between; }
.profile-overview-quick-grid > * > header > div { min-width:0; }
.profile-overview-quick-grid > * > header .profile-secondary-action { flex:0 0 auto; }
.profile-overview-quick-grid .profile-achievement-empty { min-height:96px; }
.profile-overview-summary-card { display:flex; min-height:198px; padding:22px; gap:14px; flex-direction:column; }
.profile-overview-summary-card:is(.is-balance,.is-subscription) { background-color:var(--bg-panel); background-position:center; background-size:cover; background-repeat:no-repeat; }
.profile-overview-summary-card:is(.is-balance,.is-subscription) h2,
.profile-overview-summary-card.is-subscription strong { color:#fff; }
.profile-overview-summary-card:is(.is-balance,.is-subscription) .profile-kicker,
.profile-overview-summary-card.is-balance strong { color:#ffbb45; }
.profile-overview-summary-card:is(.is-balance,.is-subscription) small { color:rgba(255,255,255,.75); }
.profile-overview-summary-card.is-balance { background-image:linear-gradient(90deg,rgba(5,5,5,.76),rgba(5,5,5,.12)),url('../../../img/profile/balance-coins.webp'); }
.profile-overview-summary-card.is-subscription { background-image:linear-gradient(90deg,rgba(5,5,5,.76),rgba(5,5,5,.12)),url('../../../img/profile/subscription-cards.webp'); }
.profile-overview-summary-card__details { display:grid; min-width:0; gap:4px; }
.profile-overview-summary-card h2 { font-size:1.05rem; }
.profile-overview-summary-card strong { margin-top:8px; color:var(--text-main); font-size:1rem; line-height:1.25; }
.profile-overview-summary-card.is-balance strong { font-family:'Bowler',var(--font-family); font-size:clamp(1.65rem,3vw,2.3rem); }
.profile-overview-summary-card small { font-size:.68rem; }
.profile-overview-section { padding:22px; }
.profile-overview-section > header { display:flex; margin-bottom:16px; gap:16px; align-items:center; justify-content:space-between; }
.profile-overview-section h2 { font-size:1.2rem; }
.profile-overview-activity-grid { display:grid; gap:18px; grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); }
.profile-overview-activity-grid > * { min-width:0; }
.profile-recent-grid { display:grid; gap:12px; grid-template-columns:repeat(4,minmax(0,1fr)); }
.profile-recent-work { position:relative; min-width:0; margin:0; overflow:hidden; border:1px solid var(--border-color); border-radius:var(--radius-control); background:var(--surface-control); aspect-ratio:1/1; }
.profile-recent-work img { display:block; width:100%; height:100%; object-fit:cover; }
.profile-recent-work figcaption { position:absolute; inset:auto 0 0; padding:28px 10px 9px; overflow:hidden; background:linear-gradient(transparent,rgba(0,0,0,.86)); color:#fff; font-size:.66rem; text-overflow:ellipsis; white-space:nowrap; }
.profile-overview-empty { display:grid; min-height:130px; grid-column:1/-1; place-content:center; justify-items:center; color:var(--text-secondary); text-align:center; }
.profile-overview-empty i { margin-bottom:10px; color:var(--primary); font-size:1.8rem; }
.profile-overview-empty span { margin-top:5px; font-size:.72rem; }
.profile-overview-transaction-list { display:grid; margin:0; padding:0; gap:0; list-style:none; }
.profile-overview-transaction-row { display:grid; min-width:0; min-height:52px; padding:8px 0; gap:12px; align-items:center; grid-template-columns:minmax(0,1fr) auto; border-top:1px solid var(--border-color); }
.profile-overview-transaction-row:first-child { border-top:0; }
.profile-overview-transaction-copy { display:grid; min-width:0; gap:4px; }
.profile-overview-transaction-copy strong { overflow:hidden; color:var(--text-main); font-size:.75rem; text-overflow:ellipsis; white-space:nowrap; }
.profile-overview-transaction-copy small { color:var(--text-muted); font-size:.63rem; line-height:1.3; }
.profile-overview-transaction-row b { font-size:.78rem; font-variant-numeric:tabular-nums; white-space:nowrap; }
.profile-overview-transaction-state { margin:18px 0; color:var(--text-muted); font-size:.75rem; }
@media (max-width: 1000px) { .profile-overview-activity-grid { grid-template-columns:1fr; } }
.profile-achievement-dialog { width:min(920px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); margin:auto; padding:0; border:0; border-radius:var(--radius-panel); background:transparent; color:var(--text-main); }
.profile-achievement-dialog::backdrop { background:rgba(0,0,0,.82); backdrop-filter:blur(8px); }
.profile-achievement-dialog__panel { display:grid; max-height:calc(100dvh - 32px); grid-template-rows:auto minmax(0,1fr); overflow:hidden; border:1px solid var(--border-color); border-radius:var(--radius-panel); background:var(--bg-panel); box-shadow:0 30px 100px rgba(0,0,0,.62); }
.profile-achievement-dialog__panel > header { display:flex; min-height:72px; padding:12px 14px 12px 22px; gap:16px; align-items:center; justify-content:space-between; border-bottom:1px solid var(--border-color); }
.profile-achievement-dialog__panel > header > button { display:grid; width:44px; height:44px; flex:0 0 44px; padding:0; place-items:center; border:1px solid var(--border-color); border-radius:var(--radius-control); background:var(--surface-control); color:var(--text-secondary); cursor:pointer; }
.profile-achievement-dialog__panel > header > button:is(:hover,:focus-visible) { border-color:var(--primary); color:var(--primary); }
.profile-achievement-collection { display:grid; min-height:0; padding:18px; gap:12px; grid-template-columns:repeat(2,minmax(0,1fr)); overflow-y:auto; }
.profile-achievement-collection-card { display:grid; min-width:0; min-height:132px; padding:16px; gap:16px; align-items:center; grid-template-columns:88px minmax(0,1fr); border:1px solid var(--border-color); border-radius:var(--radius-control); background:var(--surface-control); }
.profile-achievement-collection-card img { width:88px; height:96px; object-fit:contain; filter:drop-shadow(0 10px 12px rgba(0,0,0,.55)); }
.profile-achievement-collection-card h3 { margin:0 0 7px; font-family:'Bowler',var(--font-family); font-size:.88rem; }
.profile-achievement-collection-card p { margin:0; color:var(--text-secondary); font-size:.75rem; line-height:1.5; }
.profile-account-footer { position:relative; z-index:3; display:flex; min-height:54px; margin-top:10px; padding:0; gap:8px; align-items:center; justify-content:flex-end; border:0; background:transparent; }
.profile-account-footer :is(.profile-legal-link,.profile-logout) { min-height:38px; padding:0 13px; background:transparent; font-size:.72rem; }
.profile-pane-heading { display: flex; margin-bottom: 28px; gap: 24px; align-items: flex-end; justify-content: space-between; }
.profile-pane-heading h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
.profile-pane-heading p { max-width: 390px; margin: 0; color: var(--text-secondary); line-height: 1.55; }
.profile-pane[data-profile-pane="credits"] .profile-pane-heading > div > .profile-kicker { display:none; }
.profile-pane[data-profile-pane="transactions"] .profile-pane-heading > div > .profile-kicker { display:none; }
.profile-subscription-intro { display:grid; margin-bottom:22px; gap:14px; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; }
.profile-current-plan { display:grid; min-width:0; padding:16px; gap:16px; align-content:space-between; border:1px solid rgba(var(--primary-rgb),.42); border-radius:var(--radius-panel); background:linear-gradient(100deg,rgba(var(--primary-rgb),.13),rgba(var(--primary-rgb),.025)),var(--surface-control); box-shadow:var(--shadow-panel); }
.profile-current-plan__identity { display:grid; min-width:0; gap:4px; }
.profile-current-plan__identity span,
.profile-current-plan dt { color: var(--text-muted); font-size: .66rem; }
.profile-current-plan__identity strong { color:var(--text-main); font-family:'Bowler',var(--font-family); font-size:1rem; letter-spacing:.04em; overflow-wrap:anywhere; }
.profile-current-plan dl { display:grid; min-width:0; margin:0; gap:8px; grid-template-columns:repeat(2,minmax(0,1fr)); }
.profile-current-plan dl > div { display: grid; min-width: 0; padding: 7px 10px; gap: 2px; background: var(--surface-control); }
.profile-current-plan dd { margin:0; color:var(--text-main); font-size:.76rem; font-weight:750; overflow-wrap:anywhere; }
.profile-plan-grid { display: grid; gap: 14px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.profile-plan-card { position: relative; display: flex; min-height: 372px; padding: 22px; gap: 16px; flex-direction: column; overflow: visible; border: 1px solid var(--border-color); border-radius: var(--radius-panel); background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012)), var(--surface-control); box-shadow: var(--shadow-panel); cursor: pointer; transition: border-color var(--motion-fast), transform var(--motion-fast), background var(--motion-fast); }
.profile-plan-badge { position:absolute; top:-11px; right:14px; z-index:3; display:inline-flex; min-height: 22px; max-width: calc(100% - 28px); padding: 4px 9px; align-items:center; border: 1px solid var(--primary-hover); border-radius: 999px; background: var(--primary); color: var(--text-on-accent); box-shadow: 0 5px 14px rgba(0,0,0,.35); font-size: .58rem; font-weight: 800; letter-spacing: .04em; line-height:1; text-transform: uppercase; white-space:nowrap; }
.profile-plan-badge:empty { display: none; }
.profile-plan-badge.is-current { border-color: var(--gold); background: var(--gold-2); color: #17120a; }
.profile-plan-badge.is-popular { border-color: var(--violet-2); background: var(--violet); color: #fff; }
.profile-plan-badge.is-top { border-color: var(--diamond); background: color-mix(in srgb, var(--diamond) 68%, #073344); color: #fff; }
.profile-plan-badge.is-maximum { border-color: var(--rose); background: color-mix(in srgb, var(--rose) 72%, #5f0719); color: #fff; }
.profile-plan-badge.is-hit { border-color: var(--green); background: color-mix(in srgb, var(--green) 68%, #064e3b); color: #fff; }
.profile-plan-card:hover { border-color: rgba(var(--primary-rgb), .32); transform: translateY(-2px); }
.profile-plan-card:has(input:checked) { border-color: var(--primary); background: linear-gradient(180deg, rgba(var(--primary-rgb), .12), rgba(var(--primary-rgb), .025)), var(--surface-control); box-shadow: 0 0 0 1px rgba(var(--primary-rgb), .14), var(--shadow-panel); }
.profile-plan-card input { position: absolute; opacity: 0; pointer-events: none; }
.profile-plan-card__top { display: flex; gap: 5px; flex-direction: column; }
.profile-plan-name { font-family: 'Bowler', var(--font-family); color: var(--text-main); font-size: 1rem; letter-spacing: .04em; }
.profile-plan-card__top > small { min-height: 32px; color: var(--text-muted); font-size: .72rem; line-height: 1.35; }
.profile-plan-card__top > strong { margin-top: 12px; color: var(--text-main); font-size: clamp(1.55rem, 2vw, 2.05rem); line-height: 1; white-space: nowrap; }
.profile-token-mark { color:#38bdf8; font-size:.72em; }
.profile-plan-card__top > span:last-child { color: var(--text-muted); font-size: .68rem; }
.profile-plan-credit { display: grid; gap: 3px; padding: 12px 13px; border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border-color)); border-radius: var(--radius-control); background: color-mix(in srgb, var(--primary) 7%, var(--bg-main)); }
.profile-plan-credit b { color: var(--primary); font-size: 1.2rem; font-variant-numeric: tabular-nums; line-height: 1; }
.profile-plan-credit b::before { content:'⬡'; color:#38bdf8; font-size:.72em; margin-right:5px; }
.profile-plan-credit span { color: var(--text-secondary); font-size: .66rem; }
.profile-plan-card__divider { display: block; height: 1px; background: var(--border-color); }
.profile-plan-features { display: grid; gap: 12px; color: var(--text-secondary); font-size: .72rem; line-height: 1.35; }
.profile-plan-features > span { display: grid; gap: 8px; align-items: center; grid-template-columns: 18px minmax(0, 1fr); }
.profile-plan-features i { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--text-secondary); font-size: .55rem; }
.profile-plan-select { display: flex; min-height: 42px; margin-top: auto; padding: 0 14px; align-items: center; justify-content: space-between; border: 1px solid var(--border-color); border-radius: 999px; background: var(--bg-main); color: var(--text-main); font-size: .72rem; font-weight: 750; }
.profile-plan-card:has(input:checked) .profile-plan-select { border-color: var(--primary); background: var(--primary); color: var(--text-on-accent); }
.profile-plan-card:has(input:focus-visible) { box-shadow: var(--focus-ring), var(--shadow-panel); }
.profile-topup-card { position:relative; display:flex; min-width:0; min-height:372px; padding:18px; gap:10px; flex-direction:column; border:1px solid color-mix(in srgb,var(--primary) 42%,var(--border-color)); border-radius:var(--radius-panel); background:linear-gradient(180deg,rgba(var(--primary-rgb),.105),rgba(255,255,255,.012)),var(--surface-control); box-shadow:var(--shadow-panel); }
.profile-promo-card { display:grid; min-width:0; grid-template-columns:minmax(0,1fr) auto; align-content:space-between; align-items:end; gap:12px; margin:0; padding:16px; border:1px solid var(--border-color); border-radius:var(--radius-panel); background:var(--surface-control); }
.profile-promo-card > div { grid-column:1/-1; }
.profile-promo-card h3 { margin:4px 0; color:var(--text-main); font-family:'Bowler',var(--font-family); font-size:.95rem; }
.profile-promo-card p { margin:0; color:var(--text-secondary); font-size:.74rem; line-height:1.45; }
.profile-promo-card .profile-field { margin:0; }
.profile-promo-card .profile-secondary-action { min-height:44px; }
.profile-promo-status { grid-column:1/-1; min-height:1.2em; }
@media (max-width:1080px) { .profile-subscription-intro { grid-template-columns:1fr; } }
@media (max-width:600px) { .profile-promo-card { grid-template-columns:1fr; } }
.profile-plan-badge.is-balance { border-color:color-mix(in srgb,var(--primary) 70%,#fff); background:var(--primary); color:var(--text-on-accent); }
.profile-topup-card__heading { display:grid; gap:4px; }
.profile-topup-card__heading h3 { margin:0; color:var(--text-main); font-family:'Bowler',var(--font-family); font-size:1rem; line-height:1.15; }
.profile-topup-card__heading p { min-height:48px; margin:2px 0 0; color:var(--text-secondary); font-size:.66rem; line-height:1.4; }
.profile-topup-card__balance { display:flex; min-height:44px; padding:9px 11px; gap:8px; align-items:center; justify-content:space-between; border:1px solid var(--border-color); border-radius:var(--radius-control); background:rgba(0,0,0,.18); }
.profile-topup-card__balance span { color:var(--text-muted); font-size:.65rem; }
.profile-topup-card__balance strong { color:var(--primary); font-size:.82rem; font-variant-numeric:tabular-nums; white-space:nowrap; }
.profile-topup-card__balance strong::before { content:'⬡'; margin-right:4px; color:#38bdf8; font-size:.76em; }
.profile-topup-card__balance small { color:var(--text-secondary); font-size:.58rem; }
.profile-topup-card__amount { width:100%; min-width:0; height:44px; }
.profile-topup-card .profile-credit-slider { margin:2px 0; }
.profile-topup-card .profile-credit-receipt { margin-top:0; }
.profile-topup-card .profile-credit-receipt div { min-height:54px; padding:9px 10px; }
.profile-topup-card .profile-credit-receipt span { font-size:.62rem; }
.profile-topup-card .profile-credit-receipt strong { font-size:.8rem; }
.profile-topup-card__email { margin-top:0; gap:5px; font-size:.64rem; }
.profile-topup-card .profile-primary-action { min-height:44px; margin-top:auto; }
.profile-topup-card .profile-payment-note { margin-top:0; font-size:.58rem; }
.profile-field { display: grid; margin-top: 20px; gap: 8px; color: var(--text-secondary); font-size: .76rem; }
.profile-field input, .profile-field textarea, .profile-referral-link input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: var(--radius-control); outline: none; background: var(--surface-control); color: var(--text-main); resize: vertical; }
.profile-field input:focus, .profile-field textarea:focus { border-color: var(--primary); box-shadow: var(--focus-ring); }
.profile-primary-action { min-height: 48px; margin-top: 20px; padding: 0 20px; border: 0; border-radius: var(--radius-control); background: var(--primary); color: var(--text-on-accent); font-weight: 800; cursor: pointer; }
.profile-primary-action:disabled { cursor: wait; opacity: .6; }
.profile-subscription-checkout { display: grid; margin-top: 18px; padding: 18px; gap: 14px; align-items: end; grid-template-columns: minmax(210px, .8fr) minmax(260px, 1.2fr) auto; border: 1px solid var(--border-color); border-radius: var(--radius-panel); background: color-mix(in srgb, var(--surface-control) 88%, transparent); }
.profile-subscription-checkout .profile-field,
.profile-subscription-checkout .profile-primary-action { margin-top: 0; }
.profile-checkout-summary { display: grid; gap: 5px; }
.profile-checkout-summary > span { color: var(--text-muted); font-size: .68rem; }
.profile-checkout-summary > strong { overflow-wrap: anywhere; color: var(--text-main); font-size: .88rem; }
.profile-checkout-summary > small { color: var(--text-secondary); font-size: .65rem; line-height: 1.4; }
.profile-credit-amount { display: flex; min-width: 184px; height: 48px; padding: 0 12px; gap: 8px; align-items: center; border: 1px solid var(--border-color); border-radius: var(--radius-control); background: var(--bg-main); }
.profile-credit-amount input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--primary); font: inherit; font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.profile-credit-amount span { color: var(--text-muted); font-size: .65rem; }
.profile-credit-slider { width: 100%; margin: 22px 0 12px; accent-color: var(--primary); cursor: pointer; }
.profile-credit-receipt { display: grid; margin-top: 12px; overflow: hidden; border: 1px solid var(--border-color); border-radius: var(--radius-control); grid-template-columns: 1fr 1fr; }
.profile-credit-receipt div { display: grid; min-height: 78px; padding: 14px 16px; gap: 6px; align-content: center; background: rgba(0,0,0,.18); }
.profile-credit-receipt div + div { border-left: 1px solid var(--border-color); }
.profile-credit-receipt span { color: var(--text-muted); font-size: .72rem; }
.profile-credit-receipt strong { font-size: 1.05rem; }
.profile-credit-receipt div:last-child strong { color: var(--primary); }
.profile-payment-note { display:flex; margin: 10px 0 0; gap:7px; align-items:center; justify-content:center; color: var(--text-muted); font-size: .68rem; }
.profile-topup-card__amount > span { flex:1 1 auto; color:var(--text-secondary); font-size:.64rem; }
.profile-topup-card__amount input { width:auto; flex:0 1 86px; font-size:.9rem; }
.profile-topup-card__email input { min-height:42px; padding:8px 10px; }
.profile-referral-link button { min-height: 48px; padding: 0 16px; border: 1px solid rgba(var(--primary-rgb), .4); border-radius: var(--radius-control); background: rgba(var(--primary-rgb), .1); color: var(--primary); cursor: pointer; }
.profile-token-nav-icon { width: 21px; height: 21px; overflow: visible; color: #38bdf8; filter: drop-shadow(0 0 7px rgba(56,189,248,.58)); }
.profile-token-nav-icon .token-shell { fill: rgba(14,165,233,.13); stroke: currentColor; stroke-width: 1.8; }
.profile-section-nav button[data-profile-section="subscription"]:hover .profile-token-nav-icon,
.profile-section-nav button[data-profile-section="subscription"].is-active .profile-token-nav-icon { color: #67d7ff; filter: drop-shadow(0 0 10px rgba(56,189,248,.9)); }
.profile-support-dashboard { min-height:0; }
.profile-support-workspace { display:grid; height:min(760px,calc(100dvh - 128px)); min-height:520px; overflow:hidden; grid-template-columns:minmax(280px,1fr) minmax(0,3fr); }
.profile-support-inbox,.profile-support-conversation { min-width:0; min-height:0; overflow:hidden; background:transparent; }
.profile-support-inbox { display:flex; flex-direction:column; border-right:1px solid var(--border-color); }
.profile-support-inbox > header,.profile-support-conversation__header { display:flex; min-height:78px; padding:14px 16px; gap:12px; align-items:center; border-bottom:1px solid var(--border-color); background:color-mix(in srgb,var(--surface-panel) 82%,transparent); }
.profile-support-inbox > header { justify-content:space-between; }
.profile-support-inbox .profile-kicker,.profile-support-conversation__header .profile-kicker { font-size:.75rem; }
.profile-support-inbox h3,.profile-support-conversation__header h3 { margin:4px 0 0; font-family:'Bowler',var(--font-family); font-size:1rem; line-height:1.2; }
.profile-support-conversation__header { justify-content:space-between; }
.profile-support-conversation__header > div { min-width:0; }
.profile-support-conversation__header > div:first-of-type { flex:1 1 auto; }
.profile-support-conversation__header span,.profile-support-conversation__header p { color:var(--text-muted); font-size:.75rem; }
.profile-support-conversation__header p { max-width:560px; margin:6px 0 0; line-height:1.45; }
.profile-support-conversation__header h3 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.profile-support-mobile-back { display:none; }
.profile-support-form { display:grid; min-height:0; gap:16px; }
.profile-support-conversation > .profile-support-form { width:min(100%,780px); margin:0 auto; padding:24px; overflow-y:auto; }
.profile-support-form .profile-field { display:grid; margin-top:0; gap:8px; }
.profile-support-form .profile-field > span { color:var(--text-secondary); font-size:.8rem; font-weight:700; }
.profile-support-form .profile-field input,.profile-support-form .profile-field textarea { width:100%; padding:13px 14px; border:1px solid var(--border-color); border-radius:var(--radius-control); outline:0; background:var(--surface-control); color:var(--text-main); font-size:1rem; resize:vertical; }
.profile-support-form .profile-field input:focus,.profile-support-form .profile-field textarea:focus { border-color:var(--primary); box-shadow:var(--focus-ring); }
.profile-support-composer { display:grid; min-width:0; padding:8px; gap:8px; align-items:center; grid-template-columns:var(--control-height-lg) minmax(0,1fr) auto; border:1px solid var(--border-color); border-radius:var(--radius-dialog); background:var(--surface-panel); box-shadow:var(--shadow-panel); }
.profile-support-file-preview { grid-column:1 / -1; min-height:0; padding:0; }
.profile-support-file-preview > span { flex-basis:96px; width:96px; height:100px; border-radius:var(--radius-control); }
.profile-support-file-preview > span img { height:72px; }
.profile-support-file-preview > span small { inset:auto 0 0; width:100%; height:26px; padding:0 6px; border-radius:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.profile-support-composer__attach { width:var(--control-height-lg); min-width:var(--control-height-lg); min-height:var(--control-height-lg); cursor:pointer; }
.profile-support-composer__attach input,.profile-support-file-input { position:absolute; width:1px; height:1px; overflow:hidden; opacity:0; }
.profile-support-composer > span { color:var(--text-muted); font-size:.75rem; }
.profile-support-composer .profile-primary-action { display:inline-flex; min-width:128px; margin:0; gap:8px; align-items:center; justify-content:center; }
.profile-support-refresh { width:var(--control-height-md); min-width:var(--control-height-md); cursor:pointer; }
.profile-support-loading,.profile-support-empty { display:grid; min-height:360px; padding:30px; place-content:center; justify-items:center; color:var(--text-secondary); text-align:center; }
.profile-support-loading { gap:12px; }
.profile-support-loading i { color:var(--primary); }
.profile-support-empty > i { margin-bottom:16px; color:var(--primary); font-size:2rem; }
.profile-support-empty strong { color:var(--text-main); font-size:.92rem; }
.profile-support-empty span { max-width:340px; margin-top:7px; color:var(--text-muted); font-size:.8rem; line-height:1.5; }
.profile-support-empty .profile-primary-action,.profile-support-empty .profile-secondary-action { margin-top:18px; }
.profile-support-conversation > .profile-support-empty { flex:1 1 auto; }
.profile-support-empty.is-error > i { color:var(--rose); }
.profile-support-list-summary { display:grid; margin:12px 16px 0; gap:6px; grid-template-columns:repeat(3,minmax(0,1fr)); color:var(--text-muted); font-size:.75rem; }
.profile-support-list-summary span { display:grid; min-height:48px; padding:7px 8px; place-content:center; justify-items:center; border-radius:var(--radius-control); background:var(--surface-control); }
.profile-support-list-summary b { color:var(--text-main); font-size:.9rem; font-variant-numeric:tabular-nums; }
.profile-support-create { display:flex; min-height:44px; margin:12px 16px; gap:8px; align-items:center; justify-content:center; }
.profile-support-ticket-list { display:grid; min-height:0; padding:0 10px 12px; gap:6px; align-content:start; overflow-y:auto; scrollbar-width:thin; }
.profile-support-ticket-row { display:grid; width:100%; min-height:94px; padding:12px; gap:10px; align-items:center; grid-template-columns:minmax(0,1fr); border:1px solid transparent; border-radius:var(--radius-control); background:transparent; color:inherit; text-align:left; cursor:pointer; transition:border-color var(--motion-fast),background-color var(--motion-fast); }
.profile-support-ticket-row:hover,.profile-support-ticket-row:focus-visible { border-color:var(--border-color); outline:0; background:var(--surface-control-hover); }
.profile-support-ticket-row.is-selected { border-color:color-mix(in srgb,var(--primary) 44%,var(--border-color)); background:color-mix(in srgb,var(--surface-control) 90%,var(--primary) 10%); box-shadow:inset 3px 0 0 var(--primary); }
.profile-support-ticket-row:focus-visible { box-shadow:var(--focus-ring); }
.profile-support-ticket-row.is-selected:focus-visible { box-shadow:inset 3px 0 0 var(--primary),var(--focus-ring); }
.profile-support-ticket-row__main { display:grid; min-width:0; gap:6px; }
.profile-support-ticket-row__main > span { overflow:hidden; color:var(--text-muted); font-size:.75rem; text-overflow:ellipsis; white-space:nowrap; }
.profile-support-ticket-row__main strong { overflow:hidden; color:var(--text-main); font-size:.9rem; text-overflow:ellipsis; white-space:nowrap; }
.profile-support-ticket-row__main small { overflow:hidden; color:var(--text-secondary); font-size:.76rem; text-overflow:ellipsis; white-space:nowrap; }
.profile-support-ticket-row__meta { display:flex; min-width:0; gap:8px; align-items:center; }
.profile-support-ticket-row__meta small { margin-left:auto; color:var(--text-muted); font-size:.75rem; }
.profile-support-ticket-row__meta > i { color:var(--text-muted); font-size:.62rem; }
.profile-support-ticket-row__meta > b { display:grid; min-width:20px; height:20px; padding:0 5px; place-items:center; border-radius:var(--radius-pill); background:var(--primary); color:var(--text-on-accent); font-size:.75rem; }
.profile-support-list-empty { display:grid; min-height:190px; padding:24px; place-content:center; gap:7px; color:var(--text-secondary); text-align:center; }
.profile-support-list-empty span { color:var(--text-muted); font-size:.76rem; line-height:1.45; }
.profile-support-ticket-badges { display:flex; gap:7px; flex-wrap:wrap; justify-content:flex-end; }
.support-status-pill,.support-priority-pill { display:inline-flex; min-height:24px; padding:0 9px; align-items:center; border:1px solid var(--border-color); border-radius:var(--radius-pill); color:var(--text-secondary)!important; font-size:.58rem!important; font-weight:800; white-space:nowrap; }
.support-status-pill.is-pending { border-color:color-mix(in srgb,var(--primary) 42%,var(--border-color)); background:var(--primary-glow); color:var(--primary)!important; }
.support-status-pill.is-resolved { border-color:color-mix(in srgb,var(--green) 42%,var(--border-color)); background:color-mix(in srgb,var(--green) 10%,transparent); color:var(--green)!important; }
.support-priority-pill.is-high,.support-priority-pill.is-urgent { border-color:color-mix(in srgb,var(--rose) 42%,var(--border-color)); background:color-mix(in srgb,var(--rose) 9%,transparent); color:var(--rose)!important; }
.profile-support-workspace :is(.support-status-pill,.support-priority-pill) { font-size:.75rem!important; }
.profile-support-conversation { display:flex; flex-direction:column; }
.profile-support-thread { display:flex; min-height:300px; padding:20px; gap:12px; flex:1 1 auto; flex-direction:column; overflow-y:auto; scrollbar-width:thin; }
.profile-support-message { width:fit-content; max-width:min(76%,600px); padding:12px 14px; border:1px solid var(--border-color); border-radius:var(--radius-panel) var(--radius-panel) var(--radius-panel) 4px; background:var(--surface-control); }
.profile-support-message.is-user { align-self:flex-end; border-color:color-mix(in srgb,var(--primary) 34%,var(--border-color)); border-radius:var(--radius-panel) var(--radius-panel) 4px var(--radius-panel); background:color-mix(in srgb,var(--surface-control) 90%,var(--primary) 10%); }
.profile-support-message__meta { display:flex; margin-bottom:6px; gap:10px; align-items:center; justify-content:space-between; }
.profile-support-message__meta strong { color:var(--text-secondary); font-size:.75rem; }
.profile-support-message.is-user .profile-support-message__meta strong { color:var(--primary); }
.profile-support-message__meta time { color:var(--text-muted); font-size:.75rem; }
.profile-support-message p { margin:0; color:var(--text-main); font-size:.85rem; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
.profile-support-message__assets { display:inline-block; max-width:100%; margin-top:10px; vertical-align:top; }
.profile-support-message__assets .creative-asset { display:inline-block; width:fit-content; max-width:100%; border-radius:var(--radius-control); vertical-align:top; }
.profile-support-message__assets .creative-asset-open { display:block; width:fit-content; max-width:100%; height:auto; aspect-ratio:auto; border:0; padding:0; background:transparent; cursor:zoom-in; }
.profile-support-message__assets .creative-asset-open > img { display:block; width:auto; height:auto; max-width:min(220px,100%); max-height:220px; aspect-ratio:auto; object-fit:contain; }
.profile-support-reply { display:grid; height:auto; min-height:64px; margin:0 14px 14px; padding:8px; gap:8px; flex:0 0 auto; align-items:center; grid-auto-rows:min-content; grid-template-columns:var(--control-height-lg) minmax(0,1fr) var(--control-height-lg); border:1px solid var(--border-color); border-radius:var(--radius-dialog); background:var(--surface-panel); box-shadow:var(--shadow-panel); }
.profile-support-reply .profile-support-file-preview { grid-column:1 / -1; }
.profile-support-reply__field { display:block; min-width:0; height:var(--control-height-lg); }
.profile-support-reply textarea { width:100%; height:var(--control-height-lg); min-height:var(--control-height-lg); max-height:120px; padding:12px; border:0; border-radius:var(--radius-control); outline:0; background:transparent; color:var(--text-main); font-size:16px; line-height:1.45; resize:none; }
.profile-support-reply textarea:focus { box-shadow:inset 0 0 0 1px var(--primary); }
.profile-support-reply__attach { width:var(--control-height-lg); min-width:var(--control-height-lg); height:var(--control-height-lg); min-height:var(--control-height-lg); cursor:pointer; }
.profile-support-reply__attach input { position:absolute; width:1px; height:1px; overflow:hidden; opacity:0; }
.profile-support-reply__send { align-self:auto; width:var(--control-height-lg); height:var(--control-height-lg); border-radius:14px; cursor:pointer; }
.profile-support-reply__send:disabled { cursor:wait; opacity:.55; }
.profile-support-reply .profile-form-status { grid-column:1 / -1; margin:0; font-size:.75rem; }
.profile-support-reply .profile-form-status:empty { display:none; }
.profile-form-status, .profile-loading-state { margin-top: 16px; color: var(--text-secondary); }
.profile-referral-link { display: grid; max-width: 760px; gap: 8px; grid-template-columns: minmax(0, 1fr) 48px; }
.profile-referral-dashboard { display: grid; gap: 18px; }
.profile-referral-dashboard[hidden], .profile-referral-network[hidden], .profile-referral-balance[hidden] { display: none; }
.profile-pane.is-referral-detail > .profile-pane-heading { display:none; }
.profile-referral-stats { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.profile-referral-stats article { display: grid; min-height: 150px; padding: 18px; gap: 7px; align-content: start; border: 1px solid var(--border-color); border-radius: var(--radius-panel); background: linear-gradient(180deg, rgba(255,255,255,.035), transparent), var(--surface-control); }
.profile-referral-stats article > i { margin-bottom: 14px; color: var(--primary); font-size: 1rem; }
.profile-referral-stats article > span { color: var(--text-muted); font-size: .7rem; line-height: 1.35; }
.profile-referral-stats article > strong { margin-top: auto; color: var(--text-main); font-size: 1.15rem; line-height: 1.15; }
.profile-referral-stats article small { color: var(--text-secondary); font-size: .62rem; }
.profile-referral-invite { display: grid; padding: 18px; gap: 18px; align-items: end; grid-template-columns: minmax(170px, .65fr) minmax(0, 1.35fr); border: 1px solid var(--border-color); border-radius: var(--radius-panel); background: color-mix(in srgb, var(--surface-control) 86%, transparent); }
.profile-referral-invite > div:first-child { display: grid; gap: 5px; }
.profile-referral-invite > div:first-child span { color: var(--text-muted); font-size: .7rem; }
.profile-referral-invite > div:first-child strong { font-family: 'Bowler', var(--font-family); font-size: .92rem; }
.profile-referral-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.profile-referral-actions .profile-primary-action { margin-top: 0; }
.profile-secondary-action { display: inline-flex; min-height: 48px; padding: 0 18px; gap: 9px; align-items: center; border: 1px solid var(--border-color); border-radius: var(--radius-control); background: var(--surface-control); color: var(--text-main); font-weight: 700; cursor: pointer; }
.profile-secondary-action:hover { border-color: rgba(var(--primary-rgb), .38); background: var(--surface-control-hover); }
.profile-referral-network, .profile-referral-balance { min-width: 0; }
.profile-referral-network__header { position: sticky; z-index: 3; left: 0; display: flex; min-height:48px; margin-bottom:12px; gap: 12px; align-items: center; }
.profile-referral-network__header > button { display: grid; width: 44px; min-width: 44px; height: 44px; padding: 0; place-items: center; border: 1px solid var(--border-color); border-radius: 50%; background: var(--surface-control); color: var(--text-secondary); cursor: pointer; }
.profile-referral-network__header h3 { margin:0; font-family:'Bowler',var(--font-family); font-size:1.1rem; }
.profile-referral-network__header p { margin: 5px 0 0; color: var(--text-muted); font-size: .7rem; }
.profile-partner-levels { display:grid; margin-bottom:12px; gap:8px; grid-template-columns:repeat(3,minmax(0,1fr)); }
.profile-partner-levels span { display:flex; min-height:48px; padding:8px 12px; gap:7px; align-items:center; border:1px solid var(--border-color); border-radius:var(--radius-control); background:var(--surface-control); color:var(--text-secondary); font-size:.68rem; }
.profile-partner-levels b { color:var(--primary); font-size:.88rem; font-variant-numeric:tabular-nums; }
.profile-partner-tree { width:100%; max-width:1040px; padding:14px; overflow-x:hidden; border:1px solid var(--border-color); border-radius:var(--radius-panel); background:color-mix(in srgb,var(--surface-control) 66%,transparent); }
.profile-partner-tree ul { position:relative; display:grid; min-width:0; margin:0; padding:0; gap:8px; list-style:none; }
.profile-partner-tree ul ul { margin:8px 0 0 30px; padding-left:26px; border-left:1px solid color-mix(in srgb,var(--primary) 42%,var(--border-color)); }
.profile-partner-tree li { position:relative; min-width:0; }
.profile-partner-tree ul ul > li::before { content:""; position:absolute; top:31px; left:-26px; width:20px; border-top:1px solid color-mix(in srgb,var(--primary) 42%,var(--border-color)); }
.profile-partner-node { display:grid; width:100%; min-width:0; min-height:64px; padding:9px 12px; gap:10px; align-items:center; grid-template-columns:44px minmax(0,1fr) auto 16px; border:1px solid var(--border-color); border-radius:var(--radius-control); background:var(--surface-control); color:var(--text-secondary); text-align:left; }
button.profile-partner-node { cursor:pointer; }
button.profile-partner-node:hover,button.profile-partner-node:focus-visible { border-color:color-mix(in srgb,var(--primary) 48%,var(--border-color)); background:var(--surface-control-hover); }
button.profile-partner-node:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
.profile-partner-node img { display: block; width: 44px; height: 44px; border: 1px solid var(--border-color); border-radius: 50%; background: var(--bg-main); object-fit: cover; }
.profile-partner-node__copy { display: grid; min-width: 0; gap: 3px; }
.profile-partner-node strong { overflow:hidden; color:var(--text-main); font-size:.74rem; text-overflow:ellipsis; white-space:nowrap; }
.profile-partner-node small { color:var(--text-muted); font-size:.62rem; }
.profile-partner-node__meta { display:flex; min-width:94px; gap:5px; align-items:baseline; justify-content:flex-end; color:var(--text-muted); font-size:.58rem; white-space:nowrap; }
.profile-partner-node__meta b { color:var(--text-main); font-variant-numeric:tabular-nums; }
.profile-partner-node > i { color: var(--text-muted); font-size: .58rem; transition: transform var(--motion-fast); }
.profile-partner-node[aria-expanded="false"] > i { transform: rotate(-90deg); }
.profile-partner-node__leaf { width:6px; height:6px; justify-self:center; border-radius:50%; background:var(--border-strong); }
.profile-partner-node.is-root { border-color:rgba(var(--primary-rgb),.55); background:color-mix(in srgb,var(--surface-control) 88%,var(--primary) 12%); }
.profile-partner-node.is-root img { border-color: var(--primary); }
.profile-partner-empty { display: grid; min-height: 300px; place-content: center; justify-items: center; color: var(--text-secondary); text-align: center; }
.profile-partner-empty i { margin-bottom: 14px; color: var(--primary); font-size: 1.8rem; }
.profile-partner-empty span { margin-top: 6px; color: var(--text-muted); font-size: .72rem; }
.profile-referral-balance__summary { display: flex; min-height: 92px; padding: 18px 20px; align-items: center; justify-content: space-between; border: 1px solid rgba(var(--primary-rgb), .35); border-radius: var(--radius-panel); background: rgba(var(--primary-rgb), .07); }
.profile-referral-balance__summary span { color: var(--text-secondary); }
.profile-referral-balance__summary strong { color: var(--primary); font-size: 1.65rem; }
.profile-referral-balance__summary small { color: var(--text-secondary); font-size: .68rem; }
.profile-referral-money-grid { display: grid; margin-top: 16px; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-referral-money-card { display: grid; min-height: 300px; padding: 22px; gap: 14px; align-content: start; border: 1px solid var(--border-color); border-radius: var(--radius-panel); background: var(--surface-control); }
.profile-referral-money-card > i { color: var(--primary); font-size: 1.1rem; }
.profile-referral-money-card h4, .profile-referral-history h4 { margin: 0; font-family: 'Bowler', var(--font-family); font-size: .9rem; }
.profile-referral-money-card p { margin: 5px 0 0; color: var(--text-muted); font-size: .72rem; line-height: 1.5; }
.profile-referral-money-card .profile-primary-action { margin-top: auto; }
.profile-referral-money-card.is-disabled { opacity: .72; }
.profile-referral-money-card button:disabled { cursor: not-allowed; opacity: .58; }
.profile-referral-history { margin-top: 16px; padding: 20px; border: 1px solid var(--border-color); border-radius: var(--radius-panel); background: color-mix(in srgb, var(--surface-control) 86%, transparent); }
.profile-referral-history > header { display: flex; margin-bottom: 12px; align-items: center; justify-content: space-between; }
.profile-referral-history > header span { color: var(--primary); font-weight: 800; }
.profile-referral-history > div { display: grid; gap: 6px; }
.profile-referral-history article { display: flex; min-height: 58px; padding: 10px 12px; align-items: center; justify-content: space-between; border: 1px solid var(--border-color); border-radius: var(--radius-control); background: rgba(0,0,0,.14); }
.profile-referral-history article div { display: grid; gap: 3px; }
.profile-referral-history article span { color: var(--text-muted); font-size: .65rem; }
.profile-referral-history article b { color: var(--green); }
.profile-transaction-list { min-width:0; overflow:hidden; }
.profile-transaction-filters { width:min(100%,520px); margin-bottom:12px; grid-template-columns:repeat(3,minmax(0,1fr)); }
.profile-transaction-filters button { display:flex; min-width:0; min-height:44px; padding:0 12px; gap:8px; align-items:center; justify-content:center; cursor:pointer; }
.profile-transaction-filters button span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.profile-transaction-filters button b { display:grid; min-width:22px; height:22px; padding:0 6px; place-items:center; border-radius:var(--radius-pill); background:var(--surface-control-hover); color:var(--text-muted); font-size:.6rem; font-variant-numeric:tabular-nums; }
.profile-transaction-filters button.active b { background:color-mix(in srgb,var(--primary) 18%,var(--surface-control)); color:var(--primary); }
.profile-transaction-filters button:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
.profile-transaction-empty { display:grid; min-height:220px; place-content:center; justify-items:center; gap:10px; border:1px solid var(--border-color); border-radius:var(--radius-panel); background:color-mix(in srgb,var(--surface-control) 72%,transparent); color:var(--text-secondary); }
.profile-transaction-empty i { color:var(--primary); font-size:1.35rem; }
.profile-transaction-table { min-width:0; overflow:hidden; border:1px solid var(--border-color); border-radius:var(--radius-panel); background:color-mix(in srgb,var(--surface-control) 72%,transparent); }
.profile-transaction-head,.profile-transaction-row { display:grid; min-width:0; grid-template-columns:88px minmax(0,1fr) 92px 100px; gap:12px; align-items:center; }
.profile-transaction-head { min-height:42px; padding:0 14px; color:var(--text-muted); font-size:.65rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.profile-transaction-row { min-height:58px; padding:8px 14px; border-top:1px solid rgba(255,255,255,.06); }
.profile-transaction-row:hover { background:rgba(var(--primary-rgb),.045); }
.profile-transaction-row time { color:var(--text-muted); font-size:.65rem; line-height:1.35; }
.profile-transaction-description { min-width:0; display:grid; gap:3px; }
.profile-transaction-description strong { overflow:hidden; color:var(--text-main); font-size:.75rem; text-overflow:ellipsis; white-space:nowrap; }
.profile-transaction-description small { overflow:hidden; color:var(--text-muted); font-size:.62rem; text-overflow:ellipsis; white-space:nowrap; }
.profile-transaction-row b,.profile-transaction-balance { min-width:0; overflow:hidden; font-size:.74rem; font-variant-numeric:tabular-nums; text-align:right; text-overflow:ellipsis; white-space:nowrap; }
.profile-transaction-row b.is-income::before,.profile-transaction-row b.is-expense::before,.profile-overview-transaction-row b.is-income::before,.profile-overview-transaction-row b.is-expense::before,.profile-transaction-balance::before { content:'⬡'; color:#38bdf8; font-size:.82em; margin-right:4px; }
.profile-transaction-list .is-income,.profile-overview-transaction-list .is-income { color:var(--green); }.profile-transaction-list .is-expense,.profile-overview-transaction-list .is-expense { color:var(--rose); }
.profile-transaction-list .is-rating,.profile-overview-transaction-list .is-rating { color:var(--primary); }
.profile-transaction-list .is-rating i,.profile-overview-transaction-list .is-rating i { margin-right:4px; font-size:.8em; }
.profile-transaction-list .is-neutral,.profile-overview-transaction-list .is-neutral { color:var(--text-muted); }
.profile-transaction-pagination { display:flex; width:fit-content; max-width:100%; margin:12px auto 0; padding:6px; gap:5px; justify-content:center; border:1px solid var(--border-color); border-radius:var(--radius-panel); background:color-mix(in srgb,var(--surface-control) 82%,transparent); }
.profile-transaction-pagination button { display:grid; min-width:36px; height:36px; padding:0 8px; place-items:center; border:1px solid transparent; border-radius:var(--radius-control); background:transparent; color:var(--text-secondary); cursor:pointer; }
.profile-transaction-pagination button:hover:not(:disabled) { border-color:var(--border-color); background:var(--surface-control-hover); color:var(--text-main); }
.profile-transaction-pagination button.is-active { border-color: var(--primary); background: rgba(var(--primary-rgb), .15); color: var(--primary); }
.profile-transaction-pagination button:disabled { cursor:not-allowed; opacity:.45; }
.profile-subscription-checkout { display:none; }
.profile-subscription-checkout.is-open { display:grid; }
.profile-checkout-back,.profile-checkout-detail { grid-column:1 / -1; }
.profile-checkout-back { justify-self:start; border:0; background:transparent; color:var(--text-secondary); cursor:pointer; }
.profile-checkout-detail { display:grid; gap:5px; color:var(--text-secondary); }
.profile-checkout-detail strong { color:var(--text-main); font-size:1.05rem; }
.profile-checkout-detail p { margin:0; }
.profile-checkout-detail ul { margin:0; padding-left:18px; }
.profile-state-error { padding: 30px; color: var(--rose); text-align: center; }
@media (max-width: 600px) {
    .profile-partner-levels { gap:6px; }
    .profile-partner-levels span { min-height:52px; padding:6px; flex-direction:column; justify-content:center; }
    .profile-partner-tree { padding:10px; }
    .profile-partner-tree ul ul { margin-left:12px; padding-left:14px; }
    .profile-partner-tree ul ul > li::before { left:-14px; width:10px; }
    .profile-partner-node { min-height:68px; padding:9px; gap:8px; grid-template-columns:40px minmax(0,1fr) 14px; }
    .profile-partner-node img { width:40px; height:40px; }
    .profile-partner-node__meta { grid-column:2; min-width:0; justify-content:flex-start; }
    .profile-partner-node > i,.profile-partner-node__leaf { grid-column:3; grid-row:1 / span 2; }
    .profile-transaction-filters { width:100%; }
    .profile-transaction-filters button { min-height:56px; padding:6px 4px; gap:2px; flex-direction:column; }
    .profile-transaction-filters button span { overflow:visible; font-size:.65rem; line-height:1.15; text-overflow:clip; white-space:normal; }
    .profile-transaction-filters button b { min-width:20px; height:18px; font-size:.55rem; }
    .profile-transaction-head,.profile-transaction-row { grid-template-columns:66px minmax(0,1fr) 72px 82px; gap:7px; padding-inline:9px; }
    .profile-transaction-head { font-size:.58rem; }
    .profile-transaction-description strong { font-size:.68rem; }
    .profile-transaction-description small,.profile-transaction-row time { font-size:.56rem; }
    .profile-transaction-row b,.profile-transaction-balance { font-size:.65rem; }
}

@media (max-width: 1080px) {
    .profile-overview-hero { grid-template-columns:1fr; }
    .profile-overview-progress { min-height:190px; }
    .profile-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-referral-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-subscription-checkout { grid-template-columns: 1fr 1fr; }
    .profile-subscription-checkout .profile-primary-action { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .profile-support-workspace { display:block; height:calc(100dvh - 174px); min-height:480px; }
    .profile-support-inbox,.profile-support-conversation { height:100%; }
    .profile-support-inbox { border-right:0; }
    .profile-support-workspace:not(.has-ticket-open):not(.is-compose-open) .profile-support-conversation { display:none; }
    .profile-support-workspace:is(.has-ticket-open,.is-compose-open) .profile-support-inbox { display:none; }
    .profile-support-mobile-back { display:inline-flex; }
    .profile-support-inbox > header,.profile-support-conversation__header { min-height:68px; padding:10px 12px; }
    .profile-support-ticket-badges { justify-content:flex-start; }
    .profile-support-conversation__header .profile-support-ticket-badges { display:none; }
    .profile-support-thread { min-height:260px; padding:12px; }
    .profile-support-message { max-width:94%; }
    .profile-support-conversation > .profile-support-form { padding:12px; }
}
@media (max-height: 620px) {
    .profile-support-workspace { height:calc(100dvh - 96px); min-height:280px; }
    .profile-support-inbox > header,.profile-support-conversation__header { min-height:64px; padding-block:8px; }
    .profile-support-thread { min-height:0; }
}
@media (max-width: 1280px) {
    #profile-view:not(.has-profile-hub) { padding: 8px; }
    .profile-hub { display: flex; flex-direction: column; }
    .profile-avatar-control { width:82px; height:82px; margin:0; }
    .profile-avatar-control span { width:28px; height:28px; }
    .profile-identity-copy { padding-right:30px; }
    .profile-overview-identity { min-height:190px; padding:20px; grid-template-columns:82px minmax(0,1fr); }
    .profile-overview-identity.has-admin-actions .profile-identity-copy { padding-right:86px; }
    .profile-channel-actions { top: 12px; right: 12px; }
    .profile-workspace { display:flex; min-width:0; flex-direction:column; order:1; }
    .profile-section-nav { position:sticky; z-index:20; top:0; height:auto; min-height:0; flex:0 0 auto; flex-direction:row; justify-content:center; margin:0; padding:8px; gap:9px; overflow-x:auto; overflow-y:hidden; border-right:0; border-bottom:1px solid var(--border-color); background:color-mix(in srgb,var(--bg-panel) 92%,transparent); scroll-padding-inline:8px; }
    .profile-section-nav .creative-library-rail__group { display:flex; gap:7px; }
    .profile-section-nav .profile-account-nav-button { display:grid; }
    #profile-view .profile-section-nav button { display:grid; width:48px; min-width:48px; height:48px; flex:0 0 48px; padding:0; }
    .profile-section-stage { min-height:500px; padding:16px 0; }
    .profile-account-pane { min-height:0; }
    .profile-pane-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
    .profile-plan-grid { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(238px,64vw); grid-template-columns:none; margin-inline:0; padding:14px 8px 10px; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; }
    .profile-plan-grid::-webkit-scrollbar { display:none; }
    .profile-plan-card,
    .profile-topup-card { min-height:340px; scroll-snap-align:start; }
    .profile-subscription-checkout { grid-template-columns: 1fr; }
    .profile-subscription-checkout .profile-primary-action { grid-column: auto; width:100%; }
    .profile-referral-invite { grid-template-columns: 1fr; }
    .profile-referral-actions { display: grid; }
    .profile-referral-actions > * { width: 100%; justify-content: center; }
    .profile-referral-money-grid { grid-template-columns: 1fr; }
    .profile-referral-balance__summary { gap: 8px; align-items: flex-start; flex-direction: column; }
}

/* Profile loading uses the same dotted canvas as Studio and other modes. */
#profile-view { background:var(--app-canvas-background); background-size:var(--app-canvas-size); }
#profile-view > .workshop-loader { display:flex; width:100%; min-height:100%; align-items:center; justify-content:center; }

/* The account-center workspace is a transparent layer over the shared dotted canvas. */
#profile-view:has(.profile-hub) .profile-hub,
#profile-view:has(.profile-hub) .profile-workspace,
#profile-view:has(.profile-hub) .profile-section-stage,
#profile-view:has(.profile-hub) .profile-pane {
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}
#profile-view:has(.profile-hub) {
    background: var(--app-canvas-background) !important;
    background-size: var(--app-canvas-size) !important;
}
@media (prefers-reduced-motion: reduce) { .profile-pane.is-active { animation: none; } }

/* Mobile account center: compact information density with a persistent section rail. */
@media (max-width: 600px) {
    .profile-support-list-summary { gap:12px; padding-inline:12px; }
    .profile-support-ticket-row { min-height:104px; padding:13px 11px; gap:8px; }
    .profile-support-ticket-row__main small { white-space:normal; line-height:1.4; }
    .profile-support-composer { grid-template-columns:44px minmax(0,1fr) 44px; }
    .profile-support-composer > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .profile-support-composer .profile-primary-action { min-width:44px; width:44px; padding:0; font-size:0; }
    .profile-support-composer .profile-primary-action i { font-size:.8rem; }
    #profile-view .profile-section-stage { padding: 8px 0 18px; }
    #profile-view .profile-overview { gap:10px; }
    #profile-view .profile-overview-hero { gap:10px; grid-template-columns:1fr; }
    #profile-view .profile-overview-quick-grid { gap:10px; }
    #profile-view .profile-overview-identity { min-height:0; padding:14px; gap:12px; grid-template-columns:68px minmax(0,1fr); border-radius:16px; }
    #profile-view .profile-avatar-control { width: 68px; height: 68px; }
    #profile-view .profile-avatar-control span { width: 23px; height: 23px; border-width: 2px; font-size: .62rem; }
    #profile-view .profile-identity-copy { padding-right: 24px; }
    #profile-view .profile-identity-copy h1 { margin-top: 2px; font-size: 1.05rem; line-height: 1.05; }
    #profile-view .profile-subscription-intro { margin-bottom:14px; }
    #profile-view .profile-current-plan { padding:12px; border-radius:16px; }
    #profile-view .profile-level-line { margin-top: 6px; gap: 5px; }
    #profile-view .profile-level-line > * { padding: 5px 7px; font-size: .62rem; }
    #profile-view .profile-overview-facts { margin-top:10px; }
    #profile-view .profile-overview-facts div { padding:7px; }
    #profile-view .profile-overview-facts dt { font-size:.58rem; }
    #profile-view .profile-overview-facts dd { font-size:.66rem; }
    #profile-view .profile-overview-progress { min-height:0; padding:16px; border-radius:16px; }
    #profile-view .profile-overview-progress dl { margin:14px 0; }
    #profile-view .profile-overview-progress dl div { padding:8px 6px; }
    #profile-view .profile-overview-progress dt { font-size:.55rem; }
    #profile-view .profile-overview-progress dd { font-size:.7rem; }
    #profile-view .profile-channel-actions button { width: 44px; min-height: 44px; }
    #profile-view .profile-overview-summary-card { min-height:132px; padding:16px; border-radius:16px; }
    #profile-view .profile-overview-section { padding:14px; border-radius:16px; }
    #profile-view .profile-recent-grid { gap:8px; grid-template-columns:repeat(2,minmax(0,1fr)); }
    #profile-view .profile-achievement-wall { min-height:190px; padding:16px; border-radius:16px; }
    #profile-view .profile-achievement-wall h2 { font-size: .98rem; }
    #profile-view .profile-achievement-grid { min-height:76px; padding:4px 10px 8px 0; }
    #profile-view .profile-achievement-grid > img { width:58px; height:66px; flex-basis:58px; }
    #profile-view .profile-achievement-dialog { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); }
    #profile-view .profile-achievement-dialog__panel { max-height:calc(100dvh - 16px); border-radius:16px; }
    #profile-view .profile-achievement-collection { padding:10px; grid-template-columns:1fr; }
    #profile-view .profile-achievement-collection-card { min-height:112px; padding:12px; grid-template-columns:68px minmax(0,1fr); }
    #profile-view .profile-achievement-collection-card img { width:68px; height:76px; }
    #profile-view .profile-pane-heading { margin-bottom: 16px; gap: 6px; }
    #profile-view .profile-pane-heading h3 { font-size: 1.08rem; }
    #profile-view .profile-pane-heading p { font-size: .72rem; line-height: 1.4; }
}
@media (max-width: 1160px) {
    #profile-view .profile-overview-quick-grid { grid-template-columns:1fr; }
}
#profile-view { background:var(--app-canvas-background); background-size:var(--app-canvas-size); }
#profile-view > .workshop-loader { min-height:100%; }

.btn-balance { position:relative; isolation:isolate; background:linear-gradient(145deg,rgba(250,191,60,.11),rgba(56,189,248,.055)); border-color:rgba(250,191,60,.3); }
.btn-balance::after { content:""; position:absolute; inset:1px; z-index:0; border-radius:inherit; pointer-events:none; background:linear-gradient(110deg,transparent 25%,rgba(255,255,255,.09) 48%,transparent 70%); transform:translateX(-120%); transition:transform .65s ease; }
.btn-balance:hover::after { transform:translateX(120%); }
.btn-balance .ico { box-shadow:0 10px 28px rgba(250,191,60,.18); }
@media (prefers-reduced-motion:reduce) { .btn-balance::after { display:none; } }
.btn-balance .tit {
    font-size: 1.2rem;
    color: var(--primary);
}
.btn-balance .dsc { color: var(--primary); }

/* ===== СРЕДНИЙ РЯД: АРТЕФАКТЫ + НЕЙРО-СТЕК ===== */
.profile-row-mid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--p-gap);
    align-items: stretch;
}
.profile-row-mid > .bento-card { display: flex; flex-direction: column; }

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

.achieve-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    padding: 12px 4px;
    text-align: center;
    transition: var(--transition);
    min-width: 0;
}
.achieve-box:hover {
    background: rgba(var(--primary-rgb), 0.05);
    border-color: rgba(var(--primary-rgb), 0.2);
    transform: translateY(-2px);
}
.achieve-box .ico { font-size: 1.4rem; margin-bottom: 4px; }
.achieve-box .val {
    font-size: 1.15rem;
    font-family: var(--p-mono);
    font-weight: 900;
    color: var(--text-main);
    line-height: 1;
}
.achieve-box .lbl {
    font-size: 0.55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Нейро-стек (скиллы) */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.skills-list.custom-scrollbar {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 6px;
}
.skill-item { display: flex; flex-direction: column; gap: 6px; }
.skill-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}
.skill-head .name {
    font-size: 0.72rem;
    color: #d4d4d8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.skill-head .stats {
    color: var(--text-main);
    font-size: 0.85rem;
    font-family: var(--p-mono);
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.skill-head .stats span { color: var(--text-muted); font-size: 0.7rem; }
.skill-track {
    height: 6px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 3px;
    overflow: hidden;
}
.skill-fill {
    height: 100%;
    transition: width 1s ease;
    border-radius: 3px;
}

/* ===== ИНФО-КАРТОЧКИ (PRO + НАГРАДЫ) ===== */
.profile-row-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--p-gap);
    align-items: stretch;
}
.profile-row-split > div { height: 100%; display: flex; }
.profile-row-split > div > .info-card { width: 100%; }

.info-card {
    height: 100%;
    width: 100%;
    min-height: 150px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.info-card:hover { transform: translateY(-2px); }

/* Фоновое свечение */
.card-glow-bg {
    position: absolute;
    top: -50%; right: -20%;
    width: 180px; height: 180px;
    border-radius: 50%;
    filter: blur(55px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
    transition: 0.4s;
}
.info-card:hover .card-glow-bg { opacity: 0.6; transform: scale(1.1); }
.card-glow-bg.gold-glow { background: var(--primary); }
.card-glow-bg.blue-glow { background: var(--primary); opacity: 0.2; }

/* Шапка инфо-карточки */
.info-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
}

.ico-box {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.info-card-body { position: relative; z-index: 1; }
.info-card-body .tit {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 5px;
    letter-spacing: -0.3px;
}
.info-card-body .dsc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--p-mono);
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.highlight-gold {
    color: var(--primary);
    font-weight: bold;
    text-shadow: 0 0 10px var(--primary-glow);
}
.highlight-blue {
    color: var(--primary);
    font-weight: bold;
}

/* PRO активна */
.info-card.vip-active {
    border-color: rgba(var(--primary-rgb), 0.3);
    background: linear-gradient(145deg, rgba(26, 18, 6, 0.9), rgba(10, 10, 10, 0.95));
}
.info-card.vip-active .ico-box {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: rgba(var(--primary-rgb), 0.4);
    box-shadow: 0 0 12px rgba(var(--primary-rgb), 0.2);
}

.badge-discount {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Награды */
.info-card.reward-card {
    border-color: rgba(var(--primary-rgb), 0.15);
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.9), rgba(10, 10, 10, 0.95));
}
.info-card.reward-card .ico-box {
    background: rgba(var(--primary-rgb), 0.08);
    border-color: rgba(var(--primary-rgb), 0.25);
}

.reward-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.reward-tag {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    font-family: var(--p-mono);
    white-space: nowrap;
}
.reward-tag.diamond {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
}
.reward-tag.gold {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb), 0.4);
}
.reward-tag.feature {
    background: rgba(168, 85, 247, 0.1);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* Кнопка купить PRO */
.btn-buy-vip {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--bg-main);
    font-weight: 900;
    border: none;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px var(--primary-glow);
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-buy-vip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.5);
    filter: brightness(1.1);
}

/* Список фич PRO */
.pro-features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(var(--primary-rgb), 0.25);
}
.pro-features-list.inactive {
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}
.pro-feat-item {
    font-size: 0.68rem;
    color: #e4e4e7;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}
.pro-feat-item svg {
    color: var(--primary);
    filter: drop-shadow(0 0 4px var(--primary-glow));
    flex-shrink: 0;
}
.inactive .pro-feat-item svg { color: var(--text-muted); filter: none; }
.inactive .pro-feat-item { color: var(--text-secondary); }

/* ===== РЯД НА ВСЮ ШИРИНУ ===== */
.profile-row-full { width: 100%; }

/* ===== ПАРТНЕРСКАЯ СЕТЬ ===== */
.ref-card {
    padding: 20px;
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.9), rgba(10, 10, 10, 0.95));
    position: relative;
    overflow: hidden;
    width: 100%;
}

.ref-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.ref-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.ref-tit {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.3px;
}

.ref-btn {
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    color: var(--primary);
    padding: 7px 16px;
    border-radius: 8px;
    font-weight: 800;
    font-family: var(--p-mono);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.ref-btn:hover {
    background: rgba(var(--primary-rgb), 0.18);
    border-color: var(--primary);
    box-shadow: 0 0 16px var(--primary-glow);
    transform: translateY(-1px);
}

.ref-dsc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 18px;
    max-width: 85%;
    position: relative;
    z-index: 1;
}
.ref-dsc b { color: var(--primary); font-weight: 800; }

.ref-percents {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.ref-pct-box {
    flex: 1 1 100px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 14px 8px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    min-width: 0;
}
.ref-pct-box:hover {
    transform: translateY(-3px);
    background: rgba(var(--primary-rgb), 0.05);
    border-color: rgba(var(--primary-rgb), 0.2);
}

.ref-pct-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
}
.ref-pct-box:nth-child(1)::before {
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}
.ref-pct-box:nth-child(2)::before {
    background: #fcd34d;
    box-shadow: 0 0 12px rgba(252, 211, 77, 0.5);
}
.ref-pct-box:nth-child(3)::before {
    background: #71717a;
    box-shadow: 0 0 12px rgba(113, 113, 122, 0.4);
}

.ref-pct-val {
    font-size: 1.5rem;
    font-family: var(--p-mono);
    font-weight: 900;
    display: block;
    line-height: 1.1;
    margin-bottom: 4px;
}
.ref-pct-box:nth-child(1) .ref-pct-val {
    color: var(--primary);
    text-shadow: 0 0 16px var(--primary-glow);
}
.ref-pct-box:nth-child(2) .ref-pct-val { color: #fcd34d; }
.ref-pct-box:nth-child(3) .ref-pct-val { color: #e4e4e7; }

.ref-pct-lbl {
    font-size: 0.62rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.ref-link-box {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 5px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.ref-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--primary);
    padding: 8px 12px;
    font-family: var(--p-mono);
    font-size: 0.8rem;
    outline: none;
    min-width: 0;
    text-overflow: ellipsis;
}
.ref-copy-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--bg-main);
    border: none;
    font-weight: 800;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.ref-copy-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 16px var(--primary-glow);
    transform: translateY(-1px);
}

/* ===== ИВЕНТЫ ===== */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 12px;
}

.event-card {
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.85), rgba(10, 10, 10, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.event-card.art-event {
    --evt-color: var(--primary);
    --evt-glow: rgba(var(--primary-rgb), 0.15);
    --evt-border: rgba(var(--primary-rgb), 0.5);
}
.event-card.audio-event {
    --evt-color: #ff6b35;
    --evt-glow: rgba(255, 107, 53, 0.15);
    --evt-border: rgba(255, 107, 53, 0.5);
}

.event-card::after {
    content: '';
    position: absolute;
    top: -50%; left: -10%;
    width: 50%; height: 200%;
    background: radial-gradient(circle, var(--evt-glow) 0%, transparent 70%);
    opacity: 0.4;
    pointer-events: none;
    transition: 0.4s;
    z-index: 0;
}

.event-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 30px -5px var(--evt-glow);
}
.event-card:hover::after { opacity: 0.8; transform: scale(1.15); }

.event-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
    background: var(--evt-color);
    box-shadow: 2px 0 12px var(--evt-color);
    border-radius: 3px 0 0 3px;
    z-index: 1;
}

.event-head {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1 1 220px;
    z-index: 2;
}

.event-ico {
    width: 50px; height: 50px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    border: 1px solid var(--evt-border);
    box-shadow: 0 0 16px var(--evt-glow), inset 0 0 12px var(--evt-glow);
    flex-shrink: 0;
}

.event-info { min-width: 0; }
.event-info-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.event-info h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: -0.2px;
}

.ev-status {
    font-size: 0.58rem;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.ev-status.active {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.ev-status.active::before {
    content: '';
    display: block;
    width: 5px; height: 5px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 6px #22c55e;
    animation: p-pulse 1.5s infinite;
}
.ev-status.upcoming {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
}

.ev-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--p-mono);
}

.event-prizes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 200px;
    z-index: 2;
}
.ev-prize {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5px 11px;
    border-radius: 16px;
    font-size: 0.72rem;
    color: #e4e4e7;
    font-weight: 600;
    transition: var(--transition);
}
.ev-prize:hover {
    background: rgba(var(--primary-rgb), 0.08);
    border-color: rgba(var(--primary-rgb), 0.25);
    transform: translateY(-1px);
}

.ev-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--text-main);
    padding: 10px 22px;
    border: 1px solid var(--evt-border);
    border-radius: 10px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.75rem;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    z-index: 2;
    position: relative;
    flex-shrink: 0;
}
.ev-btn:hover {
    background: var(--evt-color);
    color: var(--bg-main);
    box-shadow: 0 0 18px var(--evt-glow);
    border-color: var(--evt-color);
}
.ev-btn svg { transition: 0.3s; }
.ev-btn:hover svg { transform: translateX(3px); }

/* ===== ФУТЕР ===== */
.dashboard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}
.footer-links { display: flex; gap: 8px; flex-wrap: wrap; }
.logout-btn {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    padding: 9px 20px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
}
.logout-btn:hover {
    background: var(--color-danger);
    color: var(--text-main);
    border-color: var(--color-danger);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}
.cyber-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.72rem;
    font-family: var(--p-mono);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-transform: uppercase;
    transition: var(--transition);
}
.cyber-link:hover {
    color: var(--primary);
    border-color: rgba(var(--primary-rgb), 0.3);
    background: rgba(var(--primary-rgb), 0.05);
}

/* ===== ПРОФИЛЬНЫЕ СКИЛЛЫ (из renderSkillsBars в JS) ===== */
.profile-skills-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.profile-skill-item { display: flex; flex-direction: column; gap: 6px; }
.profile-skill-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}
.profile-skill-header span:first-child {
    font-size: 0.72rem;
    color: #d4d4d8;
    font-weight: 600;
}
.profile-skill-value {
    color: var(--text-main);
    font-size: 0.85rem;
    font-family: var(--p-mono);
    font-weight: 700;
    white-space: nowrap;
}
.profile-skill-value span { color: var(--text-muted); font-size: 0.7rem; }
.profile-skill-track {
    height: 6px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 3px;
    overflow: hidden;
}
.profile-skill-fill {
    height: 100%;
    transition: width 1s ease;
    border-radius: 3px;
}

/* ===== ПАНЕЛЬ ПОЛЬЗОВАТЕЛЯ (шапка сайта) ===== */
.user-panel-pro-badge {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb), 0.4);
    font-size: 0.55rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-left: 4px;
}

/* ===== ИСТОРИЯ ТРАНЗАКЦИЙ (модалка) ===== */
.history-tabs-container {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}
.hist-tab-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.hist-tab-btn:hover {
    color: var(--text-main);
    border-color: rgba(var(--primary-rgb), 0.3);
}
.hist-tab-btn.active {
    background: var(--primary);
    color: var(--bg-main);
    border-color: var(--primary);
}

.history-grid-header {
    display: grid;
    grid-template-columns: 1.2fr 2fr 0.8fr 0.8fr;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 800;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.history-grid-header .text-end { text-align: right; }

.tx-grid-row {
    display: grid;
    grid-template-columns: 1.2fr 2fr 0.8fr 0.8fr;
    gap: 8px;
    padding: 12px 16px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.78rem;
    transition: var(--transition);
}
.tx-grid-row:hover { background: rgba(var(--primary-rgb), 0.03); }
.tx-grid-row.is-pro { background: rgba(var(--primary-rgb), 0.04); }

.tx-date { color: var(--text-muted); font-family: var(--p-mono); font-size: 0.68rem; }
.tx-desc {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-main);
    min-width: 0;
}
.tx-icon-mini { flex-shrink: 0; }
.tx-desc-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-amount { text-align: right; font-family: var(--p-mono); font-weight: 700; }
.tx-bal { text-align: right; font-family: var(--p-mono); color: var(--text-secondary); }

.badge-pro-micro {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb), 0.4);
    font-size: 0.55rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    flex-shrink: 0;
}

.history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 14px;
    flex-wrap: wrap;
}
.history-pagination button {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    width: 32px; height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.history-pagination button:hover:not(:disabled) {
    color: var(--text-main);
    border-color: rgba(var(--primary-rgb), 0.3);
}
.history-pagination button.active {
    background: var(--primary);
    color: var(--bg-main);
    border-color: var(--primary);
}
.pag-dots { color: var(--text-muted); padding: 0 4px; }

/* ===== РЕФЕРАЛЬНЫЙ ТЕРМИНАЛ (HUD-модалка) ===== */
.hud-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.hud-stat-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    transition: var(--transition);
}
.hud-stat-card.highlight { border-color: rgba(34, 197, 94, 0.3); background: rgba(34, 197, 94, 0.05); }
.hud-stat-val {
    display: block;
    font-size: 1.3rem;
    font-weight: 900;
    font-family: var(--p-mono);
    color: var(--primary);
    line-height: 1.2;
}
.hud-stat-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.hud-actions-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 18px;
    align-items: stretch;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 18px;
}
.hud-col-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.hud-divider-vertical { width: 1px; background: rgba(255, 255, 255, 0.08); }
.hud-input {
    background: var(--bg-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: var(--p-mono);
    outline: none;
    transition: var(--transition);
}
.hud-input:focus { border-color: var(--primary); box-shadow: 0 0 10px var(--primary-glow); }
.btn-hud {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--bg-main);
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
}
.btn-hud:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.btn-hud:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-hud-withdraw {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px;
    font-weight: 800;
    cursor: not-allowed;
    text-transform: uppercase;
    font-size: 0.72rem;
}
.btn-hud-withdraw.locked { opacity: 0.7; }

.hud-link-section { margin-bottom: 18px; }
.ref-link-container {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 5px;
    margin-top: 8px;
}
.ref-link-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--primary);
    padding: 8px 12px;
    font-family: var(--p-mono);
    font-size: 0.8rem;
    outline: none;
    min-width: 0;
    text-overflow: ellipsis;
}
.btn-ref-action {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--bg-main);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 800;
    cursor: pointer;
    font-size: 0.72rem;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition);
}
.btn-ref-action:hover { filter: brightness(1.1); }

.hud-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.hud-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.hud-tab.active { background: var(--primary); color: var(--bg-main); border-color: var(--primary); }

.hud-table-wrapper { max-height: 300px; overflow-y: auto; border-radius: var(--radius-sm); }
.hud-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.hud-table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-muted);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    background: var(--bg-card);
}
.hud-table td {
    padding: 10px 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ===== АДАПТАЦИЯ ===== */
@media (max-width: 1100px) {
    .hud-actions-grid { grid-template-columns: 1fr; gap: 14px; }
    .hud-divider-vertical { width: 100%; height: 1px; }
}

@media (max-width: 992px) {
    .event-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 18px;
    }
    .event-head { width: 100%; flex: 1 1 auto; }
    .event-prizes { width: 100%; flex: 1 1 auto; }
    .ev-btn { width: 100%; }
}

@media (max-width: 768px) {
    #profile-view { padding: 12px; }
    .profile-row-actions {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    .achievements-grid { grid-template-columns: repeat(3, 1fr); }
    .ref-dsc { max-width: 100%; }

    /* история на узких экранах прячет колонку баланса */
    .history-grid-header,
    .tx-grid-row {
        grid-template-columns: 1.2fr 2fr 0.8fr;
    }
    .history-grid-header .h-bal,
    .tx-bal { display: none; }
}

@media (max-width: 576px) {
    #profile-view { padding: 10px; }
    .profile-layout { gap: 12px; }
    .bento-card { padding: 14px; }
    .user-main-card { padding: 16px; }

    .profile-row-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .user-header-wrap {
        flex-direction: column;
        text-align: center;
        position: relative;
        padding-top: 42px;
        gap: 14px;
    }
    .avatar-container { width: 70px; height: 70px; }
    .user-name-line { justify-content: center; }
    .user-name-line h2 { font-size: 1.2rem; }
    .user-top-row { justify-content: center; }
    .meta-id-date { margin: 0 auto; }
    .profile-badges-wrapper { justify-content: center; }
    .shop-badges-grid { justify-content: center; }

    .top-right-actions {
        position: absolute !important;
        top: 0;
        right: 0;
        width: auto !important;
        margin-top: 0 !important;
        z-index: 10;
        gap: 6px;
    }

    .tg-channel-btn {
        width: 34px !important;
        height: 34px !important;
        padding: 0 !important;
        justify-content: center !important;
        font-size: 0 !important;
    }
    .bell-btn, .edit-tg-btn {
        width: 34px !important;
        height: 34px !important;
    }

    .tg-channel-btn svg,
    .bell-btn svg,
    .edit-tg-btn svg {
        width: 16px;
        height: 16px;
        margin: 0;
    }

    .tg-wrap { margin: 0; width: auto; }

    .achievements-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .achieve-box { padding: 10px 4px; }
    .achieve-box .ico { font-size: 1.2rem; }
    .achieve-box .val { font-size: 1rem; }

    .profile-row-mid { grid-template-columns: 1fr; }
    .profile-row-split { grid-template-columns: 1fr !important; }

    .info-card { padding: 16px; min-height: auto; }
    .info-card-head {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    .reward-tags { justify-content: flex-end; }
    .pro-features-list { justify-content: flex-start; }

    .ref-card { padding: 16px; }
    .ref-tit { font-size: 1rem; }
    .ref-dsc { max-width: 100%; font-size: 0.75rem; }
    .ref-percents { gap: 6px; }
    .ref-pct-box { padding: 10px 5px; flex: 1 1 80px; }
    .ref-pct-val { font-size: 1.2rem; }
    .ref-pct-lbl { font-size: 0.58rem; }

    .ref-link-box { flex-direction: column; padding: 8px; gap: 8px; }
    .ref-input { width: 100%; text-align: center; padding: 6px; }
    .ref-copy-btn { width: 100%; }

    .events-grid { grid-template-columns: 1fr; }

    .dashboard-footer {
        flex-direction: column;
        gap: 14px;
        align-items: stretch;
        text-align: center;
    }
    .logout-btn { width: 100%; }
    .footer-links { justify-content: center; }

    /* HUD рефералка */
    .hud-stats-grid { grid-template-columns: 1fr; }
    .ref-link-container { flex-direction: column; }
    .btn-ref-action { width: 100%; }
    .shop-badge-item { width: 50px; height: 50px; }
}

/* ===== ЦЕНТР УВЕДОМЛЕНИЙ ===== */
#notificationModal .modal-dialog {
    max-width: 440px;
    margin: auto;
}

#notificationModal .modal-content {
    background: rgba(15, 15, 15, 0.97);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(var(--primary-rgb), 0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

#notificationModal .modal-header {
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px 18px;
}

#notificationModal .modal-title {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

#notificationModal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.5;
    transition: var(--transition);
}
#notificationModal .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

#notificationModal .modal-body {
    background: transparent;
    padding: 0;
    max-height: 60vh;
    overflow-y: auto;
}

.notification-item {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
    background: transparent;
}
.notification-item:last-child { border-bottom: none; }
.notification-item:hover { background: rgba(var(--primary-rgb), 0.03); }

.notification-item.is-new {
    background: rgba(var(--primary-rgb), 0.06);
}
.notification-item.is-new::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    box-shadow: 2px 0 8px var(--primary-glow);
    border-radius: 0 3px 3px 0;
}

.notification-date {
    font-size: 0.65rem;
    color: var(--primary);
    font-family: var(--p-mono);
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.notification-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
    line-height: 1.3;
}
.notification-body {
    font-size: 0.8rem;
    color: #d4d4d8;
    line-height: 1.5;
}
.notification-body a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dashed rgba(var(--primary-rgb), 0.4);
    transition: 0.2s;
}
.notification-body a:hover {
    color: var(--text-main);
    border-bottom-color: var(--text-main);
}
.notification-body b,
.notification-body strong {
    color: var(--text-main);
    font-weight: 800;
}

#notificationModal .modal-footer {
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#notificationModal .modal-footer small {
    color: var(--text-muted);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}
#notificationModal .btn-outline-secondary {
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.1);
    background: transparent;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 8px;
    padding: 6px 14px;
    transition: var(--transition);
}
#notificationModal .btn-outline-secondary:hover {
    color: var(--text-main);
    background: rgba(var(--primary-rgb), 0.1);
    border-color: rgba(var(--primary-rgb), 0.3);
}

/* ===== ДОСТУПНОСТЬ И РЕДУЦИРОВАННЫЕ АНИМАЦИИ ===== */
/* Уважаем настройку пользователя "уменьшить движение" */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Подсветка фокуса для клавиатурной навигации */
.action-btn:focus-visible,
.ref-btn:focus-visible,
.btn-buy-vip:focus-visible,
.ev-btn:focus-visible,
.logout-btn:focus-visible,
.hist-tab-btn:focus-visible,
.hud-tab:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Предотвращаем "прыжки" при наведении на тач-устройствах */
@media (hover: none) {
    .bento-card:hover,
    .action-btn:hover,
    .info-card:hover,
    .event-card:hover,
    .ref-pct-box:hover,
    .achieve-box:hover {
        transform: none;
    }
}

/* ==========================================================================
   PROFILE EXPERIENCE — unified account center
   ========================================================================== */
#profile-view {
    --profile-surface: rgba(24, 24, 27, 0.88);
    --profile-surface-raised: rgba(29, 29, 33, 0.94);
    --profile-line: rgba(255, 255, 255, 0.085);
    --profile-soft: rgba(255, 255, 255, 0.035);
    --profile-success: #43d79e;
    container-name: profile-panel;
    container-type: inline-size;
    padding: clamp(18px, 2vw, 30px);
    background:
        radial-gradient(circle at 15% -10%, rgba(var(--primary-rgb), 0.08), transparent 30rem),
        radial-gradient(circle at 92% 20%, rgba(139, 92, 246, 0.045), transparent 28rem),
        var(--bg-main);
}

#profile-view .profile-layout {
    max-width: 1320px;
    gap: 14px;
}

.profile-page-heading {
    display: flex;
    min-height: 86px;
    padding: 4px 2px 12px;
    gap: 24px;
    align-items: flex-end;
    justify-content: space-between;
    border-bottom: 1px solid var(--profile-line);
}

.profile-page-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.18em;
}

.profile-page-heading h1 {
    margin: 0;
    color: var(--text-main);
    font-family: 'Bowler', var(--font-family);
    font-size: clamp(1.25rem, 2vw, 1.7rem);
    letter-spacing: 0.035em;
}

.profile-page-heading p {
    max-width: 680px;
    margin: 7px 0 0;
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.55;
}

.profile-heading-statuses {
    display: flex;
    gap: 7px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.profile-heading-status {
    display: inline-flex;
    min-height: 30px;
    padding: 6px 10px;
    gap: 6px;
    align-items: center;
    color: var(--text-secondary);
    border: 1px solid var(--profile-line);
    border-radius: 999px;
    background: var(--profile-soft);
    font-size: 0.64rem;
    font-weight: 750;
    letter-spacing: 0.035em;
}

.profile-heading-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.profile-heading-status.is-online { color: var(--profile-success); }
.profile-heading-status.is-pro {
    color: var(--primary);
    border-color: rgba(var(--primary-rgb), 0.28);
    background: rgba(var(--primary-rgb), 0.07);
}

#profile-view .bento-card,
#profile-view .info-card {
    border-color: var(--profile-line);
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 42%),
        var(--profile-surface);
    box-shadow: 0 20px 50px -32px rgba(0, 0, 0, 0.75);
}

#profile-view .bento-card:hover,
#profile-view .info-card:hover {
    border-color: rgba(var(--primary-rgb), 0.22);
}

#profile-view .user-main-card {
    padding: clamp(20px, 2.3vw, 30px);
    border-radius: 22px;
}

#profile-view .user-main-card.is-vip {
    background:
        radial-gradient(circle at 92% 5%, rgba(var(--primary-rgb), 0.12), transparent 30%),
        linear-gradient(135deg, rgba(var(--primary-rgb), 0.055), transparent 54%),
        var(--profile-surface-raised) !important;
    border-color: rgba(var(--primary-rgb), 0.3) !important;
    box-shadow:
        0 24px 60px -36px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(var(--primary-rgb), 0.12) !important;
}

#profile-view .avatar-container {
    width: 82px;
    height: 82px;
}

#profile-view .avatar-img { border-width: 2px; }

#profile-view .user-name-line h2 {
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    letter-spacing: -0.025em;
}

#profile-view .meta-id-date {
    padding: 5px 8px;
    border: 1px solid var(--profile-line);
    border-radius: 7px;
    background: var(--profile-soft);
}

#profile-view .progress-box {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid var(--profile-line);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.16);
}

#profile-view .progress-track {
    height: 7px;
    background: rgba(0, 0, 0, 0.32);
}

#profile-view .progress-fill {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--primary-2));
    box-shadow: 0 0 12px rgba(var(--primary-rgb), 0.24);
}

.profile-section-heading {
    display: flex;
    min-height: 48px;
    margin-top: 8px;
    padding: 0 2px;
    gap: 18px;
    align-items: flex-end;
    justify-content: space-between;
}

.profile-section-heading > div > span {
    display: block;
    margin-bottom: 4px;
    color: var(--primary);
    font-size: 0.55rem;
    font-weight: 850;
    letter-spacing: 0.16em;
}

.profile-section-heading h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 0.96rem;
    font-weight: 800;
}

.profile-section-heading p {
    margin: 0 0 1px;
    color: var(--text-muted);
    font-size: 0.68rem;
}

#profile-view .profile-row-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

#profile-view .profile-row-actions .action-btn,
#profile-view .profile-row-actions .btn-theme {
    display: grid;
    min-width: 0;
    min-height: 84px;
    padding: 14px;
    gap: 2px 12px;
    overflow: hidden;
    align-items: center;
    justify-content: initial;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: 1fr 1fr;
    color: var(--text-main);
    border: 1px solid var(--profile-line);
    border-radius: 15px;
    background:
        linear-gradient(135deg, rgba(var(--primary-rgb), 0.025), transparent 55%),
        var(--profile-surface);
    box-shadow: none;
    text-align: left;
}

#profile-view .profile-row-actions .action-btn::before {
    background: linear-gradient(120deg, rgba(var(--primary-rgb), 0.085), transparent 56%);
}

#profile-view .profile-row-actions .action-btn:hover {
    border-color: rgba(var(--primary-rgb), 0.3);
    background-color: var(--profile-surface-raised);
    box-shadow: 0 16px 30px -24px rgba(var(--primary-rgb), 0.5);
    transform: translateY(-2px);
}

#profile-view .profile-row-actions .action-btn .ico,
#profile-view .profile-row-actions .btn-theme .ico {
    width: 42px;
    height: 42px;
    margin: 0;
    grid-row: 1 / 3;
    border-radius: 12px;
}

#profile-view .profile-row-actions .action-btn .tit,
#profile-view .profile-row-actions .btn-theme .tit {
    align-self: end;
    margin: 0;
    overflow: hidden;
    font-size: 0.77rem;
    line-height: 1.25;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#profile-view .profile-row-actions .action-btn .dsc,
#profile-view .profile-row-actions .btn-theme .dsc {
    align-self: start;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.57rem;
    line-height: 1.3;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#profile-view .profile-row-actions .btn-theme .theme-copy { display: contents; }

#profile-view .profile-row-actions .btn-theme .theme-static-icon {
    width: 22px;
    height: 22px;
    color: var(--primary);
    filter: drop-shadow(0 0 7px rgba(var(--primary-rgb), 0.28));
}

#profile-view .profile-row-actions .btn-theme .theme-switch {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 19px;
    margin: 0;
    padding: 2px;
}

#profile-view .profile-row-actions .btn-theme .theme-switch > span {
    width: 13px;
    height: 13px;
}

#profile-view .profile-row-actions .btn-theme.is-light .theme-switch > span {
    transform: translateX(15px);
}

#profile-view .action-btn.is-muted,
#profile-view .ico-box.is-muted,
#profile-view .tg-channel-btn.is-disabled {
    opacity: 0.52;
    cursor: not-allowed;
    filter: grayscale(0.65);
}

#profile-view .profile-row-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#profile-view .info-card {
    min-height: 178px;
    padding: 20px;
}

#profile-view .info-card.vip-active,
#profile-view .info-card.reward-card {
    background:
        radial-gradient(circle at 95% 5%, rgba(var(--primary-rgb), 0.09), transparent 34%),
        var(--profile-surface) !important;
}

#profile-view .profile-pro-status {
    display: inline-flex;
    min-height: 27px;
    padding: 5px 9px;
    gap: 6px;
    align-items: center;
    border: 1px solid var(--profile-line);
    border-radius: 999px;
    color: var(--text-muted);
    background: var(--profile-soft);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#profile-view .profile-pro-status.is-active { color: var(--profile-success); }
#profile-view .profile-pro-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 7px currentColor; }
#profile-view .profile-pro-title-row { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }

#profile-view .profile-pro-days {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    color: var(--primary);
    font-size: 1.2rem;
    line-height: 1;
    text-align: right;
}

#profile-view .profile-pro-days small { margin-top: 4px; color: var(--text-muted); font-size: 0.5rem; font-weight: 750; text-transform: uppercase; }

#profile-view .profile-pro-action {
    width: 100%;
    min-height: 37px;
    margin-top: 13px;
    padding: 8px 12px;
    border: 1px solid var(--primary);
    border-radius: 10px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    color: #171109;
    font-size: 0.68rem;
    font-weight: 850;
}

#profile-view .profile-pro-action.is-secondary { background: rgba(var(--primary-rgb), 0.07); color: var(--primary); }

#profile-view .ico-box {
    border-color: var(--profile-line);
    background: var(--profile-soft);
}

#profile-view .profile-date-accent { margin-left: 4px; }
#profile-view .profile-lock-mark { margin-left: 4px; font-size: 0.72rem; }
#profile-view .profile-avatar-file-input { display: none; }
#profile-view .profile-section-block { margin-bottom: 2px; }

#profile-view .ref-card {
    width: 100%;
    padding: clamp(20px, 2vw, 26px);
    background:
        radial-gradient(circle at 92% 0%, rgba(var(--primary-rgb), 0.08), transparent 30%),
        var(--profile-surface) !important;
}

#profile-view .ref-title-icon { font-size: 1.2rem; }
#profile-view .ref-tier--secondary .ref-pct-val { color: #55bfe8; }
#profile-view .ref-tier--tertiary .ref-pct-val { color: var(--text-secondary); }
#profile-view .profile-challenges-card { width: 100%; }

#profile-view .dashboard-footer {
    margin-top: 8px;
    padding-top: 18px;
    border-top-style: solid;
    border-top-color: var(--profile-line);
}

@media (max-width: 1180px) {
    #profile-view .profile-row-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .profile-page-heading,
    .profile-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .profile-heading-statuses { justify-content: flex-start; }
    .profile-section-heading p { margin: 0; }

    #profile-view .profile-row-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    #profile-view { padding: 10px; }

    .profile-page-heading { padding: 5px 4px 14px; }
    #profile-view .user-main-card { padding: 17px; }

    #profile-view .profile-row-actions .action-btn,
    #profile-view .profile-row-actions .btn-theme {
        min-height: 78px;
        padding: 11px;
        gap: 2px 9px;
        grid-template-columns: 38px minmax(0, 1fr);
    }

    #profile-view .profile-row-actions .action-btn .ico,
    #profile-view .profile-row-actions .btn-theme .ico {
        width: 38px;
        height: 38px;
    }

    #profile-view .profile-row-split { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
    #profile-view .profile-row-actions { grid-template-columns: 1fr; }

    #profile-view .profile-row-actions .action-btn,
    #profile-view .profile-row-actions .btn-theme {
        min-height: 72px;
    }

    .profile-heading-status {
        padding-inline: 8px;
        font-size: 0.59rem;
    }
}

/* The center column can be narrow even on a desktop when both sidebars are open. */
@container profile-panel (max-width: 900px) {
    .profile-page-heading,
    .profile-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .profile-heading-statuses { justify-content: flex-start; }

    #profile-view .profile-row-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #profile-view .profile-row-split {
        grid-template-columns: 1fr;
    }
}

@container profile-panel (max-width: 560px) {
    #profile-view .profile-row-actions {
        grid-template-columns: 1fr;
    }

    #profile-view .user-header-wrap {
        align-items: flex-start;
        flex-direction: column;
    }

    #profile-view .user-top-row {
        align-items: flex-start;
        flex-direction: column;
    }

    #profile-view .top-right-actions {
        position: static !important;
        width: 100% !important;
        justify-content: flex-start;
    }

    #profile-view .profile-row-actions .action-btn,
    #profile-view .profile-row-actions .btn-theme {
        min-height: 72px;
    }
}

/* ==========================================================================
   PROFILE MODULES — unified referral and challenge cards
   ========================================================================== */
#profile-view .ref-card,
#profile-view .profile-challenges-card {
    border: 1px solid var(--profile-line);
    border-radius: 18px;
    background: var(--profile-surface) !important;
    box-shadow: 0 18px 38px -30px rgba(0, 0, 0, 0.72);
}

#profile-view .ref-card {
    padding: clamp(18px, 2vw, 24px);
}

#profile-view .ref-card::after,
#profile-view .event-card::after {
    display: none;
}

#profile-view .ref-head {
    margin-bottom: 7px;
}

#profile-view .ref-tit {
    font-size: clamp(0.95rem, 1.5vw, 1.08rem);
    letter-spacing: -0.015em;
}

#profile-view .ref-title-icon {
    display: grid;
    width: 36px;
    height: 36px;
    border: 1px solid var(--profile-line);
    border-radius: 11px;
    place-items: center;
    background: var(--profile-soft);
}

#profile-view .ref-dsc {
    max-width: 760px;
    margin: 0 0 18px 44px;
    color: var(--text-muted);
    font-size: 0.74rem;
}

#profile-view .ref-percents {
    display: grid;
    margin-bottom: 12px;
    gap: 9px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#profile-view .ref-pct-box {
    min-height: 78px;
    padding: 15px 10px 12px;
    border: 1px solid var(--profile-line);
    border-radius: 12px;
    background: var(--profile-soft);
}

#profile-view .ref-pct-box:hover {
    border-color: rgba(var(--primary-rgb), 0.34);
    background: rgba(var(--primary-rgb), 0.065);
    transform: translateY(-2px);
}

#profile-view .ref-pct-box::before {
    left: 14px;
    right: 14px;
    height: 1px;
    background: rgba(var(--primary-rgb), 0.5) !important;
    box-shadow: none !important;
}

#profile-view .ref-pct-val {
    color: var(--text-main) !important;
    font-size: 1.25rem;
    text-shadow: none !important;
}

#profile-view .ref-link-box {
    min-height: 48px;
    padding: 5px;
    border: 1px solid var(--profile-line);
    border-radius: 12px;
    background: var(--profile-soft);
}

#profile-view .ref-input {
    color: var(--text-main);
}

#profile-view .ref-copy-btn,
#profile-view .ref-btn {
    border-radius: 9px;
}

#profile-view .profile-challenges-card {
    padding: clamp(18px, 2vw, 24px);
}

#profile-view .profile-challenges-card > .bento-title {
    margin: 0 0 14px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--profile-line);
    color: var(--text-main);
    font-size: 0.92rem;
    letter-spacing: 0;
}

#profile-view .profile-challenges-card > .bento-title::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

#profile-view .events-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

#profile-view .event-card {
    display: grid;
    min-width: 0;
    min-height: 182px;
    padding: 16px;
    gap: 14px;
    align-content: start;
    grid-template-columns: minmax(0, 1fr) auto;
    border: 1px solid var(--profile-line);
    border-radius: 15px;
    background: var(--profile-soft);
    box-shadow: none;
}

#profile-view .event-card::before {
    top: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: 2px;
    border-radius: 15px 15px 0 0;
    background: linear-gradient(90deg, transparent, var(--evt-color), transparent);
    box-shadow: none;
    opacity: 0.72;
}

#profile-view .event-card:hover {
    border-color: rgba(var(--primary-rgb), 0.3);
    background: rgba(var(--primary-rgb), 0.055);
    box-shadow: 0 16px 32px -27px rgba(var(--primary-rgb), 0.55);
}

#profile-view .event-head {
    grid-column: 1 / -1;
}

#profile-view .event-ico {
    width: 42px;
    height: 42px;
    border: 1px solid var(--profile-line);
    border-radius: 11px;
    background: var(--profile-soft);
    box-shadow: none;
    font-size: 1.25rem;
}

#profile-view .event-info h4 {
    font-size: 0.86rem;
}

#profile-view .event-prizes {
    align-content: flex-start;
    flex-direction: column;
}

#profile-view .ev-prize {
    width: fit-content;
    max-width: 100%;
    padding: 4px 8px;
    border-color: var(--profile-line);
    border-radius: 7px;
    background: var(--profile-soft);
    color: var(--text-secondary);
    font-size: 0.63rem;
}

#profile-view .ev-btn {
    align-self: end;
    padding: 9px 13px;
    border-color: rgba(var(--primary-rgb), 0.34);
    font-size: 0.63rem;
}

@container profile-panel (max-width: 920px) {
    #profile-view .events-grid {
        grid-template-columns: 1fr;
    }
}

@container profile-panel (max-width: 560px) {
    #profile-view .ref-dsc {
        margin-left: 0;
    }

    #profile-view .ref-percents {
        grid-template-columns: 1fr;
    }

    #profile-view .ref-link-box,
    #profile-view .event-card {
        grid-template-columns: 1fr;
    }

    #profile-view .ref-link-box {
        align-items: stretch;
    }

    #profile-view .ref-copy-btn,
    #profile-view .ev-btn {
        width: 100%;
    }
}

/* Keep the migrated account center authoritative while legacy dialog styles are phased out. */
#profile-view.has-profile-hub,
#profile-view:has(.profile-hub) {
    padding: 0;
    overflow:hidden;
    background: var(--app-canvas-background);
    background-size: var(--app-canvas-size);
}

@media (max-width: 1280px) {
    #profile-view:has(.profile-hub) .profile-hub { gap: 0; }
    #profile-view:has(.profile-hub) .profile-section-nav { padding: 8px; border-bottom: 1px solid var(--border-color); background: var(--bg-main) !important; }
}

#profile-view { background:var(--app-canvas-background); background-size:var(--app-canvas-size); }
#profile-view > .workshop-loader { display:flex; width:100%; min-height:100%; align-items:center; justify-content:center; }
.profile-bugboard-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 18px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-panel);
    color: var(--text-main);
    font: inherit;
    cursor: pointer;
}
.profile-bugboard-link:hover { border-color: var(--primary); color: var(--primary); }
