:root {
  --primary: #1769ff;
  --primary-strong: #0e4ed8;
  --primary-soft: rgba(23, 105, 255, .12);
  --secondary: #7c3aed;
  --accent: #06b6d4;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --bronze: #b87333;
  --silver: #64748b;
  --gold: #f59e0b;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --surface-glass: rgba(255,255,255,.82);
  --text: #101828;
  --text-2: #475467;
  --text-3: #667085;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --shadow-sm: 0 4px 14px rgba(16,24,40,.06);
  --shadow-md: 0 16px 40px rgba(16,24,40,.10);
  --shadow-lg: 0 28px 70px rgba(16,24,40,.16);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --max: 1240px;
  --header-height: 72px;
  --ease: .22s cubic-bezier(.2,.8,.2,1);
}
html[data-theme="dark"] {
  --bg: #080d17;
  --surface: #101827;
  --surface-2: #162033;
  --surface-glass: rgba(16,24,39,.84);
  --text: #f8fafc;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;
  --border: #263349;
  --border-strong: #334155;
  --shadow-sm: 0 4px 14px rgba(0,0,0,.20);
  --shadow-md: 0 16px 40px rgba(0,0,0,.32);
  --shadow-lg: 0 28px 70px rgba(0,0,0,.42);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin:0; min-height:100vh; font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif; color:var(--text); background:var(--bg); line-height:1.55; -webkit-font-smoothing:antialiased; }
