/* ==========================================================================
   MARKET3D DESIGN SYSTEM & STYLESHEET
   Web3 Cyber Dark Theme, Glassmorphism, Micro-Animations & Glow FX
   ========================================================================== */

:root {
    /* ===== UI_STANDARD.md design tokens (BẮT BUỘC) ===== */
    --bg: #0b0f1a;
    --card: rgba(255,255,255,0.04);
    --border: rgba(255,255,255,0.10);
    --text: #e5e9f0;
    --text-dim: #94a3b8;
    --accent: #6366f1;
    --accent-2: #22d3ee;
    --ok: #4ade80;
    --warn: #f59e0b;
    --err: #f87171;
    --btn-h: 44px;
    --btn-radius: 10px;
    --btn-pad: 10px 18px;
    --btn-font: 14px;
    --dur: 180ms;
    --ease: cubic-bezier(.4,0,.2,1);

    /* ===== Legacy tokens (giữ để app.js không gãy; alias sang chuẩn) ===== */
    --bg-dark: #0b0f1a;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --border-color: rgba(255, 255, 255, 0.10);
    --border-glow: rgba(99, 102, 241, 0.3);

    /* Palette Colors */
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --cyan-accent: #22d3ee;
    --cyan-glow: rgba(34, 211, 238, 0.35);
    --usdt-green: #4ade80;
    --usdt-glow: rgba(74, 222, 128, 0.35);
    --warning-amber: #f59e0b;
    --danger-red: #f87171;
    --text-main: #e5e9f0;
    --text-muted: #94a3b8;
    --text-secondary: #94a3b8;
    --text-dim: #64748b;

    /* Spacing & Radii */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
}

/* ===== Logo neon "thở" (UI_STANDARD.md mục 4) ===== */
.logo-neon {
    color: #fff;
    text-shadow:
        0 0 6px  rgba(99,102,241,.95), 0 0 14px rgba(99,102,241,.75),
        0 0 26px rgba(34,211,238,.55), 0 0 42px rgba(34,211,238,.35);
    animation: neon-breathe 3s ease-in-out infinite;
    will-change: text-shadow;
}
@keyframes neon-breathe {
    0%, 100% { text-shadow: 0 0 6px rgba(99,102,241,.95), 0 0 14px rgba(99,102,241,.75), 0 0 26px rgba(34,211,238,.55), 0 0 42px rgba(34,211,238,.35); }
    50%      { text-shadow: 0 0 4px rgba(99,102,241,.55), 0 0 8px  rgba(99,102,241,.35), 0 0 14px rgba(34,211,238,.25), 0 0 20px rgba(34,211,238,.15); }
}
@media (prefers-reduced-motion: reduce) { .logo-neon { animation: none; } }

/* Background Animated Spheres */
.glow-sphere {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.25;
}
.sphere-1 {
    width: 450px;
    height: 450px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    animation: floatAnim 18s infinite alternate ease-in-out;
}
.sphere-2 {
    width: 400px;
    height: 400px;
    background: var(--cyan-accent);
    top: 40%;
    right: -100px;
    animation: floatAnim 22s infinite alternate-reverse ease-in-out;
}
.sphere-3 {
    width: 350px;
    height: 350px;
    background: var(--usdt-green);
    bottom: -100px;
    left: 30%;
    animation: floatAnim 20s infinite alternate ease-in-out;
}

@keyframes floatAnim {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.1); }
}

/* Glassmorphism Card Style */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}
.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Typography & Utilities */
.gradient-text {
    background: linear-gradient(135deg, #a5b4fc 0%, #38bdf8 50%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-success { color: var(--usdt-green); }
.text-warning { color: var(--warning-amber); }
.text-danger { color: var(--danger-red); }
.text-info { color: var(--cyan-accent); }
.hidden { display: none !important; }

/* ================= NAVIGATION HEADER (2 DÒNG THOÁNG RỘNG) ================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 10, 18, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 32px;
}
.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Dòng 1: Top Row (Brand + Wallet Actions) */
.nav-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
a.brand, .brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: var(--transition);
}
a.brand:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}
.brand-logo {
    position: relative;
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--primary), var(--cyan-accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--primary-glow);
    animation: logoNeonBreathe 3s ease-in-out infinite;
}
.logo-pulse {
    position: absolute;
    inset: -3px;
    border-radius: var(--radius-md);
    box-shadow: 0 0 18px rgba(99, 102, 241, 0.85), 0 0 36px rgba(6, 182, 212, 0.55);
    opacity: 0.5;
    pointer-events: none;
    animation: logoPulseGlow 3s ease-in-out infinite;
}
@keyframes logoNeonBreathe {
    0%, 100% { box-shadow: 0 0 14px rgba(99, 102, 241, 0.55), 0 0 26px rgba(6, 182, 212, 0.30); }
    50%      { box-shadow: 0 0 24px rgba(99, 102, 241, 0.95), 0 0 48px rgba(6, 182, 212, 0.65); }
}
@keyframes logoPulseGlow {
    0%, 100% { opacity: 0.35; transform: scale(1); }
    50%      { opacity: 0.8;  transform: scale(1.05); }
}
.logo-icon {
    font-size: 24px;
    color: #fff;
    position: relative;
    z-index: 2;
}
.brand-name {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.brand-name .highlight {
    color: var(--cyan-accent);
}
.badge-web3 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(6, 182, 212, 0.12);
    color: var(--cyan-accent);
    border: 1px solid rgba(6, 182, 212, 0.3);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Dòng 2: Bottom Row (Nav Links Menu) */
.nav-bottom-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    padding: 2px 0;
}
.nav-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    padding: 9px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.nav-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}
.nav-btn.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(6, 182, 212, 0.25));
    border: 1px solid var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}
