/* Fonts loaded via <link> in HTML — do not @import here (breaks CSS on some CDN/CSP setups) */
/* ===== CSS Custom Properties ===== */
:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --bg-primary: #0a0a0f;
    --bg-surface: rgba(15, 15, 23, 0.8);
    --bg-secondary: #12121a;
    --bg-elevated: rgba(30, 30, 46, 0.8);
    --bg-hover: rgba(139, 92, 246, 0.08);
    --bg-active: rgba(139, 92, 246, 0.15);

    --border: rgba(139, 92, 246, 0.2);
    --border-hover: rgba(139, 92, 246, 0.4);
    --border-active: rgba(139, 92, 246, 0.6);

    --text-primary: #e4e4e7;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-faint: rgba(255, 255, 255, 0.25);

    --accent: #8b5cf6;
    --accent-hover: #a78bfa;
    --accent-muted: rgba(139, 92, 246, 0.15);
    --accent-cyan: #a78bfa;

    --violet-300: #c4b5fd;
    --violet-400: #a78bfa;
    --violet-500: #8b5cf6;
    --violet-600: #7c3aed;
    --violet-700: #6d28d9;
    /* legacy aliases — mapped to violet (no teal/cyan in UI) */
    --cyan-300: #c4b5fd;
    --cyan-400: #a78bfa;
    --cyan-500: #8b5cf6;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --green-300: #86efac;
    --green-400: #4ade80;
    --green-500: #22c55e;
    --yellow-300: #fde047;
    --yellow-400: #facc15;
    --pink-300: #f9a8d4;
    --pink-400: #f472b6;
    --blue-300: #93c5fd;
    --blue-400: #60a5fa;
    --red-400: #f87171;
    --red-500: #ef4444;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;

    --sidebar-width: 260px;
    --sidebar-collapsed-width: 0px;
    --header-height: 60px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;

    --glass-blur: blur(20px);
    --glass-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(139, 92, 246, 0.1);

    /* Roblox163 pattern — one surface, one active state, accent = border + icon only */
    --surface: rgba(15, 15, 23, 0.85);
    --surface-solid: #12121a;
    --surface-hover: rgba(139, 92, 246, 0.06);
    --state-active-bg: rgba(139, 92, 246, 0.12);
    --state-active-border: var(--border-hover);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(139, 92, 246, 0.12);

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms ease;
}

/* ===== Reset / Normalize ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

input {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

ul, ol {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(30, 30, 46, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.7);
}

/* ===== Grid Overlay Background ===== */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    animation: gridMove 40s linear infinite;
    z-index: -1;
    pointer-events: none;
}

/* ===== Layout ===== */
body:not(.login-page) {
    display: flex;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(15, 15, 23, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-slow), width var(--transition-slow);
    overflow: hidden;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-slow);
}

/* ===== Sidebar ===== */
.sidebar-header {
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--border);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), transparent);
}

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

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--accent);
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--text-primary);
}

/* Sidebar Search */
.sidebar-games-search {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}

.sidebar-games-search .search-icon {
    position: static;
    color: var(--text-muted);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.games-search-input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: inherit;
    width: 100%;
}

.games-search-input::placeholder {
    color: var(--text-faint);
}

/* Sidebar Games List */
.sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 6px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.2) transparent;
}

.games-list-container {
    padding: 0 8px;
}

.game-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
    text-decoration: none;
    color: var(--text-secondary);
    position: relative;
}

.game-item:hover {
    background: rgba(139, 92, 246, 0.08);
    color: var(--text-primary);
}

.game-item.active {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid var(--border-hover);
    color: var(--text-primary);
}

.game-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: linear-gradient(180deg, var(--violet-500), var(--violet-400));
    border-radius: 0 4px 4px 0;
}

.game-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.game-item-icon-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
}

.game-item-info {
    flex: 1;
    min-width: 0;
}

.game-item-name {
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.game-item-accounts {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: block;
}

.game-item .favorite-btn {
    padding: 4px;
    border-radius: 6px;
    color: var(--text-faint);
    transition: all var(--transition-fast);
    opacity: 0;
    flex-shrink: 0;
}

.game-item:hover .favorite-btn {
    opacity: 0.6;
}

.game-item .favorite-btn:hover,
.game-item .favorite-btn.favorited {
    color: var(--red-400);
    opacity: 1;
}

.game-item .favorite-btn svg {
    width: 14px;
    height: 14px;
}

/* Sidebar Bottom - User Card */
.sidebar-bottom {
    border-top: 1px solid var(--border);
    position: relative;
    flex-shrink: 0;
}

.sidebar-bottom::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), transparent);
}

.sidebar-user-card {
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 36px 1fr 32px;
    grid-template-rows: auto auto;
    gap: 8px 10px;
    align-items: center;
    transition: background var(--transition-fast);
}

