/* CLS — Deep black / rich purple — Premium redesign */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg-base:       #07070f;
    --bg-surface:    #0d0d1c;
    --bg-elevated:   #111127;
    --bg-card:       #0f0f20;

    --purple-900:    #2e1065;
    --purple-700:    #6d28d9;
    --purple-600:    #7c3aed;
    --purple-500:    #8b5cf6;
    --purple-400:    #a78bfa;
    --purple-300:    #c4b5fd;
    --purple-200:    #ddd6fe;

    --pink-500:      #ec4899;
    --pink-400:      #f472b6;

    --white:         #ffffff;
    --text-primary:  #f1f0ff;
    --text-secondary:#a09cc0;
    --text-muted:    #5c5880;

    --border-subtle: rgba(139, 92, 246, 0.15);
    --border-mid:    rgba(139, 92, 246, 0.28);
    --border-bright: rgba(167, 139, 250, 0.55);

    --glow-sm:       0 0 16px rgba(139, 92, 246, 0.35);
    --glow-md:       0 0 32px rgba(139, 92, 246, 0.45);
    --glow-lg:       0 0 60px rgba(139, 92, 246, 0.3);

    --glass:         rgba(13, 13, 28, 0.75);
    --font-ui:       "Inter", "Segoe UI", system-ui, sans-serif;
    --radius-sm:     8px;
    --radius-md:     14px;
    --radius-lg:     20px;
    --radius-xl:     28px;
    --transition:    0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-ui);
    min-height: 100vh;
    color: var(--text-primary);
    background: var(--bg-base);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── Animated background ─────────────────────────────────────── */
.page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.page-bg__gradient {
    position: absolute;
    inset: -60%;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(109, 40, 217, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 90% 90%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 60% 50%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, #07070f 0%, #0a0918 50%, #070710 100%);
    animation: bg-drift 20s ease-in-out infinite alternate;
}

@keyframes bg-drift {
    0%   { transform: translate(0,    0)    scale(1); }
    100% { transform: translate(-2%, 1.5%) scale(1.02); }
}

.page-bg__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orb-drift 16s ease-in-out infinite;
}

.page-bg__orb--1 {
    width: clamp(300px, 40vw, 600px);
    height: clamp(300px, 40vw, 600px);
    top: -15%;
    right: -10%;
    background: radial-gradient(circle, rgba(109, 40, 217, 0.22) 0%, transparent 70%);
    animation-delay: 0s;
}

.page-bg__orb--2 {
    width: clamp(200px, 30vw, 400px);
    height: clamp(200px, 30vw, 400px);
    bottom: 0%;
    left: -5%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
    animation-delay: -6s;
}

.page-bg__orb--3 {
    width: clamp(150px, 20vw, 280px);
    height: clamp(150px, 20vw, 280px);
    top: 40%;
    left: 35%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes orb-drift {
    0%, 100% { transform: translate(0,    0)    scale(1); }
    33%      { transform: translate(15px, -20px) scale(1.04); }
    66%      { transform: translate(-10px, 12px)  scale(0.97); }
}

.page-bg__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 85% 65% at 50% 40%, black 15%, transparent 100%);
}

.page-bg__slashes { display: none; }

/* ── Layout ──────────────────────────────────────────────────── */
.app-container {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 20px 40px;
}

.portal {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    align-items: start;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
    position: sticky;
    top: 16px;
    border-radius: var(--radius-lg);
    padding: 6px 8px 12px;
    background: linear-gradient(160deg, rgba(17,13,36,0.9) 0%, rgba(9,8,20,0.95) 100%);
    border: 1px solid var(--border-subtle);
    box-shadow:
        0 24px 48px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.04);
    backdrop-filter: blur(20px);
}

.sidebar__brand {
    padding: 14px 10px 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar__brand-title {
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    color: var(--white);
    background: linear-gradient(135deg, #c4b5fd, #a78bfa, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar__brand-sub {
    margin-top: 5px;
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    font-weight: 500;
}

.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 4px 8px;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    text-align: left;
    font-family: inherit;
    transition: var(--transition);
    transition-property: background, border-color, color, transform;
}

.nav-item:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: var(--border-subtle);
    color: var(--text-primary);
    transform: translateX(2px);
}

.nav-item.is-active {
    background: linear-gradient(135deg, rgba(124,58,237,0.25) 0%, rgba(109,40,217,0.12) 100%);
    border-color: var(--border-mid);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(109,40,217,0.2), inset 0 1px 0 rgba(255,255,255,0.06);
}

.nav-item__ico {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    color: var(--purple-400);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    flex-shrink: 0;
    transition: var(--transition);
}

.nav-item.is-active .nav-item__ico {
    background: linear-gradient(135deg, rgba(124,58,237,0.6), rgba(139,92,246,0.4));
    border-color: rgba(167,139,250,0.5);
    color: var(--white);
    box-shadow: 0 0 14px rgba(139,92,246,0.3);
}