.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.badge-dot.red {
    background: var(--danger-red);
    box-shadow: 0 0 6px var(--danger-red);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}
.role-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-muted);
}
.role-selector select {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    outline: none;
}
.role-selector select option {
    background: var(--bg-dark);
    color: var(--text-main);
}

/* Wallet Header Pill */
.wallet-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}
.wallet-pill:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 15px var(--usdt-glow);
}
.pill-usdt-icon {
    width: 28px;
    height: 28px;
    background: var(--usdt-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
}
.pill-balance {
    display: flex;
    flex-direction: column;
}
.pill-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}
.pill-amount {
    font-size: 15px;
    font-weight: 700;
    color: var(--usdt-green);
    font-family: 'JetBrains Mono', monospace;
}
.pill-quick-actions {
    display: flex;
    gap: 4px;
}
.btn-quick-deposit, .btn-quick-withdraw {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.btn-quick-deposit:hover { background: var(--usdt-green); }
.btn-quick-withdraw:hover { background: var(--primary); }

/* Web3 Connect Button */
/* Account Dropdown (2.1 — gộp auth + web3) */
.account-wrap {
    position: relative;
    display: inline-flex;
}
.btn-account {
    background: linear-gradient(135deg, var(--primary), var(--cyan-accent));
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 15px var(--primary-glow);
    transition: var(--transition);
    white-space: nowrap;
}
.btn-account:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--cyan-glow);
}
.acc-caret {
    font-size: 11px;
    transition: transform 0.25s ease;
    margin-left: 2px;
}
.account-wrap.open .acc-caret {
    transform: rotate(180deg);
}
.account-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
    padding: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 60;
}
.account-wrap.open .account-menu {
    display: flex;
}
.account-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-align: left;
    white-space: nowrap;
}
.account-item:hover {
    background: var(--primary);
    color: #fff;
}
.account-item i {
    width: 18px;
    text-align: center;
}
/* Mobile */
@media (max-width: 768px) {
    .account-menu {
        right: -20px;
        min-width: 200px;
    }
}

/* Giữ btn-connect-web3 cũ cho các chỗ khác dùng */
.btn-connect-web3 {
    background: linear-gradient(135deg, var(--primary), var(--cyan-accent));
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 15px var(--primary-glow);
    transition: var(--transition);
}
.btn-connect-web3:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--cyan-glow);
}

/* ================= MAIN CONTAINER & SECTIONS ================= */
.app-main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 28px 32px;
    position: relative;
    z-index: 10;
}
.view-section {
    display: none;
    animation: fadeIn 0.3s ease;
}
.view-section.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Banner */
/* Banner carousel */
.banner-carousel {
    position: relative;
    height: 260px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}
.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.banner-slide.active {
    opacity: 1;
    pointer-events: auto;
}
.banner-slide-bg {
    position: absolute;
    inset: 0;
}
.banner-slide-content {
    position: relative;
    z-index: 1;
    padding: 32px 40px;
    max-width: 720px;
    color: #fff;
}
.banner-slide-content h2 {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.3;
    margin: 10px 0 8px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.banner-slide-content p {
    font-size: 14px;
    opacity: 0.92;
    margin: 0;
    max-width: 560px;
}
.banner-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.22);
    backdrop-filter: blur(4px);
}
.banner-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}
.banner-dots .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.3s, width 0.3s;
}
.banner-dots .dot.active {
    background: #fff;
    width: 26px;
    border-radius: 6px;
}
@media (max-width: 700px) {
    .banner-carousel { height: 220px; }
    .banner-slide-content { padding: 20px 22px; }
    .banner-slide-content h2 { font-size: 20px; }
}
/* 3 danh mục lớn: File 3D / Nhà In / Artist */
.market-cat-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.market-cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s ease;
}
.market-cat-tab:hover { color: #fff; border-color: rgba(99,102,241,0.5); }
.market-cat-tab.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border-color: transparent;
}
/* Tooltip guide (focus/click, hỗ trợ mobile) */
.field-tooltip {
    position: absolute;
    z-index: 9999;
    max-width: 260px;
    padding: 8px 12px;
    background: #0f172a;
    border: 1px solid rgba(99,102,241,0.4);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 12px;
    line-height: 1.45;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.field-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}