a { color:inherit; text-decoration:none; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
img { max-width:100%; display:block; }
.hidden { display:none !important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link { position:fixed; top:-60px; left:16px; background:var(--primary); color:#fff; padding:10px 14px; border-radius:8px; z-index:9999; }
.skip-link:focus { top:12px; }

.site-header { position:sticky; top:0; z-index:1000; height:var(--header-height); border-bottom:1px solid color-mix(in srgb,var(--border) 80%,transparent); background:var(--surface-glass); backdrop-filter:blur(18px) saturate(160%); }
.nav-wrap { max-width:var(--max); height:100%; margin:auto; padding:0 24px; display:flex; align-items:center; gap:24px; }
.brand { display:inline-flex; align-items:center; gap:10px; font-size:1.35rem; font-weight:800; letter-spacing:-.04em; white-space:nowrap; }
.brand > span:last-child > span { color:var(--primary); }
.brand-mark { width:36px; height:36px; border-radius:11px; display:grid; place-items:center; color:#fff; background:linear-gradient(135deg,var(--primary),var(--secondary)); box-shadow:0 8px 22px rgba(23,105,255,.28); }
.main-nav { display:flex; align-items:center; gap:4px; flex:1; }
.main-nav a { display:flex; align-items:center; gap:8px; padding:10px 12px; border-radius:10px; color:var(--text-2); font-size:.9rem; font-weight:600; transition:var(--ease); }
.main-nav a:hover,.main-nav a.active { color:var(--primary); background:var(--primary-soft); }
.main-nav .sell-link { color:#fff; background:linear-gradient(135deg,var(--primary),var(--secondary)); margin-left:auto; }
.nav-actions { display:flex; align-items:center; gap:8px; }
.icon-btn { width:42px; height:42px; border:1px solid var(--border); border-radius:12px; background:var(--surface); color:var(--text-2); display:grid; place-items:center; transition:var(--ease); position:relative; }
.icon-btn:hover { border-color:var(--primary); color:var(--primary); transform:translateY(-1px); }
.count-badge { position:absolute; right:-4px; top:-5px; min-width:18px; height:18px; border-radius:999px; display:grid; place-items:center; padding:0 4px; color:white; background:var(--danger); font-size:.68rem; font-weight:700; border:2px solid var(--surface); }
.mobile-menu-btn { display:none; }
.auth-nav { position:relative; display:flex; align-items:center; gap:8px; }
.profile-trigger { border:1px solid var(--border); background:var(--surface); color:var(--text); border-radius:999px; padding:5px 10px 5px 5px; display:flex; align-items:center; gap:8px; font-weight:600; }
.avatar { width:32px; height:32px; border-radius:50%; display:grid; place-items:center; background:linear-gradient(135deg,var(--primary),var(--secondary)); color:#fff; font-weight:800; overflow:hidden; }
.avatar img { width:100%; height:100%; object-fit:cover; }
.profile-menu { display:none; position:absolute; right:0; top:52px; width:220px; padding:8px; border:1px solid var(--border); border-radius:14px; background:var(--surface); box-shadow:var(--shadow-lg); }
.profile-menu.open { display:block; animation:fadeUp .18s ease; }
.profile-menu a,.profile-menu button { width:100%; border:0; background:transparent; color:var(--text-2); padding:10px 12px; border-radius:9px; display:flex; align-items:center; gap:10px; text-align:left; }
.profile-menu a:hover,.profile-menu button:hover { background:var(--surface-2); color:var(--primary); }

.btn { border:0; min-height:44px; border-radius:12px; padding:10px 18px; display:inline-flex; align-items:center; justify-content:center; gap:8px; font-weight:700; transition:var(--ease); }
.btn:hover { transform:translateY(-2px); }
.btn:disabled { opacity:.55; cursor:not-allowed; transform:none; }
.btn-primary { background:linear-gradient(135deg,var(--primary),var(--primary-strong)); color:#fff; box-shadow:0 10px 24px rgba(23,105,255,.2); }
.btn-secondary { background:linear-gradient(135deg,var(--secondary),#5b21b6); color:#fff; }
.btn-success { background:var(--success); color:#fff; }
.btn-danger { background:var(--danger); color:#fff; }
.btn-warning { background:var(--warning); color:#fff; }
.btn-ghost { background:var(--surface); color:var(--text); border:1px solid var(--border); }
.btn-outline { background:transparent; color:var(--primary); border:1px solid var(--primary); }
.btn-sm { min-height:38px; padding:8px 13px; font-size:.86rem; }
.btn-lg { min-height:52px; padding:13px 24px; }
.btn-block { width:100%; }
.icon-action { width:36px; height:36px; border:1px solid var(--border); background:var(--surface); border-radius:10px; display:grid; place-items:center; color:var(--text-2); }
.icon-action:hover { color:var(--primary); border-color:var(--primary); }

.page-root { min-height:60vh; }
.page-container { max-width:var(--max); margin:auto; padding:40px 24px 72px; }
.page-header { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom:28px; }
.page-header h1 { margin:0; font-size:clamp(1.8rem,4vw,2.7rem); letter-spacing:-.04em; }
.page-header p { margin:8px 0 0; color:var(--text-2); }
.eyebrow { color:var(--primary); text-transform:uppercase; letter-spacing:.14em; font-size:.76rem; font-weight:800; }
.section { padding:56px 0; }
.section-title { display:flex; justify-content:space-between; align-items:end; gap:20px; margin-bottom:24px; }
.section-title h2 { margin:0; font-size:clamp(1.5rem,3vw,2.25rem); letter-spacing:-.035em; }
.section-title p { margin:6px 0 0; color:var(--text-2); }
.muted { color:var(--text-3); }
.text-primary { color:var(--primary); }
.text-danger { color:var(--danger); }
.text-success { color:var(--success); }

.hero { min-height:620px; display:grid; align-items:center; overflow:hidden; position:relative; background:
 radial-gradient(circle at 12% 10%,rgba(23,105,255,.18),transparent 34%),
 radial-gradient(circle at 88% 18%,rgba(124,58,237,.18),transparent 35%),
 linear-gradient(180deg,var(--surface),var(--bg)); }
.hero::after { content:""; position:absolute; inset:0; background-image:linear-gradient(var(--border) 1px,transparent 1px),linear-gradient(90deg,var(--border) 1px,transparent 1px); background-size:44px 44px; opacity:.24; mask-image:linear-gradient(to bottom,#000,transparent 85%); }
.hero-inner { max-width:var(--max); margin:auto; padding:72px 24px; display:grid; grid-template-columns:1.08fr .92fr; gap:48px; align-items:center; position:relative; z-index:1; }
.hero-copy h1 { font-size:clamp(2.7rem,6vw,5.2rem); line-height:1.02; letter-spacing:-.065em; margin:12px 0 22px; }
.hero-copy h1 span { background:linear-gradient(135deg,var(--primary),var(--secondary),var(--accent)); background-clip:text; -webkit-background-clip:text; color:transparent; }
.hero-copy > p { font-size:1.1rem; color:var(--text-2); max-width:640px; }
.hero-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:28px; }
.hero-trust { display:flex; flex-wrap:wrap; gap:18px; margin-top:28px; color:var(--text-2); font-size:.9rem; }
.hero-trust span { display:flex; align-items:center; gap:7px; }
.hero-trust i { color:var(--success); }
.hero-showcase { position:relative; min-height:430px; }
.showcase-card { position:absolute; border-radius:22px; overflow:hidden; border:1px solid rgba(255,255,255,.3); background:var(--surface-glass); backdrop-filter:blur(18px); box-shadow:var(--shadow-lg); }
.showcase-card img { width:100%; height:100%; object-fit:cover; }
.showcase-main { width:72%; height:330px; top:34px; left:8%; }
.showcase-side { width:46%; height:210px; right:0; bottom:10px; }
.showcase-float { left:0; bottom:28px; padding:14px 16px; display:flex; align-items:center; gap:12px; }
.float-icon { width:44px; height:44px; border-radius:12px; display:grid; place-items:center; color:#fff; background:linear-gradient(135deg,var(--primary),var(--secondary)); }

.stats-strip { max-width:var(--max); margin:-38px auto 0; padding:0 24px; position:relative; z-index:3; }
.stats-panel { display:grid; grid-template-columns:repeat(4,1fr); background:var(--surface); border:1px solid var(--border); border-radius:20px; box-shadow:var(--shadow-md); }
.stat { padding:24px; text-align:center; border-right:1px solid var(--border); }
.stat:last-child { border-right:0; }
.stat strong { display:block; font-size:1.65rem; letter-spacing:-.04em; }
.stat span { color:var(--text-3); font-size:.86rem; }

.card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-sm); }
.card-pad { padding:22px; }
.glass-card { background:var(--surface-glass); backdrop-filter:blur(18px); border:1px solid color-mix(in srgb,var(--border) 75%,transparent); border-radius:var(--radius-lg); box-shadow:var(--shadow-md); }
.grid { display:grid; gap:20px; }
.grid-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.grid-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.grid-4 { grid-template-columns:repeat(4,minmax(0,1fr)); }

.category-grid { display:grid; grid-template-columns:repeat(8,1fr); gap:14px; }
.category-card { min-height:132px; padding:18px 10px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:12px; text-align:center; background:var(--surface); border:1px solid var(--border); border-radius:16px; transition:var(--ease); }
.category-card:hover { transform:translateY(-5px); border-color:var(--primary); box-shadow:var(--shadow-md); color:var(--primary); }
.category-icon { width:50px; height:50px; border-radius:14px; display:grid; place-items:center; background:var(--primary-soft); color:var(--primary); font-size:1.2rem; }
.category-card span { font-size:.85rem; font-weight:700; }

.product-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; }
.product-card { overflow:hidden; background:var(--surface); border:1px solid var(--border); border-radius:18px; transition:var(--ease); position:relative; }
.product-card:hover { transform:translateY(-5px); box-shadow:var(--shadow-md); border-color:color-mix(in srgb,var(--primary) 45%,var(--border)); }
.product-image { aspect-ratio:4/3; background:var(--surface-2); overflow:hidden; position:relative; }
.product-image img { width:100%; height:100%; object-fit:cover; transition:transform .4s ease; }
.product-card:hover .product-image img { transform:scale(1.04); }
.product-badges { position:absolute; left:10px; top:10px; display:flex; flex-wrap:wrap; gap:6px; }
.badge { display:inline-flex; align-items:center; gap:5px; min-height:25px; padding:4px 8px; border-radius:999px; font-size:.7rem; font-weight:800; background:var(--surface); color:var(--text); box-shadow:var(--shadow-sm); }
.badge.gold { background:#fff3c4; color:#8a5800; }
.badge.silver { background:#e9eef5; color:#475569; }
.badge.bronze { background:#f4dfca; color:#854d1d; }
.badge.success { background:#dcfce7; color:#166534; }
.badge.warning { background:#ffedd5; color:#9a3412; }
.badge.danger { background:#fee2e2; color:#991b1b; }
.wishlist-btn { position:absolute; right:10px; top:10px; width:36px; height:36px; border:0; border-radius:50%; background:rgba(255,255,255,.92); color:#334155; display:grid; place-items:center; box-shadow:var(--shadow-sm); }
.wishlist-btn.active { color:var(--danger); }
.product-body { padding:16px; }
.product-title { font-size:1rem; font-weight:700; margin:0 0 7px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.product-meta { display:flex; justify-content:space-between; gap:8px; color:var(--text-3); font-size:.78rem; }
.price-row { display:flex; align-items:end; gap:8px; margin-top:14px; }
.price { font-size:1.18rem; font-weight:800; color:var(--primary); }
.old-price { color:var(--text-3); text-decoration:line-through; font-size:.82rem; }
.rating { display:flex; align-items:center; gap:5px; color:var(--warning); font-size:.78rem; }

.search-toolbar { display:grid; grid-template-columns:1fr 190px 160px auto; gap:12px; padding:16px; margin-bottom:22px; background:var(--surface); border:1px solid var(--border); border-radius:16px; box-shadow:var(--shadow-sm); }
.search-layout { display:grid; grid-template-columns:260px 1fr; gap:24px; align-items:start; }
.filter-panel { padding:20px; position:sticky; top:94px; }
.filter-group { padding:16px 0; border-bottom:1px solid var(--border); }
.filter-group:first-child { padding-top:0; }
.filter-group:last-child { border-bottom:0; padding-bottom:0; }
.filter-group h4 { margin:0 0 12px; }
.check-list { display:grid; gap:9px; }
.check-list label { display:flex; gap:9px; align-items:center; color:var(--text-2); font-size:.9rem; }
.result-heading { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:16px; }

.form-card { max-width:760px; margin:auto; padding:28px; }
.auth-layout { min-height:calc(100vh - var(--header-height)); display:grid; grid-template-columns:1fr 1fr; }
.auth-visual { padding:56px; color:#fff; display:flex; flex-direction:column; justify-content:flex-end; background:linear-gradient(145deg,rgba(15,23,42,.35),rgba(23,105,255,.66)),url('https://images.unsplash.com/photo-1556742049-0cfed4f6a45d?auto=format&fit=crop&w=1400&q=80') center/cover; }
.auth-visual h2 { font-size:2.5rem; margin:0 0 10px; letter-spacing:-.04em; }
.auth-panel { display:grid; place-items:center; padding:50px 24px; }
.auth-box { width:min(460px,100%); }
.auth-box h1 { font-size:2.2rem; margin:0 0 8px; letter-spacing:-.04em; }
.auth-box > p { color:var(--text-2); margin:0 0 26px; }
.form-grid { display:grid; gap:17px; }
.form-grid.cols-2 { grid-template-columns:1fr 1fr; }
.form-group { display:grid; gap:7px; }
.form-group label { font-size:.86rem; font-weight:700; color:var(--text-2); }
.form-control,input,select,textarea { width:100%; min-height:46px; padding:11px 13px; color:var(--text); background:var(--surface); border:1px solid var(--border-strong); border-radius:11px; outline:none; transition:var(--ease); }
textarea { min-height:120px; resize:vertical; }
input:focus,select:focus,textarea:focus { border-color:var(--primary); box-shadow:0 0 0 4px var(--primary-soft); }
.input-wrap { position:relative; }
.input-wrap input { padding-left:42px; }
.input-wrap > i { position:absolute; left:14px; top:50%; transform:translateY(-50%); color:var(--text-3); }
.password-toggle { position:absolute; right:10px; top:50%; transform:translateY(-50%); border:0; background:transparent; color:var(--text-3); }
.form-help { color:var(--text-3); font-size:.78rem; }
.form-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.divider { display:flex; align-items:center; gap:12px; color:var(--text-3); margin:20px 0; font-size:.82rem; }
.divider::before,.divider::after { content:""; height:1px; background:var(--border); flex:1; }
.google-btn { width:100%; border:1px solid var(--border-strong); background:var(--surface); color:var(--text); }
.alert { padding:13px 15px; border-radius:11px; display:flex; gap:10px; align-items:flex-start; font-size:.88rem; }
.alert.info { background:#eaf2ff; color:#174ea6; border:1px solid #b8d1ff; }
.alert.success { background:#eaf8ee; color:#166534; border:1px solid #bbf7d0; }
.alert.warning { background:#fff7e6; color:#92400e; border:1px solid #fed7aa; }
.alert.danger { background:#fff0f0; color:#991b1b; border:1px solid #fecaca; }
html[data-theme="dark"] .alert.info { background:#0d244c; color:#bfdbfe; border-color:#234b86; }
html[data-theme="dark"] .alert.success { background:#0c2c19; color:#bbf7d0; border-color:#166534; }
html[data-theme="dark"] .alert.warning { background:#392209; color:#fed7aa; border-color:#92400e; }
html[data-theme="dark"] .alert.danger { background:#3c1111; color:#fecaca; border-color:#991b1b; }

.dashboard-layout { display:grid; grid-template-columns:240px 1fr; gap:24px; }
.dashboard-sidebar { padding:14px; position:sticky; top:94px; align-self:start; }
.dashboard-sidebar a { display:flex; align-items:center; gap:10px; padding:11px 12px; border-radius:10px; color:var(--text-2); font-size:.9rem; font-weight:600; }
.dashboard-sidebar a:hover,.dashboard-sidebar a.active { color:var(--primary); background:var(--primary-soft); }
.dashboard-main { min-width:0; }
.kpi-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:24px; }
.kpi-card { padding:20px; display:flex; justify-content:space-between; align-items:flex-start; }
.kpi-card .kpi-icon { width:44px; height:44px; border-radius:13px; display:grid; place-items:center; color:var(--primary); background:var(--primary-soft); }
.kpi-card strong { display:block; font-size:1.55rem; margin-top:9px; }
.kpi-card span { color:var(--text-3); font-size:.82rem; }
.content-grid { display:grid; grid-template-columns:1.4fr .8fr; gap:20px; }

.table-wrap { width:100%; overflow:auto; border:1px solid var(--border); border-radius:14px; background:var(--surface); }
table { width:100%; border-collapse:collapse; min-width:760px; }
th,td { text-align:left; padding:13px 14px; border-bottom:1px solid var(--border); vertical-align:middle; }
th { font-size:.76rem; color:var(--text-3); text-transform:uppercase; letter-spacing:.06em; background:var(--surface-2); }
td { font-size:.88rem; }
tr:last-child td { border-bottom:0; }
.table-product { display:flex; align-items:center; gap:10px; min-width:220px; }
.table-product img { width:48px; height:48px; border-radius:9px; object-fit:cover; }
.table-actions { display:flex; gap:6px; }
.status { display:inline-flex; align-items:center; gap:6px; border-radius:999px; padding:5px 9px; font-size:.72rem; font-weight:800; text-transform:capitalize; }
.status.pending { background:#fff7e6; color:#92400e; }
.status.confirmed,.status.delivered,.status.active,.status.approved,.status.completed { background:#dcfce7; color:#166534; }
.status.processing,.status.shipped { background:#dbeafe; color:#1e40af; }
.status.cancelled,.status.refunded,.status.suspended,.status.rejected { background:#fee2e2; color:#991b1b; }

.plan-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:22px; align-items:stretch; }
.plan-card { padding:28px; position:relative; overflow:hidden; }
.plan-card.featured { border:2px solid var(--primary); transform:translateY(-8px); box-shadow:var(--shadow-lg); }
.plan-card.featured::before { content:"Most Popular"; position:absolute; right:-38px; top:18px; transform:rotate(40deg); background:var(--primary); color:#fff; padding:5px 46px; font-size:.68rem; font-weight:800; }
.plan-name { font-size:1.3rem; font-weight:800; }
.plan-price { font-size:2.25rem; font-weight:800; letter-spacing:-.05em; margin:14px 0; }
.plan-price small { font-size:.82rem; color:var(--text-3); font-weight:500; }
.plan-list { list-style:none; padding:0; margin:20px 0 26px; display:grid; gap:12px; color:var(--text-2); font-size:.9rem; }
.plan-list li { display:flex; gap:9px; }
.plan-list i { color:var(--success); margin-top:4px; }

.product-detail { display:grid; grid-template-columns:1.05fr .95fr; gap:40px; }
.gallery-main { aspect-ratio:4/3; border-radius:20px; overflow:hidden; background:var(--surface-2); }
.gallery-main img { width:100%; height:100%; object-fit:cover; }
.gallery-thumbs { display:flex; gap:10px; margin-top:12px; overflow:auto; }
.gallery-thumb { width:78px; height:68px; border:2px solid transparent; border-radius:11px; overflow:hidden; padding:0; background:var(--surface-2); }
.gallery-thumb.active { border-color:var(--primary); }
.gallery-thumb img { width:100%; height:100%; object-fit:cover; }
.product-info h1 { font-size:clamp(2rem,4vw,3rem); margin:8px 0 12px; letter-spacing:-.045em; }
.detail-price { font-size:2rem; color:var(--primary); font-weight:800; }
.detail-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:24px 0; }
.seller-box { display:flex; align-items:center; gap:14px; padding:16px; }
.seller-box .avatar { width:52px; height:52px; }
.spec-list { display:grid; grid-template-columns:1fr 1fr; gap:0; border:1px solid var(--border); border-radius:14px; overflow:hidden; }
.spec-list div { padding:12px 14px; border-bottom:1px solid var(--border); }
.spec-list div:nth-child(odd) { color:var(--text-3); background:var(--surface-2); }

.cart-layout { display:grid; grid-template-columns:1fr 360px; gap:24px; align-items:start; }
.cart-list { display:grid; gap:14px; }
.cart-item { display:grid; grid-template-columns:100px 1fr auto; gap:16px; padding:16px; align-items:center; }
.cart-item img { width:100px; height:90px; border-radius:12px; object-fit:cover; }
.qty-control { display:inline-flex; align-items:center; border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.qty-control button { width:34px; height:34px; border:0; background:var(--surface-2); color:var(--text); }
.qty-control input { width:44px; min-height:34px; padding:0; border:0; text-align:center; border-radius:0; }
.order-summary { padding:22px; position:sticky; top:94px; }
.summary-line { display:flex; justify-content:space-between; gap:14px; padding:10px 0; color:var(--text-2); }
.summary-total { margin-top:8px; padding-top:16px; border-top:1px solid var(--border); font-size:1.15rem; font-weight:800; color:var(--text); }

.message-layout { display:grid; grid-template-columns:320px 1fr; min-height:640px; overflow:hidden; }
.conversation-list { border-right:1px solid var(--border); }
.conversation-item { width:100%; display:flex; gap:11px; padding:14px; border:0; border-bottom:1px solid var(--border); background:transparent; color:var(--text); text-align:left; }
.conversation-item:hover,.conversation-item.active { background:var(--surface-2); }
.message-panel { display:flex; flex-direction:column; min-width:0; }
.message-header { padding:15px 18px; border-bottom:1px solid var(--border); font-weight:700; }
.message-stream { flex:1; padding:20px; overflow:auto; display:flex; flex-direction:column; gap:10px; background:color-mix(in srgb,var(--surface-2) 50%,transparent); }
.message-bubble { max-width:72%; padding:10px 13px; border-radius:14px 14px 14px 4px; background:var(--surface); border:1px solid var(--border); }
.message-bubble.mine { align-self:flex-end; color:#fff; background:var(--primary); border-color:var(--primary); border-radius:14px 14px 4px 14px; }
.message-compose { display:flex; gap:10px; padding:14px; border-top:1px solid var(--border); }

.empty-state { padding:54px 24px; text-align:center; border:1px dashed var(--border-strong); border-radius:18px; background:var(--surface); }
.empty-state i { width:64px; height:64px; border-radius:18px; display:grid; place-items:center; margin:0 auto 14px; color:var(--primary); background:var(--primary-soft); font-size:1.5rem; }
.empty-state h3 { margin:0 0 6px; }
.empty-state p { margin:0 auto 18px; color:var(--text-3); max-width:430px; }

.loading-screen { min-height:420px; display:grid; place-content:center; justify-items:center; color:var(--text-3); }
.loader { width:42px; height:42px; border-radius:50%; border:4px solid var(--border); border-top-color:var(--primary); animation:spin .8s linear infinite; }
.skeleton { position:relative; overflow:hidden; background:var(--surface-2); }
.skeleton::after { content:""; position:absolute; inset:0; transform:translateX(-100%); background:linear-gradient(90deg,transparent,rgba(255,255,255,.35),transparent); animation:shimmer 1.4s infinite; }

.configuration-banner { max-width:var(--max); margin:14px auto 0; padding:12px 16px; border-radius:12px; background:#fff7e6; color:#92400e; border:1px solid #fed7aa; font-size:.86rem; }
.toast-stack { position:fixed; right:18px; bottom:18px; z-index:3000; width:min(390px,calc(100vw - 36px)); display:grid; gap:10px; }
.toast { display:grid; grid-template-columns:auto 1fr auto; gap:11px; align-items:start; padding:14px; border:1px solid var(--border); border-left:4px solid var(--primary); border-radius:13px; background:var(--surface); box-shadow:var(--shadow-lg); animation:slideIn .22s ease; }
.toast.success { border-left-color:var(--success); }
.toast.error { border-left-color:var(--danger); }
.toast.warning { border-left-color:var(--warning); }
.toast button { border:0; background:transparent; color:var(--text-3); }
.modal-backdrop { position:fixed; inset:0; z-index:2500; display:grid; place-items:center; padding:18px; background:rgba(2,6,23,.66); backdrop-filter:blur(5px); }
.modal { width:min(620px,100%); max-height:90vh; overflow:auto; position:relative; background:var(--surface); border:1px solid var(--border); border-radius:20px; box-shadow:var(--shadow-lg); padding:26px; }
.modal-close { position:absolute; right:14px; top:14px; width:36px; height:36px; border:1px solid var(--border); border-radius:10px; background:var(--surface); color:var(--text); }

.site-footer { border-top:1px solid var(--border); background:var(--surface); }
.footer-grid { max-width:var(--max); margin:auto; padding:48px 24px; display:grid; grid-template-columns:1.4fr repeat(3,1fr); gap:36px; }
.footer-grid h4 { margin:0 0 14px; }
.footer-grid p { color:var(--text-3); max-width:350px; }
.footer-grid > div:not(:first-child) { display:flex; flex-direction:column; gap:9px; }
.footer-grid a { color:var(--text-2); font-size:.88rem; }
.footer-grid a:hover { color:var(--primary); }
.footer-brand { margin-bottom:14px; }
.currency-note { color:var(--text-3); font-size:.82rem; margin-top:8px; }
.footer-bottom { max-width:var(--max); margin:auto; padding:18px 24px; border-top:1px solid var(--border); display:flex; justify-content:space-between; gap:16px; color:var(--text-3); font-size:.8rem; }

.legal-content { max-width:880px; margin:auto; }
.legal-content h2 { margin-top:34px; }
.legal-content p,.legal-content li { color:var(--text-2); }
.admin-shell { display:grid; grid-template-columns:230px 1fr; gap:24px; }
.admin-nav { padding:14px; align-self:start; position:sticky; top:94px; }
.admin-nav a { display:flex; gap:10px; align-items:center; padding:11px 12px; border-radius:10px; color:var(--text-2); font-size:.88rem; font-weight:600; }
.admin-nav a:hover,.admin-nav a.active { color:var(--primary); background:var(--primary-soft); }
.chart-placeholder { min-height:280px; padding:20px; display:flex; align-items:end; gap:10px; }
.chart-bar { flex:1; min-width:18px; border-radius:8px 8px 0 0; background:linear-gradient(180deg,var(--primary),var(--secondary)); position:relative; }
.chart-bar span { position:absolute; left:50%; transform:translateX(-50%); bottom:-26px; color:var(--text-3); font-size:.7rem; }

@keyframes spin { to { transform:rotate(360deg); } }
@keyframes shimmer { to { transform:translateX(100%); } }
@keyframes slideIn { from { opacity:0; transform:translateY(12px); } }
@keyframes fadeUp { from { opacity:0; transform:translateY(8px); } }

@media (max-width:1100px) {
  .main-nav a span { display:none; }
  .category-grid { grid-template-columns:repeat(4,1fr); }
  .product-grid { grid-template-columns:repeat(3,1fr); }
  .kpi-grid { grid-template-columns:repeat(2,1fr); }
  .footer-grid { grid-template-columns:1.4fr 1fr 1fr; }
  .footer-grid > div:last-child { grid-column:2; }
}
@media (max-width:900px) {
  .hero-inner { grid-template-columns:1fr; }
  .hero-showcase { display:none; }
  .stats-panel { grid-template-columns:repeat(2,1fr); }
  .stat:nth-child(2) { border-right:0; }
  .stat:nth-child(-n+2) { border-bottom:1px solid var(--border); }
  .product-grid { grid-template-columns:repeat(2,1fr); }
  .search-layout,.dashboard-layout,.admin-shell,.cart-layout,.product-detail,.content-grid { grid-template-columns:1fr; }
  .filter-panel,.dashboard-sidebar,.admin-nav,.order-summary { position:static; }
  .dashboard-sidebar,.admin-nav { display:flex; overflow:auto; white-space:nowrap; }
  .auth-layout { grid-template-columns:1fr; }
  .auth-visual { display:none; }
  .plan-grid { grid-template-columns:1fr; max-width:620px; margin:auto; }
  .plan-card.featured { transform:none; }
  .message-layout { grid-template-columns:260px 1fr; }
}
@media (max-width:760px) {
  :root { --header-height:64px; }
  .nav-wrap { padding:0 14px; gap:10px; }
  .mobile-menu-btn { display:grid; order:2; }
  .brand { flex:1; }
  .main-nav { display:none; position:absolute; left:12px; right:12px; top:68px; flex-direction:column; align-items:stretch; padding:10px; background:var(--surface); border:1px solid var(--border); border-radius:15px; box-shadow:var(--shadow-lg); }
  .main-nav.open { display:flex; }
  .main-nav a span { display:inline; }
  .main-nav .sell-link { margin-left:0; }
  .nav-actions { order:3; }
  .profile-name,.nav-actions > .count-button:first-child { display:none; }
  .auth-nav > .btn { display:none; }
  .page-container { padding:28px 15px 56px; }
  .page-header { align-items:flex-start; flex-direction:column; }
  .hero-inner { padding:52px 15px 78px; }
  .hero { min-height:auto; }
  .hero-copy h1 { font-size:clamp(2.6rem,15vw,4rem); }
  .stats-strip { padding:0 15px; }
  .category-grid { grid-template-columns:repeat(3,1fr); gap:10px; }
  .product-grid { gap:12px; }
  .product-body { padding:12px; }
  .search-toolbar { grid-template-columns:1fr 1fr; }
  .search-toolbar > :first-child { grid-column:1/-1; }
  .form-grid.cols-2 { grid-template-columns:1fr; }
  .detail-actions { grid-template-columns:1fr; }
  .message-layout { grid-template-columns:1fr; min-height:720px; }
  .conversation-list { border-right:0; border-bottom:1px solid var(--border); max-height:230px; overflow:auto; }
  .footer-grid { grid-template-columns:1fr 1fr; padding:38px 15px; }
  .footer-grid > div:first-child { grid-column:1/-1; }
  .footer-grid > div:last-child { grid-column:auto; }
  .footer-bottom { padding:16px 15px; flex-direction:column; }
}
@media (max-width:520px) {
  .brand-mark { width:32px; height:32px; }
  .brand { font-size:1.15rem; }
  .nav-actions { gap:5px; }
  .icon-btn { width:38px; height:38px; }
  .category-grid { grid-template-columns:repeat(2,1fr); }
  .product-grid { grid-template-columns:1fr 1fr; }
  .product-title { font-size:.9rem; }
  .product-meta { display:none; }
  .search-toolbar { grid-template-columns:1fr; }
  .search-toolbar > :first-child { grid-column:auto; }
  .kpi-grid { grid-template-columns:1fr; }
  .stats-panel { grid-template-columns:1fr 1fr; }
  .stat { padding:18px 8px; }
  .cart-item { grid-template-columns:82px 1fr; }
  .cart-item img { width:82px; height:78px; }
  .cart-item > :last-child { grid-column:2; }
  .footer-grid { grid-template-columns:1fr; }
  .footer-grid > div:first-child { grid-column:auto; }
  .auth-panel { padding:36px 15px; }
  .form-card,.modal { padding:20px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