.nav-item__txt {
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.sidebar__notes {
    margin: 6px 6px 0;
    padding: 12px 12px 10px;
    background: rgba(236, 72, 153, 0.06);
    border: 1px solid rgba(236, 72, 153, 0.22);
    border-radius: var(--radius-md);
}

.sidebar__notes-title {
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #ec4899;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.sidebar__notes-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar__notes-list li {
    font-size: 0.72rem;
    color: rgba(236, 72, 153, 0.75);
    line-height: 1.45;
    padding-left: 14px;
    position: relative;
}

.sidebar__notes-list li::before {
    content: '›';
    position: absolute;
    left: 2px;
    color: #ec4899;
    font-weight: 700;
}

.note-hl {
    color: #f472b6;
    font-weight: 700;
}

.sidebar__footer {
    padding: 10px 6px 0;
    border-top: 1px solid var(--border-subtle);
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar__token { width: 100%; justify-content: center; }

.sidebar__account {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(139, 92, 246, 0.07);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.sidebar__account-ico { font-size: 0.9rem; flex-shrink: 0; }
.sidebar__account-name { font-size: 0.8rem; font-weight: 700; color: var(--purple-300); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.sidebar__account-level { font-size: 0.7rem; font-weight: 800; color: var(--purple-400); background: rgba(139,92,246,0.15); padding: 2px 6px; border-radius: 6px; white-space: nowrap; flex-shrink: 0; }

/* ── Main ────────────────────────────────────────────────────── */
.main { min-width: 0; }

/* ── Header ──────────────────────────────────────────────────── */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 18px 24px;
    margin-bottom: 16px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(17,13,36,0.92) 0%, rgba(9,8,20,0.96) 100%);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167,139,250,0.5), rgba(236,72,153,0.3), transparent);
}

.logo { display: flex; align-items: center; gap: 14px; }

.logo__cls {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(139,92,246,0.3), 0 8px 24px rgba(109,40,217,0.4);
    animation: logo-pulse 5s ease-in-out infinite;
}

.logo__img { object-fit: contain; background: transparent; }

@keyframes logo-pulse {
    0%, 100% { box-shadow: 0 0 0 1px rgba(139,92,246,0.3), 0 8px 24px rgba(109,40,217,0.4); }
    50%       { box-shadow: 0 0 0 1px rgba(167,139,250,0.5), 0 8px 36px rgba(139,92,246,0.55); }
}

.logo__text h1 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, #e0d7ff 0%, #a78bfa 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo__by {
    display: block;
    margin-top: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--purple-400);
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.header__right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* ── How To Use Button ───────────────────────────────────────── */
.btn-how-to-use {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    font-family: inherit;
    color: #f472b6;
    background: rgba(236, 72, 153, 0.08);
    border: 1px solid rgba(236, 72, 153, 0.35);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
}
.btn-how-to-use:hover {
    background: rgba(236, 72, 153, 0.18);
    border-color: rgba(236, 72, 153, 0.65);
    color: #fbb6ce;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.25);
}
.btn-how-to-use__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 0.7rem;
    font-weight: 900;
    border-radius: 50%;
    background: rgba(236, 72, 153, 0.25);
    color: #f472b6;
    flex-shrink: 0;
}

/* ── How To Use Modal ────────────────────────────────────────── */
.htu-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(4, 3, 14, 0.82);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s;
}
.htu-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}
.htu-modal {
    background: #0f0d1f;
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 0 40px rgba(236, 72, 153, 0.15), 0 20px 60px rgba(0,0,0,0.6);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.22s;
    overflow: hidden;
}
.htu-overlay.is-open .htu-modal {
    transform: translateY(0) scale(1);
}
.htu-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid rgba(236, 72, 153, 0.15);
    background: rgba(236, 72, 153, 0.05);
}
.htu-modal__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #f472b6, #ec4899, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.htu-modal__title-ico { -webkit-text-fill-color: initial; font-size: 1.1rem; }
.htu-modal__close {
    background: transparent;
    border: 1px solid rgba(236, 72, 153, 0.25);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.htu-modal__close:hover {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border-color: rgba(236, 72, 153, 0.5);
}
.htu-modal__body {
    padding: 20px 22px 24px;
    max-height: 70vh;
    overflow-y: auto;
}
.htu-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.htu-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(236, 72, 153, 0.04);
    border: 1px solid rgba(236, 72, 153, 0.1);
    border-radius: 8px;
    transition: background 0.15s, border-color 0.15s;
}
.htu-step:hover {
    background: rgba(236, 72, 153, 0.09);
    border-color: rgba(236, 72, 153, 0.22);
}
.htu-step__num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #a78bfa);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.htu-step__text {
    font-size: 0.8rem;
    color: rgba(220, 210, 255, 0.82);
    line-height: 1.5;
}
.htu-hl {
    color: #f472b6;
    font-weight: 700;
}

/* ── Top bar ─────────────────────────────────────────────────── */
.page-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(17,13,36,0.85) 0%, rgba(9,8,20,0.92) 100%);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    backdrop-filter: blur(16px);
}

.page-topbar__kicker {
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.01em;
    color: var(--white);
}

.page-topbar__sub {
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.page-topbar__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* ── CR Balance ──────────────────────────────────────────────── */
.cr-balance {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(245,158,11,0.35);
}

.cr-balance__label { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(253,230,138,0.55); font-weight: 700; }
.cr-balance__val   { font-weight: 800; font-size: 0.92rem; color: #fde68a; font-variant-numeric: tabular-nums; }
.cr-balance__unit  { font-size: 0.7rem; color: rgba(253,230,138,0.45); font-weight: 700; }

/* ── Pages ───────────────────────────────────────────────────── */
.page { display: none; }
.page.is-active { display: block; }

/* ── Placeholder ─────────────────────────────────────────────── */
.placeholder {
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    background: linear-gradient(160deg, rgba(17,13,36,0.7) 0%, rgba(9,8,20,0.85) 100%);
    border: 1px solid var(--border-subtle);
    text-align: center;
}

.placeholder__title { font-weight: 800; color: var(--white); margin-bottom: 10px; letter-spacing: 0.04em; }
.placeholder__text  { color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; }

/* ── Social page ─────────────────────────────────────────────── */
.social-layout { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.social-tabs { display: flex; gap: 6px; flex-wrap: wrap; }

.social-tab {
    padding: 7px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(0,0,0,0.25);
    color: var(--text-secondary);
    font-size: 0.8rem; font-weight: 700; letter-spacing: 0.07em;
    cursor: pointer;
    transition: var(--transition);
}

.social-tab:hover { background: rgba(139,92,246,0.1); color: var(--text-primary); border-color: var(--border-mid); }
.social-tab.is-active { background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(109,40,217,0.15)); border-color: var(--border-bright); color: var(--white); }

.social-actions { display: flex; gap: 10px; }
.social-list { min-height: 120px; }
.social-player-list { display: flex; flex-direction: column; gap: 8px; }

.social-player {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px; border-radius: var(--radius-md);
    background: rgba(13,13,28,0.7);
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
}

.social-player:hover { border-color: var(--border-mid); background: rgba(139,92,246,0.06); }

.social-player__avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(109,40,217,0.2));
    border: 1px solid var(--border-mid);
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 1rem; color: var(--white); flex-shrink: 0;
}