.has-tooltip { position: relative; }
.hero-banner {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.6));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
}
.hero-content h1 {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.4px;
    color: #ffffff;
    margin-bottom: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-shadow: 0 0 25px rgba(99, 102, 241, 0.25);
}
.hero-content p {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
    max-width: 700px;
    margin-bottom: 24px;
}
.hero-stats {
    display: flex;
    gap: 36px;
}
.stat-item {
    display: flex;
    flex-direction: column;
}
.stat-num {
    font-size: 26px;
    font-weight: 900;
    color: var(--cyan-accent);
}
.stat-desc {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.search-box {
    position: relative;
    flex: 1;
    min-width: 280px;
}
.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.search-box input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    padding: 12px 16px 12px 44px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    outline: none;
    transition: var(--transition);
}
.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}
.category-pills {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}
.cat-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.cat-pill:hover, .cat-pill.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Products Grid (Nới rộng không gian thẻ bên dưới) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 28px;
    padding-bottom: 40px;
}
.product-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 430px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}
.product-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.product-thumb {
    position: relative;
    height: 175px;
    background: #070a12;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-thumb svg {
    width: 100%;
    height: 100%;
    transition: var(--transition);
}
.product-card:hover .product-thumb svg {
    transform: scale(1.04);
}
.product-badge-usdt {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(16, 185, 129, 0.9);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    box-shadow: 0 0 10px var(--usdt-glow);
}
.product-info {
    padding: 22px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}
.product-title {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.35;
    letter-spacing: -0.3px;
    margin-bottom: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.product-artist {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.product-bottom {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.product-price {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 20px;
    font-weight: 900;
    color: var(--usdt-green);
    font-family: 'JetBrains Mono', monospace;
}
.btn-buy-usdt {
    background: linear-gradient(135deg, var(--usdt-green), #059669);
    border: none;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 15px var(--usdt-glow);
    transition: var(--transition);
    white-space: nowrap;
}
.btn-buy-usdt:hover {
    box-shadow: 0 0 25px var(--usdt-glow);
    transform: translateY(-2px);
}
.btn-buy-usdt:hover {
    box-shadow: 0 0 15px var(--usdt-glow);
    transform: translateY(-2px);
}

/* ================= SECTION 2: COMMISSION LAYOUT ================= */
.section-header {
    margin-bottom: 24px;
}
.section-header h2 {
    font-size: 26px;
    font-weight: 800;
}
.section-header p {
    color: var(--text-muted);
}

/* Orders sub-tabs (2.2) */
.orders-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.04);
    padding: 4px;
    border-radius: var(--radius-md);
    width: fit-content;
}
.orders-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.orders-tab.active {
    background: var(--primary);
    color: #fff;
}
.orders-tab:hover:not(.active) {
    color: var(--text-main);
    background: rgba(255,255,255,0.05);
}

/* Printers grid (2.2) */
.printers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}
.printer-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s, transform 0.2s;
}
.printer-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
}
.printer-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.printer-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(99,102,241,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}
.printer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.printer-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
}
.printer-tier {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
}
.printer-tier.premium { background: rgba(74,222,128,0.15); color: var(--usdt-green); }
.printer-tier.classic { background: rgba(99,102,241,0.18); color: #a5b4fc; }
.printer-tier.free { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.printer-meta {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}
.printers-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 13px;
}

/* Cart dropdown (2.2) */
.btn-checkout-cart {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(99,102,241,0.2);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}
.btn-checkout-cart:hover {
    background: rgba(99,102,241,0.35);
}
.btn-checkout-cart.has-items {
    border-color: var(--usdt-green);
    background: rgba(74,222,128,0.15);
}
.market-cart-wrap {
    position: relative;
}
.cart-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 310px;
    background: rgba(15,23,42,0.97);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    z-index: 999;
    flex-direction: column;
    gap: 12px;
}
.cart-dropdown.open {
    display: flex;
}
.cart-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-dropdown-header h4 {
    font-size: 15px;
    margin: 0;
}
.cart-total {
    font-size: 14px;
    font-weight: 700;
    color: var(--usdt-green);
}
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
}
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.04);
    font-size: 13px;
}
.cart-item-title {
    flex: 1;
    margin-right: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cart-item-type {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
}
.cart-item-type.file { background: rgba(99,102,241,0.2); color: #a5b4fc; }
.cart-item-type.print { background: rgba(74,222,128,0.18); color: var(--usdt-green); }
.cart-item-remove {
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 4px;
}
.cart-item-remove:hover { color: #ef4444; }
.cart-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
}
.cart-ship-estimate {
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: rgba(74,222,128,0.08);
}

.commission-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.commission-form, .commission-info {
    padding: 30px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}
.form-group input:focus, .form-group select:focus {
    border-color: var(--primary);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}
.upload-dropzone i {
    font-size: 32px;
    color: var(--cyan-accent);
}
.upload-dropzone:hover {
    border-color: var(--cyan-accent);
    background: rgba(6, 182, 212, 0.05);
}

.input-symbol {
    position: relative;
}
.input-symbol input {
    padding-right: 70px;
}
.input-symbol span {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 700;
    color: var(--usdt-green);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    border: none;
    color: #fff;
    font-size: var(--btn-font);
    font-weight: 700;
    height: var(--btn-h);
    padding: var(--btn-pad);
    border-radius: var(--btn-radius);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 20px var(--primary-glow);
}
.btn-primary:active { transform: scale(.98); }
.btn-primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-2);
    outline-offset: 2px;
}
.btn-primary:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ===== Chuẩn nút (UI_STANDARD.md mục 3) ===== */
.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: var(--btn-font);
    font-weight: 600;
    height: var(--btn-h);
    padding: var(--btn-pad);
    border-radius: var(--btn-radius);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-secondary:hover { filter: brightness(1.1); background: var(--card); }
