/* ============ Tadawel Social + Marketplace — app.css ============ */
/* Dark / light theme via :root[data-theme] + CSS variables */

:root {
    --accent: #06b6d4;
    --accent-2: #22d3ee;
    --accent-rgb: 6, 182, 212;
    --radius: 14px;
    --radius-lg: 18px;
    --shadow: 0 1px 3px rgba(0,0,0,.12), 0 8px 28px rgba(0,0,0,.1);
    --font: 'Inter', -apple-system, 'Segoe UI', Tahoma, sans-serif;
}
:root[data-theme="dark"] {
    --bg: #0b0f1a;
    --bg-2: #111827;
    --surface: #151b2b;
    --surface-2: #1c2538;
    --surface-3: #243049;
    --text: #e7edf7;
    --text-2: #aab4c7;
    --text-3: #6b768a;
    --line: #26334d;
    --input-bg: #0e1524;
    --danger: #ef4444;
    --success: #22c55e;
}
:root[data-theme="light"] {
    --bg: #f4f6fa;
    --bg-2: #eef1f6;
    --surface: #ffffff;
    --surface-2: #f6f8fc;
    --surface-3: #eef1f6;
    --text: #141a26;
    --text-2: #4b5568;
    --text-3: #8a94a7;
    --line: #e3e8f0;
    --input-bg: #f2f4f9;
    --danger: #dc2626;
    --success: #16a34a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select {
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    background: var(--input-bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 14px;
    width: 100%;
    outline: none;
    transition: border .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; }

/* ---------- Layout ---------- */
.app {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
    max-width: 1280px;
    margin: 0 auto;
}
.sidebar {
    position: sticky; top: 0;
    height: 100vh;
    padding: 20px 16px;
    display: flex; flex-direction: column; gap: 24px;
    border-left: 1px solid var(--line);
    background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--text); }
.brand-logo { width: 40px; height: 40px; flex-shrink: 0; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; border-radius: 12px;
    color: var(--text-2); font-weight: 600; font-size: 15px;
}
.nav-item svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: rgba(var(--accent-rgb), .13); color: var(--accent); }

.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.nav-profile { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; color: var(--text); }
.nav-profile:hover { background: var(--surface-2); }
.nav-profile-meta { line-height: 1.3; }
.nav-profile-meta b { display: block; font-size: 14px; }
.nav-profile-meta span { font-size: 12px; color: var(--text-3); }

.mobile-top { display: none; }
.mobile-nav { display: none; }

.main { padding: 24px 28px 80px; min-width: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: none; border-radius: 11px;
    font-weight: 700; font-size: 14px;
    padding: 11px 18px; cursor: pointer;
    transition: transform .06s, opacity .15s;
    color: var(--text); background: var(--surface-2);
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text-2); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ---------- Cards ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.card h3 { font-size: 15px; margin-bottom: 10px; }
.card p { color: var(--text-2); font-size: 14px; }

