/* Z5 — SecuredC# inspired dark fluent theme */

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

:root {
    --bg-base:       #0a0d12;
    --bg-surface:    #0f141d;
    --bg-elevated:   #1f2633;
    --bg-card:       #131722;

    --purple-900:    #1d2a3d;
    --purple-700:    #2f4769;
    --purple-600:    #40608a;
    --purple-500:    #6ba3f5;
    --purple-400:    #8bb8ff;
    --purple-300:    #b8c5d6;
    --purple-200:    #eaf2ff;

    --pink-500:      #2e7d32;
    --pink-400:      #66bb6a;

    --white:         #ffffff;
    --text-primary:  #f2f5fa;
    --text-secondary:#94a3b8;
    --text-muted:    #64748b;

    --border-subtle: #151e2e;
    --border-mid:    #233247;
    --border-bright: #4c5e7e;

    --glow-sm:       0 0 16px rgba(107, 163, 245, 0.2);
    --glow-md:       0 0 26px rgba(107, 163, 245, 0.24);
    --glow-lg:       0 0 48px rgba(107, 163, 245, 0.2);

    --glass:         rgba(15, 20, 29, 0.84);
    --font-ui:       "Manrope", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, 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;
}

.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 55% 45% at 15% 15%, rgba(110, 143, 212, 0.18) 0%, transparent 65%),
        radial-gradient(ellipse 45% 55% at 85% 80%, rgba(100, 60, 200, 0.14) 0%, transparent 60%),
        radial-gradient(ellipse 40% 35% at 70% 20%, rgba(60, 140, 180, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 60% 30% at 40% 95%, rgba(80, 50, 160, 0.10) 0%, transparent 65%);
}

.bg-layer {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.bg-stars { opacity: 0.56; }
.bg-lines { opacity: 0.42; }
.bg-dots { opacity: 0.88; }

.loading-strip {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 3px;
    z-index: 999;
    background: rgba(255, 255, 255, 0.06);
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}

.loading-strip.active {
    opacity: 1;
}

.loading-strip > span {
    display: block;
    width: 36%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, #5ea8ff 36%, #8bc4ff 62%, transparent 100%);
    animation: stripMove 1.1s linear infinite;
}

@keyframes stripMove {
    0% { transform: translateX(-40%); }
    100% { transform: translateX(320%); }
}

/* ── 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(19,23,34,0.95) 0%, rgba(15,20,29,0.98) 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;
}

.sidebar__brand-title {
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    color: var(--white);
    background: linear-gradient(135deg, #b7d5ff, #6ba3f5, #6bf5b3);
    -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);
}

.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(107, 163, 245, 0.56), rgba(107, 245, 179, 0.36));
    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: #6ba3f5;
    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: #6ba3f5;
    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(19,23,34,0.95) 0%, rgba(15,20,29,0.98) 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__z5 {
    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, #dbeafe 0%, #8bb8ff 52%, #6bf5b3 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; }

/* ── 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);
    margin-left: 4px;
}

.page-topbar__sub {
    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: 9px;
    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; }

/* ── Step Guide Panel ─────────────────────────────────────────── */
.guide-panel {
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid rgba(154, 173, 208, 0.2);
    background: linear-gradient(160deg, rgba(22, 28, 42, 0.72) 0%, rgba(14, 18, 28, 0.86) 100%);
    box-shadow: 0 14px 38px rgba(2, 6, 14, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px) saturate(125%);
    -webkit-backdrop-filter: blur(14px) saturate(125%);
}

.guide-panel__head { margin-bottom: 10px; }
.guide-panel__title {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #dbeafe;
    margin-bottom: 4px;
}
.guide-panel__desc {
    font-size: 0.76rem;
    color: #9db4d7;
    line-height: 1.5;
}

.guide-panel__steps {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 7px;
}
.guide-panel__steps li {
    font-size: 0.77rem;
    color: #bfd0ea;
    line-height: 1.52;
}
.guide-panel__step-label {
    color: #e9f2ff;
    font-weight: 700;
}

/* ── Empty state ──────────────────────────────────────────────── */
.empty-state {
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(145deg, rgba(24, 33, 49, 0.7), rgba(13, 19, 29, 0.88));
    border: 1px solid rgba(140, 167, 206, 0.24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 24px rgba(5, 10, 20, 0.36);
}

.empty-state__icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 10px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    color: #a9c5ef;
    background: linear-gradient(135deg, rgba(107,163,245,0.18), rgba(76,94,126,0.18));
    border: 1px solid rgba(139, 184, 255, 0.3);
}

.empty-state__title {
    font-weight: 800;
    color: #eaf2ff;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.empty-state__text {
    color: #b8c5d6;
    font-size: 0.86rem;
    line-height: 1.55;
}

/* ── 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: 9px;
    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 { display: flex; flex-direction: column; gap: 16px; }

.settings-section {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: linear-gradient(160deg, rgba(19,23,34,0.9) 0%, rgba(15,20,29,0.96) 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: linear-gradient(135deg, rgba(22, 30, 44, 0.78) 0%, rgba(15, 20, 29, 0.92) 100%);
}

.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-license-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}


/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: flex-end; gap: 8px;
    padding: 10px 20px; border: 1px solid rgba(255, 255, 255, 0.18); 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;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    animation: btnGlassPulse 5.5s ease-in-out infinite;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(107, 163, 245, 0.42) 0%, rgba(90, 143, 232, 0.34) 60%, rgba(76, 94, 126, 0.38) 100%);
    color: #0b1020;
    box-shadow: 0 6px 18px rgba(107,163,245,0.24), 0 1px 0 rgba(255,255,255,0.22) inset;
    border: 1px solid rgba(139,184,255,0.48);
}

.btn-primary::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 12%, rgba(255,255,255,0.22) 44%, transparent 78%);
    border-radius: inherit;
    pointer-events: none;
    transform: translateX(-120%);
    animation: btnGlassSweep 3.8s ease-in-out infinite;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(107,163,245,0.34), 0 1px 0 rgba(255,255,255,0.12) inset;
}

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

.btn-secondary {
    background: linear-gradient(135deg, rgba(31,38,51,0.62), rgba(37,45,61,0.5));
    color: var(--text-primary);
    border: 1px solid rgba(139,184,255,0.26);
    box-shadow: 0 4px 12px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-1px);
    background: rgba(37,45,61,0.95);
    border-color: var(--border-bright);
    color: var(--purple-200);
    box-shadow: 0 4px 16px rgba(107,163,245,0.16);
}

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

.container-filter-group .btn.active {
    background: linear-gradient(135deg, rgba(107,163,245,0.34), rgba(90,143,232,0.24));
    border-color: rgba(139,184,255,0.56);
    color: #dbeafe;
    box-shadow: 0 0 14px rgba(107,163,245,0.28);
    font-weight: 700;
}

#filter-refreshed-only { flex-shrink: 0; }
#filter-refreshed-only.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 ─────────────────────────────────────────────── */
.container-filter-group {
    display: flex;
    gap: 4px;
    align-items: center;
}

.filters {
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 14px;
    background: linear-gradient(160deg, rgba(19,23,34,0.9) 0%, rgba(15,20,29,0.96) 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); }

/* ── Toggle ──────────────────────────────────────────────────── */
.toggle {
    display: inline-flex; align-items: center; gap: 10px;
    user-select: none; cursor: pointer;
    padding: 9px 12px; border-radius: 9px;
    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: 9px;
    border: 1px solid var(--border-mid);
    background: linear-gradient(135deg, rgba(22, 30, 44, 0.78) 0%, rgba(15, 20, 29, 0.92) 100%);
    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: linear-gradient(135deg, rgba(107, 163, 245, 0.34), rgba(90, 143, 232, 0.26)); border-color: rgba(139,184,255,0.52); }
.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(19,23,34,0.92) 0%, rgba(15,20,29,0.98) 100%);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: var(--transition);
    transition-property: transform, border-color, box-shadow, background;
    overflow: hidden;
}