.social-player__info { flex: 1; min-width: 0; }
.social-player__name { font-weight: 700; font-size: 0.92rem; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.social-player__id   { font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; font-variant-numeric: tabular-nums; }

.social-player__status {
    font-size: 0.75rem; padding: 3px 10px; border-radius: 999px;
    background: rgba(139,92,246,0.12); border: 1px solid rgba(139,92,246,0.3);
    color: var(--purple-400); white-space: nowrap;
}

/* ── Settings page ───────────────────────────────────────────── */
.settings-layout { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; max-width: 700px; }

.settings-section {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: linear-gradient(160deg, rgba(17,13,36,0.65) 0%, rgba(9,8,20,0.82) 100%);
    overflow: hidden;
}

.settings-section__title {
    padding: 11px 18px 10px;
    font-size: 0.7rem; font-weight: 800;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--purple-400);
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(139,92,246,0.05);
}

.settings-row {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer; transition: background var(--transition);
}

.settings-row:last-child { border-bottom: none; }
.settings-row:hover { background: rgba(139,92,246,0.05); }
.settings-row__label { font-weight: 700; font-size: 0.88rem; color: var(--text-primary); flex: 1; pointer-events: none; }
.settings-row__desc  { font-size: 0.78rem; color: var(--text-muted); flex: 2; pointer-events: none; line-height: 1.55; }

.settings-about { padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.settings-about__name { font-weight: 800; font-size: 1rem; color: var(--white); margin-bottom: 4px; }
.settings-about__line { font-size: 0.82rem; color: var(--text-muted); }
.settings-about__link { color: var(--purple-400); text-decoration: none; }
.settings-about__link:hover { color: var(--purple-300); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border: none; border-radius: var(--radius-md);
    cursor: pointer; font-size: 0.9rem; font-weight: 700;
    font-family: inherit; letter-spacing: 0.02em;
    transition: var(--transition);
    transition-property: transform, box-shadow, background, border-color, opacity;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 60%, #5b21b6 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(109,40,217,0.45), 0 1px 0 rgba(255,255,255,0.1) inset;
    border: 1px solid rgba(167,139,250,0.25);
    position: relative; overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 60%);
    border-radius: inherit;
    pointer-events: none;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(109,40,217,0.6), 0 1px 0 rgba(255,255,255,0.12) inset;
}

.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    background: rgba(139,92,246,0.08);
    color: var(--purple-300);
    border: 1px solid var(--border-mid);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-1px);
    background: rgba(139,92,246,0.16);
    border-color: var(--border-bright);
    color: var(--purple-200);
    box-shadow: 0 4px 16px rgba(109,40,217,0.25);
}

.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Filter button active states */
#backpackOnlyBtn { flex-shrink: 0; }
#backpackOnlyBtn.active {
    background: linear-gradient(135deg, rgba(124,58,237,0.45), rgba(109,40,217,0.3));
    border-color: var(--border-bright);
    color: var(--white);
    box-shadow: 0 0 16px rgba(109,40,217,0.4);
}

.container-filter-group .btn.active {
    background: linear-gradient(135deg, rgba(124,58,237,0.4), rgba(109,40,217,0.25));
    border-color: rgba(167,139,250,0.6);
    color: var(--purple-200);
    box-shadow: 0 0 14px rgba(109,40,217,0.35);
    font-weight: 700;
}

#refreshedOnlyBtn { flex-shrink: 0; }
#refreshedOnlyBtn.active {
    background: linear-gradient(135deg, rgba(236,72,153,0.3), rgba(219,39,119,0.2));
    border-color: rgba(244,114,182,0.55);
    color: var(--pink-400);
    box-shadow: 0 0 14px rgba(236,72,153,0.3);
}

.btn-icon { font-size: 1.05rem; line-height: 1; }

/* ── Filters bar ─────────────────────────────────────────────── */
.controls { display: flex; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; align-items: center; }

.filters {
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 14px;
    background: linear-gradient(160deg, rgba(17,13,36,0.6) 0%, rgba(9,8,20,0.75) 100%);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    backdrop-filter: blur(12px);
}

.filters__row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.filters__row--second { margin-top: 12px; align-items: center; }
.filters__group { display: flex; flex-direction: column; gap: 7px; }
.filters__group--grow { flex: 1; min-width: 260px; }

.filters__label {
    font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
    font-weight: 700; color: var(--text-muted);
}

.filters__select {
    appearance: none;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-mid);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-family: inherit;
    font-weight: 600; font-size: 0.88rem;
    cursor: pointer; min-width: 160px;
    transition: border-color var(--transition);
}

.filters__select:focus { outline: none; border-color: var(--border-bright); }
.filters__select:disabled { opacity: 0.5; cursor: not-allowed; }

/* Search box */
.search-box {
    flex: 1; min-width: 200px;
    display: flex; align-items: center; gap: 10px;
    padding: 0 14px; border-radius: var(--radius-md);
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-mid);
    transition: border-color var(--transition);
}