.sb-user-avatar {
    grid-column: 1;
    grid-row: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid transparent;
    background-image: linear-gradient(var(--bg-primary), var(--bg-primary)), linear-gradient(135deg, #8b5cf6, #a78bfa);
    background-origin: border-box;
    background-clip: content-box, border-box;
    cursor: pointer;
}

.sb-user-info {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sb-user-profile-hit {
    cursor: pointer;
}

.sb-logout-btn {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    justify-self: end;
}

.sb-user-controls {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-user-card:hover .sb-user-profile-hit .sb-user-name,
.sidebar-user-card:hover .sb-user-avatar {
    color: var(--text-primary);
}

.sidebar-user-card:hover {
    background: rgba(139, 92, 246, 0.05);
}

.sb-user-avatar:hover {
    opacity: 0.92;
}

.sb-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb-user-balance {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--success);
    font-family: var(--font-sans);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.currency-switch-compact { padding: 1px; gap: 1px; }
.currency-switch-compact .currency-btn { padding: 1px 5px; font-size: 0.65rem; }

.lang-switch-compact { padding: 1px; flex-shrink: 0; }
.lang-switch-compact .lang-switch-btn { padding: 1px 5px; font-size: 0.65rem; }

.sb-user-controls .currency-switch-compact,
.sb-user-controls .lang-switch-compact {
    flex: 1;
    justify-content: center;
}

/* Quick Links (always visible) */
.sidebar-quick-links {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.sb-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.sb-link-item:hover {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.sb-link-item.active {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid var(--border-hover);
    color: var(--violet-400);
}

.sb-link-item svg {
    flex-shrink: 0;
}

.sb-logout-btn {
    padding: 6px;
    border-radius: 6px;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.sb-logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red-400);
}

/* Language Switch */
.sidebar-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-switch {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.lang-switch-btn {
    padding: 3px 8px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    letter-spacing: 0.04em;
    cursor: pointer;
    border: none;
    background: none;
}

.lang-switch-btn:hover {
    color: var(--text-primary);
}

.lang-switch-btn.active {
    background: rgba(139, 92, 246, 0.15);
    color: var(--text-primary);
}

.lang-switch-header {
    display: none;
}

body.guest-docs .lang-switch-header {
    display: flex;
}

/* Currency Switch */
.currency-switch { display: flex; gap: 2px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 6px; padding: 2px; overflow: hidden; }
.currency-btn { padding: 3px 8px; border-radius: 4px; border: none; background: none; color: var(--text-muted); font-size: 0.7rem; font-weight: 600; cursor: pointer; transition: all var(--transition-fast); letter-spacing: 0.04em; }
.currency-btn:hover { color: var(--text-primary); }
.currency-btn.active { background: rgba(139, 92, 246, 0.15); color: var(--text-primary); }
.currency-switch-header { display: none; }

@media (max-width: 1024px) {
    .lang-switch-header {
        display: flex;
    }
    .currency-switch-header {
        display: flex;
    }
}

/* ===== Header ===== */
.main-header {
    height: var(--header-height);
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 15, 23, 0.92);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    position: sticky;
    top: 0;
    z-index: 200;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    display: none;
    padding: 6px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.menu-toggle:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

.menu-toggle svg {
    width: 20px;
    height: 20px;
}

.header-page-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-sans);
    letter-spacing: -0.02em;
    line-height: 1.35;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.header-balance-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    color: var(--success);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header-balance-pill:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
}

.header-balance-pill svg {
    color: var(--success);
    opacity: 0.7;
}

.header-community-user-stat,
.community-user-stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    background: rgba(139, 92, 246, 0.08);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.community-user-stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success, #22c55e);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.55);
    flex-shrink: 0;
}

.header-user-btn {
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    background-image: linear-gradient(var(--bg-primary), var(--bg-primary)), linear-gradient(135deg, #8b5cf6, #a78bfa);
    background-origin: border-box;
    background-clip: content-box, border-box;
    transition: all var(--transition-fast);
}

.header-user-btn:hover .header-avatar {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.icon-btn {
    padding: 7px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

.color-scheme-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.color-dot-cyan { background: var(--cyan-400); }
.color-dot-violet { background: var(--violet-400); }
.color-dot-emerald { background: var(--emerald-400); }
.color-dot-amber { background: var(--amber-400); }

.color-dot.active {
    border-color: var(--text-primary);
    transform: scale(1.2);
    box-shadow: 0 0 8px currentColor;
}

/* ===== Main Body ===== */
.main-body {
    flex: 1;
    padding: 24px;
}

/* ===== Dashboard ===== */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== Stats Section ===== */
.stats-section {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    flex: 1;
}

.stat-card {
    position: relative;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--surface-border, var(--border));
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-card::before {
    display: none;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--state-active-border);
    box-shadow: var(--shadow-hover);
}

.stat-card-violet:hover,
.stat-card-cyan:hover,
.stat-card-emerald:hover,
.stat-card-amber:hover {
    box-shadow: var(--shadow-hover);
}

.stat-glow {
    position: absolute;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    filter: blur(36px);
    opacity: 0.08;
    pointer-events: none;
    top: -16px;
    right: -16px;
}

.stat-glow-cyan { background: var(--violet-400); }
.stat-glow-violet { background: var(--violet-400); }
.stat-glow-emerald { background: var(--emerald-400); }
.stat-glow-amber { background: var(--amber-400); }

.stat-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-icon {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

.stat-card-cyan .stat-icon { color: var(--violet-400); }
.stat-card-violet .stat-icon { color: var(--violet-400); }
.stat-card-emerald .stat-icon { color: var(--emerald-400); }
.stat-card-amber .stat-icon { color: var(--amber-400); }

.stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.stat-separator {
    color: var(--text-muted);
    font-weight: 400;
    margin: 0 2px;
}

.stat-rate {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    font-family: var(--font-sans);
}

.stat-card-cyan .stat-rate { color: var(--text-muted); }
.stat-card-amber .stat-rate { color: var(--text-muted); }

.stat-action {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.stat-action:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

.stat-action svg {
    width: 14px;
    height: 14px;
}

/* Activity Chart */
.activity-chart {
    min-width: 220px;
    max-width: 280px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(15, 15, 23, 0.8);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    box-shadow: var(--glass-shadow);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.chart-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.chart-period {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.chart-placeholder {
    width: 100%;
    height: 80px;
}

.mini-chart {
    width: 100%;
    height: 100%;
}

/* ===== Toolbar ===== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    background: rgba(15, 15, 23, 0.8);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    box-shadow: var(--glass-shadow);
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-mode-switch { display: flex; gap: 2px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 6px; padding: 2px; flex-shrink: 0; }
.search-mode-btn { padding: 4px 10px; border-radius: 4px; border: none; background: none; color: var(--text-muted); font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all var(--transition-fast); white-space: nowrap; }
.search-mode-btn:hover { color: var(--text-primary); }
.search-mode-btn.active { background: rgba(139, 92, 246, 0.15); color: var(--text-primary); }

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 10px;
    width: 15px;
    height: 15px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    padding: 8px 12px 8px 32px;
    border-radius: var(--radius-md);
    background: rgba(30, 30, 46, 0.8);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 0.82rem;
    width: 200px;
    transition: all var(--transition-fast);
}

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

.search-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

/* Radio Buttons */
.filter-radios {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: var(--radius-md);
    background: rgba(30, 30, 46, 0.6);
    border: 1px solid var(--border);
}

.radio-btn {
    display: flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
}

.radio-btn input {
    display: none;
}

.radio-btn:hover {
    color: var(--text-secondary);
}

.radio-btn.active {
    background: var(--bg-active);
    color: var(--accent);
}

/* Toolbar Buttons */
.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.toolbar-btn:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

.toolbar-btn svg {
    width: 14px;
    height: 14px;
}

.toolbar-btn.active {
    background: var(--accent-muted);
    color: var(--accent);
}

.toolbar-separator {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 4px;
}

.view-toggle {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: var(--radius-sm);
    background: rgba(30, 30, 46, 0.6);
    border: 1px solid var(--border);
}

.view-btn {
    padding: 5px;
    border-radius: 6px;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.view-btn:hover {
    color: var(--text-secondary);
}

.view-btn.active {
    background: var(--bg-active);
    color: var(--accent);
}

.view-btn svg {
    width: 15px;
    height: 15px;
}

/* ===== Data Table ===== */
.table-container {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    background: rgba(15, 15, 23, 0.8);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.data-table thead {
    background: rgba(139, 92, 246, 0.1);
    border-bottom: 1px solid var(--border);
}

.data-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8b5cf6;
    white-space: nowrap;
    user-select: none;
}

.data-table th.sortable {
    cursor: pointer;
    transition: color var(--transition-fast);
}

.data-table th.sortable:hover {
    color: var(--accent-hover);
}

.data-table th.sortable::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--text-faint);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.data-table th.sortable:hover::after {
    opacity: 1;
}

.data-table th.sort-asc::after {
    opacity: 1;
    border-top: none;
    border-bottom: 4px solid #8b5cf6;
}

.data-table th.sort-desc::after {
    opacity: 1;
    border-top: 4px solid #8b5cf6;
}

.data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.08);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: rgba(139, 92, 246, 0.05);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.th-checkbox,
.td-checkbox {
    width: 40px;
    text-align: center;
}

/* Compact mode */
.compact .data-table td {
    padding: 5px 12px;
}

.compact .stat-card {
    padding: 12px;
}

/* ===== Account Cell ===== */
.account-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.status-online {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    animation: statusPulse 2s ease-in-out infinite;
}

.status-dot.status-offline {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.account-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.account-username {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-sans);
    letter-spacing: -0.01em;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
    line-height: 1.45;
    letter-spacing: 0;
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid;
}

.badge-green {
    color: var(--green-300);
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.3);
}

.badge-yellow {
    color: var(--yellow-300);
    background: rgba(250, 204, 21, 0.12);
    border-color: rgba(250, 204, 21, 0.3);
}

.badge-pink {
    color: var(--pink-300);
    background: rgba(244, 114, 182, 0.12);
    border-color: rgba(244, 114, 182, 0.3);
}

.badge-violet {
    color: var(--violet-300);
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.3);
}

.badge-blue {
    color: var(--blue-300);
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.3);
}

.badge-amber {
    color: var(--amber-300);
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
}

.badge-clickable { cursor: pointer; transition: all var(--transition-fast); }
.badge-clickable:hover { filter: brightness(1.3); transform: scale(1.05); }

.badge-emerald {
    color: var(--emerald-300);
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
}

.badge-slate {
    color: var(--slate-300);
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.25);
}

.badge-red {
    color: var(--red-400);
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
}

.badge-cyan {
    color: var(--cyan-300);
    background: rgba(196, 181, 253, 0.12);
    border-color: rgba(196, 181, 253, 0.3);
}

/* ===== Checkbox ===== */
.checkbox-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.checkbox-wrapper input {
    display: none;
}

.checkbox-custom {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border-hover);
    border-radius: 4px;
    transition: all var(--transition-fast);
    position: relative;
    background: transparent;
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid var(--bg-primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform var(--transition-fast);
}

.checkbox-wrapper input:checked + .checkbox-custom {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.checkbox-wrapper input:checked + .checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

/* ===== Table Footer / Pagination ===== */
.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.table-info {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--accent);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-btn svg {
    width: 16px;
    height: 16px;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 2px;
}

.page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.page-number:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

.page-number.active {
    background: var(--accent-muted);
    color: var(--accent);
    font-weight: 600;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* ===== Login Page ===== */
.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.login-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.login-bg-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(139, 92, 246, 0.12) 0%, transparent 60%);
}

.login-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.06) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

.login-bg-radial {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
}

.login-container {
    position: relative;
    z-index: 1;
}

.login-card {
    padding: 0;
    border-radius: var(--radius-xl);
    background: transparent;
}

.login-card-inner {
    padding: 40px;
    border-radius: var(--radius-xl);
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    min-width: 380px;
    box-shadow: var(--glass-shadow);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.login-logo .logo-icon {
    width: 44px;
    height: 44px;
}

.login-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.login-body {
    margin-bottom: 24px;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    background: #fff;
    color: #181825;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.08);
}

.google-btn:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.15);
}

.google-icon {
    width: 20px;
    height: 20px;
}

.login-footer {
    text-align: center;
}

.login-footer p {
    font-size: 0.75rem;
    color: var(--text-faint);
}

.page-footer {
    position: fixed;
    bottom: 20px;
    text-align: center;
    z-index: 1;
}

/* ===== Landing Page ===== */
.landing-page {
    justify-content: flex-start;
    padding: 24px 20px 40px;
    background: #0a0a0f;
    overflow-x: hidden;
}

.landing-page::after {
    display: none;
}

.landing-page .grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

.landing-page #threejs-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.landing-page #threejs-bg canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.landing-wrap {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

.landing-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 48px;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.landing-brand .logo-icon {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.landing-top-btn {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(139, 92, 246, 0.35);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.landing-top-btn:hover {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.55);
}

.landing-main {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.landing-hero {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.landing-eyebrow {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.landing-headline {
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    color: #e2e8f0;
    letter-spacing: -0.02em;
}

.landing-lead {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.landing-feature {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: rgba(15, 15, 23, 0.75);
    border: 1px solid rgba(139, 92, 246, 0.15);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.landing-feature:hover {
    border-color: rgba(139, 92, 246, 0.45);
    background: rgba(20, 18, 32, 0.92);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(139, 92, 246, 0.16);
}

.landing-feature:hover .landing-feature-icon {
    background: rgba(139, 92, 246, 0.22);
    border-color: rgba(139, 92, 246, 0.45);
}

.landing-feature-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: var(--accent);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.landing-feature-icon svg {
    width: 20px;
    height: 20px;
}

.landing-feature h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.landing-feature p {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.landing-footer {
    margin-top: 48px;
    text-align: center;
}

.landing-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-faint);
}

@media (max-width: 640px) {
    .landing-page {
        padding: 16px 16px 32px;
    }

    .landing-top {
        margin-bottom: 32px;
    }

    .landing-features {
        grid-template-columns: 1fr;
    }
}

.page-footer p {
    font-size: 0.72rem;
    color: var(--text-faint);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
    background: rgba(30, 30, 46, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--text-primary);
}

.btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn-primary,
.btn.btn-primary,
.btn.btn-primary.btn-lg,
a.btn.btn-primary,
a.btn.btn-primary.btn-lg {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid var(--border-hover);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: none;
}

.btn-primary:hover,
.btn.btn-primary:hover,
.btn.btn-primary.btn-lg:hover,
a.btn.btn-primary:hover,
a.btn.btn-primary.btn-lg:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.btn-secondary {
    background: rgba(30, 30, 46, 0.6);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.btn-ghost {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--accent);
    border-color: transparent;
    transform: none;
    box-shadow: none;
}

.btn-danger {
    background: rgba(30, 30, 46, 0.6);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    font-weight: 600;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

.btn-warning {
    background: rgba(30, 30, 46, 0.6);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--amber-300);
    font-weight: 600;
}

.btn-warning:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
}

.btn-lg,
.btn.btn-lg {
    padding: 12px 24px;
    font-size: 0.9rem;
}

.btn.btn-secondary.btn-lg {
    background: rgba(30, 30, 46, 0.6);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn.btn-secondary.btn-lg:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--border-hover);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.btn.btn-primary.btn-lg {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid var(--border-hover);
    box-shadow: none;
}

.btn.btn-primary.btn-lg:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.wallet-balance-actions .btn.btn-primary,
.wallet-balance-actions .btn.btn-primary.btn-lg {
    min-width: 120px;
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 0.88rem;
    font-weight: 700;
    min-height: 44px;
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-loader {
    display: inline-flex;
    align-items: center;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ===== Dialog / Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: rgba(15, 15, 23, 0.95);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(10px);
    transition: transform var(--transition-base);
    box-shadow: var(--glass-shadow);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-sans);
}

.modal-close {
    padding: 4px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

.modal-body {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.app-dialog-overlay {
    z-index: 10050;
}

.app-dialog {
    max-width: 440px;
}

.app-dialog-body {
    white-space: pre-wrap;
    word-break: break-word;
}

.app-dialog-body-mono {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    max-height: 240px;
    overflow-y: auto;
}

.app-dialog-input-wrap {
    margin-top: 14px;
}

.app-dialog-input {
    width: 100%;
}

.app-dialog-input-error {
    border-color: var(--red-400) !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

/* (header balance moved to .header-balance-pill above) */

/* ===== Notification Bell ===== */
.header-notification-btn {
    position: relative;
}

.notification-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: var(--red-400);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 6px rgba(248, 113, 113, 0.5);
}

.notification-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(360px, calc(100vw - 24px));
    max-height: 420px;
    background: rgba(18, 18, 26, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: var(--radius-md);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(0, 0, 0, 0.35);
    z-index: 1200;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    isolation: isolate;
}

.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.875rem;
    background: #12121a;
    flex-shrink: 0;
}

.notification-mark-all {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
}

.notification-mark-all:hover {
    text-decoration: underline;
}

.notification-list {
    overflow-y: auto;
    max-height: 360px;
    background: #12121a;
}

.notification-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border: none;
    border-bottom: 1px solid rgba(139, 92, 246, 0.12);
    background: #12121a;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.notification-item:hover {
    background: rgba(139, 92, 246, 0.12);
}

.notification-item.unread {
    background: rgba(139, 92, 246, 0.16);
}

.notification-item-title {
    font-weight: 600;
    font-size: 0.8125rem;
    margin-bottom: 4px;
}

.notification-item-body {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.notification-item-time {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 6px;
    opacity: 0.8;
}

.notification-empty {
    padding: 24px 14px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* ===== Sidebar Close Button (mobile only) ===== */
.sidebar-close-btn {
    display: none;
    padding: 6px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.sidebar-close-btn:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

.sidebar-close-btn svg {
    width: 20px;
    height: 20px;
}

/* ===== Sidebar Backdrop ===== */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 199;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
}

/* ===== Nav Link Active State ===== */
.nav-link-active {
    background: rgba(139, 92, 246, 0.12) !important;
    border: 1px solid var(--border-hover);
    color: var(--violet-400) !important;
}

/* ===== Main Footer ===== */
.main-footer {
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    margin-top: auto;
    background: rgba(15, 15, 23, 0.5);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-copyright {
    font-size: 0.72rem;
    color: var(--text-faint);
}

.footer-center {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-link {
    font-size: 0.72rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent);
}

.footer-sep {
    color: var(--text-faint);
    font-size: 0.72rem;
}

.footer-version {
    font-size: 0.68rem;
    color: var(--text-faint);
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.15);
}

/* ===== Bottom Navigation Bar ===== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 23, 0.95);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--border);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 0;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    min-height: 44px;
    justify-content: center;
    text-decoration: none;
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
}

.bottom-nav-item.active {
    color: #8b5cf6;
}

.bottom-nav-item:hover {
    color: var(--accent-hover);
}

/* ===== Wallet Page ===== */
.wallet-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.wallet-balance-card {
    position: relative;
    padding: 32px;
    border-radius: var(--radius-2xl);
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.wallet-balance-card::before {
    display: none;
}

.wallet-balance-glow {
    display: none;
}

.wallet-balance-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.wallet-balance-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.wallet-balance-amount {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin: 8px 0;
}

.wallet-currency {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--violet-400);
    font-family: var(--font-sans);
}

.wallet-amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    font-family: var(--font-sans);
}

.wallet-balance-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.wallet-balance-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* ===== Transactions ===== */
.transactions-section {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.transactions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
    gap: 16px;
}

.transactions-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.transactions-tabs {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: var(--radius-md);
    background: rgba(30, 30, 46, 0.6);
    border: 1px solid var(--border);
}

.tab-btn {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    white-space: nowrap;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.tab-btn:hover {
    color: var(--text-secondary);
}

.tab-btn.active {
    background: var(--bg-active);
    color: var(--accent);
}

.transactions-list {
    padding: 16px 24px 24px;
}

.transactions-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 24px 20px;
}

/* Transaction Row */
.txn-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(139, 92, 246, 0.08);
    transition: background var(--transition-fast);
    gap: 12px;
}

.txn-row:last-child {
    border-bottom: none;
}

.txn-row:hover {
    background: rgba(139, 92, 246, 0.05);
    margin: 0 -12px;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: var(--radius-sm);
}

.txn-row-compact {
    padding: 10px 0;
}

.txn-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.txn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.txn-icon-deposit {
    background: rgba(16, 185, 129, 0.12);
    color: var(--emerald-400);
}

.txn-icon-withdrawal {
    background: rgba(239, 68, 68, 0.12);
    color: var(--red-400);
}

.txn-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.txn-method {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.txn-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.txn-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.txn-amount {
    font-size: 0.88rem;
    font-weight: 700;
    font-family: var(--font-sans);
}

.txn-amount-positive {
    color: var(--emerald-300);
}

.txn-amount-negative {
    color: var(--red-400);
}

.txn-status {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 10px;
}

.txn-status.status-completed {
    color: #10b981;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.txn-status.status-pending {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.3);
    animation: statusPulse 2s ease-in-out infinite;
}

.txn-status.status-processing {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    animation: statusPulse 2s ease-in-out infinite;
}

.txn-status.status-failed {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ===== Empty & Loading States ===== */
.transactions-empty {
    text-align: center;
    padding: 48px 24px;
}

.transactions-empty svg {
    color: var(--text-faint);
    margin: 0 auto 16px;
}

.empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.empty-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.skeleton-row {
    height: 56px;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.05) 25%, rgba(139, 92, 246, 0.1) 50%, rgba(139, 92, 246, 0.05) 75%);
    background-size: 200% 100%;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

/* ===== Deposit Page ===== */
.deposit-page {
    max-width: 1100px;
    margin: 0 auto;
}

.deposit-header {
    margin-bottom: 24px;
}

.deposit-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.deposit-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.deposit-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.deposit-card {
    position: relative;
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.deposit-card::before {
    display: none;
}

.deposit-card:hover {
    border-color: var(--state-active-border);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.deposit-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 0;
}

.deposit-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.deposit-card-icon-bank {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
}

.deposit-card-icon-crypto {
    background: rgba(139, 92, 246, 0.12);
    color: var(--violet-400);
}

.deposit-card-icon-phone {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.deposit-card-title-wrap {
    flex: 1;
    min-width: 0;
}

.deposit-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.deposit-card-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.deposit-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.deposit-badge-green {
    color: var(--emerald-300);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.deposit-badge-blue {
    color: var(--blue-300);
    background: rgba(96, 165, 250, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.deposit-badge-amber {
    color: var(--amber-300);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.deposit-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.deposit-min-note {
    font-size: 0.72rem;
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.deposit-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.deposit-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.deposit-input {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    background: rgba(30, 30, 46, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
    min-height: 44px;
}

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

.deposit-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
    outline: none;
}

/* Quick Amount Buttons */
.quick-amounts {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.quick-amount-btn {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: rgba(30, 30, 46, 0.6);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
    min-height: 36px;
    cursor: pointer;
}

.quick-amount-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.quick-amount-btn.active {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

/* Network / Provider / Denomination Selectors */
.network-selector,
.provider-selector,
.denomination-selector {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.network-btn,
.provider-btn,
.denomination-btn {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    background: rgba(30, 30, 46, 0.6);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    min-height: 36px;
}

.network-btn:hover,
.provider-btn:hover,
.denomination-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.network-btn.active,
.provider-btn.active,
.denomination-btn.active {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

/* Recent Deposits */
.recent-deposits {
    background: rgba(15, 15, 23, 0.8);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 20px 24px;
    box-shadow: var(--glass-shadow);
}

.recent-deposits-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
}

/* ── Visual Provider Selector (Thẻ Cào) ── */
.provider-selector-visual {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.625rem;
}

.provider-selector-visual .provider-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 0.5rem;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    background: rgba(30, 30, 46, 0.4);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s;
}

.provider-selector-visual .provider-btn:hover {
    border-color: var(--border-hover);
    background: rgba(139, 92, 246, 0.08);
    transform: translateY(-2px);
}

.provider-selector-visual .provider-btn.active {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.1);
    box-shadow: 0 0 20px -6px rgba(139, 92, 246, 0.4);
    color: #fff;
}

.provider-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #fff;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.provider-btn.active .provider-logo { transform: scale(1.1); }
.provider-logo-viettel { background: linear-gradient(135deg, #e60012, #ff4444); }
.provider-logo-mobifone { background: linear-gradient(135deg, #0066b3, #0099e6); }
.provider-logo-vinaphone { background: linear-gradient(135deg, #0057a8, #00a1e4); }

.provider-name {
    font-size: 0.78rem;
    font-weight: 600;
}

/* ── Visual Network Selector ── */
.network-selector-visual {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.625rem;
}

.network-selector-visual .network-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 0.875rem 0.5rem;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    background: rgba(30, 30, 46, 0.4);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s;
    min-height: auto;
}

.network-selector-visual .network-btn:hover {
    border-color: var(--border-hover);
    background: rgba(139, 92, 246, 0.08);
    transform: translateY(-2px);
}

.network-selector-visual .network-btn.active {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.12);
    box-shadow: 0 0 20px -6px rgba(139, 92, 246, 0.35);
    color: var(--text-primary);
}

.network-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s;
}

.network-btn.active .network-logo {
    transform: scale(1.1);
}

.network-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.network-chain {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
}

.network-btn.active .network-chain {
    color: rgba(196, 181, 253, 0.85);
}

/* ── Payment Iframe ── */
.payment-iframe-wrap {
    margin-top: 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    background: rgba(15, 15, 23, 0.8);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
}

.payment-iframe-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(139, 92, 246, 0.05);
    border-bottom: 1px solid var(--border);
}

.payment-iframe-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.payment-iframe-info svg { color: #34d399; }

.payment-iframe-network {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.15);
    color: var(--cyan-300);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.payment-iframe-actions {
    display: flex;
    gap: 0.25rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(30, 30, 46, 0.6);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent);
}

.payment-iframe {
    width: 100%;
    height: 700px;
    border: none;
    background: #f8f9fa;
    display: block;
    transition: opacity 0.3s;
}

.payment-iframe:not([src]),
.payment-iframe[src=""] {
    opacity: 0.4;
    background: rgba(0, 0, 0, 0.3) url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="18" fill="none" stroke="%238b5cf6" stroke-width="2.5" stroke-dasharray="28.27" stroke-dashoffset="28.27"><animateTransform attributeName="transform" type="rotate" from="0 50 50" to="360 50 50" dur="1s" repeatCount="indefinite"/><animate attributeName="stroke-dasharray" dur="1.5s" values="0 113.1;56.55 56.55;0 113.1" repeatCount="indefinite"/></circle></svg>') center no-repeat;
    background-size: 48px;
}

.payment-iframe-fallback {
    padding: 3rem 1.5rem;
    text-align: center;
}

.fallback-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.fallback-content svg { color: var(--text-faint); }

.fallback-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.fallback-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 0.5rem;
}

.fallback-content .btn { min-width: 180px; }

.payment-iframe-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(139, 92, 246, 0.03);
    border-top: 1px solid rgba(139, 92, 246, 0.1);
}

.spinner-small {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== Escrow Page ===== */
.escrow-page {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.escrow-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.escrow-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.escrow-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Escrow Create Form */
.escrow-create-form {
    animation: glassFadeIn 0.3s ease-out;
}

.escrow-form-card {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.escrow-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.escrow-form-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.escrow-form-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.escrow-textarea {
    resize: vertical;
    min-height: 80px;
    padding: 1rem 1.5rem;
    line-height: 1.5;
    background: rgba(30, 30, 46, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    transition: all var(--transition-fast);
}

.escrow-textarea:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    outline: none;
}

.escrow-balance-hint {
    font-size: 0.72rem;
    color: var(--emerald-300);
    margin-top: 2px;
    font-family: var(--font-sans);
}

/* Escrow Tabs */
.escrow-tabs {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: var(--radius-md);
    background: rgba(30, 30, 46, 0.6);
    border: 1px solid var(--border);
    width: fit-content;
}

/* Escrow List */
.escrow-list {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    padding: 16px 24px 24px;
}

/* Escrow Ticket Card */
.escrow-ticket-card {
    display: block;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: rgba(30, 30, 46, 0.4);
    backdrop-filter: blur(10px);
    margin-bottom: 12px;
    transition: all var(--transition-base);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.escrow-ticket-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
}

.escrow-ticket-card:last-child {
    margin-bottom: 0;
}

.escrow-ticket-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.escrow-ticket-id {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

/* Escrow Status Badges */
.escrow-status-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.escrow-status-active {
    color: var(--emerald-300);
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.escrow-status-completed {
    color: var(--cyan-300);
    background: rgba(196, 181, 253, 0.15);
    border: 1px solid rgba(196, 181, 253, 0.3);
}

.escrow-status-pending {
    color: var(--amber-300);
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    animation: statusPulse 2s ease-in-out infinite;
}

.escrow-status-disputed {
    color: var(--red-400);
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: statusPulse 2s ease-in-out infinite;
}

.escrow-status-cancelled {
    color: var(--text-muted);
    background: rgba(100, 116, 139, 0.1);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.escrow-status-refunded {
    color: var(--violet-300);
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.escrow-status-delivered {
    color: #fcd34d;
    background: rgba(252, 211, 77, 0.12);
    border: 1px solid rgba(252, 211, 77, 0.35);
    animation: statusPulse 2s ease-in-out infinite;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--amber-400);
    color: var(--amber-300);
    background: rgba(245, 158, 11, 0.08);
}

/* ===== Binance P2P Order Layout ===== */
.p2p-order-page {
    max-width: 1200px;
    margin: 0 auto;
}

.p2p-order-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    align-items: start;
}

.p2p-order-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.p2p-status-banner {
    border-radius: var(--radius-xl);
    border: 1px solid rgba(252, 211, 77, 0.25);
    background: linear-gradient(135deg, rgba(252, 211, 77, 0.12) 0%, rgba(15, 15, 23, 0.95) 100%);
    overflow: hidden;
}

.p2p-status-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    flex-wrap: wrap;
}

.p2p-status-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--amber-300);
    display: block;
    margin-bottom: 6px;
}

.p2p-status-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.p2p-status-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 8px 0 0;
    line-height: 1.5;
    max-width: 520px;
}

.p2p-countdown {
    text-align: right;
    min-width: 120px;
}

.p2p-countdown-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.p2p-countdown-value {
    font-family: var(--font-sans);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--amber-300);
}

.p2p-countdown-value.p2p-countdown-urgent {
    color: var(--red-400);
    animation: statusPulse 1s ease-in-out infinite;
}

.p2p-banner-delivered {
    border-color: rgba(252, 211, 77, 0.4);
}

.p2p-banner-completed {
    border-color: rgba(16, 185, 129, 0.35);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(15, 15, 23, 0.95) 100%);
}

.p2p-banner-disputed {
    border-color: rgba(239, 68, 68, 0.35);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(15, 15, 23, 0.95) 100%);
}

.p2p-steps {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 16px 0 8px;
    overflow-x: auto;
}

.p2p-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 72px;
    flex-shrink: 0;
}

.p2p-step span {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 80px;
    line-height: 1.2;
}

.p2p-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid var(--border);
    color: var(--text-muted);
    background: rgba(15, 15, 23, 0.6);
}

.p2p-step.completed .p2p-step-num {
    border-color: var(--emerald-400);
    background: rgba(16, 185, 129, 0.2);
    color: var(--emerald-300);
}

.p2p-step.active .p2p-step-num {
    border-color: var(--amber-400);
    background: rgba(252, 211, 77, 0.2);
    color: var(--amber-300);
    box-shadow: 0 0 12px rgba(252, 211, 77, 0.3);
}

.p2p-step.active span,
.p2p-step.completed span {
    color: var(--text-secondary);
}

.p2p-step.disputed .p2p-step-num {
    border-color: var(--red-400);
    color: var(--red-400);
}

.p2p-step-line {
    flex: 1;
    min-width: 12px;
    height: 2px;
    background: var(--border);
    margin-bottom: 22px;
}

.p2p-steps-cancelled {
    opacity: 0.45;
}

.p2p-order-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.p2p-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    font-size: 0.85rem;
}

.p2p-detail-label {
    color: var(--text-muted);
    flex-shrink: 0;
}

.p2p-detail-value {
    color: var(--text-primary);
    text-align: right;
    word-break: break-word;
}

.p2p-detail-amount {
    font-weight: 700;
    color: var(--amber-300);
}

.p2p-detail-desc .p2p-detail-value {
    max-width: 60%;
}

.p2p-action-panel {
    margin-top: 0;
}

.p2p-action-card {
    background: rgba(15, 15, 23, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 20px;
}

.p2p-btn-binance {
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%) !important;
    border: none !important;
    color: #1a1a2e !important;
    font-weight: 700 !important;
}

.p2p-btn-binance:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.p2p-btn-main {
    flex: 2;
}

.p2p-wait-notice {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    background: rgba(252, 211, 77, 0.08);
    border: 1px solid rgba(252, 211, 77, 0.2);
    color: var(--amber-200);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.p2p-order-chat .escrow-chat-section {
    height: auto;
    min-height: 0;
}

@media (max-width: 960px) {
    .p2p-order-layout {
        grid-template-columns: 1fr;
    }

    .p2p-order-chat .escrow-chat-section {
        height: auto;
        min-height: 0;
    }
}

/* Escrow Parties */
.escrow-ticket-parties {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 14px;
}

.escrow-party {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.escrow-party-role {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.escrow-party-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.escrow-arrow {
    color: var(--text-faint);
    flex-shrink: 0;
}

.escrow-ticket-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.escrow-ticket-amount {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--emerald-300);
    font-family: var(--font-sans);
}

.escrow-ticket-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.escrow-ticket-desc {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Escrow Detail Page ===== */
.escrow-detail-page {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.escrow-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    width: fit-content;
}

.escrow-back-btn:hover {
    color: var(--accent);
    transform: translateX(-3px);
}

.escrow-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Escrow Info Card */
.escrow-info-card {
    background: rgba(15, 15, 23, 0.8);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.escrow-info-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.escrow-info-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.escrow-info-title {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-sans);
}

.escrow-info-amount {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.escrow-info-amount .wallet-currency {
    font-size: 1.4rem;
}

.escrow-info-amount span:nth-child(2) {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-sans);
}

.escrow-currency-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    align-self: flex-end;
    margin-bottom: 4px;
}

/* Escrow Progress Steps */
.escrow-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 8px 0;
}

.escrow-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.escrow-progress-step span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.escrow-progress-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--border-hover);
    background: var(--bg-primary);
    transition: all var(--transition-base);
}

.escrow-progress-step.completed .escrow-progress-dot {
    background: #8b5cf6;
    border-color: #8b5cf6;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

.escrow-progress-step.completed span {
    color: var(--violet-300);
}

.escrow-progress-step.disputed .escrow-progress-dot {
    background: var(--red-400);
    border-color: var(--red-400);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.escrow-progress-step.disputed span {
    color: var(--red-400);
}

.escrow-progress-line {
    width: 60px;
    height: 2px;
    background: var(--border-hover);
    margin: 0 8px;
    margin-bottom: 24px;
}

.escrow-progress-cancelled .escrow-progress-dot {
    border-color: var(--text-faint) !important;
    background: var(--bg-primary) !important;
    box-shadow: none !important;
}

/* Escrow Parties Detail */
.escrow-parties-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.escrow-party-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    background: rgba(30, 30, 46, 0.5);
    border: 1px solid var(--border);
    min-width: 140px;
    flex: 1;
}

.escrow-party-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 20px;
}

.escrow-party-buyer {
    color: var(--cyan-300);
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.escrow-party-seller {
    color: var(--violet-300);
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.escrow-party-detail-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    word-break: break-all;
}

.escrow-arrow-detail {
    color: var(--text-faint);
    flex-shrink: 0;
}

/* Escrow Description */
.escrow-description-box {
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(30, 30, 46, 0.5);
    border: 1px solid var(--border);
}

.escrow-desc-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 6px;
}

.escrow-desc-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.escrow-dates {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.escrow-date-item {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.escrow-date-item span {
    color: var(--text-secondary);
}

/* Escrow Actions */
.escrow-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.escrow-flow-notice {
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.escrow-flow-hint {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-radius: var(--radius-lg);
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.18);
}

.escrow-flow-hint-text {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-secondary);
    flex: 1;
}

.escrow-flow-timer {
    flex-shrink: 0;
    text-align: right;
}

.escrow-flow-timer-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.escrow-flow-timer-value {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    color: var(--amber-300);
}

.escrow-flow-timer-value.escrow-flow-timer-urgent {
    color: var(--red-400);
}

.p2p-steps-compact {
    padding: 4px 0 0;
}

.p2p-steps-compact .p2p-step {
    min-width: 56px;
}

.p2p-steps-compact .p2p-step-num {
    width: 24px;
    height: 24px;
    font-size: 0.68rem;
}

.p2p-steps-compact .p2p-step span {
    font-size: 0.58rem;
    max-width: 64px;
}

.p2p-steps-compact .p2p-step-line {
    margin-bottom: 18px;
}

.escrow-action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.escrow-action-btn {
    flex: 1;
    min-width: 160px;
}

.escrow-action-confirm {
    font-weight: 600;
}

.escrow-action-accept {
    font-weight: 600;
}

.escrow-role-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.escrow-role-buyer {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #93c5fd;
}

.escrow-role-seller {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

/* Escrow Notice */
.escrow-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    font-weight: 500;
    width: 100%;
}

.escrow-notice-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--emerald-300);
}

.escrow-notice-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--amber-300);
    animation: statusPulse 3s ease-in-out infinite;
}

.escrow-notice-muted {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

/* ===== Escrow Chat ===== */
.escrow-chat-section {
    background: rgba(15, 15, 23, 0.8);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.escrow-chat-title {
    font-size: 0.95rem;
    font-weight: 700;
    padding: 20px 24px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ws-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    transition: background 0.3s;
}
.ws-status-dot.ws-online {
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}
.ws-status-dot.ws-offline {
    background: var(--danger);
    box-shadow: 0 0 6px var(--danger);
}

.ws-online-count {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-left: auto;
}

.escrow-typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    opacity: 0.6;
}
.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.escrow-chat-messages {
    max-height: 400px;
    overflow-y: auto;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.escrow-chat-empty {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.escrow-chat-loading {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* Chat Messages */
.escrow-msg {
    display: flex;
    max-width: 80%;
}

.escrow-msg-mine {
    align-self: flex-end;
    margin-left: auto;
}

.escrow-msg-other {
    align-self: flex-start;
    margin-right: auto;
}

.escrow-msg-system {
    align-self: center;
    max-width: 90%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 16px;
}

.escrow-msg-system .escrow-msg-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.escrow-msg-system .escrow-msg-time {
    font-size: 0.62rem;
    color: var(--text-faint);
}

.escrow-msg-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 100%;
    word-break: break-word;
}

.escrow-msg-mine .escrow-msg-bubble {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.28), rgba(139, 92, 246, 0.22));
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-bottom-right-radius: 4px;
}

.escrow-msg-other .escrow-msg-bubble {
    background: rgba(30, 30, 46, 0.6);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.escrow-msg-name {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--violet-300);
}

.escrow-msg-text {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.escrow-msg-time {
    font-size: 0.62rem;
    color: var(--text-faint);
    align-self: flex-end;
    font-family: var(--font-sans);
}

.escrow-msg-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}

.escrow-msg-mine .escrow-msg-meta {
    justify-content: flex-end;
}

.escrow-msg-status {
    font-size: 0.62rem;
    color: var(--text-muted);
    font-weight: 500;
}

.escrow-msg-status.escrow-msg-seen {
    color: var(--accent);
}

/* Chat Input */
.escrow-chat-input {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: rgba(30, 30, 46, 0.3);
}

.escrow-msg-input {
    flex: 1;
    min-height: 44px;
    padding: 10px 14px;
    background: rgba(30, 30, 46, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.escrow-msg-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    outline: none;
}

.escrow-send-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

/* ===== Animations ===== */
@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

@keyframes glassFadeIn {
    0% { opacity: 0; transform: translateY(15px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.stat-card {
    animation: glassFadeIn 0.4s ease-out both;
}

.stat-card:nth-child(1) { animation-delay: 0ms; }
.stat-card:nth-child(2) { animation-delay: 50ms; }
.stat-card:nth-child(3) { animation-delay: 100ms; }
.stat-card:nth-child(4) { animation-delay: 150ms; }
.stat-card:nth-child(5) { animation-delay: 200ms; }
.stat-card:nth-child(6) { animation-delay: 250ms; }
.stat-card:nth-child(7) { animation-delay: 300ms; }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .activity-chart {
        display: none;
    }
}

@media (max-width: 900px) {
    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .toolbar-right {
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .main-body {
        padding: 12px;
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-input {
        width: 100%;
    }

    .toolbar-btn span {
        display: none;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 800px;
    }

    .data-table .td-account {
        position: sticky;
        left: 0;
        background: rgba(15, 15, 23, 0.95);
        z-index: 2;
    }

    .main-header {
        padding: 0 12px;
    }

    .header-page-title {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .color-scheme-selector {
        display: none;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .toolbar-left {
        width: 100%;
    }

    .search-input-wrapper {
        flex: 1;
    }

    .filter-radios {
        flex-shrink: 0;
    }

    .main-footer {
        display: none;
    }
}

/* ===== Mobile Responsive: Sidebar Overlay ===== */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        z-index: 200;
        transform: translateX(-100%);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
        opacity: 1;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .sidebar-close-btn {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .deposit-methods {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .bottom-nav {
        display: flex;
        justify-content: space-around;
    }

    .wallet-balance-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .wallet-balance-card {
        padding: 24px 20px;
    }

    .wallet-amount {
        font-size: 2.2rem;
    }

    .wallet-currency {
        font-size: 1.4rem;
    }

    .wallet-balance-actions {
        width: 100%;
    }

    .wallet-balance-actions .btn {
        flex: 1;
    }

    .transactions-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 16px 0;
    }

    .transactions-tabs {
        width: 100%;
    }

    .tab-btn {
        flex: 1;
        justify-content: center;
    }

    .transactions-list {
        padding: 12px 16px 16px;
    }

    .txn-row {
        padding: 10px 0;
    }

    .txn-icon {
        width: 32px;
        height: 32px;
    }

    .txn-method {
        font-size: 0.8rem;
    }

    .txn-amount {
        font-size: 0.82rem;
    }

    .deposit-methods {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .deposit-card-body {
        padding: 16px;
    }

    .recent-deposits {
        padding: 16px;
    }

    .header-balance-pill {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    .payment-iframe { height: 500px; }
    .payment-iframe-header { padding: 0.5rem 0.75rem; }
    .payment-iframe-info span:not(.payment-iframe-network) { display: none; }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .deposit-methods {
        grid-template-columns: 1fr;
    }

    .bottom-nav {
        display: none;
    }

    .wallet-balance-card {
        padding: 28px;
    }

    .wallet-amount {
        font-size: 2.6rem;
    }

    .payment-iframe { height: 600px; }
}

/* ===== Escrow Responsive ===== */
@media (max-width: 640px) {
    .escrow-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .escrow-header .btn {
        width: 100%;
    }

    .escrow-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .escrow-tabs .tab-btn {
        flex: 1;
        justify-content: center;
    }

    .escrow-list {
        padding: 12px 16px 16px;
    }

    .escrow-ticket-card {
        padding: 16px;
    }

    .escrow-ticket-parties {
        gap: 8px;
    }

    .escrow-info-card {
        padding: 20px;
    }

    .escrow-info-header {
        flex-direction: column;
    }

    .escrow-parties-detail {
        flex-direction: column;
        gap: 12px;
    }

    .escrow-arrow-detail {
        transform: rotate(90deg);
    }

    .escrow-party-card {
        width: 100%;
    }

    .escrow-progress-line {
        width: 30px;
    }

    .escrow-chat-messages {
        padding: 12px 16px;
        max-height: 300px;
    }

    .escrow-chat-input {
        padding: 12px 16px;
    }

    .escrow-msg {
        max-width: 90%;
    }

    .escrow-actions {
        flex-direction: column;
    }

    .escrow-action-btn {
        width: 100%;
    }

    .escrow-form-body {
        padding: 16px;
    }
}

/* ===== Market Page ===== */
.market-page { padding: 0; }
.market-header {
    margin-bottom: 20px;
}
.market-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.market-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.market-search-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
}
.market-search-wrap .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.market-search {
    width: 100%;
    padding: 10px 12px 10px 36px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-fast);
}
.market-search:focus { border-color: var(--accent); }
.market-search::placeholder { color: var(--text-faint); }
.market-filter-select {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    min-width: 140px;
}
.market-filter-select option { background: var(--bg-primary); }
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.market-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.market-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
}
.market-card-image {
    position: relative;
    padding-top: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(139, 92, 246, 0.05));
    overflow: hidden;
}
.market-card-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: transform 0.2s;
}
.market-card:hover .market-card-image img { transform: translate(-50%, -50%) scale(1.08); }
.market-stock-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    background: rgba(239, 68, 68, 0.8);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 6px;
}
.market-card-info { padding: 12px 14px 14px; }
.market-card-game {
    font-size: 0.65rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.market-card-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 4px 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.2em;
    line-height: 1.3;
}
.market-card-prices { display: flex; align-items: baseline; gap: 8px; }
.market-price-usd {
    font-size: 1rem;
    font-weight: 700;
    color: #8b5cf6;
    font-family: var(--font-sans);
}
.market-price-vnd {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
}
.market-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.market-empty svg { margin-bottom: 12px; opacity: 0.4; }
.market-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* ===== Admin Page ===== */
.admin-page { padding: 0; }
.admin-header { margin-bottom: 20px; }
.admin-title {
    font-size: 1.4rem;
    font-weight: 700;
}
.admin-tabs {
    display: flex;
    gap: 4px;
    padding: 0 0 16px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.admin-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}
.admin-list { display: flex; flex-direction: column; gap: 6px; }
.admin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color var(--transition-fast);
}
.admin-item:hover { border-color: rgba(139, 92, 246, 0.3); }
.admin-item-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.admin-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.admin-item-icon-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(139, 92, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}
.admin-item-info { display: flex; flex-direction: column; min-width: 0; }
.admin-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-item-slug {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.admin-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.btn-sm { padding: 5px 12px; font-size: 0.75rem; border-radius: 6px; }

.admin-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.admin-modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}
.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.admin-modal-header h3 { font-size: 1rem; font-weight: 600; }
.admin-modal-body { padding: 20px; }
.admin-icon-preview { margin-top: 8px; }
.admin-field { margin-bottom: 14px; }
.admin-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
}
.admin-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-fast);
    resize: vertical;
}
.admin-input:focus { border-color: var(--accent); }
.admin-upload-row { display: flex; gap: 8px; align-items: center; }
.admin-upload-row .admin-input { flex: 1; }
.btn-upload {
    cursor: pointer;
    white-space: nowrap;
    padding: 10px 14px;
    font-size: 0.8rem;
    border-radius: 8px;
    flex-shrink: 0;
}
.admin-input::placeholder { color: var(--text-faint); }
select.admin-input { cursor: pointer; }
select.admin-input option { background: var(--bg-primary); }
.admin-vnd-preview {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--success);
    font-family: var(--font-sans);
}

@media (max-width: 640px) {
    .market-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .market-toolbar { flex-direction: column; }
    .market-filter-select { min-width: 100%; }
    .admin-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .admin-item-actions { width: 100%; justify-content: flex-end; }
}

/* ===== Admin Tabs (new multi-tab) ===== */
.admin-tab { padding: 8px 16px; border-radius: 6px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--text-muted); font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all var(--transition-fast); }
.admin-tab:hover { color: var(--text-primary); border-color: var(--accent); }
.admin-tab.active { background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(6,182,212,0.15)); color: #fff; border-color: var(--accent); }
.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }
.admin-data-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.admin-data-table th { text-align: left; padding: 8px 12px; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); }
.admin-data-table td { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--text-secondary); }
.admin-data-table tr:hover td { background: rgba(255,255,255,0.02); }