.inv-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 14%, rgba(255,255,255,0.18) 46%, transparent 78%);
    transform: translateX(-130%);
    opacity: 0;
}

.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: none;
    border-color: rgba(139, 184, 255, 0.5);
    box-shadow: 0 10px 26px rgba(0,0,0,0.42), 0 0 0 1px rgba(139,184,255,0.16), inset 0 0 0 1px rgba(255,255,255,0.04);
    animation: invCardGlassPulse 1.15s ease-in-out infinite alternate;
}

.inv-card:hover::before { opacity: 1; }
.inv-card:hover::after {
    opacity: 1;
    animation: invCardGlassSweep 1.6s ease-in-out infinite;
}

.inv-card.is-selected {
    border-color: rgba(107,163,245,0.65);
    box-shadow: 0 0 0 1px rgba(107,163,245,0.24), 0 12px 32px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(139,184,255,0.1), 0 0 16px rgba(107,163,245,0.16);
    background: linear-gradient(160deg, rgba(31,38,51,0.92) 0%, rgba(19,23,34,0.98) 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: 9px;
    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: 9px;
    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;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 10px;
}

.inv-card__actions-left {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
}

.inv-mini-btn {
    border: 1px solid rgba(139,184,255,0.26);
    background: linear-gradient(135deg, rgba(31,38,51,0.56), rgba(37,45,61,0.44));
    color: var(--purple-300);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--radius-sm); padding: 7px 10px;
    font-weight: 700; font-size: 0.8rem;
    font-family: inherit; cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px) saturate(118%);
    -webkit-backdrop-filter: blur(8px) saturate(118%);
    animation: btnGlassPulse 5.5s ease-in-out infinite;
}

.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 rgba(139,184,255,0.26);
    background: linear-gradient(135deg, rgba(19,23,34,0.56), rgba(15,20,29,0.42));
    color: var(--text-secondary); font-weight: 700;
    letter-spacing: 0.05em; font-size: 0.75rem;
    font-family: inherit; cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px) saturate(118%);
    -webkit-backdrop-filter: blur(8px) saturate(118%);
    animation: btnGlassPulse 5.5s ease-in-out infinite;
}

.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(190,226,52,0.44) 0%, rgba(168,201,50,0.36) 100%);
    border-color: rgba(190,226,52,0.56);
    color: #141a0d;
    box-shadow: 0 4px 14px rgba(190,226,52,0.2);
}

.bulk-actions__btn--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(203,232,107,0.5) 0%, rgba(190,226,52,0.42) 100%);
    box-shadow: 0 6px 18px rgba(190,226,52,0.24);
    color: #141a0d;
}

@keyframes btnGlassPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.08); }
    50% { box-shadow: 0 6px 18px rgba(107,163,245,0.14), inset 0 1px 0 rgba(255,255,255,0.14); }
}

@keyframes btnGlassSweep {
    0% { transform: translateX(-120%); opacity: 0; }
    12% { opacity: 0.9; }
    48% { transform: translateX(120%); opacity: 0.18; }
    100% { transform: translateX(120%); opacity: 0; }
}

.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 {
    padding: 34px 16px;
    display: flex;
    justify-content: center;
}

.loading__panel {
    width: min(560px, 100%);
    padding: 16px;
    border: 1px solid rgba(130, 168, 224, 0.28);
    background: linear-gradient(145deg, rgba(20, 28, 42, 0.78), rgba(13, 19, 29, 0.9));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 16px 34px rgba(4, 10, 20, 0.44);
    backdrop-filter: blur(10px) saturate(122%);
    -webkit-backdrop-filter: blur(10px) saturate(122%);
}

.loading__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.loading__copy { min-width: 0; }

.loading__title {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #e9f2ff;
}

.loading__subtitle {
    margin: 4px 0 0;
    font-size: 0.74rem;
    color: #9db5d7;
}

.loading__progress {
    position: relative;
    height: 7px;
    border: 1px solid rgba(107, 163, 245, 0.24);
    background: rgba(8, 14, 24, 0.72);
    overflow: hidden;
}

.loading__progress-bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 42%;
    background: linear-gradient(90deg, rgba(107,163,245,0.86), rgba(107,245,179,0.88));
    box-shadow: 0 0 16px rgba(107,163,245,0.42);
    animation: loadingProgressSweep 1.25s ease-in-out infinite;
}

.loading__pulse-dots {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.loading__pulse-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(148, 179, 221, 0.75);
    animation: loadingDotPulse 1.05s ease-in-out infinite;
}
.loading__pulse-dots span:nth-child(2) { animation-delay: 0.15s; }
.loading__pulse-dots span:nth-child(3) { animation-delay: 0.3s; }

.spinner {
    width: 34px;
    height: 34px;
    border: 2px solid rgba(107, 163, 245, 0.22);
    border-top-color: rgba(107, 245, 179, 0.88);
    border-right-color: rgba(107, 163, 245, 0.86);
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
    flex-shrink: 0;
    margin: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes loadingProgressSweep {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}
@keyframes loadingDotPulse {
    0%, 100% { opacity: 0.35; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ── Stats pill ──────────────────────────────────────────────── */
.header-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 10px 22px;
    min-height: 42px;
    border-radius: 8px;
    width: 100%;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
    color: var(--purple-300);
    border: 1px solid var(--border-subtle);
    background: linear-gradient(135deg, rgba(107, 245, 179, .1), rgba(76, 94, 126, 0.2));
    border-color: rgba(107, 245, 179, .2);
    box-shadow: none;
}

.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); }


