:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --ink: #172033;
    --muted: #647087;
    --line: #dfe5ef;
    --brand: #0f8f7a;
    --brand-dark: #0a6e60;
    --accent: #efb443;
    --danger: #b8334a;
    --warning: #a86d12;
    --shadow: 0 14px 35px rgba(23, 32, 51, .08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
}
a { color: inherit; text-decoration: none; }
input, textarea, select, button {
    font: inherit;
}

.topbar {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px clamp(18px, 4vw, 48px);
    background: #111827;
    color: white;
    border-bottom: 4px solid var(--brand);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--brand);
    font-weight: 800;
}
.brand small { display: block; color: #aeb9cc; margin-top: 2px; }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.nav a { color: #eef3fb; padding: 8px 10px; border-radius: 8px; }
.nav a:hover { background: rgba(255,255,255,.09); }

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto;
}
.hero {
    min-height: 210px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(24px, 5vw, 44px);
    margin-bottom: 22px;
    color: white;
    border-radius: 8px;
    background:
        linear-gradient(105deg, rgba(17,24,39,.94), rgba(15,143,122,.82)),
        url("https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?auto=format&fit=crop&w=1600&q=80") center/cover;
    box-shadow: var(--shadow);
}
.hero h1 { font-size: clamp(32px, 5vw, 56px); margin: 0 0 8px; letter-spacing: 0; }
.hero p { max-width: 680px; color: #dbe7ef; font-size: 18px; margin: 0; }

.grid.two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr); gap: 22px; align-items: start; }
.panel, .auth-card, .post {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.panel { padding: 22px; margin-bottom: 22px; }
.panel.narrow, .auth-card { max-width: 720px; margin: 0 auto 22px; }
.auth-card { padding: 28px; }
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
h1, h2 { margin: 0 0 8px; letter-spacing: 0; }
p { line-height: 1.6; }
.muted, small, .section-title span, .stats { color: var(--muted); }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: white;
    cursor: pointer;
    font-weight: 700;
}
.button:hover { background: var(--brand-dark); }
.button.ghost {
    background: #eef3f7;
    color: var(--ink);
}
.button.ghost:hover { background: #dfe8f1; }

.category-list, .topic-list { display: grid; gap: 10px; }
.category-row, .topic-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}
.category-row:hover, .topic-row:hover { border-color: var(--brand); }
.category-row strong, .topic-row strong { display: block; margin-bottom: 4px; }
.compact .topic-row { padding: 12px; }
.stats { min-width: 105px; text-align: right; font-size: 13px; }

.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 7px; font-weight: 700; }
.form input, .form textarea, .form select, .searchbar input, td input, td select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: white;
    color: var(--ink);
}
textarea { resize: vertical; }
.searchbar { display: flex; gap: 10px; margin: 16px 0; }
.row-form { grid-template-columns: 1fr 1.4fr 100px auto auto; align-items: end; margin-bottom: 16px; }
.check { display: inline-flex !important; grid-template-columns: none !important; align-items: center; gap: 7px !important; font-weight: 600 !important; }
.check input { width: auto; }