.btn-secondary:active { transform: scale(.98); }
.btn-secondary:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent-2); outline-offset: 2px; }
.btn-secondary:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

.btn-danger {
    background: rgba(248,113,113,.15);
    border: 1px solid var(--err);
    color: var(--err);
    font-size: var(--btn-font);
    font-weight: 600;
    height: var(--btn-h);
    padding: var(--btn-pad);
    border-radius: var(--btn-radius);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-danger:hover { filter: brightness(1.1); }
.btn-danger:active { transform: scale(.98); }
.btn-danger:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent-2); outline-offset: 2px; }
.btn-danger:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: var(--btn-font);
    font-weight: 600;
    height: var(--btn-h);
    padding: var(--btn-pad);
    border-radius: var(--btn-radius);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-ghost:hover { color: var(--text); background: var(--card); }
.btn-ghost:active { transform: scale(.98); }
.btn-ghost:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* Spinner loading cho nút (chống double-submit) */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* Timeline Stepper */
.timeline-stepper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 20px;
    position: relative;
}
.timeline-stepper::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: var(--border-color);
}
.step-item {
    display: flex;
    gap: 16px;
    position: relative;
    z-index: 1;
}
.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 16px;
}
.step-item.active .step-icon {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px var(--primary-glow);
}
.step-content h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}
.step-content p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ================= SECTION 3: WALLET ================= */
.wallet-header-banner {
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.wallet-user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}
.avatar-box {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--cyan-accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
}
.wallet-address-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}
.copy-icon {
    cursor: pointer;
    color: var(--cyan-accent);
}
.copy-icon:hover { color: #fff; }

.wallet-top-stats {
    display: flex;
    gap: 16px;
}
.w-stat-card {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    min-width: 180px;
}
.w-stat-card.primary { border-color: rgba(99, 102, 241, 0.4); }
.w-stat-card.warning { border-color: rgba(245, 158, 11, 0.4); }
.w-stat-card.success { border-color: rgba(16, 185, 129, 0.4); }

.w-stat-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.w-stat-value {
    font-size: 24px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    margin: 4px 0;
}
.w-stat-card.primary .w-stat-value { color: #fff; }
.w-stat-card.warning .w-stat-value { color: var(--warning-amber); }
.w-stat-card.success .w-stat-value { color: var(--usdt-green); }
.w-stat-sub {
    font-size: 11px;
    color: var(--text-muted);
}

/* Wallet Operations Tabs */
.wallet-ops-container {
    padding: 30px;
}
.ops-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 24px;
    overflow-x: auto;
}
.ops-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.ops-tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}
.ops-tab-btn.active {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.wtab-pane {
    display: none;
    animation: fadeIn 0.25s ease;
}
.wtab-pane.active {
    display: block;
}

/* Deposit (Cash In) Grid */
.deposit-methods-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
}
.deposit-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
}
.card-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--usdt-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}
.deposit-card h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
}
.deposit-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Web3 Amount Selector */
.web3-amount-selector {
    margin-bottom: 24px;
}
.web3-amount-selector label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.preset-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.amount-preset-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
    padding: 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}
.amount-preset-btn:hover, .amount-preset-btn.active {
    background: var(--usdt-green);
    border-color: var(--usdt-green);
    color: #fff;
}
.custom-amount-input {
    position: relative;
}
.custom-amount-input input {
    width: 100%;
    background: rgba(7, 10, 18, 0.8);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 16px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
}
.custom-amount-input span {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    color: var(--usdt-green);
}
.btn-deposit-web3 {
    width: 100%;
    background: linear-gradient(135deg, var(--usdt-green), #059669);
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 0 15px var(--usdt-glow);
}
.btn-deposit-web3:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--usdt-glow);
}

/* Network Selector */
.network-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
.net-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}
.net-item i {
    font-size: 20px;
    color: var(--cyan-accent);
}
.net-item strong {
    display: block;
    font-size: 13px;
}
.net-item small {
    font-size: 10px;
    color: var(--text-muted);
}
.net-item:hover, .net-item.active {
    background: rgba(6, 182, 212, 0.12);
    border-color: var(--cyan-accent);
}

/* QR Code & Copy Address */
.qr-address-display {
    display: flex;
    gap: 20px;
    align-items: center;
    background: rgba(7, 10, 18, 0.8);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.qr-code-box {
    width: 110px;
    height: 110px;
    background: #fff;
    padding: 8px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}
.qr-rendered svg, .qr-rendered img {
    width: 100%;
    height: 100%;
}
.address-details {
    flex: 1;
}
.address-details label {
    font-size: 12px;
    color: var(--text-muted);
}
.copy-field {
    display: flex;
    gap: 8px;
    margin: 6px 0 10px;
}
.copy-field input {
    flex: 1;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--cyan-accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}
.btn-copy {
    background: var(--cyan-accent);
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.deposit-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--warning-amber);
    background: rgba(245, 158, 11, 0.1);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
}