/* ---------- Quick Composer (Facebook-style) ---------- */
.qc-composer { margin-bottom: 20px; }
.qc-top { display: flex; align-items: flex-start; gap: 12px; }
.qc-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.qc-avatar-ph { display: flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 18px; }
.qc-input { flex: 1; border: none; background: transparent; resize: none; font-size: 15px; line-height: 1.5; padding: 8px 0; color: var(--text); outline: none; font-family: inherit; min-height: 42px; }
.qc-input::placeholder { color: var(--text-3); }
.qc-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.qc-file-item { position: relative; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.qc-file-item img, .qc-file-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qc-rm { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(0,0,0,.65); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tt-activity .activity-item.activity-post { border-inline-start: 3px solid var(--brand, #22d3ee); padding-inline-start: 10px; }
.tt-activity .activity-item .activity-caption { margin-top: 6px; color: var(--text-1); font-size: 13.5px; line-height: 1.5; background: var(--bg-2, rgba(128,128,128,.06)); border-radius: 10px; padding: 8px 10px; }
.qc-load { position: absolute; inset: 0; display: block; background: var(--surface-2); }
.qc-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.qc-btn { display: inline-flex; align-items: center; gap: 7px; background: none; border: none; color: var(--text-2); font-size: 14px; cursor: pointer; padding: 6px 10px; border-radius: 8px; transition: background .15s; }
.qc-btn:hover { background: var(--surface-2); color: var(--text); }
.qc-ic { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qc-submit { min-width: 88px; }
.qc-submit[disabled] { opacity: .5; cursor: not-allowed; }
.qc-composer-wrap { margin-bottom: 16px; }
.qc-group-wrap { margin: 0 0 16px; }

/* ---------- Home ---------- */
.home-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.feed-col { min-width: 0; }
.feed-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.feed-header h1 { font-size: 24px; }
.feed { display: flex; flex-direction: column; gap: 20px; }
.feed-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.feed-card-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--surface-3); }
.avatar-sm { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.fc-meta { line-height: 1.3; }
.fc-meta b { font-size: 14px; display: block; }
.fc-meta a { color: var(--text); }
.fc-meta span { font-size: 12px; color: var(--text-3); }
/* Follow button in feed cards — IG solid accent (higher specificity than .action-btn) */
.action-btn.fc-follow { margin-inline-start: auto; background: var(--accent); border: 1px solid var(--accent); color: #fff; font-weight: 700; border-radius: 10px; padding: 7px 16px; font-size: 12.5px; transition: filter .15s, background .15s, color .15s; }
.action-btn.fc-follow:hover { background: var(--accent); color: #fff; filter: brightness(1.08); }
.action-btn.fc-follow.active { background: transparent; border-color: var(--line); color: var(--text); font-weight: 600; }

/* Post More Actions (⋯) — IG style */
.post-more-wrap { position: relative; margin-inline-start: 2px; flex: none; }
.pd-author .post-more-wrap { margin-inline-start: auto; align-self: center; }
.post-more-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: none; background: transparent; border-radius: 50%; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s; }
.post-more-btn:hover, .post-more-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--accent); }
.post-more-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); min-width: 195px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: 0 12px 32px rgba(0, 0, 0, .38); z-index: 60; }
.post-more-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: none; background: transparent; color: var(--text); font-size: 13.5px; font-weight: 600; border-radius: 9px; cursor: pointer; text-align: start; }
.post-more-item:hover { background: var(--surface-2); }
.post-more-item svg { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.post-more-item.danger { color: var(--danger); }
.post-more-item.danger:hover { background: rgba(239, 68, 68, .12); }

.feed-carousel { position: relative; }
.feed-carousel img, .feed-carousel video, .slides img, .slides video { width: 100%; max-height: 560px; object-fit: cover; display: block; }
/* theme-aware media placeholders — never a hard black box while loading/letterboxing */
.feed-carousel img, .slides img { background: var(--surface-2, #141b2d); }
.feed-carousel video, .slides video { background: #000; }
.feed-carousel .slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slides figure { flex: 0 0 100%; scroll-snap-align: start; }
.slides img { width: 100%; max-height: 560px; object-fit: cover; }
.carousel-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.carousel-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); }
.carousel-dots i.on { background: #fff; }

.feed-caption { padding: 8px 16px; font-size: 14px; }
.feed-caption b { margin-inline-end: 6px; }
.feed-caption a { color: var(--text); }
.feed-actions { display: flex; gap: 4px; padding: 6px 10px; }
.action-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: transparent; border: none; color: var(--text-2);
    font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 10px;
}
.action-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.action-btn:hover { background: var(--surface-2); }
.action-btn.liked { color: var(--danger); }
.action-btn.liked svg { fill: var(--danger); stroke: var(--danger); }
.action-btn.saved svg { fill: var(--accent); stroke: var(--accent); }
.action-btn.saved { color: var(--accent); }
.action-btn.reposted { color: var(--success); }
.action-btn.reposted svg { fill: none; stroke: var(--success); }
.action-btn.reposted svg { animation: repost-pop .35s ease; }
.action-btn:disabled { opacity: .45; cursor: not-allowed; }
.action-btn svg { transition: transform .18s ease; }
.action-btn:active svg { transform: scale(.85); }
@keyframes repost-pop { 0% { transform: scale(.5) rotate(-25deg); } 60% { transform: scale(1.35) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
.action-btn.active { color: var(--accent); }

.feed-comments { padding: 0 16px 4px; }
.comment-row { display: flex; gap: 10px; padding: 8px 0; font-size: 14px; }
.comment-row a { color: var(--text); font-weight: 600; }
.comment-row .muted { color: var(--text-3); font-size: 12px; }
.comment-input { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.comment-input input { width: auto; flex: 1; }
.comment-input .btn { padding: 10px 16px; }

/* ---------- Marketplace ---------- */
.mp-toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.mp-toolbar .input { flex: 1; min-width: 140px; }
.mp-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cat-chip {
    border: 1px solid var(--line); background: var(--surface);
    color: var(--text-2); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600;
}
.cat-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.mp-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px;
}
.mp-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
    transition: transform .08s, border .15s;
    display: flex; flex-direction: column;
}
.mp-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.mp-card-imgbox { aspect-ratio: 1 / 1; background: var(--surface-3); overflow: hidden; }
.mp-card-imgbox img { width: 100%; height: 100%; object-fit: cover; }
.mp-card-imgbox .noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 40px; color: var(--text-3); }
.mp-card-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mp-card-title { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-card-price { color: var(--accent); font-weight: 800; font-size: 15px; }
.mp-card-seller { font-size: 12px; color: var(--text-3); }

/* ---------- Product page ---------- */
.product-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; }
.product-gallery { background: var(--surface-3); border-radius: var(--radius-lg); overflow: hidden; min-height: 320px; }
.product-gallery img { width: 100%; max-height: 520px; object-fit: cover; }
.product-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.product-thumbs img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; border: 2px solid transparent; cursor: pointer; }
.product-thumbs img.on { border-color: var(--accent); }
.product-info h1 { font-size: 24px; margin-bottom: 6px; }
.product-price { font-size: 26px; font-weight: 800; color: var(--accent); margin-bottom: 6px; }
.product-meta { color: var(--text-3); font-size: 13px; margin-bottom: 14px; display: flex; gap: 14px; flex-wrap: wrap; }
.product-desc { margin: 16px 0; }
.product-seller { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; }
.product-seller b { display: block; }
.product-seller span { color: var(--text-3); font-size: 12px; }
.badge { display: inline-block; background: rgba(var(--accent-rgb), .13); color: var(--accent); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; }

/* ---------- Sell / forms ---------- */
.form-stack { display: flex; flex-direction: column; gap: 16px; max-width: 620px; }
.field { display: block; }
.field span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-2); }
.upload-dropzone {
    border: 2px dashed var(--line); border-radius: var(--radius-lg);
    padding: 28px; text-align: center; cursor: pointer; transition: border .15s, background .15s;
}
.upload-dropzone:hover { border-color: var(--accent); background: rgba(var(--accent-rgb), .05); }
.dropzone-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-2); }
.dz-icon { width: 36px; height: 36px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.post-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.post-preview figure { position: relative; border-radius: 10px; overflow: hidden; }
.post-preview img { width: 100%; height: 90px; object-fit: cover; }
.post-preview .rm { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%; width: 22px; height: 22px; font-size: 12px; line-height: 1; }

/* ---------- Create: multi-media strip + category dropdown + crop modal ---------- */
.post-preview.pv-sorted { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pv-item { position: relative; width: 120px; height: 120px; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); background: var(--surface); cursor: grab; }
.pv-item.is-cover { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .18); }
.pv-item img, .pv-item video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pv-cover { position: absolute; top: 6px; left: 6px; background: var(--accent); color: #fff; font-size: 10px; padding: 2px 7px; border-radius: 20px; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.pv-bar { position: absolute; inset-inline-end: 6px; top: 6px; display: flex; flex-direction: column; gap: 4px; }
.pv-btn { width: 26px; height: 26px; border: none; border-radius: 50%; background: rgba(0,0,0,.62); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pv-btn:active { transform: scale(.9); }
.pv-first { color: #ffe25e; }
.pv-rm { color: #ff7a7a; }
.pv-load { display: block; width: 100%; height: 100%; background: rgba(var(--accent-rgb), .15); }
.pv-drag { position: absolute; bottom: 6px; inset-inline-end: 6px; color: #fff; background: rgba(0,0,0,.5); border-radius: 50%; width: 22px; height: 22px; font-size: 14px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.cat-field { position: relative; z-index: 30; }
.cat-dropdown { position: relative; }
.cat-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text-1); font-size: 15px; cursor: pointer; }
.cat-trigger svg { transition: transform .2s; }
.cat-dropdown.open .cat-trigger svg { transform: rotate(180deg); }
.cat-menu { position: absolute; top: calc(100% + 6px); inset-inline: 0; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); max-height: 280px; overflow: auto; padding: 6px; }
.cat-menu-head { font-size: 12px; font-weight: 700; color: var(--text-3); padding: 4px 8px 8px; }
.cat-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: none; background: transparent; color: var(--text-1); font-size: 14px; border-radius: 8px; cursor: pointer; text-align: start; }
.cat-opt:hover { background: rgba(var(--accent-rgb), .1); color: var(--accent); }
.cat-opt .co-icon { width: 22px; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; }
.cat-other-field { margin-top: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: var(--radius); background: rgba(var(--accent-rgb), .04); }
.cat-other-field[hidden] { display: none; }
.cat-other-field input { width: 100%; margin-top: 4px; }
.cat-other-field small { display: block; margin-top: 4px; }
.crop-modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(4px); }
.crop-modal[hidden] { display: none; }
.crop-box { background: var(--surface); border-radius: var(--radius-lg); width: min(560px, 100%); overflow: hidden; box-shadow: var(--shadow); }
.crop-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.crop-close { border: none; background: transparent; font-size: 22px; color: var(--text-2); cursor: pointer; line-height: 1; }
.crop-stage { position: relative; width: 100%; height: min(52vh, 420px); overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; user-select: none; }
.crop-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .15s; }
.crop-frame { position: absolute; border: 2px dashed #fff; border-radius: 6px; background: rgba(255,255,255,.08); box-shadow: 0 0 0 4000px rgba(0,0,0,.55); cursor: move; }
.crop-toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; }
.crop-btn { flex: 1; padding: 10px; border: 1px solid var(--line); background: transparent; color: var(--text-1); border-radius: var(--radius); font-size: 14px; cursor: pointer; }
.crop-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Profile ---------- */
.profile-hero { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); margin-bottom: 20px; }
.profile-cover { height: 160px; background: linear-gradient(135deg, #0ea5b7, #6366f1); position: relative; }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-head { padding: 0 24px 22px; display: flex; align-items: flex-end; gap: 18px; }
.profile-avatar { width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--surface); margin-top: -52px; object-fit: cover; }
.profile-name b { font-size: 20px; display: block; }
.profile-name span { color: var(--text-3); font-size: 14px; }
.profile-bio { color: var(--text-2); margin-top: 6px; font-size: 14px; }
.profile-stats { display: flex; gap: 18px; margin-top: 10px; font-size: 14px; color: var(--text-2); }
.profile-stats b { color: var(--text); }

.profile-tabs { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.profile-tabs button {
    background: none; border: none; padding: 12px 16px; font-weight: 700; font-size: 14px;
    color: var(--text-3); border-bottom: 2px solid transparent;
}
.profile-tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.pgrid-item { position: relative; aspect-ratio: 1/1; border-radius: 12px; overflow: hidden; background: var(--surface-3); cursor: pointer; border: 1px solid var(--line); }
.pgrid-item img { width: 100%; height: 100%; object-fit: cover; }
.pgrid-item video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.pgrid-item .overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; gap: 18px; color: #fff; opacity: 0; transition: opacity .15s; }
.pgrid-item:hover .overlay { opacity: 1; }
.pgrid-item .overlay span { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.pgrid-item .sold-tag { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.7); color: #fff; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pgrid-hide { position: absolute; top: 8px; left: 8px; z-index: 3; width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s; }
.pgrid-item:hover .pgrid-hide { opacity: 1; }
.pgrid-item.is-hidden { opacity: .45; filter: saturate(.4); }
.tt-showhidden { display: block; margin: 12px auto 4px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; font-weight: 600; }

/* ---------- TikTok-style Profile ---------- */
.tt-profile-wrap { max-width: 900px; margin: 0 auto; }
.tt-profile { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.tt-head { display: flex; gap: 18px; align-items: center; }
.tt-avatar { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; border: 3px solid var(--line); flex-shrink: 0; }
.tt-head-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tt-display { font-size: 20px; font-weight: 800; line-height: 1.2; }
.tt-username { color: var(--text-3); font-size: 14px; }
.tt-bio { color: var(--text-2); font-size: 14px; margin: 4px 0; word-break: break-word; }

.tt-stats { display: flex; gap: 24px; margin-top: 10px; }
.tt-stat { display: flex; align-items: baseline; gap: 6px; cursor: pointer; }
.tt-stat[data-stats]:hover b { color: var(--accent); }
.tt-stat b { font-size: 17px; font-weight: 800; color: var(--text); }
.tt-stat span { font-size: 13px; color: var(--text-3); }

.tt-actions-holder { display: flex; gap: 8px; margin: 12px 0 18px; }
.tt-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
    color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none;
}
.tt-btn:hover { background: var(--surface-2); }
.tt-follow { background: var(--accent); border-color: var(--accent); color: #fff; }
.tt-follow:hover { filter: brightness(1.05); background: var(--accent); }
.tt-follow.following { background: transparent; border-color: var(--line); color: var(--text); }
.tt-icon-btn { flex: 0 0 46px; width: 46px; }

.tt-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.tt-tabs::-webkit-scrollbar { display: none; }
.tt-tab {
    flex: 1; min-width: 0; white-space: nowrap; background: none; border: none; padding: 13px 10px; font-weight: 700; font-size: 14px;
    color: var(--text-3); border-bottom: 2px solid transparent; cursor: pointer;
}
.tt-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.tt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.tt-grid .pgrid-item { aspect-ratio: 9/14; border-radius: 0; border: none; }

/* Followers / Following modal */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.55);
    display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .15s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-sheet {
    width: min(480px, 100%); max-height: 70vh; background: var(--surface); border: 1px solid var(--line);
    border-radius: 16px 16px 0 0; display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 -8px 30px rgba(0,0,0,.25); animation: sheetUp .18s ease-out;
}
@keyframes sheetUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tt-fm-tabs { display: flex; gap: 4px; }
.tt-fm-tab {
    background: none; border: none; padding: 9px 16px; font-weight: 700; font-size: 14px; color: var(--text-3);
    border-radius: 8px; cursor: pointer;
}
.tt-fm-tab.active { background: var(--surface-3); color: var(--text); }
.modal-close {
    background: none; border: none; font-size: 26px; line-height: 1; color: var(--text-3); cursor: pointer; padding: 4px 8px;
}
.modal-close:hover { color: var(--text); }
.tt-fm-body { overflow-y: auto; padding: 8px 0; }
.tt-fm-body .empty-state { padding: 40px 20px; }
.tt-fm-user { display: flex; align-items: center; gap: 12px; padding: 9px 16px; }
.tt-fm-user:hover { background: var(--surface-2); }
.tt-fm-ava { flex-shrink: 0; }
.tt-fm-ava img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.tt-fm-info { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.tt-fm-info b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-fm-info span { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-fm-follow {
    border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 700;
    font-size: 13px; padding: 7px 18px; border-radius: 6px; cursor: pointer; flex-shrink: 0;
}
.tt-fm-follow.following { background: var(--accent); border-color: var(--accent); color: #fff; }

@media (min-width: 640px) {
    .modal-backdrop { align-items: center; padding: 20px; }
    .modal-sheet { border-radius: 16px; max-height: 74vh; }
}
@media (max-width: 640px) {
    .tt-avatar { width: 84px; height: 84px; }
}

/* ---------- Explore (Twitter hashtags + Instagram grid) ---------- */
.explore-wrap { max-width: 980px; margin: 0 auto; }
.explore-head h1 { font-size: 26px; }
.explore-sub { color: var(--text-3); margin: 6px 0 20px; font-size: 14px; }

/* ---------- Post Detail ---------- */
.post-detail { display: flex; gap: 24px; max-width: 980px; margin: 0 auto; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.post-detail-media { flex: 1; min-width: 0; background: var(--bg-2, #111827); display: flex; align-items: center; justify-content: center; position: relative; }
.pd-media-main { max-width: 100%; max-height: 78vh; object-fit: contain; background: var(--surface-2, #141b2d); border-radius: 12px; display: block; margin: 0 auto; }
.pd-media-open { position: relative; display: flex; align-items: center; justify-content: center; cursor: zoom-in; }
.pd-media-open:hover .pd-loopz-hint { opacity: 1; }
.pd-loopz-hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 12.5px; padding: 6px 12px; border-radius: 20px; opacity: 0; transition: opacity .18s; pointer-events: none; white-space: nowrap; }
.post-detail-side { flex: 1; max-width: 420px; display: flex; flex-direction: column; padding: 18px; gap: 12px; }
.pd-author { display: flex; align-items: center; gap: 12px; }
.pd-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.pd-avatar-sm { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.pd-author-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pd-name { font-weight: 700; color: var(--text); text-decoration: none; }
.pd-meta { font-size: 12px; color: var(--text-3); }
.vis-badge { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-3); }
.pd-caption { font-size: 15px; line-height: 1.6; }
.pd-location { color: var(--text-3); font-size: 13px; margin: 0; }
.pd-actions { display: flex; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.pd-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: var(--text-2); font-weight: 700; font-size: 14px; cursor: pointer; padding: 8px 12px; border-radius: 8px; }
.pd-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.pd-btn:active svg { transform: scale(.85); }
.pd-btn.active { color: var(--accent); }
.pd-btn.active svg { fill: var(--accent); stroke: var(--accent); }
.pd-btn#pdRepost.active, .pd-btn#pdRepost.reposted { color: var(--success); }
.pd-btn#pdRepost.active svg, .pd-btn#pdRepost.reposted svg { fill: var(--success); stroke: var(--success); }
.pd-btn:disabled { opacity: .45; cursor: not-allowed; }
.pd-btn:hover { background: var(--surface-2); }
.pd-comments-head h3 { font-size: 15px; }
.pd-comments { flex: 1; overflow-y: auto; max-height: 40vh; display: flex; flex-direction: column; gap: 14px; }
.pd-comment { display: flex; gap: 10px; }
.pd-c-txt { flex: 1; min-width: 0; }
.pd-c-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pd-c-user { font-weight: 700; font-size: 14px; color: var(--text); text-decoration: none; }
.pd-c-body { margin: 2px 0 0; font-size: 14px; }
.pin-tag { font-size: 11px; color: var(--accent); background: var(--surface-3); padding: 1px 7px; border-radius: 999px; }
.pd-c-actions { margin-inline-start: auto; display: flex; gap: 6px; }
.pd-c-actions button { background: none; border: none; color: var(--text-3); font-size: 12px; cursor: pointer; }
.pd-c-actions button:hover { color: var(--accent); }
.pd-no-comments { color: var(--text-3); font-size: 14px; }
.pd-comment-form { display: flex; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.pd-comment-form input { flex: 1; }
.vis-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.vis-picker label {
    display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; cursor: pointer;
    border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: var(--surface);
}
.vis-picker label:has(input:checked) { border-color: var(--accent); color: var(--accent); }
.pd-login-hint { text-align: center; color: var(--text-3); font-size: 14px; }
.pd-login-hint a { color: var(--accent); }
.pd-listings-link { align-self: flex-start; }
.fc-seemore { color: var(--accent); font-size: 13px; text-decoration: none; }

/* ---------- Groups ---------- */
.groups-wrap { max-width: 840px; margin: 0 auto; }
.groups-head h1 { font-size: 26px; }
.create-group-box { margin: 14px 0; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; background: var(--surface-2); }
.create-group-box summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.group-card { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 10px; background: var(--surface); }
.group-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0; }
.group-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.group-name { font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none; }
.group-meta { font-size: 12px; color: var(--text-3); }
.group-desc { margin: 4px 0 0; color: var(--text-2); font-size: 13px; }
.group-head { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.group-head-icon { width: 64px; height: 64px; border-radius: 16px; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-size: 32px; }
.group-head-txt { flex: 1; min-width: 0; }
.group-head-txt h1 { font-size: 22px; }
.group-head-txt p { color: var(--text-2); }
.group-posts-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.g-post { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.g-post-body { flex: 1; }
.g-post-body p { margin: 2px 0 0; }

/* ---------- Saved hub ---------- */
.saved-grid { }

@media (max-width: 720px) {
    .post-detail { flex-direction: column; }
    .post-detail-media { min-height: 320px; }
    .post-detail-side { max-width: none; }
    .pd-comments { max-height: none; }
}
.explore-filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.ex-trends-row, .ex-cats-row { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.trend-label { font-size: 12px; color: var(--text-3); font-weight: 700; margin-top: 8px; white-space: nowrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.chip {
    border: 1px solid var(--line); background: var(--surface); color: var(--text);
    border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip small { opacity: .7; font-weight: 700; }
.no-trends { color: var(--text-3); font-size: 13px; padding: 6px; }

.ex-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 4px;
}
@media (min-width: 640px) { .ex-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; } }
@media (min-width: 900px) { .ex-grid { grid-template-columns: repeat(4, 1fr); gap: 5px; } }

.ex-tile {
    position: relative; aspect-ratio: 1 / 1;
    background: var(--surface-3); border-radius: 4px; overflow: hidden; cursor: pointer;
}
.ex-tile img { width: 100%; height: 100%; object-fit: cover; }
.ex-tile video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.ex-tile-video::after {
    content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    border-left: 16px solid rgba(255,255,255,.95); border-top: 10px solid transparent; border-bottom: 10px solid transparent;
    pointer-events: none; filter: drop-shadow(0 1px 4px rgba(0,0,0,.55)); z-index: 1;
}
.ex-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 40px; color: var(--text-3); }
.ex-tile-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,.0);
    display: flex; align-items: center; justify-content: center; gap: 18px; color: #fff;
    opacity: 0; transition: opacity .15s;
}
.ex-tile:hover .ex-tile-overlay { opacity: 1; background: rgba(0,0,0,.35); }
.ex-tile-overlay span { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.exic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ex-price {
    position: absolute; top: 8px; right: 8px;
    background: rgba(0,0,0,.72); color: #fff; padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 800; z-index: 2;
}

/* Lightbox */
.ex-lb {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,.82); display: flex; align-items: center; justify-content: center; padding: 20px;
}
.ex-lb[hidden] { display: none; }
.ex-lb-close {
    position: absolute; top: 16px; right: 20px;
    background: none; border: none; color: #fff; font-size: 28px; cursor: pointer; z-index: 3;
}
.ex-lb-body { width: 100%; max-width: 520px; }
.ex-lb-card { background: var(--surface); border-radius: 16px; overflow: hidden; }
.ex-lb-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.ex-lb-user b { display: block; font-size: 14px; }
.ex-lb-user b a { color: var(--text); }
.ex-lb-user span { font-size: 12px; color: var(--text-3); }
.ex-lb-media img { width: 100%; max-height: 60vh; object-fit: contain; background: var(--surface-2, #141b2d); }
.ex-lb-media video { width: 100%; max-height: 60vh; background: var(--surface-2, #141b2d); }
.ex-lb-meta { display: flex; gap: 18px; padding: 12px 16px 4px; color: var(--text); }
.ex-lb-meta span { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.ex-lb-caption { padding: 4px 16px 16px; font-size: 14px; color: var(--text-2); }
.ex-lb-caption b { color: var(--text); }

/* ---------- Loopz (Instagram Reels — vertical scroll) ---------- */
.loopz-wrap { height: calc(100vh - 62px); display: flex; flex-direction: column; max-width: 1200px; margin: 0 auto; width: 100%; }
.loopz-top { display: flex; align-items: center; gap: 18px; padding: 8px 4px 12px; flex: 0 0 auto; }
.loopz-brand {
    font-size: 26px; font-weight: 900; font-style: italic; letter-spacing: .5px; color: var(--text);
    background: linear-gradient(135deg, #8b5cf6, #22d3ee, #fb7185);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.loopz-tab { font-size: 15px; font-weight: 600; color: var(--text-3); cursor: pointer; padding-bottom: 4px; }
.loopz-tab.active { color: var(--text); border-bottom: 3px solid var(--accent); }

/* Vertical snap container */
.loopz-scroll {
    position: relative; flex: 1; overflow-y: scroll; overflow-x: hidden;
    scroll-snap-type: y mandatory; scroll-snap-stop: always; scrollbar-width: none; -ms-overflow-style: none; background: var(--bg);
    border-radius: 16px;
}
.loopz-scroll::-webkit-scrollbar { display: none; }

/* Each reel = one IG-style vertical 9:16 frame (like IG desktop: centered reel).
   Height-driven: width derives from height via aspect-ratio; capped at 100% on narrow screens.
   NO black bars: media fills the frame via a blurred zoomed copy behind the full (contained) image/video. */
.loopz-slide {
    position: relative; height: 100%; min-height: 420px; width: auto;
    aspect-ratio: 9 / 16; max-width: 100%; margin: 0 auto;
    scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: var(--bg); display: flex;
    align-items: center; justify-content: center; border-radius: 10px;
}
.loopz-media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); }
/* blurred zoomed backdrop = same media, cover + blur, fills frame so nothing is ever black */
.loopz-blur, .loopz-video-bg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    object-fit: cover;
    filter: blur(34px) brightness(.92) saturate(1.1);
    transform: scale(1.25);
    pointer-events: none; z-index: 0;
}
/* foreground media: full image/video visible, centered, NO crop.
   absolute inset:0 (same as .loopz-frame) — guarantees exact fill; relative+flex breaks in RTL */
.loopz-frame { position: absolute; inset: 0; background-size: contain; background-repeat: no-repeat; background-position: center; z-index: 1; }
.loopz-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; z-index: 1; }
/* press-and-hold on the left half → 2x speed badge (TikTok/Shorts style) */
.loopz-slide.speed2x .loopz-media::after {
    content: '2×'; position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.55); color: #fff; font-size: 28px; font-weight: 800;
    padding: 8px 16px; border-radius: 12px; z-index: 6; pointer-events: none;
    backdrop-filter: blur(4px); letter-spacing: 1px;
}
.loopz-scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 30%, transparent 60%, rgba(0,0,0,.25)); pointer-events: none; }
.loopz-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; padding: 20px; text-align: center; }
.loopz-empty-feed { color: #fff; text-align: center; padding: 40px 20px; font-size: 15px; }

/* Per-slide progress bar */
.loopz-progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 6; background: rgba(255,255,255,.18); }
.loopz-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 3s linear; }

.loopz-rail {
    position: absolute; right: 12px; bottom: 88px; z-index: 5;
    display: flex; flex-direction: column; gap: 22px; align-items: center;
}
.loopz-action {
    background: none; border: none; color: #fff; cursor: pointer; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 700; font-size: 12px;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.loopz-action:hover { transform: scale(1.08); }
.loopz-action.on .rz-ic { fill: #fb3958; stroke: #fb3958; }
.loopz-action.rz-save.on .rz-ic { fill: #ffd500; stroke: #ffd500; }
.loopz-action.rz-repost.on .rz-ic { fill: #4ade80; stroke: #4ade80; }
/* play/pause indicator when media is paused (tap media to toggle) */
.loopz-media { cursor: pointer; }
.loopz-slide.is-paused .loopz-media::after {
    content: '';
    position: absolute; inset: 0; z-index: 4;
    background: rgba(0,0,0,.35);
    display: flex; align-items: center; justify-content: center;
}
.loopz-slide.is-paused .loopz-media::before {
    content: '▶';
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    z-index: 5; color: #fff; font-size: 56px; line-height: 1;
    text-shadow: 0 2px 12px rgba(0,0,0,.6); pointer-events: none;
}
.loopz-slide.is-paused .loopz-progress i { width: 0 !important; transition: none; }
.rz-ic { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.loopz-info {
    position: absolute; left: 16px; right: 76px; bottom: 88px; z-index: 5; color: #fff;
    display: flex; flex-direction: column; gap: 10px; max-width: 78%;
}
.loopz-user { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.rz-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); background: #333; }
.loopz-username { font-weight: 800; font-size: 15px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.rz-follow {
    background: var(--accent); color: #fff; border: none; padding: 6px 16px; border-radius: 8px;
    font-weight: 700; cursor: pointer; font-size: 13px; margin-right: 6px;
}
.rz-follow.on-follow { background: #333; color: #fff; }
.loopz-caption { font-size: 14px; line-height: 1.45; text-shadow: 0 1px 2px rgba(0,0,0,.7); margin: 0; color: #fff; }
.loopz-song { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #e5e7eb; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.loopz-song .rz-ic { width: 16px; height: 16px; stroke: #e5e7eb; }

.loopz-loader { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.loopz-side { padding: 18px 0 40px; }

/* ---------- Settings ---------- */
.settings-wrap { max-width: 720px; margin: 0 auto; }
.settings-wrap h1 { font-size: 26px; }
.settings-sub { color: var(--text-3); margin: 4px 0 22px; font-size: 14px; }
.settings-grid { display: flex; flex-direction: column; gap: 18px; }
.settings-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.settings-card h2 { font-size: 16px; margin-bottom: 18px; }
.settings-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.form-group input, .form-group textarea {
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 10px 13px; font-size: 14px; color: var(--text); width: 100%;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); outline: none; }
.form-group input.disabled { opacity: .55; }
.theme-options, .lang-options { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-option, .lang-option {
    display: flex; align-items: center; gap: 8px; padding: 10px 14px;
    border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius);
    color: var(--text); font-weight: 600; cursor: pointer; transition: all .15s;
}
.theme-option:hover, .lang-option:hover { border-color: var(--accent); }
.theme-option.active, .lang-option.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); }
.theme-swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); display: inline-block; }
.theme-swatch.dark { background: #0b0f1a; }
.theme-swatch.light { background: #f7f8fb; }
.theme-swatch.system { background: linear-gradient(135deg, #0b0f1a 50%, #f7f8fb 50%); }
.settings-form .btn { align-self: flex-start; }

/* ---------- Dashboard ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; text-align: center; }
.stat-card b { display: block; font-size: 30px; color: var(--accent); }
.stat-card span { color: var(--text-3); font-size: 13px; }
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: right; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--text-3); font-weight: 600; font-size: 12px; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tab-btn { background: var(--surface-2); border: 1px solid var(--line); padding: 9px 18px; border-radius: 10px; font-weight: 700; color: var(--text-2); }
.tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Auth ---------- */
.auth-wrap { max-width: 420px; margin: 40px auto; }
.auth-card { padding: 30px; }
.auth-brand { text-align: center; margin-bottom: 20px; }
.auth-brand .brand-logo { width: 52px; height: 52px; margin: 0 auto 10px; }
.auth-brand h1 { font-size: 22px; }
.auth-brand p { color: var(--text-3); font-size: 14px; }
.auth-card .field { margin-bottom: 14px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin: 6px 0 14px; }
.check input { width: auto; }
.auth-alt { text-align: center; font-size: 13px; color: var(--text-3); margin-top: 14px; }

/* ---------- extras ---------- */
.page-title { font-size: 26px; margin-bottom: 18px; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty-state h1 { font-size: 40px; }
.empty-state .btn { margin-top: 16px; }
.page-card { max-width: 100%; }
.feed-loader { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: var(--text-3); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--text-3); }
.feed-load-more { text-align: center; padding: 20px; }
.feed-load-more[hidden] { display: none; }
.more-link { color: var(--accent); font-weight: 700; font-size: 14px; }

.theme-toggle {
    position: fixed; bottom: 22px; left: 22px;
    background: var(--surface-2); border: 1px solid var(--line);
    width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    z-index: 50; box-shadow: var(--shadow);
}
.theme-toggle svg { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }

.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--text); color: var(--bg);
    padding: 12px 20px; border-radius: 10px; font-weight: 700; font-size: 14px;
    opacity: 0; pointer-events: none; transition: all .25s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .app { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .mobile-top { display: flex; align-items: center; gap: 14px; padding: calc(12px + env(safe-area-inset-top)) 16px calc(12px + env(safe-area-inset-top)); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; background: var(--bg); }
    .mobile-top .brand { font-size: 17px; }
    .mobile-nav { margin-inline-start: auto; display: flex; gap: 14px; font-size: 14px; font-weight: 700; white-space: nowrap; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
    .mobile-nav::-webkit-scrollbar { display: none; }
    .main { padding: 18px 14px 80px; }
    .home-layout { grid-template-columns: 1fr; }
    .side-col { display: none; }
    /* theme toggle floats above the bottom nav on mobile */
    .theme-toggle { bottom: calc(84px + env(safe-area-inset-bottom)); left: 14px; width: 42px; height: 42px; }
    .product-layout { grid-template-columns: 1fr; }
    .dash-cols { grid-template-columns: 1fr; }
    .carousel-dots { display: none; }
}
/* Phones: the bottom tab bar covers navigation — hide the top link row, keep brand + quick create */
@media (max-width: 700px) {
    .mobile-nav { display: none; }
    .mobile-create { display: inline-flex; margin-inline-start: auto; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: #fff; }
    .mobile-create svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .mobile-create:active { transform: scale(.94); }
}
/* small screens: use dynamic viewport height so PWA/browser bars never cut full-height views */
@supports (height: 100dvh) {
    .loopz-wrap { height: calc(100dvh - 62px); }
    .ig-wrap { height: calc(100dvh - 100px); }
}
    .product-layout { grid-template-columns: 1fr; }
    .dash-cols { grid-template-columns: 1fr; }
    .carousel-dots { display: none; }

/* ---------- Create: category picker & smart suggest ---------- */
.cat-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.cat-picker .cat-chip {
    border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
    border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600;
    cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 4px;
    transition: border .15s, background .15s, color .15s;
}
.cat-picker input { position: absolute; opacity: 0; pointer-events: none; }
.cat-picker input:checked + span { color: var(--accent); }
.cat-picker .cat-chip:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.cat-suggest { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; padding: 8px 12px; border: 1px dashed var(--accent); border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.cat-suggest[hidden] { display: none; }
.cat-suggest-btn { border: none; background: var(--accent); color: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.cat-suggest-txt { font-size: 13px; color: var(--accent); font-weight: 600; }

/* ---------- Messages (Instagram-style DM) ---------- */
.ig-wrap { display: flex; height: calc(100vh - 120px); min-height: 460px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.ig-side { width: 350px; min-width: 300px; display: flex; flex-direction: column; border-inline-end: 1px solid var(--line); background: var(--surface); }
.ig-side-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.ig-title { font-size: 18px; font-weight: 700; }
.ig-new-btn { border: none; background: transparent; color: var(--text); cursor: pointer; display: inline-flex; padding: 4px; border-radius: 50%; }
.ig-new-btn:hover { color: var(--accent); }
.ig-search { position: relative; margin: 0 14px 8px; }
.ig-search svg { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: var(--text-2); }
.ig-search-input { width: 100%; padding: 8px 12px 8px 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); font-size: 13px; }
.ig-search-input::placeholder { color: var(--text-2); }
.ig-search-results { position: absolute; top: calc(100% + 6px); inline-start: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.18); z-index: 60; overflow: hidden; }
.ig-search-results[hidden] { display: none; }
.ig-sr-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.ig-sr-user:hover { background: var(--line); }
.ig-sr-user b { display: block; font-size: 13px; }
.ig-sr-user span { font-size: 12px; color: var(--text-2); }
.ig-search-none { padding: 14px; font-size: 13px; color: var(--text-2); text-align: center; }
.ig-conv-list { flex: 1; overflow-y: auto; }
.ig-conv { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; }
.ig-conv:hover { background: var(--line); }
.ig-conv.active { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.ig-av { width: 46px; height: 46px; min-width: 46px; border-radius: 50%; background-size: cover; background-position: center; background-color: var(--line); }
.ig-conv-main { flex: 1; min-width: 0; }
.ig-conv-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-conv-last { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-conv-last.has-unread { color: var(--text); font-weight: 600; }
.ig-conv-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ig-conv-time { font-size: 11px; color: var(--text-2); }
.ig-badge { background: var(--accent); color: #fff; border-radius: 999px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.ig-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--text-2); text-align: center; padding: 30px 18px; }
.ig-empty p { margin: 0; font-size: 14px; }
.ig-empty svg { opacity: .5; }

.ig-main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.ig-thread { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ig-thread[hidden] { display: none; }
.ig-thread-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ig-back { display: none; border: none; background: transparent; color: var(--text); font-size: 28px; cursor: pointer; line-height: 1; }
.ig-thread-me { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.ig-ava-lg { width: 30px; height: 30px; border-radius: 50%; background-size: cover; background-position: center; background-color: var(--line); }
.ig-thread-me b { font-size: 14px; }
.ig-user { display: block; font-size: 12px; color: var(--text-2); }
.ig-thread-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.ig-day { align-self: center; font-size: 12px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; margin: 4px 0; }
.ig-row { display: flex; align-items: flex-end; gap: 8px; }
.ig-row.mine { flex-direction: row-reverse; }
.ig-row-ava { width: 28px; height: 28px; border-radius: 50%; background: var(--line); min-width: 28px; object-fit: cover; }
.ig-bubble { max-width: 62%; padding: 9px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); line-height: 1.4; }
.ig-row.mine .ig-bubble { background: var(--accent); border-color: var(--accent); color: #fff; border-end-end-radius: 4px; }
.ig-row:not(.mine) .ig-bubble { border-end-start-radius: 4px; }
.ig-bubble-text { font-size: 14px; word-wrap: break-word; }
.ig-bubble-time { display: block; font-size: 11px; opacity: .7; margin-top: 3px; text-align: end; }
.ig-seen { font-size: 11px; }
.ig-head-actions { display: flex; gap: 4px; margin-inline-start: auto; }
.ig-head-btn { background: none; border: none; color: var(--text-2); cursor: pointer; padding: 6px; border-radius: 8px; line-height: 0; }
.ig-head-btn:hover { background: var(--surface-2, rgba(128,128,128,.12)); color: var(--text); }
.ig-ctx { position: fixed; z-index: 90; min-width: 170px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 6px; }
.ig-ctx[hidden] { display: none; }
.ig-ctx-btn { display: block; width: 100%; text-align: start; padding: 9px 12px; border: none; background: none; color: var(--text); font-size: 14px; cursor: pointer; border-radius: 8px; }
.ig-ctx-btn:hover { background: var(--surface-2); }
.ig-ctx-btn.danger { color: #ef4444; }
.ig-bubble-img { line-height: 0; border-radius: 12px; overflow: hidden; }
.ig-dm-img { max-width: 240px; max-height: 300px; border-radius: 12px; display: block; cursor: zoom-in; }
.ig-expire-tag { display: inline-block; margin-top: 8px; font-size: 11px; opacity: .75; color: var(--warn, #f59e0b); }
.ig-keep-pro { display: inline-block; margin-inline-start: 8px; font-size: 11px; color: var(--accent); text-decoration: none; font-weight: 700; }
.ig-keep-pro:hover { text-decoration: underline; }
.ig-img-expired { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; padding: 10px 6px; }
.ig-removed { font-style: italic; opacity: .6; }
.ig-row { cursor: default; }
.ig-row[data-mine="1"] { position: relative; }
.ig-blocked-bar { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-2); font-size: 13px; }
.ig-blocked-bar[hidden] { display: none; }
.ig-blocked-action { border: none; background: var(--accent); color: #fff; padding: 8px 16px; border-radius: 20px; font-weight: 700; cursor: pointer; }
.ig-attach { display: inline-flex; align-items: center; color: var(--text-2); cursor: pointer; padding: 6px; line-height: 0; }
.ig-attach:hover { color: var(--accent); }
.ig-pro-flag { display: inline-flex; align-items: center; gap: 6px; color: var(--warn, #f59e0b); font-size: 12px; cursor: pointer; white-space: nowrap; padding: 6px 10px; border: 1px dashed var(--warn, #f59e0b); border-radius: 16px; }
.ig-pro-flag[hidden] { display: none; }
.ig-conv-muted .ig-conv-name { opacity: .65; }
.ig-mute-ic { font-size: 12px; }
.pro-mini { color: var(--warn, #f59e0b); font-size: 12px; }
.ig-warn-badge { display: inline-block; background: var(--warn, #f59e0b); color: #fff; border-radius: 999px; font-size: 10px; padding: 1px 6px; margin-inline-start: 6px; }
.pro-title-icon { color: var(--warn, #f59e0b); }
.pro-sub { font-size: 13px; opacity: .8; }
.pro-price { font-weight: 700; color: var(--warn, #f59e0b); font-size: 15px; margin: 8px 0; }
.pro-status { font-weight: 700; padding: 10px 14px; border-radius: 12px; }
.pro-status.pro-active { background: rgba(34,197,94,.12); color: #22c55e; }
.pro-note { font-size: 12px; opacity: .7; margin-top: 8px; }
.ig-compose { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.ig-compose input { flex: 1; padding: 10px 14px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--text); font-size: 14px; }
.ig-compose input:focus { outline: none; border-color: var(--accent); }
#igSendBtn { border: none; background: transparent; color: var(--accent); font-weight: 700; font-size: 14px; cursor: pointer; }
#igSendBtn[hidden] { display: none; }
.ig-main-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--text-2); text-align: center; flex: 1; }
.ig-main-empty[hidden] { display: none; }
.ig-paper { width: 64px; height: 64px; opacity: .4; }
.ig-badge-total { position: absolute; top: 4px; inset-inline-end: 4px; background: var(--accent); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; }
.pos-rel { position: relative; }
@media (max-width: 700px) {
    .ig-wrap { height: calc(100vh - 100px); }
    .ig-side { width: 100%; min-width: 0; border-inline-end: none; }
    .ig-main { display: none; }
    .ig-side-hidden .ig-main { display: flex; }
    .ig-main.ig-has-thread { display: flex; }
    .ig-back { display: inline-flex; }
    .ig-thread { min-height: 60vh; }
}
/* ---------- Mobile bottom tab bar ---------- */
.bottom-nav { display: none; }
@media (max-width: 900px) {
    .bottom-nav {
        display: flex;
        position: fixed; inset-inline: 0; bottom: 0; z-index: 50;
        background: var(--bg); border-top: 1px solid var(--line);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        backdrop-filter: blur(12px);
    }
    .bn-item {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
        gap: 3px; padding: 6px 0 4px; color: var(--text-3); text-decoration: none;
        font-size: 10px; font-weight: 700; min-height: 52px; border-radius: 10px;
        -webkit-tap-highlight-color: transparent;
    }
    .bn-item .bn-ic { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; }
    .bn-item .bn-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .bn-item.active { color: var(--accent); }
    .bn-item.active .bn-ic svg { fill: var(--accent); stroke: var(--accent); stroke-width: 2; }
    .bn-item:active { transform: scale(.92); }
    .bn-badge { top: 0; inset-inline-end: 8px; }
    .main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* ---------- Notifications ---------- */
.ig-side-notif { max-width: 640px; margin: 0 auto; padding: 12px; }
.notif-filter-bar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.notif-filter-btn { padding: 7px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; }
.notif-filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.notif-list { display: flex; flex-direction: column; }
.notif-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; text-decoration: none; color: var(--text); }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.notif-icon { color: var(--accent); flex: 0 0 22px; display: flex; }
.notif-avatar { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; }
.notif-avatar img { width: 100%; height: 100%; object-fit: cover; }
.notif-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.notif-text { font-size: 14px; color: var(--text); line-height: 1.35; }
.notif-text b { font-weight: 700; }
.notif-time { font-size: 12px; color: var(--muted); }
.notif-side { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 8px; overflow: hidden; }
.notif-thumb { width: 100%; height: 100%; object-fit: cover; }
.notif-thumb-ph { display: block; width: 100%; height: 100%; background: var(--surface-2); }
.notif-requests { margin-bottom: 16px; }
.notif-section-title { font-size: 14px; font-weight: 700; margin: 16px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.notif-request { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 8px; }
.notif-req-meta { flex: 1; display: flex; flex-direction: column; }
.notif-req-actions { display: flex; gap: 8px; }
.notif-badge { top: 4px; inset-inline-end: 4px; }

/* ---------- Private account ---------- */
.tt-name-row { display: inline-flex; align-items: center; gap: 6px; }
.tt-priv-badge { display: inline-flex; align-items: center; color: var(--muted); }
.tt-locked { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 48px 20px; color: var(--muted); text-align: center; }
.tt-locked svg { color: var(--muted); }
.settings-toggle { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.settings-toggle input { display: none; }
.toggle-ui { width: 48px; height: 28px; border-radius: 20px; background: var(--line); position: relative; flex: 0 0 48px; transition: background .2s; }
.toggle-ui::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.settings-toggle input:checked + .toggle-ui { background: var(--accent); }
.settings-toggle input:checked + .toggle-ui::after { transform: translateX(21px); }
[dir="rtl"] .settings-toggle input:checked + .toggle-ui::after { transform: translateX(-21px); }
.toggle-label { display: flex; flex-direction: column; gap: 2px; }
.toggle-label b { font-size: 14px; }
.toggle-label small { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ---------- Marketplace: My Listings view switch ---------- */
.mp-view-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mp-view-btn { padding: 7px 14px; font-size: 13px; font-weight: 600; border: none; background: transparent; color: var(--muted); cursor: pointer; }
.mp-view-btn.active { background: var(--surface-2); color: var(--text); }
.mp-mine { margin-bottom: 12px; }
.mp-mine-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.mp-mine-tabs .tab-btn { padding: 6px 14px; border-radius: 20px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 600; }
.mp-mine-tabs .tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.mp-grid .mp-card { cursor: pointer; }

/* ---------- Activity Feed (Twitter/X style) ---------- */
.activity-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.activity-item:last-child {
    border-bottom: none;
}
.activity-item .avatar-sm {
    flex-shrink: 0;
    margin-top: 2px;
}
.activity-content {
    flex: 1;
    min-width: 0;
}
.activity-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.activity-header a {
    color: var(--text);
    font-weight: 700;
    font-size: 14px;
}
.activity-header .muted {
    font-size: 12px;
    color: var(--text-3);
}
.activity-text {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.5;
}
.activity-text a {
    color: var(--text);
    font-weight: 700;
}
.activity-text .muted {
    color: var(--text-3);
    font-style: italic;
}
.activity-media {
    margin-top: 8px;
    display: block;
    border-radius: 10px;
    overflow: hidden;
    max-width: 280px;
}
.activity-media img,
.activity-media video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    background: var(--surface-2, #141b2d);
}

/* Activity feed — Twitter-style single vertical column (page scrolls down/up) */
.tt-grid.tt-activity {
    display: block;
    margin-top: 14px;
}
.tt-activity-row {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}
.tt-activity-row .activity-item {
    flex: none;
    width: 100%;
    max-width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 14px 2px;
}
.tt-activity-row .activity-header {
    flex-wrap: nowrap;
    overflow: hidden;
}
.tt-activity-row .activity-media {
    max-width: 100%;
    margin-top: 10px;
}
.tt-activity-row .activity-media img,
.tt-activity-row .activity-media video {
    max-height: 200px;
    width: 100%;
    object-fit: cover;
}

/* ===== Creator Studio (TikTok-style) ===== */
.studio-wrap { max-width: 820px; margin: 0 auto; padding: 20px 16px 40px; }
.studio-title { font-size: 24px; margin: 0 0 2px; display: inline-flex; align-items: center; gap: 8px; }
.studio-sub { color: var(--muted); margin: 0 0 18px; font-size: 13px; }
.studio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.studio-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.sc-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.sc-value { font-size: 24px; font-weight: 800; }
.sc-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.studio-card-balance { border-color: var(--accent); }
.studio-card-balance .sc-value { color: var(--accent); }
.studio-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.st-block { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.st-head { font-weight: 700; margin-bottom: 8px; font-size: 14px; }
.st-ok { color: #22c55e; font-weight: 700; }
.st-wait { color: var(--warn, #f59e0b); font-weight: 700; }
.st-no { color: #ef4444; font-weight: 700; }
.st-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.verified-badge { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; margin-inline-start: 6px; }
.vb-badge { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #1d9bf0; color: #fff; margin-inline-start: 6px; flex-shrink: 0; vertical-align: middle; }
.vb-badge svg { display: block; }
.studio-chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 20px; }
.st-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 10px; }
.st-bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.st-bar { width: 100%; max-width: 26px; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.st-bar-v { font-size: 10px; color: var(--muted); margin-top: 4px; }
.st-bar-d { font-size: 9px; color: var(--muted); }
.st-empty { color: var(--muted); font-size: 13px; padding: 12px 0; }
.studio-videos .sv-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); color: inherit; }
.sv-thumb { width: 56px; height: 56px; border-radius: 10px; background: var(--surface-3); overflow: hidden; flex-shrink: 0; }
.sv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sv-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.sv-info { flex: 1; min-width: 0; }
.sv-cap { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-meta { display: flex; gap: 12px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.sv-m em { font-style: normal; }

/* ---- Admin panel ---- */
.admin-wrap { max-width: 760px; margin: 0 auto; padding: 20px 16px; }
.admin-head { margin-bottom: 16px; }
.admin-title { font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-tab { background: var(--surface); border: 1px solid var(--line); color: var(--text); padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.admin-tab.active { background: var(--accent, #22d3ee); color: #06121a; border-color: var(--accent, #22d3ee); }
.at-badge { background: rgba(128,128,128,.22); border-radius: 999px; padding: 0 7px; font-size: 11px; line-height: 17px; }
.admin-tab:not(.active) .at-badge { background: var(--accent, #22d3ee); color: #06121a; }
.admin-pane { display: none; }
.admin-pane.active { display: block; }
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.ad-row { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.ad-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent, #22d3ee); color: #06121a; display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.ad-body { flex: 1; min-width: 0; font-size: 14px; }
.ad-note { color: var(--muted); font-size: 12px; margin-top: 4px; white-space: pre-wrap; }
.ad-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.admin-settings { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.admin-settings label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.admin-settings input[type="number"], .admin-settings input[type="text"] { background: var(--bg-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.admin-settings label.chk { flex-direction: row; align-items: center; gap: 8px; }

/* ---------- Admin panel v2 — full-site control ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat-card.rev b { color: var(--success); }
.stat-card.warn b { color: #f59e0b; }
.stat-card.ok b { color: var(--success); }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-col-title { font-size: 14px; margin: 0 0 8px; color: var(--text-2); }
.admin-toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.admin-toolbar .input { flex: 1; min-width: 180px; }
.admin-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.admin-row-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.admin-row-meta b { font-size: 14px; color: var(--text); }
.admin-row-meta a { color: var(--text); text-decoration: none; }
.admin-row-meta a:hover { color: var(--accent); }
.admin-row-meta span { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.admin-row-meta .muted { font-size: 12px; }
.admin-row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.admin-empty { color: var(--text-3); text-align: center; padding: 24px; font-size: 13.5px; }
.admin-badge { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.admin-badge.role { background: rgba(34, 211, 238, .15); color: var(--accent); }
.admin-badge.warn { background: rgba(245, 158, 11, .15); color: #f59e0b; }
.admin-badge.ok { background: rgba(34, 197, 94, .15); color: var(--success); }
.admin-badge.pro { background: rgba(168, 85, 247, .18); color: #a855f7; }
.btn-xs { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn-xs.danger { color: var(--danger); border-color: var(--danger); }
.btn-xs.danger:hover { background: rgba(239, 68, 68, .12); }
.btn-xs.ok { color: var(--success); border-color: var(--success); }
.btn-xs.ok:hover { background: rgba(34, 197, 94, .12); }
/* Engagement deep-search rows */
.eng-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.eng-ic { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.eng-ic.like { background: rgba(244, 63, 94, .14); color: #f43f5e; }
.eng-ic.comment { background: rgba(34, 211, 238, .14); color: var(--accent); }
.eng-ic.repost { background: rgba(34, 197, 94, .14); color: var(--success); }
.eng-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.eng-mid b { font-size: 13.5px; color: var(--text); }
.eng-mid b a { color: var(--text); text-decoration: none; }
.eng-mid b a:hover { color: var(--accent); }
.eng-body { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.eng-body .eng-quote { font-style: italic; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.eng-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-3); flex-shrink: 0; border: 1px solid var(--line); }
.eng-time { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.eng-counts { display: flex; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.eng-count { font-size: 12.5px; font-weight: 700; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; display: inline-flex; align-items: center; gap: 6px; }
.eng-count i { font-style: normal; }
.eng-count.like i { color: #f43f5e; }
.eng-count.comment i { color: var(--accent); }
.eng-count.repost i { color: var(--success); }
@media (max-width: 640px) {
    .eng-row { flex-wrap: wrap; }
    .eng-row .admin-row-actions { width: 100%; justify-content: flex-start; }
    .admin-cols { grid-template-columns: 1fr; }
    .admin-row { flex-wrap: wrap; }
    .admin-row-actions { width: 100%; justify-content: flex-start; }
}

/* ---------- Sounds page (TikTok-style) ---------- */
.sounds-page { max-width: 640px; }
.sounds-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.sounds-tab { flex: 1; padding: 9px 0; border-radius: 999px; border: 1px solid var(--line, #2a3352); background: transparent; color: var(--text-2, #93a0c3); font-weight: 600; cursor: pointer; }
.sounds-tab.on { background: var(--accent, #06b6d4); color: #fff; border-color: transparent; }
.sounds-list { display: flex; flex-direction: column; gap: 10px; }
.sound-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: var(--surface-2, #141b2d); border: 1px solid var(--line, #232c47); }
.sound-row.focus { outline: 2px solid var(--accent, #06b6d4); }
.sound-cover-wrap { position: relative; flex: none; }
.sound-cover { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; display: block; background: #000; }
.sound-cover-ico { display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; background: linear-gradient(135deg, #8b5cf6, #06b6d4); }
.sound-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.45); border: 0; border-radius: 10px; cursor: pointer; color: #fff; }
.sound-play .sp-ic { width: 20px; height: 20px; fill: currentColor; }
.sound-info { flex: 1; min-width: 0; }
.sound-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sound-meta { font-size: 12px; color: var(--text-3, #718096); margin-top: 3px; }
.sound-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.sound-use { border: 0; border-radius: 999px; padding: 7px 14px; background: var(--accent, #06b6d4); color: #fff; font-weight: 700; font-size: 12px; cursor: pointer; }
.sound-save { background: transparent; border: 0; cursor: pointer; color: var(--text-2, #93a0c3); padding: 6px; }
.sound-save .ss-ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sound-save.on { color: var(--accent, #06b6d4); }
.sound-save.on .ss-ic { fill: currentColor; }
.sounds-more { display: block; margin: 16px auto 0; }
.sounds-empty { padding: 40px 0; text-align: center; }

/* ---------- Sound chip on posts (feed / post page / composer) ---------- */
.post-sound { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line, #2a3352); background: var(--surface-2, #141b2d); color: var(--text-2, #93a0c3); font-size: 12.5px; cursor: pointer; text-decoration: none; max-width: 100%; }
.post-sound .ps-ic { width: 14px; height: 14px; fill: currentColor; flex: none; }
.post-sound .ps-title { font-weight: 600; color: var(--text-1, #e8edf7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-sound:hover { border-color: var(--accent, #06b6d4); color: var(--accent, #06b6d4); }
.qc-sound { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px dashed var(--accent, #06b6d4); background: rgba(6,182,212,.08); color: var(--accent, #06b6d4); font-size: 12px; cursor: pointer; }
.qc-sound:hover { background: rgba(6,182,212,.16); }

/* ---------- Sound picker modal (composer) ---------- */
.sound-modal { position: fixed; inset: 0; z-index: 90; background: rgba(4,8,20,.7); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sound-modal-inner { width: 100%; max-width: 420px; max-height: 75vh; display: flex; flex-direction: column; background: var(--surface, #0f1526); border: 1px solid var(--line, #232c47); border-radius: 16px; overflow: hidden; }
.sound-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line, #232c47); font-weight: 700; }
.sound-modal-close { background: transparent; border: 0; color: var(--text-2, #93a0c3); font-size: 20px; cursor: pointer; }
.sound-modal-list { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.sound-modal-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; }
.sound-modal-row:hover { background: var(--surface-2, #141b2d); }
.sound-modal-row.selected { background: rgba(6,182,212,.12); }
.sound-modal-row .sm-cover { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: #000; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; }
.sound-modal-row .sm-info { flex: 1; min-width: 0; }
.sound-modal-row .sm-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sound-modal-row .sm-meta { font-size: 11.5px; color: var(--text-3, #718096); }

/* ---------- Post target selector (profile / group) ---------- */
.qc-target { position: relative; display: inline-block; margin: 0 0 2px 0; padding: 0 14px; }
.qc-target-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line, #2a3352); background: var(--surface-2, #141b2d); color: var(--text-2, #93a0c3); font-size: 12.5px; cursor: pointer; }
.qc-target-btn:hover { border-color: var(--accent, #06b6d4); color: var(--accent, #06b6d4); }
.qc-target-btn .qc-ic { width: 14px; height: 14px; fill: currentColor; }
.qc-target-btn .qc-caret { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.qc-target-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 210px; max-width: min(280px, calc(100vw - 32px)); background: var(--surface, #0f1526); border: 1px solid var(--line, #232c47); border-radius: 12px; padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 2px; }
.qc-target-menu[hidden] { display: none; }
.qc-target-opt { text-align: start; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-1, #e8edf7); font-size: 13px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qc-target-opt:hover { background: var(--surface-2, #141b2d); }
/* group feed full posts */
.g-post-full { border-bottom: 1px solid var(--line, #232c47); padding: 12px 14px; }
.g-post-full video, .g-post-full img { max-width: 100%; border-radius: 10px; display: block; margin-top: 8px; max-height: 460px; }
.g-post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 8px; }
.g-post-grid img, .g-post-grid video { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; }
.g-post-actions { display: flex; gap: 14px; margin-top: 8px; }
.g-post-actions .action-btn { background: transparent; border: 0; color: var(--text-2, #93a0c3); font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.g-post-actions .action-btn.liked { color: #f43f5e; }


/* ===== content categories (signup/settings chips) ===== */
.cat-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip { position: relative; cursor: pointer; }
.cat-chip input { position: absolute; opacity: 0; pointer-events: none; }
.cat-chip-box { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: var(--surface-2, #1c2538); border: 1.5px solid var(--line, #2a3550); color: var(--text-2, #93a0c3);
  font-size: 12.5px; font-weight: 600; transition: all .15s ease; user-select: none; }
.cat-chip input:checked + .cat-chip-box { background: color-mix(in srgb, var(--accent, #06b6d4) 18%, transparent);
  border-color: var(--accent, #06b6d4); color: var(--accent, #06b6d4); }
.cat-chip input:focus-visible + .cat-chip-box { outline: 2px solid var(--accent, #06b6d4); outline-offset: 2px; }
.req-star { color: #f43f5e; font-style: normal; }
.opt-hint { color: var(--text-2, #93a0c3); font-style: normal; font-weight: 400; font-size: 11px; }

/* ===== post category chip (feed cards) ===== */
.feed-cat-chip { margin: -2px 0 8px; }
.feed-cat-chip span { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: color-mix(in srgb, var(--accent, #06b6d4) 14%, transparent); color: var(--accent, #06b6d4); }

/* ===== profile: score / spam warn / ban badge / location ===== */
.tt-loc { margin: 4px 0 0; font-size: 12.5px; color: var(--text-2, #93a0c3); }
.tt-score-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tt-score, .tt-spamwarn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; background: color-mix(in srgb, var(--accent, #06b6d4) 14%, transparent); color: var(--accent, #06b6d4); }
.tt-spamwarn { background: color-mix(in srgb, #f59e0b 16%, transparent); color: #f59e0b; }
.tt-banbadge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11px;
  font-weight: 700; background: color-mix(in srgb, #f43f5e 16%, transparent); color: #f43f5e; }
.tt-ban-btn { border-color: color-mix(in srgb, #f43f5e 40%, transparent) !important; color: #f43f5e !important; }

/* ===== admin panel: category select row ===== */
.admin-cat-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.admin-cat-select { padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line, #2a3550);
  background: var(--surface-2, #1c2538); color: var(--text, #eef2ff); font-size: 12px; max-width: 170px; }
.admin-badge.role { background: color-mix(in srgb, var(--accent, #06b6d4) 16%, transparent); color: var(--accent, #06b6d4); }

/* ===== ban modal ===== */
.modal-body { padding: 14px; display: grid; gap: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line, #2a3550); }
.btn-danger { background: #f43f5e; border-color: #f43f5e; color: #fff; }
.btn-danger:hover { background: #e11d48; border-color: #e11d48; }