.post {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    margin-bottom: 14px;
}
.post aside {
    border-right: 1px solid var(--line);
    padding-right: 16px;
}
.post aside small { display: block; margin-top: 6px; }
.post-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 12px;
}
.post-meta a { margin-left: 10px; color: var(--brand-dark); font-weight: 700; }
.post-body { white-space: normal; line-height: 1.7; }
.hidden-post { opacity: .62; border-style: dashed; }

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #e8f7f3;
    color: var(--brand-dark);
    border: 1px solid #bfe7df;
}
.alert.danger { background: #fdecef; color: var(--danger); border-color: #f4bdc7; }
.alert.warning { background: #fff7e3; color: var(--warning); border-color: #f2d99b; }
.badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef3f7;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 13px; text-transform: uppercase; }
.inline-actions { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.tabs a { padding: 9px 12px; border-radius: 8px; background: #eef3f7; font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdff; }
.stat-card strong { display: block; font-size: 34px; color: var(--brand-dark); }
.stat-card span { color: var(--muted); }
.breadcrumbs { color: var(--muted); margin-bottom: 14px; }

.setup { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.footer {
    width: min(1180px, calc(100% - 32px));
    margin: 10px auto 28px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 860px) {
    .topbar, .hero, .section-title, .footer { flex-direction: column; align-items: flex-start; }
    .grid.two, .stat-grid { grid-template-columns: 1fr; }
    .post { grid-template-columns: 1fr; }
    .post aside { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 12px; }
    .searchbar, .row-form { display: grid; grid-template-columns: 1fr; }
    .category-row, .topic-row { align-items: flex-start; }
}

/* Modern AdminCP upgrade */
.admin-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 28px;
    margin-bottom: 18px;
    border-radius: 8px;
    color: #f8fbff;
    background: linear-gradient(135deg, #111827 0%, #0f8f7a 58%, #efb443 140%);
    box-shadow: var(--shadow);
}
.admin-hero h1 { font-size: clamp(30px, 4vw, 48px); margin: 4px 0 8px; }
.admin-hero p { max-width: 720px; color: #d8e9ea; margin: 0; }
.eyebrow { color: #b7fff2; font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: 0; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .7fr); gap: 22px; align-items: start; }
.admin-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 22px; }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.module-card {
    display: grid;
    gap: 7px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}
.module-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.module-card strong { font-size: 16px; }
.module-card span { color: var(--muted); line-height: 1.45; }
.tone-green strong { color: #0f8f7a; }
.tone-blue strong { color: #2563eb; }
.tone-amber strong { color: #b7791f; }
.tone-red strong { color: #b8334a; }
.tone-violet strong { color: #7c3aed; }
.tone-slate strong { color: #334155; }
.rank-pill, .tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    color: white;
    background: var(--rank, #647087);
    font-size: 12px;
    font-weight: 800;
}
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tag { background: var(--tag, #0f8f7a); }
.admin-form-grid { grid-template-columns: 1.2fr .8fr 80px 140px auto auto; align-items: end; }
.permission-row { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.permission-row.small { margin-top: 8px; font-size: 12px; }
.mini-form { display: grid; gap: 7px; min-width: 190px; }
.split-top { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.reaction-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); }
.reaction-row form { display: inline-flex; gap: 7px; }
.reaction-button { border: 1px solid var(--line); background: #f8fbff; color: var(--ink); border-radius: 999px; padding: 6px 10px; cursor: pointer; font-weight: 800; }
.reaction-button:hover { border-color: var(--brand); color: var(--brand-dark); }
.bar-list { display: grid; gap: 12px; }
.bar-list div { display: grid; grid-template-columns: 120px 1fr 44px; gap: 10px; align-items: center; }
.bar-list b { display: block; height: 10px; min-width: 6px; border-radius: 999px; background: var(--brand); }
.bar-list strong { text-align: right; }
@media (prefers-color-scheme: dark) {
    :root { --bg: #0b1220; --panel: #111827; --ink: #e8eef8; --muted: #9aa8bd; --line: #273244; --shadow: 0 18px 45px rgba(0,0,0,.32); }
    .category-row, .topic-row, .stat-card, .module-card { background: #151e2d; }
    .form input, .form textarea, .form select, .searchbar input, td input, td select { background: #0f1726; color: var(--ink); }
    .button.ghost, .tabs a { background: #223047; color: #e8eef8; }
    .reaction-button { background: #151e2d; color: #e8eef8; }
}
@media (max-width: 980px) {
    .admin-layout, .admin-stats, .module-grid, .admin-form-grid { grid-template-columns: 1fr; }
    .admin-hero { flex-direction: column; align-items: flex-start; }
}

/* Full modern visual pass */
body {
    background:
        radial-gradient(circle at top left, rgba(15,143,122,.12), transparent 32rem),
        radial-gradient(circle at top right, rgba(239,180,67,.12), transparent 30rem),
        var(--bg);
}
.glassbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: rgba(17, 24, 39, .92);
}
.user-chip { display: inline-flex !important; align-items: center; gap: 8px; background: rgba(255,255,255,.08); }
.theme-switch select { min-height: 36px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; padding: 6px 9px; }
.theme-switch option { color: #111827; }
.glow-panel { border-color: rgba(15,143,122,.25); box-shadow: 0 18px 55px rgba(15,143,122,.13); }
.modern-post { grid-template-columns: 210px minmax(0, 1fr); padding: 0; overflow: hidden; }
.author-card { display: grid; align-content: start; justify-items: center; gap: 10px; padding: 22px 16px; background: linear-gradient(180deg, rgba(15,143,122,.10), rgba(255,255,255,0)); border-right: 1px solid var(--line); text-align: center; }
.avatar-bubble, .profile-avatar { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 18px; background: linear-gradient(135deg, var(--brand), var(--accent)); color: white; font-size: 30px; font-weight: 900; box-shadow: 0 14px 34px rgba(15,143,122,.24); overflow: hidden; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-name { font-size: 18px; font-weight: 900; }
.rank-rich { gap: 6px; box-shadow: 0 8px 22px color-mix(in srgb, var(--rank) 35%, transparent); }
.rank-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; background: rgba(255,255,255,.22); }
.muted-rank { background: #647087; }
.author-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.author-stats span { padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.5); color: var(--muted); font-size: 12px; }
.author-stats b { display: block; color: var(--ink); font-size: 16px; }
.post-content { padding: 22px; }
.rich-body { font-size: 16px; }
.signature { margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 13px; }
.post-tools { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.post-tools form { display: inline; }
.link-danger { border: 0; background: transparent; color: var(--danger); font: inherit; font-weight: 800; cursor: pointer; padding: 0; }
.reply-panel textarea { border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); }
.profile-hero { position: relative; overflow: hidden; padding: 0; }
.profile-cover { height: 220px; background: linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.52)), var(--cover) center/cover; }
.profile-main { display: flex; align-items: end; gap: 18px; padding: 0 24px 24px; margin-top: -44px; }
.profile-main h1 { font-size: clamp(32px, 5vw, 54px); margin-bottom: 8px; }
.profile-grid { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 22px; align-items: start; }
.profile-card { position: sticky; top: 100px; }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.profile-stats span { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdff; color: var(--muted); }
.profile-stats b { display: block; color: var(--brand-dark); font-size: 24px; }
.profile-edit { grid-template-columns: 1fr 1fr; }
.profile-edit label:nth-last-child(-n+3) { grid-column: 1 / -1; }
.staff-panel { border-color: rgba(239,180,67,.35); }
.admin-side, .mod-hero { border-color: rgba(239,180,67,.28); }
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"], html[data-theme="midnight"], html[data-theme="market"] { color-scheme: dark; }
html[data-theme="dark"] body, html[data-theme="midnight"] body, html[data-theme="market"] body { --bg: #0b1220; --panel: #111827; --ink: #e8eef8; --muted: #9aa8bd; --line: #273244; --shadow: 0 18px 45px rgba(0,0,0,.32); }
html[data-theme="midnight"] body { --brand: #7c3aed; --brand-dark: #a78bfa; --accent: #22d3ee; --danger: #fb7185; }
html[data-theme="market"] body { --brand: #12b981; --brand-dark: #34d399; --accent: #f59e0b; --danger: #ef4444; }
html[data-theme="dark"] .category-row, html[data-theme="dark"] .topic-row, html[data-theme="dark"] .stat-card, html[data-theme="dark"] .module-card,
html[data-theme="midnight"] .category-row, html[data-theme="midnight"] .topic-row, html[data-theme="midnight"] .stat-card, html[data-theme="midnight"] .module-card,
html[data-theme="market"] .category-row, html[data-theme="market"] .topic-row, html[data-theme="market"] .stat-card, html[data-theme="market"] .module-card { background: #151e2d; }
html[data-theme="dark"] .author-stats span, html[data-theme="dark"] .profile-stats span,
html[data-theme="midnight"] .author-stats span, html[data-theme="midnight"] .profile-stats span,
html[data-theme="market"] .author-stats span, html[data-theme="market"] .profile-stats span { background: #151e2d; }
@media (max-width: 860px) {
    .modern-post, .profile-grid, .profile-edit { grid-template-columns: 1fr; }
    .author-card { border-right: 0; border-bottom: 1px solid var(--line); }
    .profile-main { align-items: flex-start; flex-direction: column; }
    .profile-card { position: static; }
}

/* Polish pass: home, staff tools, profiles, themes */
.home-hero {
    min-height: 360px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    gap: 28px;
    align-items: end;
    padding: clamp(28px, 6vw, 58px);
    margin-bottom: 18px;
    border-radius: 8px;
    color: #fff;
    background:
        linear-gradient(115deg, rgba(8,13,24,.96), rgba(15,143,122,.78) 58%, rgba(239,180,67,.42)),
        url("https://images.unsplash.com/photo-1642790551116-18e150f248e5?auto=format&fit=crop&w=1800&q=80") center/cover;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.home-hero h1 { font-size: clamp(42px, 7vw, 78px); line-height: .96; margin: 8px 0 16px; }
.home-hero p { max-width: 720px; color: #dcecf0; font-size: 18px; }
.home-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.market-card { align-self: stretch; display: grid; align-content: end; gap: 12px; padding: 22px; border: 1px solid rgba(255,255,255,.22); border-radius: 8px; background: rgba(9,14,24,.42); backdrop-filter: blur(16px); }
.market-card span { color: #b7fff2; font-weight: 800; text-transform: uppercase; font-size: 12px; }
.market-card strong { font-size: 26px; line-height: 1.1; }
.pulse-bars { display: flex; align-items: end; gap: 8px; height: 72px; }
.pulse-bars i { width: 100%; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--accent), var(--brand)); }
.pulse-bars i:nth-child(1) { height: 35%; } .pulse-bars i:nth-child(2) { height: 70%; } .pulse-bars i:nth-child(3) { height: 48%; } .pulse-bars i:nth-child(4) { height: 90%; } .pulse-bars i:nth-child(5) { height: 58%; }
.home-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.home-stats div { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--panel) 88%, transparent); box-shadow: var(--shadow); }
.home-stats strong { display: block; font-size: 34px; color: var(--brand-dark); }
.home-stats span { color: var(--muted); font-weight: 700; }
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 22px; align-items: start; }
.home-main { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 22px; box-shadow: var(--shadow); }
.forum-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.forum-card { display: grid; grid-template-columns: 54px 1fr; gap: 4px 14px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, white), color-mix(in srgb, var(--panel) 88%, var(--brand) 6%)); }
.forum-card:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 14px 35px rgba(15,143,122,.12); }
.forum-icon { grid-row: 1 / 4; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--accent)); color: white; font-weight: 900; }
.forum-card strong { font-size: 18px; }
.forum-card p { margin: 0; color: var(--muted); font-size: 14px; }
.forum-card div { display: flex; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
.home-side { display: grid; gap: 22px; }
.hot-panel { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.staff-post-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding: 12px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 8px; background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.staff-post-actions form { margin: 0; }
.staff-label { font-size: 12px; font-weight: 900; color: var(--warning); text-transform: uppercase; }
.staff-action { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font-weight: 900; cursor: pointer; }
.staff-action.danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.profile-main { align-items: center; margin-top: 0; padding: 22px 24px 26px; background: linear-gradient(180deg, rgba(0,0,0,.20), transparent); }
.profile-avatar { flex: 0 0 96px; width: 96px; height: 96px; border-radius: 22px; border: 4px solid var(--panel); margin-top: -70px; position: relative; z-index: 1; }
.profile-main > div:last-child { min-width: 0; padding-top: 6px; }
.profile-main h1 { overflow-wrap: anywhere; }
.profile-cover { height: 250px; }
.profile-card p { overflow-wrap: anywhere; }
html[data-theme="terminal"] body { --bg: #050806; --panel: #0d150f; --ink: #d9ffe5; --muted: #7fba91; --line: #1c3d28; --brand: #22c55e; --brand-dark: #86efac; --accent: #a3e635; --danger: #fb7185; --shadow: 0 18px 45px rgba(0,0,0,.42); }
html[data-theme="royal"] body { --bg: #100b1f; --panel: #1a1230; --ink: #f4efff; --muted: #b8a8d9; --line: #32264f; --brand: #8b5cf6; --brand-dark: #c4b5fd; --accent: #f0abfc; --danger: #fb7185; --shadow: 0 18px 45px rgba(31,15,61,.36); }
html[data-theme="terminal"] .category-row, html[data-theme="terminal"] .topic-row, html[data-theme="terminal"] .stat-card, html[data-theme="terminal"] .module-card, html[data-theme="terminal"] .forum-card, html[data-theme="terminal"] .home-stats div,
html[data-theme="royal"] .category-row, html[data-theme="royal"] .topic-row, html[data-theme="royal"] .stat-card, html[data-theme="royal"] .module-card, html[data-theme="royal"] .forum-card, html[data-theme="royal"] .home-stats div { background: color-mix(in srgb, var(--panel) 92%, var(--brand) 6%); }
@media (max-width: 980px) { .home-hero, .home-layout { grid-template-columns: 1fr; } .market-card { min-height: 210px; } .forum-grid, .home-stats { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .profile-main { align-items: flex-start; } .profile-avatar { margin-top: -64px; } }

/* Rank, support, trading advanced modules */
.rank-pill.rank-rich {
    min-height: 30px;
    padding: 4px 10px 4px 5px;
    border: 1px solid color-mix(in srgb, var(--rank) 72%, white 20%);
    background: linear-gradient(135deg, color-mix(in srgb, var(--rank) 88%, #111 8%), color-mix(in srgb, var(--rank) 70%, #fff 16%));
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .3px;
    font-size: 11px;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--rank) 28%, transparent);
}
.rank-icon {
    min-width: 26px;
    height: 22px;
    padding: 0 5px;
    font-size: 10px;
    letter-spacing: 0;
    border: 1px solid rgba(255,255,255,.28);
    background: rgba(255,255,255,.2);
}
.user-chip .rank-pill { max-width: 160px; }
.support-hero { background: linear-gradient(135deg, #111827, #2563eb 62%, #22c55e 130%); }
.trading-hero { background: linear-gradient(135deg, #0b1220, #0f8f7a 58%, #f59e0b 135%); }
.ticket-thread { display: grid; gap: 12px; margin-bottom: 22px; }
.ticket-reply { display: grid; grid-template-columns: 180px 1fr; gap: 18px; margin-bottom: 0; }
.ticket-reply aside { border-right: 1px solid var(--line); padding-right: 14px; }
.ticket-reply.staff-note { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.status-open { background: #fee2e2; color: #991b1b; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-resolved { background: #dcfce7; color: #166534; }
.status-closed { background: #e5e7eb; color: #374151; }
.trading-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; margin-bottom: 22px; }
.chart-panel { min-height: 520px; }
.tv-placeholder { min-height: 420px; display: grid; align-content: space-between; gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, var(--brand) 5%), color-mix(in srgb, var(--panel) 84%, #000 8%)); }
.tv-placeholder strong { font-size: clamp(36px, 8vw, 82px); letter-spacing: 0; }
.tv-placeholder span { color: var(--muted); max-width: 640px; }
.fake-chart { height: 190px; display: flex; align-items: end; gap: 12px; border-bottom: 1px solid var(--line); padding-inline: 8px; }
.fake-chart i { width: 100%; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--brand), var(--accent)); opacity: .86; }
.fake-chart i:nth-child(1) { height: 42%; } .fake-chart i:nth-child(2) { height: 63%; } .fake-chart i:nth-child(3) { height: 36%; } .fake-chart i:nth-child(4) { height: 82%; } .fake-chart i:nth-child(5) { height: 56%; } .fake-chart i:nth-child(6) { height: 76%; }
.sentiment-panel { display: grid; gap: 12px; }
.sentiment { position: relative; display: flex; justify-content: space-between; padding: 12px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-weight: 900; }
.sentiment::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); opacity: .18; background: var(--brand); }
.sentiment.sell::before { background: var(--danger); }
.sentiment.neutral::before { background: var(--muted); }
.trading-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.trading-form textarea, .trading-form button { grid-column: 1 / -1; }
.idea-list { display: grid; gap: 12px; }
.idea-card { padding: 16px; border: 1px solid var(--line); border-left: 5px solid var(--muted); border-radius: 8px; background: var(--panel); }
.idea-card.buy { border-left-color: #22c55e; }
.idea-card.sell { border-left-color: #ef4444; }
.idea-card.neutral { border-left-color: #64748b; }
.idea-card p { margin: 12px 0; }
.idea-card footer { color: var(--muted); font-size: 13px; font-weight: 700; }
.module-card[href$="support.php"], .module-card[href$="trading.php"] { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
@media (max-width: 980px) { .trading-layout, .ticket-reply { grid-template-columns: 1fr; } .ticket-reply aside { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 12px; } .trading-form { grid-template-columns: 1fr; } }
.tv-widget-box { min-height: 460px; height: 460px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #0b1220; margin-bottom: 14px; }

/* Advanced ranks, permissions and benefits */
.rank-pill.rank-rich {
    position: relative;
    isolation: isolate;
    gap: 7px;
    border-width: 1px;
    overflow: hidden;
}
.rank-pill.rank-rich::before {
    content: "";
    position: absolute;
    inset: -40% -30%;
    z-index: -1;
    background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,.28), transparent 58%);
    transform: translateX(-70%);
}
.rank-pill.rank-staff_glow {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--rank) 60%, white), 0 0 24px color-mix(in srgb, var(--rank) 44%, transparent);
}
.rank-pill.rank-vip_neon {
    background: linear-gradient(135deg, #111827, var(--rank), #22d3ee);
    box-shadow: 0 0 18px color-mix(in srgb, var(--rank) 55%, transparent), inset 0 0 12px rgba(255,255,255,.18);
}
.rank-pill.rank-elite_pulse {
    animation: rankPulse 2.4s ease-in-out infinite;
}
.rank-pill.rank-gold_shine {
    background: linear-gradient(135deg, #6b3f00, #fbbf24, #fff1a8, #b45309);
    color: #221400;
    border-color: #fef3c7;
}
.rank-pill.rank-gold_shine .rank-icon { background: rgba(0,0,0,.16); border-color: rgba(0,0,0,.20); }
.rank-pill.rank-gold_shine::before, .rank-pill.rank-staff_glow::before, .rank-pill.rank-vip_neon::before {
    animation: rankShine 3.2s ease-in-out infinite;
}
@keyframes rankShine { 0%, 45% { transform: translateX(-75%); } 100% { transform: translateX(75%); } }
@keyframes rankPulse { 0%,100% { filter: saturate(1); transform: translateY(0); } 50% { filter: saturate(1.35); transform: translateY(-1px); } }
.rank-name { line-height: 1; }
.rank-admin-list { display: grid; gap: 14px; }
.rank-editor { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--panel) 94%, var(--brand) 4%); }
.rank-editor-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rank-editor-head > div { display: grid; gap: 6px; }
.rank-editor-grid, .rank-create-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: center; }
.rank-create-grid textarea, .rank-create-grid .permission-row { grid-column: 1 / -1; }
.rank-editor textarea, .rank-editor .permission-row { width: 100%; }
.benefit-box { margin: 14px 0; padding: 12px; border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); border-radius: 8px; background: color-mix(in srgb, var(--brand) 8%, var(--panel)); }
.benefit-box strong { display: block; margin-bottom: 4px; color: var(--brand-dark); }
.pair-picker { display: flex; gap: 10px; align-items: end; margin-bottom: 14px; }
.pair-picker label { display: grid; gap: 7px; font-weight: 800; min-width: min(100%, 360px); }
.pair-picker select, .boost-form input, .boost-topic-form input { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--panel); color: var(--ink); }
.boost-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.boost-form input, .boost-topic-form input { max-width: 120px; }
.idea-top { display: grid; gap: 7px; }
@media (max-width: 980px) { .rank-editor-grid, .rank-create-grid { grid-template-columns: 1fr; } .pair-picker { display: grid; } }

/* Final polish for themes, controls, logs, levels */
html[data-theme]:not([data-theme="light"]) .button.ghost,
html[data-theme]:not([data-theme="light"]) .nav .button.ghost {
    background: color-mix(in srgb, var(--panel) 82%, white 8%);
    color: var(--ink) !important;
    border: 1px solid color-mix(in srgb, var(--line) 85%, white 15%);
}
html[data-theme]:not([data-theme="light"]) .nav a,
html[data-theme]:not([data-theme="light"]) .user-chip { color: #f8fbff; }
html[data-theme]:not([data-theme="light"]) select,
html[data-theme]:not([data-theme="light"]) input,
html[data-theme]:not([data-theme="light"]) textarea {
    background: color-mix(in srgb, var(--panel) 92%, black 8%);
    color: var(--ink);
    border-color: var(--line);
}
html[data-theme]:not([data-theme="light"]) option { background: #111827; color: #f8fbff; }
.category-editor-grid, .level-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: center; }
.category-editor-grid .permission-row, .level-grid textarea, .level-grid button { grid-column: 1 / -1; }
.category-admin-list { display: grid; gap: 14px; }
.category-admin-card { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--panel) 94%, var(--brand) 4%); }
.level-badge { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 12px; border-radius: 999px; background: var(--level); color: #fff; font-weight: 900; box-shadow: 0 10px 24px color-mix(in srgb, var(--level) 35%, transparent); }
.boost-topic-form, .boost-form { background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, var(--panel)), color-mix(in srgb, var(--accent) 10%, var(--panel))); border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); border-radius: 8px; padding: 10px; box-shadow: 0 10px 24px rgba(15,143,122,.10); }
.boost-topic-form .button, .boost-form .button { background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff !important; }

/* InvestForum 2026 global redesign */
:root {
    color-scheme: dark;
    --bg: #05070d;
    --panel: rgba(9, 15, 29, .82);
    --ink: #f2f8ff;
    --muted: #8ea3bb;
    --line: rgba(125, 211, 252, .18);
    --brand: #38bdf8;
    --brand-dark: #7dd3fc;
    --accent: #34d399;
    --danger: #fb7185;
    --shadow: 0 28px 110px rgba(0, 0, 0, .55);
}

@keyframes investGrid {
    from { background-position: 0 0, 0 0, 0 0; }
    to { background-position: 72px 72px, -96px 72px, 0 0; }
}

@keyframes investSweep {
    0%, 48% { transform: translateX(-125%); opacity: 0; }
    58% { opacity: .5; }
    100% { transform: translateX(125%); opacity: 0; }
}

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

html,
html[data-theme],
html[data-theme="light"],
html[data-theme="auto"] {
    color-scheme: dark;
}

body {
    background:
        linear-gradient(rgba(125, 211, 252, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 211, 252, .04) 1px, transparent 1px),
        linear-gradient(135deg, #04060b 0%, #08111f 48%, #04130f 100%);
    background-size: 36px 36px, 36px 36px, auto;
    animation: investGrid 22s linear infinite;
    color: var(--ink);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 8%, rgba(56, 189, 248, .18), transparent 28%),
        radial-gradient(circle at 88% 3%, rgba(52, 211, 153, .14), transparent 26%),
        linear-gradient(120deg, transparent 0%, rgba(56, 189, 248, .08) 32%, transparent 52%);
}

.topbar,
.panel,
.auth-card,
.post,
.home-main,
.home-stats div,
.forum-card,
.topic-row,
.category-row,
.stat-card,
.module-card,
.market-card,
.hosting-node {
    color: var(--ink);
    border-color: var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .028)),
        rgba(9, 15, 29, .82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px) saturate(135%);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(125, 211, 252, .16);
}

.brand-mark,
.forum-icon {
    color: #03111d;
    background: linear-gradient(135deg, #38bdf8, #34d399 55%, #f8d36a);
    box-shadow: 0 0 34px rgba(56, 189, 248, .30);
}

.nav a,
.user-chip,
.theme-switch select,
input,
textarea,
select {
    color: var(--ink);
    background: rgba(255, 255, 255, .055);
    border-color: rgba(125, 211, 252, .16);
}

.nav a:hover,
.user-chip:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, .16), rgba(52, 211, 153, .10));
    border-color: rgba(56, 189, 248, .42);
}

.home-hero,
.admin-hero,
.support-hero,
.trading-hero,
.hosting-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, .18);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(56, 189, 248, .24), rgba(52, 211, 153, .12)),
        rgba(9, 15, 29, .88);
    box-shadow: var(--shadow);
}

.home-hero::after,
.admin-hero::after,
.hosting-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .10), transparent);
    transform: translateX(-125%);
    animation: investSweep 7s ease-in-out infinite;
}

.home-hero h1,
.admin-hero h1,
.hosting-hero h1,
h1,
h2 {
    color: #fff;
    text-shadow: 0 0 30px rgba(56, 189, 248, .16);
}

.home-hero p,
.hosting-hero p,
.panel p,
.forum-card p,
.footer,
.muted {
    color: var(--muted);
}

.button,
button.button,
.staff-action {
    color: #03111d !important;
    background: linear-gradient(135deg, #38bdf8, #34d399);
    border: 0;
    border-radius: 11px;
    box-shadow: 0 18px 46px rgba(56, 189, 248, .22);
    transition: .18s ease;
}

.button:hover,
button.button:hover,
.forum-card:hover,
.topic-row:hover,
.panel:hover,
.home-stats div:hover {
    transform: translateY(-2px);
    box-shadow: 0 34px 120px rgba(0, 0, 0, .62), 0 0 42px rgba(56, 189, 248, .12);
}

.button.ghost {
    color: var(--ink) !important;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(125, 211, 252, .18);
}

.shell > section,
.home-layout,
.home-stats,
.panel,
.auth-card {
    animation: floatIn .42s ease both;
}

.home-layout,
.hosting-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
}

.hosting-hero {
    min-height: 360px;
    padding: 32px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: end;
    margin-bottom: 20px;
}

.hosting-hero h1 {
    font-size: clamp(46px, 8vw, 96px);
    line-height: .9;
    margin: 8px 0 16px;
}

.hosting-node {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
}

.hosting-node span,
.hosting-node small {
    color: var(--muted);
}

.hosting-node strong {
    display: block;
    margin: 8px 0;
    font-size: 34px;
    color: var(--accent);
}

@media (max-width: 980px) {
    .hosting-hero,
    .hosting-grid {
        grid-template-columns: 1fr;
    }
}
.rank-editor select, .rank-editor input, .rank-create-grid select, .rank-create-grid input { min-height: 42px; }
.rank-create-grid textarea { min-height: 74px; }
.table-wrap table .badge { white-space: nowrap; }
@media (max-width: 980px) { .category-editor-grid, .level-grid { grid-template-columns: 1fr; } }


/* FINAL OVERRIDES: contrast, admin controls, rank animation, trading labels */
.topbar .nav a.button.nav-logout,
.topbar .nav .nav-logout {
    background: linear-gradient(135deg, #ef4444, #f97316) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,.24) !important;
    box-shadow: 0 10px 24px rgba(239,68,68,.28);
    font-weight: 900;
}
.topbar .nav .nav-logout:hover { filter: brightness(1.08); transform: translateY(-1px); }
html[data-theme] .button,
html[data-theme] button.button,
html[data-theme] a.button {
    border: 1px solid color-mix(in srgb, var(--brand) 55%, white 12%);
    background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 58%, var(--accent))) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 22%, transparent);
    transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}
html[data-theme] .button:hover { transform: translateY(-1px); filter: brightness(1.06); }
html[data-theme] .button.ghost,
html[data-theme] button.button.ghost,
html[data-theme] a.button.ghost {
    background: color-mix(in srgb, var(--panel) 84%, var(--brand) 10%) !important;
    color: var(--ink) !important;
    border-color: color-mix(in srgb, var(--line) 70%, var(--brand) 30%);
    box-shadow: 0 8px 18px rgba(0,0,0,.08);
}
html[data-theme]:not([data-theme="light"]) .button.ghost,
html[data-theme]:not([data-theme="light"]) button.button.ghost,
html[data-theme]:not([data-theme="light"]) a.button.ghost {
    background: color-mix(in srgb, var(--panel) 72%, white 10%) !important;
    color: #f8fbff !important;
}
.admin-hero .button.ghost { color: #fff !important; background: rgba(255,255,255,.14) !important; border-color: rgba(255,255,255,.3); }
.permission-row { padding: 10px; border-radius: 8px; background: color-mix(in srgb, var(--panel) 88%, var(--brand) 5%); border: 1px solid var(--line); }
.permission-row .check {
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line) 74%, var(--brand) 20%);
    background: color-mix(in srgb, var(--panel) 92%, white 6%);
    cursor: pointer;
}
.permission-row .check:has(input:checked) {
    background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 65%, var(--accent)));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 22%, transparent);
}
.rank-pill.rank-rich {
    min-height: 34px !important;
    padding: 5px 12px 5px 6px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255,255,255,.28) !important;
    transform: translateZ(0);
    background: linear-gradient(135deg, color-mix(in srgb, var(--rank) 92%, #020617), color-mix(in srgb, var(--rank) 70%, #ffffff 20%)) !important;
}
.rank-pill.rank-rich::before {
    z-index: 0;
    opacity: .9;
    background: linear-gradient(110deg, transparent 0%, transparent 35%, rgba(255,255,255,.65) 48%, transparent 62%, transparent 100%);
}
.rank-pill.rank-rich .rank-icon,
.rank-pill.rank-rich .rank-name { position: relative; z-index: 1; }
.rank-pill.rank-staff_glow,
.rank-pill.rank-vip_neon,
.rank-pill.rank-gold_shine { animation: rankPulse 2.6s ease-in-out infinite; }
.rank-pill.rank-staff_glow::before,
.rank-pill.rank-vip_neon::before,
.rank-pill.rank-gold_shine::before,
.rank-pill.rank-elite_pulse::before { animation: rankShine 2.4s linear infinite; }
.rank-pill.rank-gold_shine { background: linear-gradient(135deg, #78350f, #f59e0b, #fff7c2, #d97706) !important; color: #1f1300 !important; }
.rank-pill.rank-vip_neon { background: linear-gradient(135deg, #111827, #7c3aed, #06b6d4) !important; }
.rank-pill.rank-staff_glow { background: linear-gradient(135deg, #0f172a, var(--rank), #f97316) !important; }
.rank-pill.rank-elite_pulse { background: linear-gradient(135deg, #020617, #0f8f7a, #f59e0b) !important; }
@keyframes rankShine { from { transform: translateX(-70%) rotate(8deg); } to { transform: translateX(70%) rotate(8deg); } }
@keyframes rankPulse { 0%,100% { box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 8px 22px color-mix(in srgb, var(--rank) 24%, transparent); } 50% { box-shadow: 0 0 0 1px rgba(255,255,255,.34), 0 0 28px color-mix(in srgb, var(--rank) 55%, transparent); } }
.trading-layout { grid-template-columns: minmax(0, 1fr) 380px; }
.sentiment-panel h2 { font-size: 30px; }
.sentiment { min-height: 58px; font-size: 18px; }
.tv-widget-box { min-height: 560px !important; height: 560px !important; }
.tv-placeholder strong { font-size: clamp(58px, 9vw, 110px) !important; }
.idea-card footer { display: flex; gap: 8px; flex-wrap: wrap; }
.idea-card footer::before { content: "Levels"; display: none; }
.boost-page .boost-target { display: grid; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, var(--panel)), color-mix(in srgb, var(--accent) 8%, var(--panel))); margin-bottom: 16px; }
.boost-page .boost-target span { text-transform: uppercase; color: var(--muted); font-weight: 900; font-size: 12px; }
.boost-page .boost-target strong { font-size: 26px; }
@media (max-width: 980px) { .trading-layout { grid-template-columns: 1fr; } }

/* Admin edit drawer redesign */
.admin-edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); gap: 22px; align-items: start; }
.rank-card-grid, .category-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rank-card, .compact-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, var(--brand) 4%), color-mix(in srgb, var(--panel) 96%, black 2%));
    box-shadow: 0 12px 26px rgba(0,0,0,.06);
}
.rank-card > div:first-child { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.rank-card p, .compact-card p { margin: 0; color: var(--muted); }
.mini-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-meta span { padding: 5px 9px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 10%, var(--panel)); border: 1px solid var(--line); color: var(--muted); font-weight: 800; font-size: 12px; }
.edit-drawer {
    position: sticky;
    top: 96px;
    border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
    box-shadow: 0 18px 50px rgba(0,0,0,.16);
}
.edit-drawer .form { gap: 12px; }
.edit-drawer input, .edit-drawer select, .edit-drawer textarea { min-height: 42px; }
.modern-perms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modern-perms strong, .modern-perms small { grid-column: 1 / -1; }
.trading-symbol-banner {
    display: grid;
    gap: 4px;
    padding: 18px 20px;
    margin-bottom: 14px;
    border: 1px solid color-mix(in srgb, var(--brand) 38%, var(--line));
    border-radius: 8px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 16%, var(--panel)), color-mix(in srgb, var(--accent) 12%, var(--panel)));
}
.trading-symbol-banner span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.trading-symbol-banner strong { font-size: clamp(42px, 7vw, 84px); line-height: .95; letter-spacing: 0; color: var(--brand-dark); }
.trading-symbol-banner small { color: var(--muted); font-weight: 800; }
html[data-theme]:not([data-theme="light"]) .rank-card,
html[data-theme]:not([data-theme="light"]) .compact-card { background: color-mix(in srgb, var(--panel) 88%, var(--brand) 7%); }
@media (max-width: 1100px) { .admin-edit-layout { grid-template-columns: 1fr; } .edit-drawer { position: static; } }
@media (max-width: 760px) { .rank-card-grid, .category-card-grid, .modern-perms { grid-template-columns: 1fr; } }

/* FINAL staff topic buttons and TradingView label fix */
.topic-head .section-title { align-items: flex-start; }
.topic-staff-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--brand) 38%, var(--line));
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel) 78%, var(--brand) 10%);
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
}
.staff-topic-button,
a.staff-topic-button,
button.staff-topic-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--brand) 45%, #fff 15%) !important;
    background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, var(--accent))) !important;
    color: #ffffff !important;
    font-weight: 950;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 10px 22px color-mix(in srgb, var(--brand) 24%, transparent);
}
.staff-topic-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
a.staff-topic-button.boost-open-button {
    width: 100%;
    margin-top: 8px;
    background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
    border-color: rgba(255,255,255,.22) !important;
    box-shadow: 0 12px 26px rgba(239,68,68,.22);
}
html[data-theme]:not([data-theme="light"]) .topic-staff-actions {
    background: color-mix(in srgb, var(--panel) 70%, var(--brand) 14%);
    border-color: color-mix(in srgb, var(--brand) 55%, #fff 10%);
}
.trading-symbol-banner strong {
    font-size: clamp(64px, 10vw, 128px) !important;
    text-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 28%, transparent);
}
.chart-panel .pair-picker select { font-size: 18px; font-weight: 900; }
@media (max-width: 760px) {
    .topic-staff-actions { justify-content: stretch; }
    .staff-topic-button { width: 100%; }
}