/* Manual TxHash Submission */
.txhash-submit-box {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}
.txhash-submit-box h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}
.txhash-form {
    display: flex;
    gap: 10px;
}
.txhash-form input {
    background: rgba(7, 10, 18, 0.8);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    outline: none;
}
.txhash-form input[type="text"] { flex: 1; }
.btn-submit-txhash {
    background: var(--primary);
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}
.btn-submit-txhash:hover { background: #4f46e5; }

/* Cash Out (Withdraw) Form */
.withdraw-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    padding: 30px;
}
.label-with-max {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.max-link {
    font-size: 12px;
    color: var(--cyan-accent);
    cursor: pointer;
}
.max-link strong { color: var(--usdt-green); }

.fee-summary-card {
    background: rgba(7, 10, 18, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}
.fee-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--text-muted);
}
.fee-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 10px 0;
}
.total-row {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
}
.btn-withdraw-submit {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
}

.withdraw-policy-side h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}
.policy-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.policy-list li {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Data Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 13px;
}
.data-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    text-align: left;
    padding: 12px 16px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
}
.status-tag.completed { background: rgba(16, 185, 129, 0.15); color: var(--usdt-green); }
.status-tag.pending { background: rgba(245, 158, 11, 0.15); color: var(--warning-amber); }
.status-tag.processing { background: rgba(6, 182, 212, 0.15); color: var(--cyan-accent); }
.status-tag.rejected { background: rgba(244, 63, 94, 0.15); color: var(--danger-red); }

.tx-hash-link {
    font-family: 'JetBrains Mono', monospace;
    color: var(--cyan-accent);
    text-decoration: none;
}
.tx-hash-link:hover { text-decoration: underline; }