/* ── 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(19,23,34,0.9) 0%, rgba(15,20,29,0.96) 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(12,16,24,0.88);
    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(107,163,245,0.12) !important; border-left: 3px solid #6ba3f5; }
.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-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    padding: 5px 7px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border-radius: 6px;
    vertical-align: middle;
    color: #ecfff7;
    background: linear-gradient(135deg, rgba(34, 197, 136, 0.34), rgba(16, 185, 129, 0.26));
    border: 1px solid rgba(110, 231, 183, 0.52);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(7px) saturate(120%);
    -webkit-backdrop-filter: blur(7px) saturate(120%);
}

.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: 16px;
    padding: 12px;
    border-radius: 18px;
    background: linear-gradient(150deg, rgba(20, 29, 44, 0.82), rgba(11, 16, 24, 0.92));
    border: 1px solid rgba(137, 165, 206, 0.24);
    box-shadow: 0 16px 34px rgba(4, 10, 22, 0.54), inset 0 1px 0 rgba(255,255,255,0.06);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
}
.site-footer__line {
    display: block;
    width: 100%;
    height: 1px;
    margin: 0 0 10px;
    background: linear-gradient(90deg, rgba(107,163,245,0), rgba(107,163,245,0.65), rgba(107,245,179,0.55), rgba(107,163,245,0));
}
.site-footer__grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.site-footer__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
}
.site-footer__brand-copy { min-width: 0; }
.site-footer__name {
    margin: 0 0 2px;
    font-size: 0.84rem;
    color: #dce9ff;
    letter-spacing: 0.03em;
}
.site-footer__logo {
    width: 42px;
    height: 42px;
    object-fit: cover;
}
.site-footer__text {
    font-size: 0.72rem;
    color: #9db4d7;
    margin: 0;
    letter-spacing: 0.02em;
}
.site-footer__text strong {
    color: #e5f0ff;
    font-weight: 800;
    letter-spacing: 0.11em;
}
.site-footer__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.site-footer__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 0.68rem;
    color: #cae2ff;
    border: 1px solid rgba(130, 188, 255, 0.28);
    background: linear-gradient(135deg, rgba(107,163,245,0.16), rgba(76,94,126,0.14));
}
.site-footer__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 0.68rem;
    color: #dcf7ff;
    text-decoration: none;
    border: 1px solid rgba(107, 245, 179, 0.34);
    background: linear-gradient(135deg, rgba(107,245,179,0.18), rgba(107,163,245,0.12));
}
.site-footer__link:hover {
    border-color: rgba(107, 245, 179, 0.55);
    background: linear-gradient(135deg, rgba(107,245,179,0.26), rgba(107,163,245,0.16));
}

/* ── 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 120% 100% at 50% 0%, rgba(107,163,245,0.12) 0%, rgba(10,13,18,0.9) 58%),
        linear-gradient(140deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 45%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(12px) saturate(105%);
    -webkit-backdrop-filter: blur(12px) saturate(105%);
}

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

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

.token-scene__glow {
    position: absolute; inset: -50%;
    background: radial-gradient(circle at 50% 30%, rgba(40, 168, 217, .24) 0%, rgba(40, 168, 217, 0.08) 35%, transparent 60%), radial-gradient(circle at 65% 38%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.05) 18%, transparent 40%);
    filter: blur(26px) saturate(110%);
    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: 20px 20px 16px; border-radius: var(--radius-xl);
    background: linear-gradient(165deg, rgba(19,23,34,0.97) 0%, rgba(15,20,29,0.99) 100%);
    border: 1px solid var(--border-mid);
    box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.02) inset;
    backdrop-filter: blur(14px);
    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: lrgba(130, 188, 255, 0.2);
    -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__head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.token-card__head-copy { min-width: 0; flex: 1; }
.token-card__z5-logo { width: 64px; height: 64px; 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__subtitle { text-align: center; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 10px; display: none; }
.token-card__title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; text-align: left; }
.token-card__hint { font-size: 0.76rem; line-height: 1.45; color: var(--text-muted); 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: 0; }
.token-card__oauth-hint { font-size: 0.7rem; color: var(--text-muted); margin: 8px 0 10px; text-align: center; }
.token-manual-block {
    margin-top: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(130, 188, 255, 0.2);
    background: rgba(8, 14, 24, 0.45);
}
.token-manual-block__title {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #cfe4ff;
    margin: 0 0 4px;
}
.token-manual-block__hint {
    margin: 0 0 10px;
    font-size: 0.72rem;
    color: #9db0cd;
}
.token-manual-block__actions {
    display: flex;
    margin-bottom: 10px;
}
.token-manual-block__download {
    width: 100%;
    justify-content: center;
}
.token-manual-block__input {
    width: 100%;
    margin-bottom: 8px;
}
.token-manual-block__submit {
    width: 100%;
    justify-content: center;
}
.token-card__license-cta-wrap {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.token-card__license-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #d6e8ff;
    text-decoration: none;
    border: 1px solid rgba(88, 101, 242, 0.45);
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.28), rgba(56, 69, 191, 0.2));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 10px rgba(88, 101, 242, 0.2);
    backdrop-filter: blur(7px) saturate(120%);
    -webkit-backdrop-filter: blur(7px) saturate(120%);
    transition: border-color var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
}

.token-card__license-cta:hover {
    color: #eef5ff;
    border-color: rgba(129, 140, 248, 0.68);
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.36), rgba(67, 81, 214, 0.3));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 14px rgba(99, 102, 241, 0.3);
}

/* Keep activate button stable on click/focus (no blur-flash toggle) */
#license-login-btn:focus,
#license-login-btn:focus-visible,
#license-login-btn:active {
    outline: none;
    transform: none !important;
    box-shadow: 0 6px 18px rgba(8, 14, 28, 0.32), 0 0 0 1px rgba(88, 231, 177, 0.2);
    filter: none;
}
.oauth-provider-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 0; }
.oauth-provider-btn { justify-content: flex-start; text-align: left; min-height: 42px; }
.oauth-provider-btn .btn-icon { width: 1.2rem; text-align: center; }
.oauth-provider-btn.is-disabled { opacity: 0.45; cursor: not-allowed; }
.oauth-provider-btn[data-provider="xbox"] {
    color: #9be6a8;
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.14);
}
.oauth-provider-btn[data-provider="xbox"]:hover:not(:disabled) {
    color: #d1fae5;
    border-color: rgba(16, 185, 129, 0.75);
    background: rgba(16, 185, 129, 0.24);
}
.oauth-provider-btn[data-provider="steam"] {
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(30, 64, 175, 0.2);
}
.oauth-provider-btn[data-provider="steam"]:hover:not(:disabled) {
    color: #dbeafe;
    border-color: rgba(59, 130, 246, 0.75);
    background: rgba(30, 64, 175, 0.32);
}
.oauth-provider-btn[data-provider="playstation"] {
    color: #c4b5fd;
    border-color: rgba(79, 70, 229, 0.45);
    background: rgba(79, 70, 229, 0.16);
}
.oauth-provider-btn[data-provider="playstation"]:hover:not(:disabled) {
    color: #e0e7ff;
    border-color: rgba(79, 70, 229, 0.75);
    background: rgba(79, 70, 229, 0.28);
}
.oauth-provider-btn[data-provider="epic"] {
    color: #f9fafb;
    border-color: rgba(148, 163, 184, 0.45);
    background: rgba(51, 65, 85, 0.28);
}
.oauth-provider-btn[data-provider="epic"]:hover:not(:disabled) {
    color: #ffffff;
    border-color: rgba(148, 163, 184, 0.75);
    background: rgba(51, 65, 85, 0.42);
}