/* Codex update: safer staff buttons and voting layout */
.delete-topic-form { width: 100%; margin-top: 8px; }
.delete-topic-form .danger-topic-button,
.staff-topic-button.danger-topic-button {
    width: 100%;
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,.22) !important;
}
.idea-vote-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.idea-vote-row form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.idea-vote-row input,
.idea-vote-row select {
    width: auto;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    background: var(--panel);
    color: var(--ink);
}
html[data-theme]:not([data-theme="light"]) .staff-topic-button,
html[data-theme]:not([data-theme="light"]) a.staff-topic-button,
html[data-theme]:not([data-theme="light"]) button.staff-topic-button {
    color: #fff !important;
    text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
/* Codex v2 AdminCP and trading vote UI */
.admin-console { display: grid; grid-template-columns: 330px minmax(0,1fr); gap: 18px; margin-bottom: 18px; }
.admin-console-side { min-height: 310px; display: grid; align-content: end; gap: 14px; padding: 28px; border-radius: 8px; color: #fff; background: linear-gradient(145deg, #050816, #0f8f7a 58%, #f59e0b 130%); box-shadow: var(--shadow); }
.admin-console-side h1 { font-size: clamp(44px, 6vw, 76px); line-height: .92; margin: 0; }
.admin-console-side p { color: #d9f7f1; margin: 0; }
.admin-quick-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-console-main { display: grid; gap: 18px; }
.admin-commandbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); }
.admin-commandbar div { display: grid; gap: 3px; }
.admin-commandbar span { color: var(--muted); font-weight: 800; }
.admin-commandbar form { display: flex; gap: 8px; min-width: min(100%, 430px); }
.admin-commandbar input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--panel); color: var(--ink); }
.admin-modern-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.admin-module-tile { min-height: 170px; display: grid; align-content: space-between; gap: 12px; padding: 18px; border: 1px solid color-mix(in srgb, var(--line) 80%, var(--brand) 20%); border-radius: 8px; background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, var(--brand) 4%), var(--panel)); box-shadow: 0 14px 34px rgba(0,0,0,.08); }
.admin-module-tile:hover { transform: translateY(-2px); border-color: var(--brand); }
.admin-module-tile span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; color: #fff; font-weight: 950; background: linear-gradient(135deg, var(--brand), var(--accent)); }
.admin-module-tile strong { font-size: 20px; }
.admin-module-tile small { color: var(--muted); line-height: 1.45; }
.admin-live-grid { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 22px; align-items: start; }
.idea-vote-button { min-height: 42px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 10px 14px; color: #fff !important; font-weight: 950; cursor: pointer; box-shadow: 0 10px 24px rgba(0,0,0,.14); }
.idea-vote-button.up { background: linear-gradient(135deg, #16a34a, #22c55e) !important; }
.idea-vote-button.down { background: linear-gradient(135deg, #dc2626, #f97316) !important; }
html[data-theme]:not([data-theme="light"]) .admin-commandbar,
html[data-theme]:not([data-theme="light"]) .admin-module-tile { background: color-mix(in srgb, var(--panel) 88%, var(--brand) 7%); }
@media (max-width: 1100px) { .admin-console, .admin-live-grid { grid-template-columns: 1fr; } .admin-modern-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 680px) { .admin-modern-grid { grid-template-columns: 1fr; } .admin-commandbar, .admin-commandbar form { display: grid; } }
/* Codex v3 admin stability pass */
.admin-console, .mod-console {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 20px;
}
.admin-console-side, .mod-console {
    border-radius: 8px;
    color: #fff;
    background: #09111f;
    background: linear-gradient(145deg, #09111f 0%, #0f8f7a 58%, #f59e0b 140%);
    box-shadow: var(--shadow);
}
.admin-console-side { min-height: 320px; display: grid; align-content: end; gap: 14px; padding: 28px; }
.mod-console { grid-template-columns: minmax(0, 1fr) auto; align-items: end; padding: 28px; }
.admin-console-side h1, .mod-console h1 { font-size: clamp(44px, 7vw, 78px); line-height: .92; margin: 0; color: #fff; }
.admin-console-side p, .mod-console p { max-width: 720px; color: #dff8f3; margin: 0; }
.admin-console-main { display: grid; gap: 18px; }
.admin-commandbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}
.admin-commandbar form { display: flex; gap: 8px; min-width: min(100%, 430px); }
.admin-commandbar input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--panel);
    color: var(--ink);
}
.admin-modern-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.admin-module-tile {
    min-height: 172px;
    display: grid;
    align-content: space-between;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
}
.admin-module-tile:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 18px 42px rgba(15,143,122,.16); }
.admin-module-tile span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    font-weight: 950;
    background: linear-gradient(135deg, var(--brand), var(--accent));
}
.admin-module-tile strong { font-size: 20px; color: var(--ink); }
.admin-module-tile small { color: var(--muted); line-height: 1.45; }
.admin-live-grid, .mod-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.mod-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.mod-panel { border-color: color-mix(in srgb, var(--brand) 28%, var(--line)); }
.mod-stats { margin-bottom: 22px; }
html[data-theme]:not([data-theme="light"]) .admin-commandbar,
html[data-theme]:not([data-theme="light"]) .admin-module-tile,
html[data-theme]:not([data-theme="light"]) .mod-panel {
    background: #111827;
    border-color: #273244;
}
html[data-theme]:not([data-theme="light"]) .admin-module-tile strong { color: #f8fbff; }
html[data-theme]:not([data-theme="light"]) .admin-commandbar input { background: #0f1726; color: #f8fbff; }
@media (max-width: 1100px) {
    .admin-console, .admin-live-grid, .mod-console, .mod-grid { grid-template-columns: 1fr; }
    .admin-modern-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mod-actions { justify-content: flex-start; }
}
@media (max-width: 680px) {
    .admin-modern-grid { grid-template-columns: 1fr; }
    .admin-commandbar, .admin-commandbar form { display: grid; }
}
/* Codex v4 launch and wipe UI */
.maintenance-body { min-height: 100vh; background: #050816; color: #fff; overflow-x: hidden; }
.maintenance-stage {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 28px;
    align-items: stretch;
    padding: clamp(22px, 4vw, 58px);
    background:
        linear-gradient(115deg, rgba(5,8,22,.94), rgba(15,143,122,.62), rgba(245,158,11,.2)),
        url("https://images.unsplash.com/photo-1642790551116-18e150f248e5?auto=format&fit=crop&w=1800&q=80") center/cover;
}
.maintenance-card {
    display: grid;
    align-content: center;
    gap: 24px;
    max-width: 920px;
}
.maintenance-card h1 { font-size: clamp(64px, 12vw, 150px); line-height: .86; margin: 0; color: #fff; }
.maintenance-card p { max-width: 740px; font-size: 20px; color: #dff8f3; }
.countdown-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 760px; }
.countdown-grid div {
    padding: 18px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    background: rgba(5,8,22,.58);
    backdrop-filter: blur(14px);
}
.countdown-grid strong { display: block; font-size: clamp(34px, 6vw, 72px); line-height: 1; color: #fff; }
.countdown-grid span { color: #b7fff2; font-weight: 900; text-transform: uppercase; font-size: 12px; }
.maintenance-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.maintenance-market {
    display: grid;
    align-content: end;
    gap: 16px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    background: rgba(5,8,22,.56);
    backdrop-filter: blur(18px);
}
.maintenance-market span { color: #b7fff2; font-weight: 900; text-transform: uppercase; font-size: 12px; }
.maintenance-market strong { font-size: 34px; line-height: 1.05; }
.maintenance-chart { height: 240px; display: flex; gap: 10px; align-items: end; border-bottom: 1px solid rgba(255,255,255,.25); }
.maintenance-chart i { width: 100%; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #f59e0b, #12b981); }
.maintenance-chart i:nth-child(1) { height: 42%; } .maintenance-chart i:nth-child(2) { height: 66%; } .maintenance-chart i:nth-child(3) { height: 48%; } .maintenance-chart i:nth-child(4) { height: 83%; } .maintenance-chart i:nth-child(5) { height: 58%; } .maintenance-chart i:nth-child(6) { height: 74%; } .maintenance-chart i:nth-child(7) { height: 92%; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 42%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--danger) 8%, var(--panel)), var(--panel)); }
.danger-zone .button { background: linear-gradient(135deg, #dc2626, #991b1b) !important; }
.admin-module-tile[href$="maintenance.php"] span { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.admin-module-tile[href$="wipe_once.php"] span { background: linear-gradient(135deg, #dc2626, #f97316); }
@media (max-width: 960px) { .maintenance-stage { grid-template-columns: 1fr; } .maintenance-market { min-height: 280px; } .countdown-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .countdown-grid { grid-template-columns: 1fr; } }
/* Codex v5 premium launch and AdminCP */
.launch-body {
    min-height: 100vh;
    margin: 0;
    color: #f8fbff;
    background: #030712;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.launch-stage {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
    gap: clamp(18px, 4vw, 42px);
    padding: clamp(18px, 4vw, 54px);
    background:
        linear-gradient(100deg, rgba(3,7,18,.96) 0%, rgba(3,7,18,.78) 48%, rgba(15,143,122,.36) 100%),
        url("https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?auto=format&fit=crop&w=2200&q=90") center/cover;
}
.launch-hero {
    min-height: calc(100vh - clamp(36px, 8vw, 108px));
    display: grid;
    align-content: space-between;
}
.launch-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.launch-brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.launch-brand span {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #0f8f7a, #f59e0b);
    font-weight: 950;
}
.launch-brand strong { font-size: 18px; }
.launch-login {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    background: rgba(255,255,255,.09);
    color: #fff;
    font-weight: 900;
    backdrop-filter: blur(14px);
}
.launch-content {
    display: grid;
    gap: 22px;
    max-width: 1040px;
    padding-bottom: clamp(22px, 6vw, 72px);
}
.launch-kicker {
    width: fit-content;
    padding: 8px 12px;
    border: 1px solid rgba(183,255,242,.28);
    border-radius: 999px;
    background: rgba(15,143,122,.16);
    color: #b7fff2;
    font-weight: 950;
    text-transform: uppercase;
    font-size: 12px;
}
.launch-content h1 {
    max-width: 980px;
    margin: 0;
    color: #fff;
    font-size: clamp(58px, 10vw, 142px);
    line-height: .88;
    letter-spacing: 0;
}
.launch-content p {
    max-width: 720px;
    margin: 0;
    color: #d7e8ef;
    font-size: clamp(17px, 2vw, 22px);
}
.launch-countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    gap: 12px;
    max-width: 820px;
}
.launch-countdown div {
    padding: 18px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
    box-shadow: 0 18px 44px rgba(0,0,0,.24);
    backdrop-filter: blur(18px);
}
.launch-countdown strong {
    display: block;
    color: #fff;
    font-size: clamp(36px, 6vw, 76px);
    line-height: .95;
}
.launch-countdown span {
    color: #b7fff2;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}
.launch-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    color: #9fb3c8;
    font-weight: 800;
}
.launch-meta strong { color: #fff; }
.launch-terminal {
    align-self: stretch;
    display: grid;
    align-content: space-between;
    gap: 18px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px;
    background: rgba(3,7,18,.68);
    box-shadow: 0 24px 72px rgba(0,0,0,.36);
    backdrop-filter: blur(22px);
}
.terminal-head { display: flex; align-items: center; gap: 8px; color: #9fb3c8; }
.terminal-head span { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.terminal-head span:nth-child(2) { background: #f59e0b; }
.terminal-head span:nth-child(3) { background: #22c55e; }
.terminal-head b { margin-left: 8px; font-size: 12px; text-transform: uppercase; }
.terminal-grid { display: grid; gap: 10px; }
.terminal-grid div {
    padding: 14px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: rgba(255,255,255,.05);
}
.terminal-grid small { display: block; color: #9fb3c8; text-transform: uppercase; font-weight: 900; font-size: 11px; }
.terminal-grid strong { display: block; margin-top: 4px; color: #fff; font-size: 22px; }
.launch-chart {
    height: min(34vh, 280px);
    display: flex;
    align-items: end;
    gap: 10px;
    padding: 0 8px;
    border-bottom: 1px solid rgba(255,255,255,.16);
}
.launch-chart i { width: 100%; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #f59e0b, #0f8f7a); box-shadow: 0 0 24px rgba(15,143,122,.32); }
.launch-chart i:nth-child(1) { height: 36%; } .launch-chart i:nth-child(2) { height: 58%; } .launch-chart i:nth-child(3) { height: 46%; } .launch-chart i:nth-child(4) { height: 78%; } .launch-chart i:nth-child(5) { height: 52%; } .launch-chart i:nth-child(6) { height: 84%; } .launch-chart i:nth-child(7) { height: 68%; } .launch-chart i:nth-child(8) { height: 96%; }
.launch-feed { display: grid; gap: 10px; }
.launch-feed span { display: flex; gap: 10px; align-items: center; color: #d7e8ef; }
.launch-feed b { width: 34px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(15,143,122,.22); color: #b7fff2; }
.admin-console-side, .mod-console {
    background:
        linear-gradient(145deg, rgba(3,7,18,.96), rgba(15,143,122,.82) 58%, rgba(245,158,11,.62)),
        url("https://images.unsplash.com/photo-1642790551116-18e150f248e5?auto=format&fit=crop&w=1600&q=85") center/cover !important;
}
.admin-module-tile {
    position: relative;
    overflow: hidden;
}
.admin-module-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(15,143,122,.10), transparent 48%, rgba(245,158,11,.08));
}
.admin-commandbar, .admin-module-tile, .stat-card, .mod-panel {
    border-radius: 8px !important;
}
.admin-module-tile strong, .admin-module-tile small, .admin-module-tile span {
    position: relative;
    z-index: 1;
}
@media (max-width: 1040px) {
    .launch-stage { grid-template-columns: 1fr; }
    .launch-hero { min-height: auto; gap: 80px; }
    .launch-terminal { min-height: 420px; }
}
@media (max-width: 680px) {
    .launch-nav { align-items: flex-start; flex-direction: column; }
    .launch-countdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
    .launch-countdown { grid-template-columns: 1fr; }
}
/* Codex v6 showcase launch and fake vote controls */
.launch-v6 .launch-stage {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 560px);
    background:
        linear-gradient(100deg, rgba(3,7,18,.97) 0%, rgba(3,7,18,.82) 46%, rgba(15,143,122,.38) 100%),
        url("https://images.unsplash.com/photo-1642790551116-18e150f248e5?auto=format&fit=crop&w=2200&q=90") center/cover;
}
.launch-v6 .launch-content h1 { max-width: 1120px; font-size: clamp(54px, 9vw, 132px); }
.launch-preview {
    align-self: stretch;
    display: grid;
    align-content: space-between;
    gap: 16px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px;
    background: rgba(3,7,18,.72);
    box-shadow: 0 28px 80px rgba(0,0,0,.42);
    backdrop-filter: blur(24px);
}
.preview-top span, .preview-card small {
    color: #b7fff2;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 950;
}
.preview-top strong { display: block; margin-top: 4px; color: #fff; font-size: 30px; }
.preview-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
}
.preview-card strong { color: #fff; font-size: 22px; line-height: 1.1; }
.preview-card p { color: #c9d7e4; margin: 0; }
.forum-preview-card { background: linear-gradient(145deg, rgba(15,143,122,.22), rgba(255,255,255,.04)); }
.trade-preview-card { gap: 16px; }
.mini-sentiment { display: grid; gap: 10px; }
.mini-sentiment span { display: grid; grid-template-columns: 58px 1fr; align-items: center; gap: 10px; color: #fff; font-weight: 950; }
.mini-sentiment i { height: 12px; width: var(--w); border-radius: 999px; background: linear-gradient(90deg, #22c55e, #f59e0b); box-shadow: 0 0 22px rgba(34,197,94,.32); }
.mini-sentiment span:nth-child(2) i { background: linear-gradient(90deg, #ef4444, #f97316); }
.preview-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.preview-row div { padding: 14px; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; background: rgba(255,255,255,.06); }
.preview-row b { display: block; color: #fff; }
.preview-row span { color: #9fb3c8; font-size: 12px; }
.fake-vote-form {
    width: 100%;
    display: flex;
    align-items: end;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}
.fake-vote-form label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.fake-vote-form input { width: 110px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--panel); color: var(--ink); }
html[data-theme]:not([data-theme="light"]) .fake-vote-form { background: color-mix(in srgb, var(--panel) 82%, var(--accent) 10%); }
@media (max-width: 1040px) { .launch-v6 .launch-stage { grid-template-columns: 1fr; } .launch-preview { min-height: 620px; } }
@media (max-width: 620px) { .preview-row { grid-template-columns: 1fr; } }
/* Codex v7 glass theme */
html[data-theme="glass"] body {
    --bg: #07111f;
    --panel: rgba(255,255,255,.10);
    --ink: #f8fbff;
    --muted: #b7c7d9;
    --line: rgba(255,255,255,.18);
    --brand: #22d3ee;
    --brand-dark: #67e8f9;
    --accent: #f59e0b;
    --danger: #fb7185;
    --shadow: 0 24px 70px rgba(0,0,0,.34);
    background:
        linear-gradient(135deg, rgba(7,17,31,.96), rgba(15,143,122,.32), rgba(245,158,11,.16)),
        url("https://images.unsplash.com/photo-1642790551116-18e150f248e5?auto=format&fit=crop&w=1800&q=85") center/cover fixed;
}
html[data-theme="glass"] .topbar {
    background: rgba(3,7,18,.62);
    border-bottom: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(22px);
}
html[data-theme="glass"] .panel,
html[data-theme="glass"] .auth-card,
html[data-theme="glass"] .post,
html[data-theme="glass"] .home-main,
html[data-theme="glass"] .admin-commandbar,
html[data-theme="glass"] .admin-module-tile,
html[data-theme="glass"] .stat-card,
html[data-theme="glass"] .category-row,
html[data-theme="glass"] .topic-row,
html[data-theme="glass"] .rank-card,
html[data-theme="glass"] .compact-card,
html[data-theme="glass"] .idea-card {
    background: rgba(255,255,255,.10) !important;
    border-color: rgba(255,255,255,.18) !important;
    box-shadow: 0 22px 60px rgba(0,0,0,.28);
    backdrop-filter: blur(20px);
}
html[data-theme="glass"] input,
html[data-theme="glass"] textarea,
html[data-theme="glass"] select {
    background: rgba(3,7,18,.48) !important;
    color: #f8fbff !important;
    border-color: rgba(255,255,255,.18) !important;
}
html[data-theme="glass"] option { background: #07111f; color: #f8fbff; }
html[data-theme="glass"] .button.ghost,
html[data-theme="glass"] a.button.ghost,
html[data-theme="glass"] button.button.ghost {
    background: rgba(255,255,255,.12) !important;
    color: #f8fbff !important;
    border-color: rgba(255,255,255,.22) !important;
}
html[data-theme="glass"] .badge,
html[data-theme="glass"] .mini-meta span {
    background: rgba(255,255,255,.12);
    color: #f8fbff;
    border: 1px solid rgba(255,255,255,.16);
}
html[data-theme="glass"] .muted,
html[data-theme="glass"] small,
html[data-theme="glass"] .section-title span {
    color: #b7c7d9;
}
html[data-theme="glass"] .admin-console-side,
html[data-theme="glass"] .mod-console,
html[data-theme="glass"] .admin-hero,
html[data-theme="glass"] .home-hero {
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 28px 80px rgba(0,0,0,.36);
}
/* Codex v8 levels and clean meta */
.author-badges { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex-wrap: wrap; }
.level-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 4px 11px 4px 5px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--level), color-mix(in srgb, var(--level) 58%, #111827));
    border: 1px solid rgba(255,255,255,.24);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--level) 28%, transparent);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}
.level-pill span {
    display: inline-grid;
    place-items: center;
    min-width: 25px;
    height: 22px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(255,255,255,.20);
}
.level-pill strong { line-height: 1; }
/* Codex v10 cinematic launch */
.launch-film-body{margin:0;min-height:100vh;background:#030712;color:#f8fbff;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;overflow-x:hidden}
.film-stage{min-height:100vh;position:relative;display:grid;grid-template-columns:minmax(0,1fr) 430px;grid-template-rows:auto 1fr auto;gap:22px;padding:clamp(18px,4vw,54px);background:linear-gradient(110deg,rgba(3,7,18,.96),rgba(3,7,18,.72),rgba(15,143,122,.3)),url("https://images.unsplash.com/photo-1642790551116-18e150f248e5?auto=format&fit=crop&w=2400&q=90") center/cover}
.film-stage:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.06),transparent);transform:translateX(-100%);animation:filmSweep 7s ease-in-out infinite;pointer-events:none}@keyframes filmSweep{0%,30%{transform:translateX(-100%)}70%,100%{transform:translateX(100%)}}
.film-nav{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:16px;position:relative;z-index:2}.film-brand{display:flex;align-items:center;gap:12px;color:#fff}.film-brand img{width:54px;height:54px;border-radius:14px;object-fit:cover;box-shadow:0 18px 44px rgba(0,0,0,.4)}.film-login{min-height:44px;display:inline-flex;align-items:center;padding:10px 16px;border-radius:999px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.09);color:#fff;font-weight:950;backdrop-filter:blur(18px)}
.film-hero{align-self:center;display:grid;gap:28px;position:relative;z-index:1}.film-copy span{display:inline-flex;width:max-content;padding:8px 12px;border-radius:999px;border:1px solid rgba(183,255,242,.28);background:rgba(15,143,122,.16);color:#b7fff2;font-size:12px;font-weight:950;text-transform:uppercase}.film-copy h1{max-width:1050px;margin:18px 0;font-size:clamp(58px,10vw,146px);line-height:.86;color:#fff;letter-spacing:0}.film-copy p{max-width:760px;color:#d9e7f2;font-size:20px;line-height:1.6}.film-countdown{display:grid;grid-template-columns:repeat(4,minmax(110px,1fr));gap:12px;max-width:850px}.film-countdown div{padding:18px;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.08);backdrop-filter:blur(18px);box-shadow:0 24px 58px rgba(0,0,0,.3)}.film-countdown b{display:block;font-size:clamp(38px,6vw,78px);line-height:.95;color:#fff}.film-countdown small{color:#b7fff2;font-weight:950;text-transform:uppercase}
.film-showcase{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,1fr);gap:12px;position:relative;z-index:1}.film-showcase article{min-height:190px;display:grid;align-content:space-between;padding:18px;border-radius:10px;border:1px solid rgba(255,255,255,.14);background:rgba(3,7,18,.58);backdrop-filter:blur(20px)}.film-showcase span{color:#fbbf24;font-weight:950}.film-showcase h2{font-size:24px;margin:0;color:#fff}.film-showcase p{color:#b9c8d8;margin:0;line-height:1.5}
.film-device{align-self:center;display:grid;gap:16px;padding:22px;border-radius:14px;border:1px solid rgba(255,255,255,.16);background:rgba(3,7,18,.72);box-shadow:0 28px 80px rgba(0,0,0,.44);backdrop-filter:blur(24px);position:relative;z-index:1}.device-top{display:flex;gap:8px;align-items:center;color:#9fb3c8}.device-top i{width:10px;height:10px;border-radius:50%;background:#ef4444}.device-top i:nth-child(2){background:#f59e0b}.device-top i:nth-child(3){background:#22c55e}.device-top b{margin-left:8px;font-size:12px}.device-signal{font-size:96px;line-height:.9;font-weight:950;color:#22c55e}.device-chart{height:220px;display:flex;align-items:end;gap:10px;border-bottom:1px solid rgba(255,255,255,.14)}.device-chart i{width:100%;border-radius:8px 8px 0 0;background:linear-gradient(180deg,#f59e0b,#0f8f7a);box-shadow:0 0 28px rgba(15,143,122,.34)}.device-chart i:nth-child(1){height:40%}.device-chart i:nth-child(2){height:64%}.device-chart i:nth-child(3){height:48%}.device-chart i:nth-child(4){height:82%}.device-chart i:nth-child(5){height:58%}.device-chart i:nth-child(6){height:94%}.device-row{display:flex;justify-content:space-between;color:#c9d7e4}.device-row b{color:#fff}
@media(max-width:1100px){.film-stage{grid-template-columns:1fr}.film-device{min-height:440px}.film-showcase{grid-template-columns:repeat(2,1fr)}}@media(max-width:680px){.film-nav{align-items:flex-start;flex-direction:column}.film-countdown,.film-showcase{grid-template-columns:1fr}.film-copy h1{font-size:clamp(50px,18vw,88px)}}
/* Codex v11 fixed Glass theme and Apple launch */
html[data-theme="glass"] body {
    --bg: #06101d;
    --panel: rgba(255,255,255,.105);
    --ink: #f8fbff;
    --muted: #c0ccda;
    --line: rgba(255,255,255,.18);
    --brand: #22d3ee;
    --brand-dark: #8be8f7;
    --accent: #f6c35f;
    --danger: #fb7185;
    --warning: #fbbf24;
    --shadow: 0 26px 74px rgba(0,0,0,.36);
    color: #f8fbff;
    background:
        linear-gradient(135deg, rgba(3,7,18,.92), rgba(15,143,122,.34), rgba(245,158,11,.16)),
        url("https://images.unsplash.com/photo-1642790551116-18e150f248e5?auto=format&fit=crop&w=2200&q=88") center/cover fixed !important;
}
html[data-theme="glass"] body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(circle at 12% 8%, rgba(34,211,238,.22), transparent 26rem),
        radial-gradient(circle at 86% 18%, rgba(246,195,95,.18), transparent 24rem);
}
html[data-theme="glass"] .topbar,
html[data-theme="glass"] .glassbar {
    background: rgba(3,7,18,.58) !important;
    border-bottom: 1px solid rgba(255,255,255,.16) !important;
    color: #f8fbff !important;
    box-shadow: 0 18px 54px rgba(0,0,0,.28);
    backdrop-filter: blur(24px) saturate(1.25);
}
html[data-theme="glass"] .shell,
html[data-theme="glass"] main { color: #f8fbff; }
html[data-theme="glass"] .panel,
html[data-theme="glass"] .auth-card,
html[data-theme="glass"] .post,
html[data-theme="glass"] .home-main,
html[data-theme="glass"] .admin-commandbar,
html[data-theme="glass"] .admin-module-tile,
html[data-theme="glass"] .stat-card,
html[data-theme="glass"] .category-row,
html[data-theme="glass"] .topic-row,
html[data-theme="glass"] .rank-card,
html[data-theme="glass"] .compact-card,
html[data-theme="glass"] .idea-card,
html[data-theme="glass"] .edit-drawer,
html[data-theme="glass"] .profile-card,
html[data-theme="glass"] .forum-card,
html[data-theme="glass"] .module-card {
    background: rgba(255,255,255,.105) !important;
    border-color: rgba(255,255,255,.18) !important;
    color: #f8fbff !important;
    box-shadow: 0 24px 70px rgba(0,0,0,.34) !important;
    backdrop-filter: blur(22px) saturate(1.18);
}
html[data-theme="glass"] .category-row:hover,
html[data-theme="glass"] .topic-row:hover,
html[data-theme="glass"] .admin-module-tile:hover,
html[data-theme="glass"] .forum-card:hover {
    border-color: rgba(139,232,247,.62) !important;
    box-shadow: 0 28px 80px rgba(34,211,238,.16) !important;
}
html[data-theme="glass"] input,
html[data-theme="glass"] textarea,
html[data-theme="glass"] select,
html[data-theme="glass"] .searchbar input,
html[data-theme="glass"] td input,
html[data-theme="glass"] td select {
    background: rgba(3,7,18,.54) !important;
    color: #f8fbff !important;
    border-color: rgba(255,255,255,.20) !important;
}
html[data-theme="glass"] option { background: #07111f !important; color: #f8fbff !important; }
html[data-theme="glass"] .button,
html[data-theme="glass"] button.button,
html[data-theme="glass"] a.button {
    background: linear-gradient(135deg, #22d3ee, #0f8f7a 55%, #f6c35f) !important;
    color: #03101a !important;
    border-color: rgba(255,255,255,.24) !important;
    box-shadow: 0 18px 42px rgba(34,211,238,.20) !important;
}
html[data-theme="glass"] .button.ghost,
html[data-theme="glass"] button.button.ghost,
html[data-theme="glass"] a.button.ghost,
html[data-theme="glass"] .tabs a,
html[data-theme="glass"] .reaction-button {
    background: rgba(255,255,255,.13) !important;
    color: #f8fbff !important;
    border: 1px solid rgba(255,255,255,.20) !important;
}
html[data-theme="glass"] .muted,
html[data-theme="glass"] small,
html[data-theme="glass"] .section-title span,
html[data-theme="glass"] .stats,
html[data-theme="glass"] .topic-row small,
html[data-theme="glass"] .category-row p {
    color: #c0ccda !important;
}
html[data-theme="glass"] table,
html[data-theme="glass"] th,
html[data-theme="glass"] td { color: #f8fbff; border-color: rgba(255,255,255,.14) !important; }
html[data-theme="glass"] .badge,
html[data-theme="glass"] .mini-meta span {
    background: rgba(255,255,255,.14) !important;
    color: #f8fbff !important;
    border: 1px solid rgba(255,255,255,.18);
}
html[data-theme="glass"] .admin-console-side,
html[data-theme="glass"] .mod-console,
html[data-theme="glass"] .admin-hero,
html[data-theme="glass"] .home-hero {
    background:
        linear-gradient(145deg, rgba(3,7,18,.78), rgba(15,143,122,.46), rgba(246,195,95,.26)),
        url("https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?auto=format&fit=crop&w=1800&q=88") center/cover !important;
    border: 1px solid rgba(255,255,255,.18) !important;
}

.tf-launch-body {
    margin: 0;
    min-height: 100vh;
    color: #f8fbff;
    background: #030712;
    cursor: none;
    overflow-x: hidden;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.tf-cursor {
    position: fixed;
    top: -13px;
    left: -13px;
    width: 26px;
    height: 26px;
    z-index: 10000;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,.82);
    border-radius: 999px;
    mix-blend-mode: difference;
    transition: width .18s ease, height .18s ease, border-color .18s ease, background .18s ease;
}
.tf-cursor.big {
    width: 58px;
    height: 58px;
    top: -29px;
    left: -29px;
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.95);
}
.tf-launch {
    min-height: 100vh;
    padding: clamp(18px, 4vw, 56px);
    background:
        linear-gradient(115deg, rgba(3,7,18,.98), rgba(3,7,18,.78) 44%, rgba(15,143,122,.22)),
        url("https://images.unsplash.com/photo-1642790551116-18e150f248e5?auto=format&fit=crop&w=2400&q=90") center/cover fixed;
}
.tf-launch::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 8%, rgba(246,195,95,.20), transparent 30rem),
        radial-gradient(circle at 82% 14%, rgba(34,211,238,.16), transparent 28rem),
        linear-gradient(90deg, transparent, rgba(255,255,255,.055), transparent);
    animation: tfFilmLight 8s ease-in-out infinite;
}
@keyframes tfFilmLight { 0%, 100% { opacity: .55; transform: translateX(-2%); } 50% { opacity: 1; transform: translateX(2%); } }
.tf-launch-nav {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: clamp(54px, 8vw, 120px);
}
.tf-launch-brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 950; }
.tf-launch-brand img { width: 54px; height: 54px; object-fit: cover; border-radius: 14px; box-shadow: 0 18px 44px rgba(0,0,0,.42); }
.tf-launch-navlinks { display: flex; align-items: center; gap: 18px; color: #cbd5e1; font-weight: 850; }
.tf-launch-navlinks a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 9px 15px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.09);
    color: #fff;
    backdrop-filter: blur(18px);
}
.tf-apple-hero {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 500px);
    gap: clamp(28px, 5vw, 70px);
    align-items: center;
    min-height: 58vh;
}
.tf-chip {
    display: inline-flex;
    width: max-content;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(183,255,242,.25);
    background: rgba(15,143,122,.16);
    color: #b7fff2;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}
.tf-hero-copy h1 {
    max-width: 1120px;
    margin: 18px 0;
    color: #fff;
    font-size: clamp(62px, 11vw, 156px);
    line-height: .84;
    letter-spacing: 0;
}
.tf-hero-copy p {
    max-width: 720px;
    margin: 0;
    color: #d8e4ef;
    font-size: clamp(18px, 2vw, 23px);
    line-height: 1.55;
}
.tf-hero-orbit {
    position: relative;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.12), rgba(255,255,255,.035) 56%, transparent 58%);
}
.tf-orbit-core {
    width: min(76%, 360px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(3,7,18,.64);
    box-shadow: 0 36px 90px rgba(0,0,0,.46), inset 0 0 60px rgba(34,211,238,.08);
    backdrop-filter: blur(22px);
}
.tf-orbit-core img { width: 92px; height: 92px; object-fit: cover; border-radius: 24px; }
.tf-orbit-core strong { font-size: clamp(36px, 5vw, 66px); color: #fff; line-height: 1; }
.tf-orbit-core small { color: #9fb3c8; font-weight: 850; }
.tf-hero-orbit i {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f6c35f;
    box-shadow: 0 0 26px rgba(246,195,95,.78);
    animation: tfOrbit 9s linear infinite;
    transform-origin: 0 190px;
}
.tf-hero-orbit i:nth-child(3) { background: #22d3ee; animation-duration: 12s; transform-origin: 0 150px; }
.tf-hero-orbit i:nth-child(4) { background: #0f8f7a; animation-duration: 15s; transform-origin: 0 220px; }
@keyframes tfOrbit { from { transform: rotate(0deg) translateY(-190px); } to { transform: rotate(360deg) translateY(-190px); } }
.tf-countdown {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 12px;
    margin: clamp(32px, 6vw, 92px) 0;
}
.tf-countdown div,
.tf-showcase article {
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 14px;
    background: rgba(255,255,255,.075);
    box-shadow: 0 28px 80px rgba(0,0,0,.30);
    backdrop-filter: blur(22px) saturate(1.15);
}
.tf-countdown div { padding: 20px; }
.tf-countdown b { display: block; color: #fff; font-size: clamp(42px, 7vw, 88px); line-height: .92; }
.tf-countdown span { color: #b7fff2; font-size: 12px; font-weight: 950; text-transform: uppercase; }
.tf-showcase {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.tf-showcase article {
    min-height: 250px;
    display: grid;
    align-content: space-between;
    gap: 20px;
    padding: 22px;
    transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.tf-showcase article:hover {
    transform: translateY(-6px);
    border-color: rgba(183,255,242,.34);
    background: rgba(255,255,255,.105);
}
.tf-showcase article.wide { grid-column: span 2; }
.tf-showcase article.tall { grid-row: span 2; }
.tf-showcase article.dark { background: rgba(3,7,18,.72); }
.tf-showcase span { color: #f6c35f; font-weight: 950; text-transform: uppercase; font-size: 12px; }
.tf-showcase h2 { margin: 0; color: #fff; font-size: clamp(26px, 3vw, 42px); line-height: 1.02; }
.tf-showcase p { margin: 0; color: #cbd5e1; line-height: 1.55; font-size: 16px; }
.tf-mini-stack { display: grid; gap: 8px; }
.tf-mini-stack b {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,.08);
    color: #fff;
}
@media (max-width: 1120px) {
    .tf-apple-hero { grid-template-columns: 1fr; }
    .tf-hero-orbit { max-width: 520px; justify-self: center; width: 100%; }
    .tf-showcase { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
    .tf-launch-body { cursor: auto; }
    .tf-cursor { display: none; }
    .tf-launch-nav { align-items: flex-start; flex-direction: column; margin-bottom: 54px; }
    .tf-launch-navlinks { flex-wrap: wrap; gap: 10px; }
    .tf-countdown { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .tf-showcase, .tf-showcase article.wide { grid-template-columns: 1fr; grid-column: auto; }
    .tf-showcase article.tall { grid-row: auto; }
    .tf-hero-copy h1 { font-size: clamp(52px, 17vw, 94px); }
}
/* Codex v13 signal replay */
.replay-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.replay-dashboard { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.replay-list { display: grid; gap: 12px; }
.replay-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--muted);
    border-radius: 8px;
    background: var(--panel);
}
.replay-card.buy { border-left-color: #22c55e; }
.replay-card.sell { border-left-color: #ef4444; }
.replay-card > div { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.replay-card strong { font-size: 24px; }
.replay-card span, .replay-card footer { color: var(--muted); font-weight: 800; }
.replay-card p { margin: 0; }
.replay-card b.tp { color: #22c55e; }
.replay-card b.sl { color: #ef4444; }
.replay-card b.open { color: #f59e0b; }
@media (max-width: 860px) { .replay-filter, .replay-dashboard { grid-template-columns: 1fr; } }
/* Codex v14 replay source note */
.replay-source-note {
    display: grid;
    gap: 6px;
    border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
    background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}
.replay-source-note strong { color: var(--brand-dark); }