/* History Filters */
.history-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
}
.h-filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
}
.h-filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ================= SECTION 5: ADMIN PORTAL ================= */
.admin-header {
    padding: 24px 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-balance-pill {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    text-align: right;
}
.admin-balance-pill .label {
    display: block;
    font-size: 11px;
    color: var(--warning-amber);
    text-transform: uppercase;
    font-weight: 700;
}
.admin-balance-pill .amount {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.admin-card {
    padding: 24px;
}
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.badge-count {
    background: var(--warning-amber);
    color: #000;
    font-weight: 800;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.btn-act-approve {
    background: var(--usdt-green);
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-right: 4px;
}
.btn-act-reject {
    background: var(--danger-red);
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* ================= MODALS & OVERLAYS ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-card {
    width: 100%;
    max-width: 480px;
    padding: 30px;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.25s ease;
}
.modal-overlay.active .modal-card {
    transform: scale(1);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
}
.btn-close-modal:hover { color: #fff; }

/* Onboarding: màn chọn vai trò khi mở web lần đầu */
.role-select-modal-card {
    max-width: 720px;
}
.role-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.role-choice-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 22px 14px;
    background: rgba(7, 10, 18, 0.55);
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 14px;
    cursor: pointer;
    color: #fff;
    text-align: center;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.role-choice-card:hover {
    transform: translateY(-4px);
    border-color: #6366f1;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}
.role-choice-icon { font-size: 34px; }
.role-choice-title { font-size: 16px; font-weight: 600; }
.role-choice-desc { font-size: 12px; color: var(--text-muted, #94a3b8); }

/* Mỗi vai trò 1 tone màu tối đồng bộ (không chói) */
.role-choice-card[data-role="customer"] {
    --rc: #818cf8; --rc-soft: rgba(99,102,241,0.10);
    border-color: rgba(99,102,241,0.32);
    background: linear-gradient(160deg, rgba(99,102,241,0.12), rgba(7,10,18,0.65));
}
.role-choice-card[data-role="artist"] {
    --rc: #f472b6; --rc-soft: rgba(236,72,153,0.10);
    border-color: rgba(236,72,153,0.32);
    background: linear-gradient(160deg, rgba(236,72,153,0.12), rgba(7,10,18,0.65));
}
.role-choice-card[data-role="supplier"] {
    --rc: #22d3ee; --rc-soft: rgba(6,182,212,0.10);
    border-color: rgba(6,182,212,0.32);
    background: linear-gradient(160deg, rgba(6,182,212,0.12), rgba(7,10,18,0.65));
}
.role-choice-card .role-choice-icon,
.role-choice-card .role-choice-title { color: var(--rc, #fff); }
.role-choice-card:hover {
    border-color: var(--rc, #6366f1);
    box-shadow: 0 10px 30px -8px var(--rc-soft, rgba(99,102,241,0.3));
    background: linear-gradient(160deg, var(--rc-soft, rgba(99,102,241,0.15)), rgba(10,14,24,0.8));
}
.role-choice-card:active { transform: translateY(-1px) scale(0.99); }

/* Modal chọn vai trò mở ngay qua body.role-modal-open (không phụ thuộc .active) */
body.role-modal-open #roleSelectModalOverlay {
    opacity: 1; pointer-events: auto;
}
body.role-modal-open #roleSelectModalOverlay .modal-card { transform: scale(1); }
.role-select-modal-card { border-top: 3px solid var(--role-primary, #6366f1); }

/* Nút đổi vai trò rõ ràng trên header */
.btn-role-switch {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 7px 12px; color: #fff;
    cursor: pointer; font-size: 13px; font-weight: 600; white-space: nowrap;
    transition: all 0.2s ease;
}
.btn-role-switch:hover { background: rgba(255,255,255,0.12); border-color: var(--role-primary, #6366f1); }
.btn-role-switch-mini { padding: 7px 10px; }
.role-switch-label { font-size: 13px; }
@media (max-width: 700px) {
    .role-switch-label { display: none; }
    .btn-role-switch { padding: 7px 10px; }
}
@media (max-width: 640px) {
    .role-choice-grid { grid-template-columns: 1fr; }
}


/* Security PIN Input Group */
.pin-input-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 24px 0;
}
.pin-digit {
    width: 46px;
    height: 54px;
    background: rgba(7, 10, 18, 0.9);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: var(--cyan-accent);
    outline: none;
    transition: var(--transition);
}
.pin-digit:focus {
    border-color: var(--cyan-accent);
    box-shadow: 0 0 15px var(--cyan-glow);
}
.pin-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Web3 Simulation Modal */
.web3-modal-card {
    text-align: center;
}
.web3-modal-status {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--cyan-accent);
    border-bottom-color: var(--primary);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.web3-spin-icon {
    font-size: 32px;
    color: var(--cyan-accent);
}
.web3-steps-list {
    text-align: left;
    background: rgba(7, 10, 18, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 20px 0;
}
.w-step {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 10px;
}
.w-step.active {
    color: var(--cyan-accent);
    font-weight: 700;
}
.w-step.done {
    color: var(--usdt-green);
    font-weight: 600;
}

.full-width { width: 100%; }

/* Toast Notifications — góc trên phải, tự ẩn 4s (UI_STANDARD.md mục 6) */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast-item {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
}
.toast-item.success { border-left-color: var(--usdt-green); }
.toast-item.error { border-left-color: var(--danger-red); }
.toast-item.warning { border-left-color: var(--warning-amber); }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .nav-actions { flex-wrap: wrap; gap: 8px; }
    .nav-container { flex-wrap: wrap; }
    .deposit-methods-grid, .withdraw-layout, .commission-layout, .admin-grid {
        grid-template-columns: 1fr;
    }
    .wallet-top-stats {
        flex-wrap: wrap;
        width: 100%;
    }
    .w-stat-card { flex: 1 1 100%; }
}


/* Footer — gọn giữa, chuyên nghiệp */
.app-footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
    padding: 14px 0;
    margin-top: 32px;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}
.f-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.3px;
}
.f-brand .highlight { color: var(--cyan-accent); }
.footer-copy { font-weight: 400; color: var(--text-muted); font-size: 12px; }
.f-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}
.footer-link { margin-right: 0; }

/* Footer Links & Policy Modals */
.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    margin-right: 0;
    transition: color 0.2s ease;
}
.footer-link:hover {
    color: var(--cyan-accent);
}
.policy-content h4 {
    color: var(--primary);
    font-size: 15px;
    margin-top: 15px;
    margin-bottom: 6px;
}
.policy-content p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* ==========================================================================
   3D STL INTERACTIVE VIEWER & P1 EXTENSIONS
   ========================================================================== */

/* Artist Upload Button in Filter Bar */
.btn-artist-upload {
    margin-left: auto;
    padding: 10px 18px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

/* 3D STL Viewer Modal Styles */
.stl-viewer-modal-card {
    max-width: 1000px !important;
    width: 95vw;
}
.stl-viewer-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    padding: 0 !important;
    min-height: 480px;
}
@media (max-width: 850px) {
    .stl-viewer-body {
        grid-template-columns: 1fr;
    }
}
.stl-canvas-wrapper {
    position: relative;
    background: radial-gradient(circle at center, #1e293b 0%, #090d16 100%);
    border-radius: var(--radius-md);
    overflow: hidden;
    min-height: 420px;
    border: 1px solid var(--border-color);
}
.stl-canvas-container {
    width: 100%;
    height: 100%;
    min-height: 420px;
    cursor: grab;
}
.stl-canvas-container:active {
    cursor: grabbing;
}

/* Floating 3D Control Toolbar */
.stl-3d-toolbar {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    gap: 8px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    padding: 6px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    z-index: 10;
}
.tool-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}
.tool-btn:hover, .tool-btn.active {
    background: rgba(99, 102, 241, 0.2);
    color: #fff;
    border-color: var(--primary);
}
.tool-select-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 12px;
}
.tool-select-wrapper select {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}
.tool-select-wrapper select option {
    background: #0f172a;
    color: #fff;
}

/* 3D Specs Bounding Box Badge */
.stl-specs-badge {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(10px);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
}
.stl-specs-badge .spec-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.stl-specs-badge .spec-row i {
    color: var(--cyan-accent);
    width: 14px;
}
.stl-specs-badge .spec-row strong {
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
}

/* 3D Sidebar Info & Actions */
.stl-viewer-sidebar {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.sidebar-price-card {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
}
.sidebar-price-card .label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sidebar-price-card .price-val {
    font-size: 26px;
    font-weight: 800;
    color: var(--usdt-green);
    margin: 6px 0;
    font-family: 'JetBrains Mono', monospace;
}
.sidebar-price-card .license-tag {
    font-size: 12px;
    color: var(--cyan-accent);
    margin-bottom: 12px;
}

.sidebar-details-card h4 {
    font-size: 14px;
    color: #fff;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-details-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}
.sidebar-details-card ul li {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-details-card ul li i {
    color: var(--primary);
}

/* File Drop Zone for STL Upload */
.file-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.02);
}
.file-drop-zone:hover, .file-drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}
.file-drop-zone .drop-icon {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 10px;
}
.file-drop-zone p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.file-chosen-name {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--cyan-accent);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

/* STL Analyzer Card */
.stl-analyzer-card {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 14px;
    border-radius: var(--radius-md);
    margin-top: 12px;
}
.stl-analyzer-card h4 {
    font-size: 13px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.analyzer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}
.analyzer-grid strong {
    color: #fff;
    display: block;
    font-family: 'JetBrains Mono', monospace;
}

/* Action Buttons for 3D Cards & Escrow */
.btn-view-3d {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: var(--cyan-accent);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.btn-view-3d:hover {
    background: rgba(6, 182, 212, 0.3);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
}

.escrow-actions-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.btn-release-escrow {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}
.btn-release-escrow:hover {
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}
.btn-supplier-proof {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}
.btn-dispute-escrow {
    background: transparent;
    border: 1px solid var(--danger-red);
    color: var(--danger-red);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
}
.btn-dispute-escrow:hover {
    background: rgba(244, 63, 94, 0.15);
}

/* ==========================================================================
   P2 & P3 EXTENSIONS: FILTERS, DETAILS MODAL, NOTIFICATIONS & DASHBOARD
   ========================================================================== */

/* Extra Market Filters */
.extra-filters-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.filter-select-box, .price-filter-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
}
.filter-select-box select {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}
.filter-select-box select option {
    background: #0f172a;
    color: #fff;
}
.price-filter-box input {
    background: transparent;
    border: none;
    color: #fff;
    width: 75px;
    font-size: 13px;
    outline: none;
}

/* Notification Bell & Drawer */
.notif-bell-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}
.notif-bell-wrapper:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
}
.notif-count-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger-red);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-drawer {
    position: fixed;
    top: 0;
    right: -360px;
    width: 340px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(16px);
    border-left: 1px solid var(--border-color);
    z-index: 2500;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.notif-drawer.active { right: 0; }
.drawer-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn-close-drawer {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
}
.drawer-body {
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.notif-card-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 12px;
}
.notif-card-item .time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

/* Product Detail Modal */
.product-detail-modal-card {
    max-width: 850px !important;
    width: 90vw;
}
.product-detail-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.detail-top-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
}
@media (max-width: 700px) {
    .detail-top-grid { grid-template-columns: 1fr; }
}
.detail-media-box {
    background: #090d16;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.detail-specs-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.detail-specs-box .price-hero {
    font-size: 28px;
    font-weight: 800;
    color: var(--usdt-green);
    font-family: 'JetBrains Mono', monospace;
}
.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-secondary);
}

/* Reviews Section */
.detail-reviews-section {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}
.add-review-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: var(--radius-md);
    margin: 12px 0 16px 0;
}
.star-rating-picker select {
    background: #0f172a;
    color: var(--warning-amber);
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    outline: none;
}
.review-input-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.review-input-row input {
    flex: 1;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 13px;
}
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.review-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: var(--radius-md);
}
.review-item .review-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 6px;
}