.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: 10px; text-align: center; font-size: 0.68rem; 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: #e7f8ff;
    background: linear-gradient(140deg, rgba(80, 174, 255, 0.86), rgba(107, 245, 179, 0.5));
    border: 1px solid rgba(166, 232, 255, 0.52);
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(80,174,255,0.34), 0 0 0 1px rgba(107,245,179,0.2), 0 2px 10px rgba(0,0,0,0.42);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.discord-fab:hover {
    transform: scale(1.07) translateY(-2px);
    box-shadow: 0 14px 34px rgba(80,174,255,0.45), 0 0 0 1px rgba(107,245,179,0.32), 0 4px 12px rgba(0,0,0,0.45);
    color: #f3fdff;
}
.discord-fab:focus-visible { outline: 2px solid rgba(107,245,179,0.62); outline-offset: 3px; }
.discord-fab__icon { flex-shrink: 0; opacity: 0.98; font-size: 1.35rem; }
.admin-fab {
    bottom: 84px;
    background: linear-gradient(140deg, rgba(80, 174, 255, 0.74), rgba(66, 153, 225, 0.48));
    border: 1px solid rgba(147, 197, 253, 0.62);
    color: #e5f2ff;
}
.admin-fab:hover {
    box-shadow: 0 14px 34px rgba(59,130,246,0.45), 0 0 0 1px rgba(191,219,254,0.36), 0 4px 12px rgba(0,0,0,0.45);
}

/* ── Scrollbar ───────────────────────────────────────────────── */
/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #6ba3f5 rgba(12,16,24,0.88);
}
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: rgba(12,16,24,0.88); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8bb8ff, #6ba3f5 45%, #6bf5b3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #dbeafe, #8bb8ff 40%, #6ba3f5);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .header { flex-direction: column; text-align: center; }
    .header__right { align-items: center; width: 100%; }
    .discord-fab { right: 14px; bottom: 14px; width: 50px; height: 50px; }
    .admin-fab { bottom: 74px; }
    .logo { flex-direction: column; }
    .search-box, .btn { width: 100%; }
    .container-filter-group { width: 100%; }
    .portal { grid-template-columns: 1fr; }
    .sidebar { position: relative; top: auto; }
    .inv-grid { grid-template-columns: 1fr; }
    .token-card { padding: 18px 16px 14px; }
    .oauth-provider-panel { grid-template-columns: 1fr; }
}

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

/* ── SecuredC# micro-tune (visual only) ─────────────────────── */
:root {
    --radius-sm: 5px;
    --radius-md: 7px;
    --radius-lg: 10px;
    --radius-xl: 12px;
}

.sidebar,
.header,
.filters,
.token-card,
.modal-content,
.settings-section,
.page-topbar,
.bulk-actions {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.sidebar,
.header,
.filters,
.inv-card,
.token-card,
.settings-section {
    border-color: #1f2b3d;
}

.nav-item {
    border-radius: 6px;
}

.nav-item.is-active {
    background: linear-gradient(135deg, rgba(107, 163, 245, 0.26), rgba(76, 94, 126, 0.2));
    border-color: rgba(107, 163, 245, 0.42);
    box-shadow: none;
}

.btn {
    border-radius: 7px;
    padding: 9px 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.btn-secondary {
    background: #1f2633;
    border-color: #2b3a4f;
}

.btn-secondary:hover:not(:disabled) {
    background: #252d3d;
    border-color: #4c5e7e;
}

.btn-primary {
    background: linear-gradient(135deg, #6ba3f5 0%, #5a8fe8 58%, #4c5e7e 100%);
    color: #ffffff;
    border-color: rgba(107, 163, 245, 0.42);
}

.btn-primary::after {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 62%);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #8bb8ff 0%, #6ba3f5 48%, #5a8fe8 100%);
}

.filters__select,
.search-box,
.toggle {
    border-radius: 5px;
}

.search-box:focus-within {
    box-shadow: 0 0 0 2px rgba(107, 163, 245, 0.18);
}

.inv-card {
    padding: 11px 10px;
}

.inv-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
}

.inv-card.is-selected {
    box-shadow: 0 0 0 1px rgba(107, 163, 245, 0.34), 0 8px 20px rgba(0, 0, 0, 0.34);
}

.bulk-actions__btn {
    border-radius: 6px;
    font-size: 0.74rem;
}

.bulk-actions__btn--primary {
    background: #bee234;
    border-color: #a8c932;
}

.bulk-actions__btn--primary:hover:not(:disabled) {
    background: #cbe86b;
}

.token-card {
    padding: 16px 16px 13px;
}

.token-card__z5-logo {
    border-radius: 6px;
    filter: drop-shadow(0 4px 14px rgba(107, 163, 245, 0.26));
}

.token-scene__glow {
    filter: blur(22px) saturate(102%);
}

/* ── C# shell structure alignment ────────────────────────────── */
.app-container {
    max-width: 1180px;
    padding: 14px 14px 24px;
}

.portal {
    grid-template-columns: 220px 1fr;
    gap: 12px;
}

.sidebar {
    top: 12px;
    padding: 4px 6px 10px;
}

.sidebar__brand {
    padding: 10px 8px 12px;
}

.sidebar__brand-title {
    background: none;
    -webkit-text-fill-color: unset;
    color: var(--text-primary);
    letter-spacing: 0.08em;
    font-size: 0.82rem;
}

.sidebar__brand-sub {
    letter-spacing: 0.08em;
    font-size: 0.68rem;
}

.sidebar__notes {
    background: rgba(21, 30, 46, 0.75);
    border-color: #233247;
}

.sidebar__notes-list li,
.sidebar__notes-list li::before,
.note-hl {
    color: #94a3b8;
}

.header {
    padding: 12px 14px;
    margin-bottom: 10px;
}

.logo {
    gap: 10px;
}

.logo__z5 {
    width: 44px;
    height: 44px;
    animation: none;
    box-shadow: 0 0 0 1px #233247, 0 4px 12px rgba(0, 0, 0, 0.28);
}

.logo__text h1 {
    background: none;
    -webkit-text-fill-color: unset;
    color: var(--text-primary);
    font-size: 1.04rem;
    letter-spacing: 0.06em;
}

.logo__by {
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    color: var(--text-secondary);
}

.page-topbar {
    padding: 8px 10px;
    margin-bottom: 10px;
    border-color: rgba(107, 163, 245, 0.24);
    background: linear-gradient(135deg, rgba(22, 30, 44, 0.78) 0%, rgba(15, 20, 29, 0.92) 100%);
}

.page-topbar__kicker {
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

.page-topbar__sub {
    font-size: 0.72rem;
}

.filters {
    padding: 10px;
    margin-bottom: 10px;
}

/* Inventory viewport behaves like the C# panel list area */
#inventory-card-canvas {
    max-height: none;
    padding: 0px 5px 0px 0px;
}

#inventory-card-canvas::-webkit-scrollbar {
    width: 8px;
}