.admin-db-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 16px;
    min-height: 420px;
}
.admin-db-sidebar {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    max-height: 70vh;
    overflow: auto;
}
.admin-db-table-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-align: left;
    cursor: pointer;
}
.admin-db-table-btn:hover,
.admin-db-table-btn.active {
    background: var(--state-active-bg);
    border-color: var(--state-active-border);
    color: var(--text-primary);
}
.admin-db-table-name { font-family: var(--font-sans); }
.admin-db-table-count {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
}
.admin-db-main { min-width: 0; }
.admin-db-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.admin-db-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.admin-db-auto {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.admin-db-table-wrap { overflow: auto; max-height: 65vh; }
.admin-db-data-table { white-space: nowrap; }
.admin-db-data-table td { max-width: 280px; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-sans); font-size: 0.72rem; }
.admin-db-null { color: var(--text-faint); }

@media (max-width: 900px) {
    .admin-db-layout { grid-template-columns: 1fr; }
    .admin-db-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        max-height: none;
    }
    .admin-db-table-btn { width: auto; flex: 1 1 calc(50% - 4px); }
}

.admin-monitor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}
.admin-monitor-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    min-width: 0;
}
.admin-monitor-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}
.admin-monitor-toolbar {
    margin-bottom: 8px;
    align-items: center;
}
.admin-monitor-hint { margin: 0 0 12px; }
.admin-monitor-table-wrap { max-height: 58vh; overflow: auto; }
.admin-query-log-table .query-log-sql {
    max-width: 420px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-sans);
    font-size: 0.72rem;
}
tr.query-log-slow td { background: rgba(245, 158, 11, 0.08); }
.query-log-err { color: #f87171; font-size: 0.72rem; }

@media (max-width: 1100px) {
    .admin-monitor-grid { grid-template-columns: 1fr; }
}
.admin-status-badge { padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; }
.admin-status-badge.pending { background: rgba(245,158,11,0.15); color: #f59e0b; }
.admin-status-badge.completed { background: rgba(34,197,94,0.15); color: #22c55e; }
.admin-status-badge.rejected { background: rgba(239,68,68,0.15); color: #ef4444; }
.admin-status-badge.active { background: rgba(59,130,246,0.15); color: #3b82f6; }
.admin-status-badge.disputed { background: rgba(239,68,68,0.15); color: #ef4444; }
.admin-status-badge.cancelled { background: rgba(100,116,139,0.15); color: #94a3b8; }
.admin-action-btn { padding: 4px 10px; border-radius: 4px; border: none; font-size: 0.72rem; font-weight: 600; cursor: pointer; transition: all var(--transition-fast); }
.admin-action-btn.approve { background: rgba(34,197,94,0.15); color: #22c55e; }
.admin-action-btn.reject { background: rgba(239,68,68,0.15); color: #ef4444; }
.admin-action-btn.revoke { background: rgba(239,68,68,0.15); color: #ef4444; }
.admin-action-btn:hover { opacity: 0.8; }
.admin-apikey-form { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-apikey-form .admin-input { flex: 1; min-width: 150px; }

/* Touch-friendly targets */
@media (pointer: coarse) {
    .nav-link,
    .nav-link-single,
    .nav-group-toggle,
    .toolbar-btn,
    .tab-btn,
    .quick-amount-btn,
    .network-btn,
    .provider-btn,
    .denomination-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .page-btn,
    .page-number {
        min-width: 44px;
        min-height: 44px;
    }

    .checkbox-custom {
        width: 20px;
        height: 20px;
    }
}

/* Inventory Modal */
.inv-modal-backdrop {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.inv-modal {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; width: 100%; max-width: 520px; max-height: 80vh;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.inv-modal-header {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.inv-modal-header h3 { flex: 1; margin: 0; font-size: 0.95rem; color: var(--text-primary); }
.inv-modal-total { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-sans); }
.inv-modal-close {
    background: none; border: none; color: var(--text-muted); font-size: 1.5rem;
    cursor: pointer; line-height: 1; padding: 0 4px;
}
.inv-modal-close:hover { color: var(--text-primary); }
.inv-modal-search { padding: 10px 20px; border-bottom: 1px solid var(--border); }
.inv-search-input {
    width: 100%; padding: 8px 12px; border-radius: 6px;
    border: 1px solid var(--border); background: rgba(255,255,255,0.04);
    color: var(--text-primary); font-size: 0.82rem; font-family: inherit; outline: none;
}
.inv-search-input:focus { border-color: var(--accent); }
.inv-modal-body { overflow-y: auto; flex: 1; }
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table th {
    position: sticky; top: 0; background: var(--surface);
    padding: 8px 20px; text-align: left; font-size: 0.75rem;
    color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border);
}
.inv-table td { padding: 6px 20px; font-size: 0.8rem; border-bottom: 1px solid rgba(255,255,255,0.03); }
.inv-item-name { color: var(--text-secondary); }
.inv-item-qty {
    color: var(--cyan-300); font-family: var(--font-sans);
    font-weight: 600; text-align: right; width: 60px;
}
.inv-table tr:hover td { background: rgba(255,255,255,0.03); }
.inv-empty { text-align: center; color: var(--text-muted); padding: 24px; }

/* API Keys Page */
.apikeys-page { max-width: 800px; }
.apikeys-header h2 { font-size: 1.3rem; margin: 0 0 4px; }
.apikeys-subtitle { font-size: 0.85rem; color: var(--text-muted); margin: 0 0 20px; }
.apikeys-create { display: flex; gap: 8px; margin-bottom: 16px; }
.apikeys-name-input {
    flex: 1; padding: 10px 14px; border-radius: 8px;
    border: 1px solid var(--border); background: rgba(255,255,255,0.04);
    color: var(--text-primary); font-size: 0.85rem; font-family: inherit; outline: none;
}
.apikeys-name-input:focus { border-color: var(--accent); }
.apikey-result {
    background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2);
    border-radius: 8px; padding: 12px 16px; margin-bottom: 16px;
}
.apikey-result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.apikey-result-label { font-size: 0.8rem; color: var(--success); font-weight: 600; }
.apikey-copy-btn {
    padding: 4px 12px; border-radius: 4px; border: 1px solid var(--success);
    background: none; color: var(--success); font-size: 0.75rem; font-weight: 600; cursor: pointer;
}
.apikey-result-value {
    display: block; padding: 8px 12px; background: rgba(0,0,0,0.3); border-radius: 6px;
    font-family: var(--font-sans); font-size: 0.82rem; color: var(--text-primary);
    word-break: break-all; user-select: all;
}
.apikeys-table { width: 100%; border-collapse: collapse; }
.apikeys-table th {
    text-align: left; padding: 10px 12px; font-size: 0.75rem; color: var(--text-muted);
    font-weight: 600; border-bottom: 1px solid var(--border);
}
.apikeys-table td { padding: 10px 12px; font-size: 0.82rem; color: var(--text-secondary); border-bottom: 1px solid rgba(255,255,255,0.04); }
.apikeys-table tr:hover td { background: rgba(255,255,255,0.02); }
.apikey-masked { font-family: var(--font-sans); font-size: 0.78rem; color: var(--text-muted); }
.apikey-status { padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; }
.apikey-active { background: rgba(34,197,94,0.15); color: #22c55e; }
.apikey-revoked { background: rgba(239,68,68,0.15); color: #ef4444; }
.apikeys-empty, .apikeys-loading { color: var(--text-muted); font-size: 0.85rem; padding: 20px 0; }
.btn-sm { padding: 4px 10px; border-radius: 4px; border: none; font-size: 0.72rem; font-weight: 600; cursor: pointer; }
.btn-warn { background: rgba(245,158,11,0.15); color: #f59e0b; margin-right: 4px; }
.btn-warn:hover { background: rgba(245,158,11,0.25); }
.btn-danger { background: rgba(239,68,68,0.15); color: #ef4444; }
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.apikeys-docs-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    padding: 18px 20px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--state-active-border);
    background: var(--state-active-bg);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition-base), background var(--transition-base), transform var(--transition-base);
    cursor: pointer;
}
.apikeys-docs-banner:hover {
    background: rgba(139, 92, 246, 0.18);
    border-color: #8b5cf6;
    transform: translateY(-2px);
}
.apikeys-docs-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}
.apikeys-docs-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.apikeys-docs-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.apikeys-docs-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
}
.apikeys-docs-cta {
    flex-shrink: 0;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid var(--border-hover);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}
.apikeys-docs-banner:hover .apikeys-docs-cta {
    background: rgba(139, 92, 246, 0.35);
    border-color: #8b5cf6;
}

@media (max-width: 640px) {
    .apikeys-docs-banner {
        flex-wrap: wrap;
    }
    .apikeys-docs-cta {
        width: 100%;
        text-align: center;
    }
}
.apikey-actions { white-space: nowrap; }

.profile-avatar-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.profile-avatar-fields {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.profile-avatar-file {
    width: 100%;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    padding: 4px 0;
}
.admin-settings-card {
    max-width: 420px;
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--surface-raised, rgba(255,255,255,0.02));
}
.admin-settings-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}
.admin-settings-card .form-hint {
    margin: 0 0 16px;
}
.admin-settings-card .admin-field {
    margin-bottom: 16px;
}
.profile-avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color, #2a2a3a);
    background: #1a1a24;
    flex-shrink: 0;
}
.wallet-panel-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.wallet-panel {
    display: none;
}
.wallet-panel.active {
    display: block;
}
.wallet-deposit-root .deposit-methods {
    margin-top: 0;
}
.deposit-balance-hint {
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-muted, #94a3b8);
    font-size: 14px;
}

/* Withdraw page */
.withdraw-page {
    max-width: 480px;
    margin: 0 auto;
}

.withdraw-balance-pill {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 16px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
    color: var(--emerald-300);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    font-family: var(--font-sans);
}

.withdraw-tabs {
    display: flex;
    margin: 0 auto 20px;
    width: 100%;
    max-width: 100%;
}

.withdraw-tabs .tab-btn {
    flex: 1;
    text-align: center;
}

.withdraw-form-wrap {
    width: 100%;
}

.withdraw-card {
    margin: 0;
}

.withdraw-card:hover {
    transform: none;
}

.withdraw-card .deposit-card-body {
    gap: 16px;
}

.withdraw-saved-block {
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.withdraw-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-hint {
    margin: 0;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.withdraw-amount-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.withdraw-amount-header .deposit-label {
    margin: 0;
}

.withdraw-all-btn {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--cyan-300);
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.withdraw-all-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.55);
}

.withdraw-save-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    margin: 4px 0 8px;
    cursor: pointer;
    user-select: none;
}

.withdraw-save-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.withdraw-submit-btn {
    margin-top: 4px;
}

/* Item search results (dashboard) */
.item-search-results {
    margin: 0 0 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(139, 92, 246, 0.06));
}
.item-search-summary-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.item-search-summary-title {
    font-size: 0.875rem;
    color: var(--text-primary);
}
.item-search-summary-title strong {
    color: #c4b5fd;
}
.item-search-summary-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.item-search-summary-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
}
.item-search-account-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.item-search-account-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #c4b5fd;
    min-width: 88px;
}
.item-match-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}
.item-match-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    line-height: 1.3;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #a7f3d0;
}
.item-match-chip em {
    font-style: normal;
    opacity: 0.85;
    font-size: 0.68rem;
}
.item-match-chip-compact {
    font-size: 0.68rem;
    padding: 2px 7px;
}
.account-item-matches {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.build-footer {
    font-size: 0.65rem;
    color: #64748b;
    text-align: center;
    padding: 4px 8px 10px;
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.build-footer-link {
    color: #a78bfa;
    text-decoration: none;
}
.build-footer-link:hover {
    color: #c4b5fd;
    text-decoration: underline;
}
.build-footer-sep { opacity: 0.5; }
.build-footer-stale {
    color: #f87171;
    font-weight: 700;
}
.build-footer-stale .build-footer-link { color: #fca5a5; }

.build-footer-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
}
.footer-contact-wrap {
    position: relative;
    display: inline-flex;
}
.footer-contact-panel {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    padding: 12px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border-hover);
    box-shadow: var(--shadow-hover);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}
.footer-contact-panel[hidden] { display: none; }
.footer-contact-title {
    margin: 0 0 4px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.footer-contact-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(139, 92, 246, 0.08);
    text-decoration: none;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}
.footer-contact-item:hover {
    border-color: var(--state-active-border);
    background: var(--state-active-bg);
}
.footer-contact-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.footer-contact-value {
    font-size: 0.82rem;
    font-weight: 600;
    color: #a78bfa;
    font-family: var(--font-sans);
}
.landing-footer-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    font-size: inherit;
    color: inherit;
}

body.guest-docs .sidebar,
body.guest-docs .sidebar-backdrop,
body.guest-docs .bottom-nav,
body.guest-docs .menu-toggle,
body.guest-docs .header-balance-pill,
body.guest-docs .header-community-user-stat,
body.guest-docs .header-notification-btn,
body.guest-docs .header-user-btn,
body.guest-docs .currency-switch-header {
    display: none !important;
}
body.guest-docs .main-content {
    margin-left: 0;
}
body.guest-docs .guest-login-btn {
    margin-right: 4px;
}
body.guest-docs #build-footer-text,
body.guest-docs #build-footer-text + .build-footer-sep {
    display: none !important;
}

.landing-footer-link {
    color: #a78bfa;
    text-decoration: none;
}
.landing-footer-link:hover {
    color: #c4b5fd;
    text-decoration: underline;
}

/* API Docs */
.apidocs-header { margin-bottom: 24px; }
.apidocs-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.apidocs-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.apidocs-copy-hint { margin: 8px 0 0; }

.apidocs-page { max-width: 1100px; margin: 0 auto; }
.apidocs-lead { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; max-width: 720px; }
.apidocs-layout {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.apidocs-nav {
    position: sticky;
    top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}
.apidocs-nav-btn {
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-align: left;
    cursor: pointer;
}
.apidocs-nav-btn:hover,
.apidocs-nav-btn.active {
    background: var(--state-active-bg);
    border-color: var(--state-active-border);
    color: var(--text-primary);
}
.apidocs-content { display: flex; flex-direction: column; gap: 16px; }
.apidocs-card {
    padding: 20px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--glass-shadow);
}
.apidocs-card h3 { margin: 0 0 12px; font-size: 1.05rem; }
.apidocs-h3 { margin: 20px 0 8px; font-size: 0.95rem; }
.apidocs-h4 { margin: 16px 0 8px; font-size: 0.85rem; color: var(--text-muted); }
.apidocs-text { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; margin: 0 0 10px; }
.apidocs-text a { color: #a78bfa; }
.apidocs-list { margin: 0 0 12px; padding-left: 1.2rem; color: var(--text-secondary); font-size: 0.88rem; }
.apidocs-example {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 10px 0;
    border-radius: var(--radius-md);
    background: rgba(30, 30, 46, 0.6);
    border: 1px solid var(--border);
    overflow-x: auto;
}
.apidocs-method {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.apidocs-method-get { color: #34d399; }
.apidocs-method-post { color: #60a5fa; }
.apidocs-method-put { color: #fbbf24; }
.apidocs-method-delete { color: #f87171; }
.apidocs-endpoint {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.apidocs-endpoint:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.apidocs-endpoint-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.apidocs-endpoint-badge {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(139, 92, 246, 0.06);
}
.apidocs-path {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-primary);
}
.apidocs-endpoint-name {
    color: var(--text-muted);
    font-size: 0.82rem;
}
.apidocs-example-curl code { white-space: pre-wrap; word-break: break-all; }
.apidocs-example code,
.apidocs-code {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--text-primary);
}
.apidocs-code {
    margin: 8px 0 0;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid var(--border);
    overflow-x: auto;
    white-space: pre;
}
.apidocs-error-table { margin-top: 8px; }
.profile-paypass-block {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.profile-paypass-block > h4 {
    margin: 0;
}
.profile-paypass-block > .form-hint {
    margin: -10px 0 0;
}

@media (max-width: 768px) {
    .apidocs-layout { grid-template-columns: 1fr; }
    .apidocs-nav { position: static; flex-direction: row; flex-wrap: wrap; }
    .apidocs-nav-btn { flex: 1 1 auto; }
}