.search-box:focus-within { border-color: var(--border-bright); box-shadow: 0 0 0 3px rgba(109,40,217,0.1); }
.search-box--wide { min-width: 260px; }
.search-icon { color: var(--text-muted); font-size: 1.05rem; }

.search-box input {
    flex: 1; background: transparent; border: none;
    padding: 11px 0; color: var(--text-primary);
    font-size: 0.9rem; outline: none; font-family: inherit;
}

.search-box input::placeholder { color: var(--text-muted); }

/* Sort box */
.sort-box {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--border-mid);
}

.sort-box label { font-size: 0.82rem; color: var(--text-muted); }
.sort-box select { background: transparent; border: none; color: var(--text-primary); padding: 6px 4px; font-size: 0.88rem; cursor: pointer; outline: none; font-family: inherit; }
.sort-box select option { background: #0d0d1c; }

/* ── Toggle ──────────────────────────────────────────────────── */
.toggle {
    display: inline-flex; align-items: center; gap: 10px;
    user-select: none; cursor: pointer;
    padding: 9px 12px; border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: rgba(0,0,0,0.25);
    position: relative;
}

.toggle input { position: absolute; opacity: 0; pointer-events: none; }

.toggle__track {
    width: 42px; height: 23px; border-radius: 999px;
    border: 1px solid rgba(139,92,246,0.3);
    background: rgba(139,92,246,0.07);
    position: relative; flex-shrink: 0;
    transition: background var(--transition), border-color var(--transition);
}

.toggle__track::after {
    content: ""; position: absolute;
    top: 3px; left: 3px;
    width: 17px; height: 17px; border-radius: 50%;
    background: var(--text-muted);
    box-shadow: 0 0 6px rgba(0,0,0,0.3);
    transition: transform var(--transition), background var(--transition);
}

.toggle input:checked + .toggle__track { background: rgba(139,92,246,0.25); border-color: rgba(167,139,250,0.55); }
.toggle input:checked + .toggle__track::after { transform: translateX(19px); background: var(--purple-400); box-shadow: 0 0 10px rgba(139,92,246,0.4); }

.toggle__txt { font-weight: 700; font-size: 0.72rem; letter-spacing: 0.1em; color: var(--text-secondary); }
.toggle--compact { padding: 7px 10px; }
.toggle--compact .toggle__txt { font-size: 0.68rem; }

/* ── Inventory cards ─────────────────────────────────────────── */
.inv-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.inv-grid--compact { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.inv-grid--compact .inv-card { padding: 8px 10px; }
.inv-grid--compact .inv-card__icon { width: 36px; height: 36px; }
.inv-grid--large { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.inv-card {
    position: relative;
    border-radius: var(--radius-md);
    padding: 14px 13px;
    background: linear-gradient(160deg, rgba(17,13,36,0.65) 0%, rgba(9,8,20,0.85) 100%);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: var(--transition);
    transition-property: transform, border-color, box-shadow, background;
    overflow: hidden;
}

.inv-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167,139,250,0.2), transparent);
    opacity: 0; transition: opacity var(--transition);
}

.inv-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-mid);
    box-shadow: 0 12px 32px rgba(0,0,0,0.45), 0 0 0 1px rgba(139,92,246,0.1);
}

.inv-card:hover::before { opacity: 1; }

.inv-card.is-selected {
    border-color: rgba(236,72,153,0.65);
    box-shadow: 0 0 0 1px rgba(236,72,153,0.25), 0 12px 32px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(236,72,153,0.08), 0 0 16px rgba(236,72,153,0.12);
    background: linear-gradient(160deg, rgba(30,10,30,0.75) 0%, rgba(12,10,28,0.9) 100%);
}

.inv-card__top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding-right: 46px; }

.inv-card__icon {
    width: 46px; height: 46px; border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-subtle);
    display: grid; place-items: center;
    overflow: hidden; flex-shrink: 0;
}

.inv-card__icon img { width: 100%; height: 100%; object-fit: contain; }
.inv-card__title { min-width: 0; flex: 1; }

.inv-card__name {
    font-weight: 700; color: var(--text-primary); font-size: 0.88rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; word-break: break-word; line-height: 1.4;
}

.inv-card__meta {
    margin-top: 4px; font-size: 0.72rem; color: var(--text-muted);
    display: flex; gap: 8px; flex-wrap: wrap;
}

.inv-card__pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 7px; border-radius: 999px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-subtle);
    font-size: 0.7rem;
}

.inv-card__qty {
    position: absolute; right: 10px; top: 10px;
    padding: 5px 9px; border-radius: 999px;
    background: rgba(139,92,246,0.12);
    border: 1px solid rgba(139,92,246,0.28);
    color: var(--purple-300);
    font-weight: 800; font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.inv-card__attach { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }

.inv-card__attach-img {
    width: 26px; height: 26px; object-fit: contain;
    border-radius: 4px; background: rgba(0,0,0,0.35);
    border: 1px solid var(--border-subtle); padding: 2px;
}

.inv-card__attach-empty {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 4px;
    background: rgba(0,0,0,0.2); border: 1px dashed rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.18); font-size: 0.75rem;
}

.inv-card__actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 10px; }

.inv-mini-btn {
    border: 1px solid var(--border-mid);
    background: rgba(139,92,246,0.08);
    color: var(--purple-300);
    border-radius: var(--radius-sm); padding: 7px 10px;
    font-weight: 700; font-size: 0.8rem;
    font-family: inherit; cursor: pointer;
    transition: var(--transition);
}