#inventory-card-canvas::-webkit-scrollbar-track {
    background: rgba(15, 20, 29, 0.7);
    border-radius: 8px;
}

#inventory-card-canvas::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6ba3f5 0%, #5a8fe8 58%, #4c5e7e 100%);
    border-radius: 8px;
}

#inventory-card-canvas::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8bb8ff 0%, #6ba3f5 48%, #5a8fe8 100%);
}

/* Denser card rhythm inside the scroll panel */
#inventory-card-canvas .inv-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

#inventory-card-canvas .inv-card {
    padding: 9px 8px;
}

#inventory-card-canvas .inv-card__top {
    gap: 7px;
    margin-bottom: 7px;
    padding-right: 40px;
}

#inventory-card-canvas .inv-card__icon {
    width: 38px;
    height: 38px;
}

#inventory-card-canvas .inv-card__name {
    font-size: 0.8rem;
    line-height: 1.3;
    line-clamp: 2;
}

#inventory-card-canvas .inv-card__meta {
    margin-top: 2px;
    gap: 5px;
    font-size: 0.68rem;
}

#inventory-card-canvas .inv-card__pill {
    padding: 1px 5px;
}

#inventory-card-canvas .inv-card__qty {
    top: 8px;
    right: 8px;
    padding: 3px 7px;
    font-size: 0.68rem;
}

#inventory-card-canvas .inv-card__attach {
    margin-top: 5px;
}

#inventory-card-canvas .inv-card__attach-img,
#inventory-card-canvas .inv-card__attach-empty {
    width: 22px;
    height: 22px;
}

#inventory-card-canvas .inv-card__actions {
    margin-top: 6px;
    gap: 4px;
}

#inventory-card-canvas .inv-mini-btn {
    padding: 5px 7px;
    font-size: 0.72rem;
    display: flex;
    align-items: flex-end;
}

/* Hard-stop card lift on hover (global + inventory panel) */
.inv-card:hover,
#inventory-card-canvas .inv-card:hover {
    transform: none !important;
}

@media (max-width: 768px) {
    #inventory-card-canvas {
        max-height: none;
        min-height: 0;
        overflow: visible;
        padding-right: 0;
    }

    #inventory-card-canvas .inv-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@keyframes invCardGlassPulse {
    0% {
        box-shadow: 0 8px 20px rgba(0,0,0,0.34), 0 0 0 1px rgba(139,184,255,0.12), inset 0 0 0 1px rgba(255,255,255,0.02);
    }
    100% {
        box-shadow: 0 10px 26px rgba(0,0,0,0.45), 0 0 0 1px rgba(139,184,255,0.26), 0 0 16px rgba(107,163,245,0.2), inset 0 0 0 1px rgba(255,255,255,0.08);
    }
}

@keyframes invCardGlassSweep {
    0% { transform: translateX(-130%); opacity: 0; }
    16% { opacity: 0.95; }
    55% { transform: translateX(130%); opacity: 0.28; }
    100% { transform: translateX(130%); opacity: 0; }
}

/* ── Global stacked layout: switcher -> notes -> main ───────── */
.portal {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.sidebar {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    padding: 8px 10px 10px !important;
}

.sidebar__brand {
    padding: 8px 4px 10px !important;
}

.sidebar__nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 12px 12px !important;
}

.nav-item {
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 10px !important;
}

.nav-item__txt {
    font-size: 0.72rem !important;
    letter-spacing: 0.08em !important;
}

.sidebar__notes {
    margin: 4px 0 0 !important;
}

.sidebar__footer {
    padding: 8px 0 0 !important;
    margin-top: 6px !important;
}

.main {
    width: 100% !important;
}

/* ── Final palette harmonization (remove legacy violet accents) ─ */
.nav-item:hover,
.sidebar__account,
.social-tab:hover,
.social-player:hover,
.settings-row:hover,
.bulk-actions__btn--ghost,
.row-select-label:hover,
.inventory-table tbody tr:hover,
.btn-refresh-id,
.btn-refresh-id:hover:not(:disabled),
.inv-mini-btn:hover:not(:disabled),
.bulk-actions__btn:hover:not(:disabled),
.status-id-cell--yes .status-id-label,
.header-stats .stats-pill__link,
.header-stats .stats-pill__link:hover {
    background-color: rgba(107, 163, 245, 0.12) !important;
}

.nav-item__ico,
.inv-card__qty,
.backpack-only-badge,
.status-id-cell--yes .status-id-label {
    border-color: rgba(107, 163, 245, 0.32) !important;
}

.toggle input:checked + .toggle__track {
    background: linear-gradient(135deg, rgba(107, 163, 245, 0.34), rgba(90, 143, 232, 0.26)) !important;
    border-color: rgba(107, 163, 245, 0.46) !important;
}

.toggle input:checked + .toggle__track::after {
    box-shadow: 0 0 10px rgba(107, 163, 245, 0.36) !important;
}

.spinner {
    border: 2px solid rgba(107, 163, 245, 0.18) !important;
    border-top-color: #6ba3f5 !important;
    border-right-color: rgba(76, 94, 126, 0.6) !important;
}

.logo__z5 {
    box-shadow: 0 0 0 1px rgba(107, 163, 245, 0.28), 0 8px 24px rgba(76, 94, 126, 0.3) !important;
}

.modal-content,
.modal--session-refreshed .modal-content--refreshed {
    box-shadow: 0 24px 64px rgba(0,0,0,0.62), 0 0 0 1px rgba(107,163,245,0.16) !important;
}

.modal-header {
    background: rgba(107, 163, 245, 0.08) !important;
}

.site-footer__line {
    background: linear-gradient(90deg, transparent, rgba(107,163,245,0.52), rgba(76,94,126,0.32), transparent) !important;
}

.row-session-refreshed .refreshed-badge,
.modal-refreshed-banner {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.42), rgba(16, 185, 129, 0.3)) !important;
    border-color: rgba(110, 231, 183, 0.58) !important;
}

/* Keep topbar size identical across pages */
.page-topbar {
    min-height: 56px;
    align-items: center;
}

.page-topbar__actions {
    min-height: 38px;
    min-width: 230px;
}

#inventory-refresh-action {
    min-width: 108px;
    justify-content: center;
}

#settings-logout-action {
    min-width: 108px;
    justify-content: center;
}