/* Dashboard Analytics Grid */
.dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
@media (max-width: 900px) {
    .dash-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 550px) {
    .dash-stats-grid { grid-template-columns: 1fr; }
}
.btn-export-csv {
    margin-left: auto;
    font-size: 13px;
    padding: 8px 16px;
}

/* ==========================================================================
   AUTH MODALS (Đăng nhập / Đăng ký / 2FA / Verify email)
   ========================================================================== */
.auth-modal-card {
    max-width: 420px;
    width: 92vw;
}
/* Auth progress bar (2.1) */
.auth-progress {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 0 16px 10px;
    font-size: 12px;
    font-weight: 600;
}
.auth-step {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    position: relative;
    padding: 0 12px;
}
.auth-step + .auth-step::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 9px;
    width: 20px;
    height: 2px;
    background: var(--border);
}
.auth-step.active {
    color: var(--primary);
}
.auth-step.active .step-dot {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.auth-step.done {
    color: var(--usdt-green);
}
.auth-step.done .step-dot {
    background: var(--usdt-green);
    color: #fff;
    border-color: var(--usdt-green);
}
.step-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    background: rgba(255,255,255,0.05);
    padding: 4px;
    border-radius: var(--radius-md);
}
.auth-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 9px 0;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}
.auth-tab.active {
    background: var(--primary);
    color: #fff;
}
.auth-form label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin: 10px 0 4px;
}
.auth-form input {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
}
.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
}
.btn-auth-submit {
    width: 100%;
    margin-top: 16px;
    padding: 11px;
    font-size: 14px;
    font-weight: 600;
}
.btn-ghost.btn-auth-submit {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}
.auth-error {
    color: var(--danger-red);
    font-size: 12px;
    margin-top: 8px;
    min-height: 16px;
}
.auth-secret-row {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    font-size: 13px;
    margin: 8px 0;
}
.auth-secret-row code {
    background: rgba(0,0,0,0.3);
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 1px;
}
#twoFaBackupCodes {
    font-family: monospace;
}
#twoFaBackupCodes span {
    background: rgba(0,0,0,0.25);
    padding: 4px 8px;
    border-radius: 6px;
}



/* ==========================================================================
   ROLE THEMES — phân biệt UI theo vai trò (customer/artist/supplier)
   ========================================================================== */