.inv-mini-btn:hover:not(:disabled) { transform: translateY(-1px); background: rgba(139,92,246,0.18); border-color: var(--border-bright); }
.inv-mini-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Bulk bar ─────────────────────────────────────────────────── */
.bulk-actions {
    position: sticky; bottom: 14px; margin-top: 14px;
    border-radius: var(--radius-md); padding: 11px 14px;
    background: rgba(9,8,20,0.92);
    border: 1px solid var(--border-mid);
    box-shadow: 0 20px 50px rgba(0,0,0,0.55), 0 0 0 1px rgba(139,92,246,0.08);
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; backdrop-filter: blur(20px);
}

.bulk-actions__left, .bulk-actions__right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bulk-actions__count { font-weight: 800; letter-spacing: 0.02em; color: var(--text-primary); font-size: 0.88rem; }

.bulk-actions__btn {
    padding: 9px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-mid);
    background: rgba(0,0,0,0.3);
    color: var(--text-secondary); font-weight: 700;
    letter-spacing: 0.05em; font-size: 0.75rem;
    font-family: inherit; cursor: pointer;
    transition: var(--transition);
}

.bulk-actions__btn:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--border-bright); color: var(--text-primary); background: rgba(139,92,246,0.1); }
.bulk-actions__btn:disabled { opacity: 0.45; cursor: not-allowed; }

.bulk-actions__btn--primary {
    background: linear-gradient(135deg, rgba(124,58,237,0.75) 0%, rgba(109,40,217,0.6) 100%);
    border-color: rgba(167,139,250,0.4);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(109,40,217,0.35);
}

.bulk-actions__btn--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(139,92,246,0.85) 0%, rgba(124,58,237,0.7) 100%);
    box-shadow: 0 6px 24px rgba(109,40,217,0.5);
    color: var(--white);
}

.bulk-actions__btn--warn { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.3); color: rgba(191,219,254,0.9); }
.bulk-actions__btn--danger { background: rgba(220,38,38,0.1); border-color: rgba(220,38,38,0.3); color: rgba(254,202,202,0.9); }
.bulk-actions__btn--ghost { background: rgba(139,92,246,0.07); border-color: var(--border-subtle); color: var(--purple-300); }

/* ── Badges ──────────────────────────────────────────────────── */
.backpack-only-badge {
    font-size: 0.78rem; font-weight: 600; color: var(--purple-300);
    padding: 5px 10px; border-radius: var(--radius-sm);
    background: rgba(139,92,246,0.12);
    border: 1px solid var(--border-mid); white-space: nowrap;
}

.backpack-only-badge.hidden { display: none; }

.inventory-banner {
    margin-bottom: 14px; padding: 12px 16px; border-radius: var(--radius-sm);
    font-size: 0.87rem; line-height: 1.45; color: #fde68a;
    background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.35);
}

.inventory-banner.inventory-banner--hidden { display: none; }

/* ── Loading ─────────────────────────────────────────────────── */
.loading { text-align: center; padding: 56px 24px; }