/* ── Unique glass system refresh (button kinds + layout) ─────────────────── */
.app-container .portal {
    display: grid;
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.app-container .sidebar,
.app-container .main,
.app-container .filters,
.app-container .settings-section,
.app-container .page-topbar,
.app-container .bulk-actions {
    border: 1px solid rgba(154, 173, 208, 0.2);
    background: linear-gradient(160deg, rgba(22, 28, 42, 0.72) 0%, rgba(14, 18, 28, 0.86) 100%);
    box-shadow: 0 14px 38px rgba(2, 6, 14, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px) saturate(125%);
    -webkit-backdrop-filter: blur(14px) saturate(125%);
}

.app-container .sidebar {
    position: sticky;
    top: 18px;
    border-radius: 18px;
    overflow: hidden;
}

.app-container .main {
    border-radius: 18px;
    padding: 14px;
}

.app-container .page-topbar {
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.app-container .filters,
.app-container .settings-section,
.app-container .bulk-actions {
    border-radius: 14px;
}

.admin-license-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(100, 120, 150, 0.18);
    background: rgba(15, 20, 30, 0.58);
    backdrop-filter: blur(28px) saturate(1.35) brightness(0.92);
    -webkit-backdrop-filter: blur(28px) saturate(1.35) brightness(0.92);
}

.admin-license-table {
    width: 100%;
    min-width: 920px;
    background: transparent;
    border: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.76rem;
}

.admin-license-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    text-align: left;
    vertical-align: middle;
    background: rgba(28, 35, 50, 0.72);
    color: rgba(176, 194, 214, 0.74);
    font-size: 0.61rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
}

.admin-license-table td {
    text-align: left;
    vertical-align: middle;
    color: rgba(236, 244, 255, 0.96);
    background: transparent;
    padding: 0.58rem 0.68rem;
    border-bottom: 1px solid rgba(100, 120, 150, 0.18);
    font-weight: 500;
}

.admin-license-table tbody tr {
    border-bottom: none;
}

.admin-license-table tbody tr:nth-child(even),
.admin-license-table tbody tr:hover {
    background: rgba(110, 143, 212, 0.08);
}

.admin-license-key {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 4px 7px;
    border: 1px solid rgba(100, 120, 150, 0.18);
    background: rgba(28, 35, 50, 0.72);
    color: rgba(236, 244, 255, 0.96);
    font-size: 0.68rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    cursor: pointer;
}

.admin-hwid {
    display: inline-block;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 3px 7px;
    border: 1px solid rgba(100, 120, 150, 0.18);
    background: rgba(28, 35, 50, 0.72);
    color: rgba(176, 194, 214, 0.74);
    font-size: 0.7rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.admin-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 0.18rem 0.52rem;
    border-radius: 999px !important;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(51, 65, 85, 0.35);
    color: #d9e6fb;
}

.admin-status-active {
    background: rgba(94, 230, 180, 0.14);
    border-color: rgba(94, 230, 180, 0.35);
    color: #5ee6b4;
}

.admin-status-revoked,
.admin-status-expired {
    background: rgba(240, 112, 112, 0.14);
    border-color: rgba(240, 112, 112, 0.35);
    color: #f07070;
}

.admin-license-cell-key {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
}

.admin-license-key {
    max-width: 210px;
}

.admin-license-inline-edit .filters__select {
    min-width: 0;
}

.admin-license-table td[data-label="Actions"] {
    min-width: 260px;
}

.admin-license-inline-edit {
    display: grid;
    grid-template-columns: 112px 70px 70px;
    gap: 6px;
    align-items: center;
}

.admin-license-inline-edit .admin-license-inline-num,
.admin-license-inline-edit .filters__select {
    height: 32px;
    line-height: 32px;
    padding-top: 0;
    padding-bottom: 0;
}

.admin-license-note {
    margin-bottom: 5px;
    font-size: 0.7rem;
    line-height: 1.25;
}

.admin-license-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.admin-license-actions .btn {
    border-radius: 8px !important;
    background: rgba(20, 26, 38, 0.64) !important;
    border-color: rgba(100, 120, 150, 0.22) !important;
    color: rgba(236, 244, 255, 0.96) !important;
    font-size: 0.72rem;
    min-height: 28px;
    padding: 4px 8px;
    line-height: 1.1;
}

.admin-license-actions .btn-warning {
    color: #e8c45a !important;
    border-color: rgba(232, 196, 90, 0.42) !important;
}

.admin-license-actions .btn-success {
    color: #5ee6b4 !important;
    border-color: rgba(94, 230, 180, 0.42) !important;
}

.admin-license-actions .btn-info {
    color: #6ee7ff !important;
    border-color: rgba(110, 231, 255, 0.42) !important;
}

.admin-license-actions .btn-danger {
    color: #f07070 !important;
    border-color: rgba(240, 112, 112, 0.35) !important;
}

.admin-license-actions .btn:hover {
    background: rgba(28, 35, 50, 0.72) !important;
}

.admin-license-inline-num {
    width: 74px !important;
}

.admin-btn-sm {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 0.74rem;
    gap: 5px;
}

/* Rounded system lock: no sharp corners */
:root {
    --round-xs: 8px;
    --round-sm: 10px;
    --round-md: 12px;
    --round-lg: 16px;
    --round-xl: 20px;
    --round-pill: 999px;
}

/* Large surfaces */
.sidebar,
.main,
.page-topbar,
.filters,
.bulk-actions,
.settings-section,
.token-card,
.modal-content,
.admin-license-table-wrap,
.inventory-table-container {
    border-radius: var(--round-lg) !important;
}

/* Medium interactive blocks */
.btn,
.bulk-actions__btn,
.inv-mini-btn,
.btn-refresh-id,
.nav-item,
.filters__select,
.search-box,
.admin-license-key,
.admin-status-badge,
.site-footer__chip,
.site-footer__link {
    border-radius: var(--round-md) !important;
}

/* Table edges */
.admin-license-table,
.inventory-table {
    border-radius: var(--round-md) !important;
    overflow: hidden;
}

.admin-license-table thead th:first-child,
.inventory-table thead th:first-child {
    border-top-left-radius: var(--round-md);
}

.admin-license-table thead th:last-child,
.inventory-table thead th:last-child {
    border-top-right-radius: var(--round-md);
}

/* Small chips/toggles */
.toggle__track,
.refreshed-badge,
.status-id-cell--yes .status-id-label,
.status-id-cell--no .status-id-label {
    border-radius: var(--round-sm) !important;
}