body[data-role="customer"] {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --cyan-accent: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.35);
    --role-primary: #6366f1;
    --role-glow: rgba(99, 102, 241, 0.45);
    --role-accent: #06b6d4;
}
body[data-role="artist"] {
    --primary: #ec4899;
    --primary-glow: rgba(236, 72, 153, 0.4);
    --cyan-accent: #a855f7;
    --cyan-glow: rgba(168, 85, 247, 0.35);
    --role-primary: #ec4899;
    --role-glow: rgba(236, 72, 153, 0.45);
    --role-accent: #a855f7;
}
body[data-role="supplier"] {
    --primary: #06b6d4;
    --primary-glow: rgba(6, 182, 212, 0.4);
    --cyan-accent: #10b981;
    --cyan-glow: rgba(16, 185, 129, 0.35);
    --role-primary: #06b6d4;
    --role-glow: rgba(6, 182, 212, 0.45);
    --role-accent: #10b981;
}
body[data-role="admin"] {
    --primary: #f59e0b;
    --primary-glow: rgba(245, 158, 11, 0.4);
    --cyan-accent: #ef4444;
    --cyan-glow: rgba(239, 68, 68, 0.35);
    --role-primary: #f59e0b;
    --role-glow: rgba(245, 158, 11, 0.45);
    --role-accent: #ef4444;
}

/* Chống nháy UI cũ: ẩn nav-btn sai vai trò NGAY từ paint đầu (data-role set ở đầu body) */
body[data-role="customer"] .nav-btn[data-roles]:not([data-roles*="customer"]) { display: none !important; }
body[data-role="artist"]   .nav-btn[data-roles]:not([data-roles*="artist"])   { display: none !important; }
body[data-role="supplier"] .nav-btn[data-roles]:not([data-roles*="supplier"]) { display: none !important; }
body[data-role="admin"]    .nav-btn[data-roles]:not([data-roles*="admin"])    { display: none !important; }
/* Ẩn section sai vai trò trước khi JS switch tab (tránh nháy nội dung) */
body[data-role="customer"] #sec-admin, body[data-role="customer"] #sec-dashboard, body[data-role="customer"] #sec-vip { display: none !important; }

/* Ẩn MỌI phần tử sai vai trò ngay từ paint đầu (data-roles + data-role-only) — chống nháy UI cũ */
body[data-role="customer"] [data-roles]:not([data-roles*="customer"]) { display: none !important; }
body[data-role="artist"]   [data-roles]:not([data-roles*="artist"])   { display: none !important; }
body[data-role="supplier"] [data-roles]:not([data-roles*="supplier"]) { display: none !important; }
body[data-role="admin"]    [data-roles]:not([data-roles*="admin"])    { display: none !important; }
body[data-role="customer"] [data-role-only]:not([data-role-only="customer"]) { display: none !important; }
body[data-role="artist"]   [data-role-only]:not([data-role-only="artist"])   { display: none !important; }
body[data-role="supplier"] [data-role-only]:not([data-role-only="supplier"]) { display: none !important; }
body[data-role="admin"]    [data-role-only]:not([data-role-only="admin"])    { display: none !important; }
body[data-role="artist"]   #sec-admin, body[data-role="artist"]   #sec-vip      { display: none !important; }
body[data-role="supplier"] #sec-admin, body[data-role="supplier"] #sec-vip      { display: none !important; }

/* role badge trên header */
.role-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 9999px; font-size: 11px; font-weight: 700;
    color: var(--role-primary); border: 1px solid var(--role-glow);
    background: rgba(255,255,255,0.03); margin-left: 8px;
}
/* nav active theo role */
body[data-role] .nav-btn.active {
    color: var(--role-primary);
    border-bottom-color: var(--role-primary);
    box-shadow: 0 4px 16px -4px var(--role-glow);
}
body[data-role] .btn-primary {
    background: linear-gradient(135deg, var(--role-primary), var(--role-accent));
    box-shadow: 0 6px 18px -4px var(--role-glow);
}

/* ==========================================================================
   3.3 Menu tối giản mobile: nav chỉ hiện icon, ẩn nhãn (≤4 icon + cuộn ngang)
   ========================================================================== */
@media (max-width: 700px) {
    .nav-top-row { flex-wrap: wrap; row-gap: 10px; }
    .nav-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
    .lang-selector select { max-width: 88px; }
    .nav-btn { padding: 9px 12px; font-size: 0; gap: 0; }
    .nav-btn i { font-size: 16px; }
    .nav-btn .badge-dot { position: absolute; }
    .nav-links { gap: 8px; }
}


/* 7.9 Viewer watermark cho khách chưa mua */
.viewer-watermark {
    position: absolute; inset: 0; z-index: 30; pointer-events: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; text-align: center; user-select: none;
}
.viewer-watermark .wm-logo {
    font-size: 22px; font-weight: 800; letter-spacing: 2px;
    color: rgba(255,255,255,0.18); transform: rotate(-18deg);
}
.viewer-watermark .wm-user {
    font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.14);
}
.viewer-watermark .wm-hint {
    font-size: 11px; color: rgba(255,255,255,0.10);
}
.viewer-watermark.hidden { display: none; }

/* Perf: tôn trọng giảm chuyển động + tránh lag cuộn trên Chrome */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}
.glass-card { backdrop-filter: blur(10px) saturate(1.2); transform: translateZ(0); will-change: auto; }