.spinner {
    width: 44px; height: 44px;
    border: 2px solid rgba(139,92,246,0.15);
    border-top-color: var(--purple-500);
    border-right-color: rgba(236,72,153,0.5);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Stats pill ──────────────────────────────────────────────── */
.header-stats {
    display: inline-flex; align-items: center; justify-content: center;
    flex-wrap: wrap; padding: 10px 22px; min-height: 42px;
    border-radius: 999px;
    font-size: 0.85rem; font-weight: 500; font-family: inherit;
    letter-spacing: 0.01em; font-variant-numeric: tabular-nums;
    color: var(--purple-300);
    background: rgba(9,8,20,0.9);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.header-stats .stats-pill__inner { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0; row-gap: 4px; }
.header-stats .stats-pill__seg { display: inline-flex; align-items: center; gap: 0.35em; white-space: nowrap; color: inherit; }
.header-stats .stats-pill__ico { font-size: 1.05em; line-height: 1; font-style: normal; }
.header-stats .stats-pill__time { font-family: ui-monospace, monospace; letter-spacing: 0.03em; }
.header-stats .stats-pill__sep { display: inline; color: var(--text-muted); font-weight: 400; padding: 0 0.45em; user-select: none; pointer-events: none; vertical-align: middle; }
.header-stats .stats-pill__seg--refreshed { color: var(--purple-300); white-space: normal; max-width: min(420px, 94vw); flex-wrap: wrap; }
.header-stats .stats-pill__link { margin-inline-start: 0.35em; padding: 2px 8px; font-size: 0.78em; font-weight: 600; font-family: inherit; color: var(--purple-300); background: rgba(139,92,246,0.15); border: 1px solid var(--border-mid); border-radius: 6px; cursor: pointer; pointer-events: auto; }
.header-stats .stats-pill__link:hover { background: rgba(139,92,246,0.25); }

/* ── Account strip ───────────────────────────────────────────── */
.header-account {
    display: inline-flex; align-items: center; max-width: min(520px, 92vw);
    padding: 7px 16px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
    font-family: inherit; color: var(--text-secondary);
    background: rgba(9,8,20,0.88);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.header-account__inner { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35em; justify-content: flex-end; row-gap: 4px; }
.header-account__ico { font-size: 1em; opacity: 0.9; }
.header-account__name { font-weight: 800; color: var(--text-primary); }
.header-account__dot { color: var(--text-muted); user-select: none; padding: 0 0.2em; font-weight: 400; }
.header-account__level { font-weight: 800; font-size: 0.9em; color: var(--purple-300); }

/* ── Inventory table (legacy, still used) ────────────────────── */
.inventory-container {
    border-radius: var(--radius-md); overflow: auto;
    max-height: calc(100vh - 280px); padding-bottom: 24px; margin-bottom: 8px;
    background: linear-gradient(160deg, rgba(17,13,36,0.65) 0%, rgba(9,8,20,0.82) 100%);
    border: 1px solid var(--border-subtle);
}

.inventory-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

.inventory-table thead { position: sticky; top: 0; z-index: 2; background: linear-gradient(180deg, #0d0c1f 0%, #09080e 100%); }

.inventory-table th {
    text-align: left; padding: 13px 14px;
    color: var(--purple-300); font-weight: 700; font-size: 0.78rem;
    text-transform: uppercase; letter-spacing: 0.07em;
    border-bottom: 1px solid var(--border-mid);
}

.inventory-table td {
    padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer; transition: background var(--transition);
}

.inventory-table td.checkbox-cell { cursor: default; vertical-align: middle; width: 52px; padding: 8px 10px; }

.row-select-label {
    display: flex; align-items: center; justify-content: center; position: relative;
    min-width: 44px; min-height: 44px; margin: -4px auto;
    cursor: pointer; border-radius: var(--radius-sm);
    transition: background var(--transition); overflow: hidden;
}

.row-select-label:hover { background: rgba(139,92,246,0.1); }
.row-select-label:focus-within { outline: 2px solid var(--purple-500); outline-offset: 2px; }

.row-checkbox { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }

.row-select-box {
    width: 21px; height: 21px; border-radius: 6px;
    border: 2px solid rgba(139,92,246,0.45);
    background: rgba(9,8,20,0.85);
    display: flex; align-items: center; justify-content: center;
    transition: border-color var(--transition), background var(--transition);
}

.row-checkbox:checked + .row-select-box {
    background: linear-gradient(135deg, rgba(124,58,237,0.6), rgba(109,40,217,0.5));
    border-color: var(--purple-400);
    box-shadow: 0 0 10px rgba(109,40,217,0.3);
}

.row-checkbox:checked + .row-select-box::after {
    content: ""; width: 6px; height: 10px;
    border: solid rgba(230,220,255,0.95); border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg); margin-bottom: 2px;
}

.th-select-wrap { display: flex; align-items: center; justify-content: center; }
.th-select-wrap .row-select-label { margin: 0; }

.inventory-table tbody tr:hover { background: rgba(139,92,246,0.06); }
.row-selected { background: rgba(236,72,153,0.1) !important; border-left: 3px solid #ec4899; }
.blacklisted-row { opacity: 0.5; background: rgba(220,38,38,0.05); }

/* Cloned items */
.inventory-table tbody tr.row-cloned {
    background: linear-gradient(90deg, rgba(245,158,11,0.12) 0%, rgba(251,191,36,0.05) 50%, transparent 100%);
    border-left: 3px solid #f59e0b;
}

.inventory-table tbody tr.row-cloned:hover {
    background: linear-gradient(90deg, rgba(245,158,11,0.18) 0%, rgba(251,191,36,0.08) 50%, rgba(139,92,246,0.05) 100%) !important;
}

.inventory-table tbody tr.row-cloned.row-selected {
    background: linear-gradient(90deg, rgba(245,158,11,0.16) 0%, rgba(139,92,246,0.08) 100%) !important;
    border-left-color: var(--purple-400);
}

.name-cell--cloned { color: #fde68a; }

.cloned-badge {
    display: inline-block; margin-left: 8px; padding: 3px 8px;
    font-size: 10px; font-weight: 800; letter-spacing: 0.04em;
    border-radius: 6px; vertical-align: middle;
    color: #1a0a00;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: 1px solid #fcd34d;
    box-shadow: 0 0 10px rgba(245,158,11,0.4);
}

/* Session refreshed */
.inventory-table tbody tr.row-session-refreshed:not(.row-cloned) {
    background: linear-gradient(90deg, rgba(139,92,246,0.18) 0%, rgba(109,40,217,0.08) 50%, transparent 100%);
    border-left: 4px solid var(--purple-500);
    box-shadow: inset 0 0 0 1px rgba(139,92,246,0.2);
}

.inventory-table tbody tr.row-session-refreshed:not(.row-cloned):hover {
    background: linear-gradient(90deg, rgba(139,92,246,0.22) 0%, rgba(109,40,217,0.1) 50%, transparent 100%) !important;
}

.inventory-table tbody tr.row-cloned.row-session-refreshed {
    border-right: 3px solid var(--purple-500);
    box-shadow: inset 0 0 0 1px rgba(245,158,11,0.18), inset -3px 0 0 0 var(--purple-500);
}

.name-cell--refreshed:not(.name-cell--cloned) { color: var(--purple-300); }

.refreshed-badge {
    display: inline-block; margin-left: 8px; padding: 3px 8px;
    font-size: 10px; font-weight: 800; letter-spacing: 0.03em;
    border-radius: 6px; vertical-align: middle;
    color: var(--white);
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border: 1px solid rgba(167,139,250,0.5);
    box-shadow: 0 0 10px rgba(109,40,217,0.4);
}

.modal--cloned-item .modal-content--cloned { border-color: rgba(245,158,11,0.5); box-shadow: 0 0 0 1px rgba(245,158,11,0.2), 0 24px 64px rgba(0,0,0,0.65); }
.modal-cloned-banner { margin: 0 0 14px; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.06em; color: #1a0a00; background: linear-gradient(90deg, #f59e0b, #fbbf24); border: 1px solid #fcd34d; text-align: center; }

.modal--session-refreshed .modal-content--refreshed { border-color: rgba(139,92,246,0.45); box-shadow: 0 0 0 1px rgba(109,40,217,0.2), 0 24px 64px rgba(0,0,0,0.65); }
.modal-refreshed-banner { margin: 0 0 14px; padding: 10px 14px; border-radius: 8px; font-size: 0.82rem; font-weight: 600; line-height: 1.35; color: var(--white); background: linear-gradient(90deg, #7c3aed, #a855f7); border: 1px solid rgba(167,139,250,0.5); text-align: center; }

/* Table cells */
.icon-cell { width: 52px; text-align: center; }
.item-icon { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.no-icon { font-size: 1.3rem; opacity: 0.4; }
.name-cell { font-weight: 500; color: var(--text-primary); max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amount-cell { width: 80px; text-align: center; color: var(--purple-300); font-weight: 700; }
.th-status-id { min-width: 88px; text-align: center; font-size: 0.78rem; letter-spacing: 0.02em; }
.status-id-cell { text-align: center; vertical-align: middle; font-weight: 700; font-size: 0.82rem; white-space: nowrap; }
.status-id-cell--yes { color: var(--purple-300); }
.status-id-cell--yes .status-id-label { display: inline-block; padding: 4px 10px; border-radius: 7px; background: rgba(139,92,246,0.15); border: 1px solid var(--border-mid); }
.status-id-cell--no { color: var(--text-muted); }
.status-id-cell--no .status-id-label { display: inline-block; padding: 4px 10px; border-radius: 7px; background: rgba(255,255,255,0.04); border: 1px solid rgba(100,116,139,0.2); }
.category-cell { font-size: 0.8rem; color: var(--text-muted); }
.actions-cell { width: 120px; text-align: center; }

.btn-refresh-id {
    padding: 7px 12px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-mid);
    background: rgba(139,92,246,0.1); color: var(--purple-300);
    font-size: 0.78rem; font-weight: 600; cursor: pointer;
    font-family: inherit; transition: var(--transition);
}

.btn-refresh-id:hover:not(:disabled) { background: rgba(139,92,246,0.22); color: var(--white); box-shadow: 0 0 12px rgba(109,40,217,0.3); }
.btn-refresh-id:disabled { opacity: 0.5; }

.error-message { margin-top: 20px; padding: 16px; border-radius: var(--radius-sm); text-align: center; color: #fecaca; background: rgba(220,38,38,0.1); border: 1px solid rgba(248,113,113,0.3); }

/* ── Modal ───────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; justify-content: center; align-items: center; background: rgba(4,3,12,0.9); backdrop-filter: blur(10px); }

.modal-content {
    border-radius: var(--radius-xl); max-width: 500px; width: 92%;
    border: 1px solid var(--border-mid);
    background: linear-gradient(160deg, rgba(18,13,38,0.98) 0%, rgba(9,8,20,0.99) 100%);
    box-shadow: 0 32px 80px rgba(0,0,0,0.65), 0 0 0 1px rgba(139,92,246,0.08);
    overflow: hidden;
}

.modal-header { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--border-subtle); background: rgba(139,92,246,0.05); }
.modal-header h3 { margin: 0; color: var(--purple-300); font-size: 1.05rem; }
.modal-icon { width: 46px; height: 46px; object-fit: contain; border-radius: 9px; }
.modal-icon-placeholder { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; background: rgba(0,0,0,0.3); border-radius: 9px; border: 1px solid var(--border-subtle); }
.modal-details { padding: 20px 22px; }
.modal-details p { margin: 10px 0; font-size: 0.9rem; line-height: 1.55; }
.modal-details strong { color: var(--purple-400); }
.close-modal { float: right; font-size: 1.4rem; cursor: pointer; color: var(--text-muted); line-height: 1; }
.close-modal:hover { color: var(--purple-300); }
.close-btn { margin: 14px 22px 20px; width: calc(100% - 44px); }
.btn.btn-primary.close-btn { justify-content: center; }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
    position: relative; z-index: 1; margin-top: 36px;
    padding: 18px 16px 22px; text-align: center;
    background: linear-gradient(180deg, transparent 0%, rgba(7,7,15,0.95) 50%);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border-top: 1px solid var(--border-subtle);
}

.site-footer__slashes { display: block; font-family: inherit; font-weight: 700; font-size: 0.68rem; letter-spacing: 0.3em; color: var(--text-muted); margin-bottom: 8px; opacity: 0.6; }
.site-footer__slashes--bottom { margin-top: 10px; margin-bottom: 0; }
.site-footer__line { display: block; width: min(180px, 45%); height: 1px; margin: 0 auto 12px; background: linear-gradient(90deg, transparent, rgba(139,92,246,0.5), rgba(236,72,153,0.25), transparent); }
.site-footer__row { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.site-footer__logo { width: 50px; height: 50px; object-fit: cover; border-radius: var(--radius-sm); box-shadow: 0 0 20px rgba(109,40,217,0.3); }
.site-footer__text { font-size: 0.76rem; color: var(--text-muted); margin: 0; }
.site-footer__text strong { color: var(--text-primary); font-weight: 700; letter-spacing: 0.15em; }

/* ── Login / Token overlay ───────────────────────────────────── */
.token-overlay {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center; padding: 24px;
    background: radial-gradient(ellipse 130% 110% at 50% 0%, rgba(109,40,217,0.15) 0%, rgba(7,7,15,0.97) 55%);
}

.token-overlay.hidden { display: none !important; }

.token-scene { position: relative; width: 100%; max-width: 440px; }

.token-scene__glow {
    position: absolute; inset: -50%;
    background: radial-gradient(circle at 50% 30%, rgba(109,40,217,0.25) 0%, transparent 55%);
    animation: token-glow 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes token-glow { 0%, 100% { opacity: 0.65; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }

.token-card {
    position: relative; padding: 36px 32px 28px; border-radius: var(--radius-xl);
    background: linear-gradient(165deg, rgba(18,13,36,0.96) 0%, rgba(9,8,20,0.98) 100%);
    border: 1px solid var(--border-mid);
    box-shadow: 0 32px 90px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.03) inset;
    backdrop-filter: blur(20px);
    animation: card-enter 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes card-enter { from { opacity: 0; transform: translateY(28px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }

.token-card::before {
    content: ""; position: absolute; inset: 0; border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(135deg, rgba(167,139,250,0.4), transparent 45%, rgba(236,72,153,0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    pointer-events: none;
}

.token-card__brand-visual { display: flex; justify-content: center; margin-bottom: 14px; }
.token-card__cls-logo { width: 96px; height: 96px; max-width: 100%; object-fit: cover; border-radius: var(--radius-md); filter: drop-shadow(0 4px 20px rgba(109,40,217,0.55)) drop-shadow(0 0 10px rgba(236,72,153,0.15)); }

.token-card__brand--cls {
    font-size: 2rem; letter-spacing: 0.4em; text-align: center;
    font-weight: 900;
    background: linear-gradient(135deg, #e0d7ff, #a78bfa, #ec4899);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.token-card__brand { text-align: center; font-family: inherit; font-weight: 800; font-size: 1.7rem; letter-spacing: 0.12em; margin-bottom: 8px; }
.token-card__brand-mark { color: var(--text-primary); }
.token-card__brand:not(.token-card__brand--cls) .token-card__brand-dot { color: var(--purple-400); animation: dot-pulse 2.2s ease-in-out infinite; }
@keyframes dot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.token-card__brand-store { color: var(--purple-400); }

.token-card__subtitle { text-align: center; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 28px; }
.token-card__title { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; text-align: left; }
.token-card__hint { font-size: 0.82rem; line-height: 1.65; color: var(--text-muted); margin-bottom: 22px; text-align: left; }
.token-card__hint a, .token-card__link { color: var(--purple-400); text-decoration: underline; text-underline-offset: 3px; }
.token-card__hint a:hover, .token-card__link:hover { color: var(--purple-300); }

.token-card__oauth { width: 100%; justify-content: center; margin-bottom: 10px; }
.token-card__oauth-hint { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 18px; text-align: center; }

.token-field { display: block; margin-bottom: 18px; }
.token-field__label { display: block; font-size: 0.74rem; font-weight: 700; color: var(--purple-400); margin-bottom: 8px; letter-spacing: 0.06em; text-transform: uppercase; }

.token-field__box {
    display: flex; align-items: center; gap: 12px;
    padding: 4px 16px 4px 4px; border-radius: var(--radius-md);
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border-mid);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.token-field__box:focus-within { border-color: var(--border-bright); box-shadow: 0 0 0 3px rgba(109,40,217,0.14); }
.token-field__icon { color: var(--purple-500); font-size: 0.65rem; opacity: 0.9; }
.token-field__icon--green { color: var(--purple-400); }

.token-field__input {
    flex: 1; border: none; background: transparent;
    padding: 13px 0 13px 8px; color: var(--text-primary);
    font-size: 0.82rem;
    font-family: ui-monospace, "Cascadia Code", monospace;
    outline: none;
}

.token-field__input::placeholder { color: var(--text-muted); }

.token-card__submit {
    position: relative; width: 100%; padding: 15px 20px;
    border: none; border-radius: var(--radius-md);
    font-size: 0.96rem; font-weight: 700; font-family: inherit;
    color: var(--white); cursor: pointer; overflow: hidden;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%);
    box-shadow: 0 10px 36px rgba(109,40,217,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
    transition: transform var(--transition), box-shadow var(--transition);
}

.token-card__submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 48px rgba(109,40,217,0.65), inset 0 1px 0 rgba(255,255,255,0.12); }
.token-card__submit:disabled { opacity: 0.5; cursor: not-allowed; }

.token-card__submit-shine {
    position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    animation: shine 3.5s ease-in-out infinite;
}

@keyframes shine { 0% { left: -100%; } 45%, 100% { left: 200%; } }

.token-card__error { display: none; margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 0.85rem; text-align: left; color: #fecaca; background: rgba(127,29,29,0.3); border: 1px solid rgba(248,113,113,0.3); }
.token-card__error.is-visible { display: block; animation: shake 0.4s ease; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.token-card__legal { margin-top: 22px; text-align: center; font-size: 0.71rem; color: var(--text-muted); }

/* ── Discord FAB ─────────────────────────────────────────────── */
.discord-fab {
    position: fixed; right: 20px; bottom: 20px; z-index: 9500;
    width: 54px; height: 54px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--white); background: #5865f2;
    border: 1px solid rgba(255,255,255,0.18); text-decoration: none;
    box-shadow: 0 8px 24px rgba(88,101,242,0.5), 0 2px 8px rgba(0,0,0,0.4);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.discord-fab:hover { transform: scale(1.07) translateY(-2px); box-shadow: 0 12px 32px rgba(88,101,242,0.65), 0 4px 12px rgba(0,0,0,0.45); color: var(--white); }
.discord-fab:focus-visible { outline: 2px solid var(--purple-300); outline-offset: 3px; }
.discord-fab__icon { flex-shrink: 0; opacity: 0.98; }

/* ── Scrollbar ───────────────────────────────────────────────── */
/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #ec4899 rgba(9,8,20,0.85);
}
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: rgba(9,8,20,0.85); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f472b6, #ec4899 45%, #a78bfa);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #fbcfe8, #f472b6 40%, #ec4899);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .header { flex-direction: column; text-align: center; }
    .header__right { align-items: center; width: 100%; }
    .header-account { justify-content: center; max-width: 100%; }
    .header-account__inner { justify-content: center; }
    .discord-fab { right: 14px; bottom: 14px; width: 50px; height: 50px; }
    .logo { flex-direction: column; }
    .controls { flex-direction: column; }
    .search-box, .sort-box, .btn { width: 100%; }
    .portal { grid-template-columns: 1fr; }
    .sidebar { position: relative; top: auto; }
    .inv-grid { grid-template-columns: 1fr; }
    .token-card { padding: 28px 22px 22px; }
}

/* ── Misc ────────────────────────────────────────────────────── */
#bulkProgressOverlay { animation: none !important; }