/* Mobile-first responsive pass */
@media (max-width: 1024px) {
    .portal,
    .app-container .portal {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .sidebar,
    .app-container .sidebar {
        position: relative;
        top: auto;
        width: 100%;
    }

    .main,
    .app-container .main {
        width: 100%;
        padding: 10px;
    }

    .filters__row {
        flex-wrap: wrap;
    }

    .filters__group,
    .filters__group--grow {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .page-topbar,
    .page-topbar__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .settings-layout {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .guide-panel__actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .bulk-actions {
        gap: 8px;
    }

    .bulk-actions__btn,
    .btn,
    .inv-mini-btn,
    .btn-refresh-id {
        width: 100%;
        justify-content: center;
    }

    .admin-license-table-wrap {
        overflow-x: auto;
    }

    .admin-license-table {
        min-width: 860px;
    }

    .admin-license-table thead {
        display: table-header-group;
    }

    .admin-license-table tbody,
    .admin-license-table tr,
    .admin-license-table td,
    .admin-license-table th {
        display: table-cell;
        width: auto;
    }

    .admin-license-table td[data-label]::before {
        content: none;
    }

    .admin-license-cell-key {
        align-items: flex-start;
    }

    .admin-license-key {
        width: auto;
    }

    .admin-license-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
}

@media (max-width: 560px) {
    .sidebar__nav {
        grid-template-columns: 1fr 1fr !important;
    }

    .nav-item__txt {
        font-size: 0.74rem;
    }

    .token-card {
        padding: 14px 12px;
    }

    .header-stats {
        padding: 8px 10px;
        font-size: 0.78rem;
    }
}

#settings-license-key {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    word-break: break-all;
}

#settings-license-status,
#settings-license-plan,
#settings-license-expires,
#settings-license-remaining {
    color: #d8e6ff;
}

.btn {
    border-width: 1px;
    border-style: solid;
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.08) 100%);
    opacity: 0.7;
}

.btn:hover:not(:disabled) {
    box-shadow: 0 10px 22px rgba(8, 14, 28, 0.45), 0 0 0 1px rgba(214, 226, 255, 0.16);
}

.btn.btn-primary {
    background: linear-gradient(135deg, rgba(84, 151, 245, 0.34), rgba(65, 114, 204, 0.25));
    border-color: rgba(132, 183, 255, 0.5);
    color: #e8f2ff;
}

.btn.btn-secondary {
    background: linear-gradient(135deg, rgba(43, 55, 78, 0.62), rgba(29, 37, 52, 0.78));
    border-color: rgba(126, 149, 188, 0.35);
    color: #d6e2f8;
}

.btn.btn-success {
    background: linear-gradient(135deg, rgba(28, 186, 133, 0.32), rgba(17, 128, 90, 0.24));
    border-color: rgba(88, 231, 177, 0.48);
    color: #d7fff0;
}

.btn.btn-info {
    background: linear-gradient(135deg, rgba(80, 174, 255, 0.33), rgba(46, 125, 206, 0.24));
    border-color: rgba(125, 207, 255, 0.52);
    color: #dff5ff;
}

.btn.btn-warning {
    background: linear-gradient(135deg, rgba(255, 183, 64, 0.3), rgba(234, 135, 34, 0.24));
    border-color: rgba(255, 202, 118, 0.52);
    color: #fff1d1;
}

.btn.btn-danger {
    background: linear-gradient(135deg, rgba(255, 103, 124, 0.32), rgba(195, 46, 86, 0.24));
    border-color: rgba(255, 135, 164, 0.48);
    color: #ffe3eb;
}

.container-filter-group .btn.active {
    box-shadow: 0 0 0 1px rgba(219, 236, 255, 0.3), 0 10px 22px rgba(9, 16, 30, 0.42);
}

@media (max-width: 1100px) {
    .app-container .portal {
        grid-template-columns: 1fr;
    }
    .app-container .sidebar {
        position: relative;
        top: auto;
    }
}

/* Requested nav + second-row filter button refactor */
.nav-item {
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 10px !important;
    background: linear-gradient(135deg, rgba(107, 163, 245, 0.05), rgba(76, 94, 126, 0.05));
    border-color: rgba(107, 163, 245, 0.05);
    box-shadow: none;
}

.filters__row--second .btn {
    background: linear-gradient(135deg, rgba(107, 163, 245, 0.16), rgba(76, 94, 126, 0.14)) !important;
    border-color: rgba(107, 163, 245, 0.26) !important;
    color: #dbeafe !important;
    box-shadow: 0 6px 16px rgba(8, 14, 28, 0.28);
}

.filters__row--second .btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(107, 163, 245, 0.24), rgba(76, 94, 126, 0.2)) !important;
    border-color: rgba(139, 184, 255, 0.44) !important;
}

.filters__row--second .btn.active,
.filters__row--second .btn[aria-pressed="true"] {
    background: linear-gradient(135deg, rgba(122, 195, 255, 0.42), rgba(91, 146, 236, 0.34)) !important;
    border-color: rgba(178, 221, 255, 0.8) !important;
    color: #f5fbff !important;
    box-shadow: 0 0 0 1px rgba(219, 240, 255, 0.42), 0 0 26px rgba(107, 163, 245, 0.46), 0 12px 28px rgba(6, 11, 24, 0.5) !important;
}

/* Keep all button hovers fixed (no lift/jump) */
.btn:hover:not(:disabled),
.btn:active:not(:disabled),
.bulk-actions__btn:hover:not(:disabled),
.bulk-actions__btn:active:not(:disabled),
.inv-mini-btn:hover:not(:disabled),
.inv-mini-btn:active:not(:disabled),
.btn-refresh-id:hover:not(:disabled),
.btn-refresh-id:active:not(:disabled) {
    transform: none !important;
}

/* Unified glass behavior for all button families (different colors only) */
.bulk-actions__btn,
.inv-mini-btn,
.btn-refresh-id {
    border-width: 1px;
    border-style: solid;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    animation: btnGlassPulse 5.5s ease-in-out infinite;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), color var(--transition), opacity var(--transition);
}

.bulk-actions__btn::before,
.inv-mini-btn::before,
.btn-refresh-id::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.08) 100%);
    opacity: 0.72;
}

.bulk-actions__btn:hover:not(:disabled),
.inv-mini-btn:hover:not(:disabled),
.btn-refresh-id:hover:not(:disabled) {
    box-shadow: 0 10px 22px rgba(8, 14, 28, 0.45), 0 0 0 1px rgba(214, 226, 255, 0.16);
}

/* Keep each family color-unique while sharing the same glass behavior */
.bulk-actions__btn {
    background: linear-gradient(135deg, rgba(43, 55, 78, 0.62), rgba(29, 37, 52, 0.78));
    border-color: rgba(126, 149, 188, 0.35);
    color: #d6e2f8;
}

.bulk-actions__btn--ghost {
    background: linear-gradient(135deg, rgba(80, 174, 255, 0.28), rgba(46, 125, 206, 0.2));
    border-color: rgba(125, 207, 255, 0.45);
    color: #dff5ff;
}

.bulk-actions__btn--primary {
    background: linear-gradient(135deg, rgba(34, 197, 136, 0.36), rgba(16, 185, 129, 0.28));
    border-color: rgba(110, 231, 183, 0.54);
    color: #ecfff7;
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.28), 0 0 0 1px rgba(110, 231, 183, 0.16);
}

.bulk-actions__btn--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.44), rgba(16, 185, 129, 0.34));
    border-color: rgba(167, 243, 208, 0.7);
    color: #f4fffb;
    box-shadow: 0 0 0 1px rgba(209, 250, 229, 0.34), 0 0 26px rgba(16, 185, 129, 0.42), 0 12px 28px rgba(6, 11, 24, 0.5);
}

#bulk-dupe-backpack-action {
    background: linear-gradient(135deg, rgba(185, 28, 28, 0.9), rgba(220, 38, 38, 0.76));
    border-color: rgba(252, 165, 165, 0.5);
    color: #ffe4e6;
    box-shadow: 0 8px 22px rgba(220, 38, 38, 0.28), 0 0 0 1px rgba(252, 165, 165, 0.18);
}

#bulk-dupe-backpack-action:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.96), rgba(239, 68, 68, 0.82));
    border-color: rgba(254, 202, 202, 0.74);
    color: #fff1f2;
    box-shadow: 0 0 0 1px rgba(254, 202, 202, 0.36), 0 0 24px rgba(220, 38, 38, 0.38), 0 12px 28px rgba(6, 11, 24, 0.5);
}

.inv-mini-btn {
    background: linear-gradient(135deg, rgba(56, 70, 96, 0.5), rgba(40, 52, 74, 0.56));
    border-color: rgba(134, 156, 194, 0.34);
    color: #c9d6ec;
}

.btn-refresh-id {
    background: linear-gradient(135deg, rgba(255, 183, 64, 0.28), rgba(234, 135, 34, 0.22));
    border-color: rgba(255, 202, 118, 0.46);
    color: #fff1d1;
}

/* Move stats bar below topbar and above inventory section */
.main > .header-stats {
    margin: 0 0 12px;
}

/* Glass animations should run only on hover */
.btn,
.bulk-actions__btn,
.inv-mini-btn,
.btn-refresh-id {
    animation: none !important;
}

.btn-primary::after {
    animation: none !important;
    opacity: 0;
}

.btn:hover:not(:disabled),
.bulk-actions__btn:hover:not(:disabled),
.inv-mini-btn:hover:not(:disabled),
.btn-refresh-id:hover:not(:disabled) {
    animation: btnGlassPulse 5.5s ease-in-out infinite;
}

.btn-primary:hover:not(:disabled)::after {
    animation: btnGlassSweep 1.2s ease-in-out 1;
    opacity: 0.9;
}

.inv-card.is-selected {
    border-color: rgba(52, 211, 153, 0.9) !important;
}

/* Sidebar nav: unique segmented responsive layout */
.sidebar__nav {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 4px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(12, 18, 29, 0.52), rgba(10, 15, 24, 0.34));
    border: 1px solid rgba(118, 149, 196, 0.16);
}

.sidebar__nav .nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center !important;
    gap: 8px;
    min-width: 0;
    min-height: 44px;
    padding: 8px 10px;
    text-align: center;
    border-radius: 12px !important;
    border: 1px solid rgba(118, 149, 196, 0.18) !important;
    background: linear-gradient(135deg, rgba(26, 36, 53, 0.64), rgba(18, 26, 40, 0.78)) !important;
    color: #bfd3ef !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}

.sidebar__nav .nav-item:hover {
    transform: translateY(-1px);
    border-color: rgba(152, 191, 255, 0.44) !important;
    background: linear-gradient(135deg, rgba(61, 95, 145, 0.32), rgba(31, 53, 83, 0.34)) !important;
    color: #edf5ff !important;
    box-shadow: 0 8px 20px rgba(7, 14, 26, 0.34), 0 0 0 1px rgba(173, 210, 255, 0.18);
}

.sidebar__nav .nav-item.is-active {
    border-color: rgba(184, 226, 255, 0.62) !important;
    background: linear-gradient(135deg, rgba(100, 154, 230, 0.52), rgba(84, 191, 151, 0.42)) !important;
    color: #f7fbff !important;
    box-shadow: 0 0 0 1px rgba(220, 242, 255, 0.34), 0 12px 24px rgba(6, 12, 24, 0.44);
}

.sidebar__nav .nav-item__ico {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    border-radius: 8px !important;
    border: 1px solid rgba(152, 191, 255, 0.28) !important;
    background: linear-gradient(135deg, rgba(93, 144, 220, 0.24), rgba(74, 104, 150, 0.2)) !important;
    color: #d6e7ff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar__nav .nav-item__ico i {
    display: block;
    font-size: 1rem;
    line-height: 1;
    text-rendering: geometricPrecision;
}

.sidebar__nav .nav-item:hover .nav-item__ico {
    border-color: rgba(184, 218, 255, 0.56) !important;
    background: linear-gradient(135deg, rgba(114, 169, 248, 0.36), rgba(85, 125, 187, 0.32)) !important;
    color: #ecf5ff !important;
}

.sidebar__nav .nav-item.is-active .nav-item__ico {
    border-color: rgba(206, 237, 255, 0.86) !important;
    background: linear-gradient(135deg, rgba(190, 227, 255, 0.42), rgba(160, 245, 209, 0.3)) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(222, 244, 255, 0.4), 0 0 16px rgba(120, 182, 255, 0.34) !important;
}

.sidebar__nav .nav-item__txt {
    font-size: 0.96rem !important;
    font-weight: 800;
    letter-spacing: 0.06em !important;
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .sidebar__nav {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 560px) {
    .sidebar__nav {
        grid-template-columns: 1fr !important;
        gap: 7px !important;
    }
    .sidebar__nav .nav-item {
        justify-content: flex-start !important;
        text-align: left;
        padding: 10px 12px;
    }
    .sidebar__nav .nav-item__txt {
        font-size: 0.8rem !important;
    }
}

.inv-card__qty {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(37, 99, 235, 0.16)) !important;
    border: 1px solid rgba(147, 197, 253, 0.42) !important;
    color: #e6f1ff !important;
    box-shadow: 0 0 0 1px rgba(147, 197, 253, 0.12), 0 6px 16px rgba(9, 16, 30, 0.32);
}

.backpack-only-badge {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(20, 83, 45, 0.18)) !important;
    border: 1px solid rgba(110, 231, 183, 0.44) !important;
    color: #d1fae5 !important;
}

.status-id-cell--yes .status-id-label {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.16)) !important;
    border: 1px solid rgba(110, 231, 183, 0.42) !important;
    color: #d1fae5 !important;
    box-shadow: 0 0 0 1px rgba(110, 231, 183, 0.12);
}

/* Readability + button polish */
body {
    font-size: 15px;
}

.guide-panel__desc,
.guide-panel__steps li,
.settings-row__desc,
.site-footer__text {
    font-size: 0.8rem;
}

.btn,
.bulk-actions__btn,
.inv-mini-btn,
.btn-refresh-id {
    padding: 8px 13px;
    font-size: 0.86rem;
    letter-spacing: 0.02em;
}

.btn-icon {
    width: 1.05rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 0.98rem;
    margin-right: 2px;
}

.btn i,
.inv-mini-btn i,
.bulk-actions__btn i,
.nav-item__ico i,
.site-footer__chip i,
.site-footer__link i {
    vertical-align: middle;
}

