/* Forum / Shop — light theme + blue accent, with a real dark-mode toggle
   (persisted in localStorage, flips html[data-theme]). Admin panel
   (admin.css alone, no forum.css) is unaffected — this file only loads on
   public pages. Light is the default; [data-theme="dark"] restores
   admin.css's original dark palette for these same pages. */
:root {
    --bg:        #f4f6fa;
    --panel:     #ffffff;
    --panel-2:   #f3f5f9;
    --border:    #e7eaf0;
    --border-2:  #d8dce5;
    --text:      #11131a;
    --text-dim:  #616875;
    --text-dim2: #9499a3;
    --white:     #2563eb;   /* accent (kept as --white: used everywhere as "primary/active color") */
    --on-accent: #ffffff;   /* text/icon color drawn on top of --white */
    --danger:    #dc2626;
    --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
    --shadow-md: 0 12px 28px -10px rgba(15,23,42,.16);
}
html[data-theme="dark"] {
    --bg:        #0a0a0d;
    --panel:     #131317;
    --panel-2:   #1a1a1f;
    --border:    #262629;
    --border-2:  #333338;
    --text:      #f2f2f4;
    --text-dim:  #9a9aa2;
    --text-dim2: #6b6b72;
    --white:     #3b82f6;
    --on-accent: #ffffff;
    --danger:    #f2f2f4;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 8px 24px -8px rgba(0,0,0,.55);
}
html { background: var(--bg); background-image: none; }
body {
    background: var(--bg);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.hero-title, .site-brand-name, .section-title, .card-title, h1 { font-family: 'Plus Jakarta Sans', -apple-system, sans-serif; }

/* Top navbar — persistent across every public page (forum, shop, account) */
.site-topbar {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
    box-shadow: var(--shadow-sm);
}
.site-topbar-inner {
    display: flex; align-items: center; gap: 28px; position: relative;
    height: 68px; padding: 0 28px;
    max-width: 1280px; margin: 0 auto;
}
.site-brand { display: flex; align-items: center; gap: 10px; }
.site-brand-mark {
    width: 30px; height: 30px; border-radius: 8px;
    background: var(--white); color: var(--on-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; letter-spacing: .2px;
}
.site-brand-name { font-size: 13.5px; font-weight: 800; color: var(--text); letter-spacing: .2px; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
}
.site-nav a svg { width: 15px; height: 15px; flex-shrink: 0; }
.site-nav a:hover { color: var(--text); background: var(--panel-2); }
.site-nav a.active { color: var(--on-accent); background: var(--white); box-shadow: var(--shadow-sm); }

.site-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.site-balance-chip {
    display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
    border-radius: 20px; background: color-mix(in srgb, var(--white) 10%, var(--panel-2));
    border: 1px solid color-mix(in srgb, var(--white) 24%, var(--border));
    color: var(--white); font-size: 12px; font-weight: 700; white-space: nowrap;
}
.site-balance-chip svg { width: 14px; height: 14px; flex-shrink: 0; }
.site-balance-chip:hover { background: color-mix(in srgb, var(--white) 16%, var(--panel-2)); }
@media (max-width: 560px) { .site-balance-chip span, .site-balance-chip { font-size: 11px; padding: 0 9px; } }
.site-user-chip {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 12px 5px 5px; border-radius: 20px;
    background: var(--panel-2); border: 1px solid var(--border);
}
.site-user-chip:hover { border-color: var(--border-2); }
.site-user-chip .uname { font-size: 12px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 4px; }
.site-user-chip .urole { font-size: 10px; color: var(--text-dim2); display: flex; align-items: center; gap: 4px; }
.online-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.icon-btn {
    width: 34px; height: 34px; padding: 0; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: var(--panel); color: var(--text-dim); border: 1px solid var(--border);
}
.icon-btn:hover { color: var(--text); background: var(--panel-2); border-color: var(--border-2); }
.icon-btn svg { width: 16px; height: 16px; }
.nav-burger { display: none; }

/* Login/Register in the navbar use .btn-sm (~24px tall) — too short next to
   the 34px icon-btn (theme/lang) beside them. Match their height here,
   scoped to .site-right only so .btn-sm stays small everywhere else
   (post delete button, admin tables, ...). */
.site-right .btn {
    height: 34px; padding: 0 16px; font-size: 12.5px; font-weight: 700;
    display: inline-flex; align-items: center;
}

/* ── Mobile (<=780px): collapse the nav links into a hamburger dropdown,
   trim the topbar chrome so it never overflows on a phone screen. ────── */
@media (max-width: 780px) {
    .site-topbar-inner { padding: 0 14px; gap: 10px; }
    .site-brand-name { display: none; }
    .nav-burger { display: flex; }
    .site-nav {
        display: none; flex-direction: column; align-items: stretch; gap: 2px;
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--panel); border-bottom: 1px solid var(--border);
        padding: 10px 14px 14px; box-shadow: var(--shadow-md);
    }
    .site-nav.open { display: flex; }
    .site-nav a { padding: 11px 14px; font-size: 13.5px; }
    .lang-btn span:first-of-type { display: none; }
    .site-user-chip .urole { display: none; }
    .site-right { gap: 6px; }
}
@media (max-width: 480px) {
    .site-user-chip .uname { display: none; }
    .site-user-chip { padding: 5px; }
}

.lang-switch { position: relative; }
.lang-btn {
    width: auto; padding: 0 10px; gap: 6px;
    font-size: 11.5px; font-weight: 700; color: var(--text-dim);
}
.lang-btn svg:first-child { width: 14px; height: 14px; }
.lang-menu {
    display: none; position: absolute; top: calc(100% + 6px); left: 0;
    min-width: 140px; background: var(--panel); border: 1px solid var(--border);
    border-radius: 10px; box-shadow: var(--shadow-md); padding: 6px; z-index: 60;
}
.lang-menu.open { display: block; }
.lang-menu a { display: block; padding: 8px 10px; border-radius: 6px; font-size: 12.5px; color: var(--text-dim); font-weight: 500; }
.lang-menu a:hover { background: var(--panel-2); color: var(--text); }
.lang-menu a.active { color: var(--white); font-weight: 700; }

.site-main { min-height: calc(100vh - 68px); }

.avatar-circle {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--panel-2); border: 1px solid var(--border-2);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: var(--text);
    flex-shrink: 0;
}
.avatar-circle.lg { width: 44px; height: 44px; font-size: 16px; }

.badge-admin {
    font-size: 9.5px; font-weight: 700; padding: 2px 6px; border-radius: 3px;
    background: var(--white); color: var(--on-accent); letter-spacing: .3px; text-transform: uppercase;
}

/* Category list */
.cat-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.cat-row:last-child { border-bottom: none; }
.cat-row:hover { background: var(--panel-2); }
.cat-name { font-size: 13.5px; font-weight: 600; color: var(--white); }
.cat-desc { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.cat-stats { text-align: right; font-size: 11px; color: var(--text-dim2); white-space: nowrap; }
.cat-stats b { color: var(--text); font-size: 13px; display: block; }

/* Topic list row */
.topic-row {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.topic-row:last-child { border-bottom: none; }
.topic-row:hover { background: var(--panel-2); }
.topic-main { flex: 1; min-width: 0; }
.topic-title { font-size: 13.5px; font-weight: 600; color: var(--white); }
.topic-title a { color: inherit; }
.topic-title a:hover { text-decoration: underline; }
.topic-meta { font-size: 11.5px; color: var(--text-dim2); margin-top: 4px; }
.topic-stats { text-align: right; font-size: 11px; color: var(--text-dim); min-width: 70px; }
.topic-stats b { color: var(--white); font-size: 14px; display: block; }
.pin-tag {
    font-size: 9.5px; font-weight: 700; padding: 2px 6px; border-radius: 3px;
    border: 1px solid var(--border-2); color: var(--text-dim); margin-right: 6px;
    text-transform: uppercase; letter-spacing: .3px;
}

/* Post / reply */
.post-item {
    display: flex; gap: 14px;
    padding: 18px; border-bottom: 1px solid var(--border);
}
.post-item:last-child { border-bottom: none; }
.post-author { width: 90px; flex-shrink: 0; text-align: center; }
.post-author .uname { font-size: 12px; font-weight: 600; color: var(--text); margin-top: 6px; word-break: break-word; }
.post-body { flex: 1; min-width: 0; }
.post-meta { font-size: 11px; color: var(--text-dim2); margin-bottom: 8px; }
.post-content { font-size: 13px; color: var(--text); line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; }

.composer textarea {
    width: 100%; min-height: 110px; padding: 12px;
    background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 8px;
    color: var(--text); font-size: 13px; font-family: inherit; resize: vertical;
}
.composer textarea:focus { outline: none; border-color: var(--white); }

/* ── Auth pages (login / register) — same premium feel as the home hero:
   dotted-grid backdrop + a centered, elevated card instead of a bare form. ── */
.auth-shell {
    position: relative;
    min-height: calc(100vh - 68px - 90px);
    display: flex; align-items: center; justify-content: center;
    padding: 48px 20px; overflow: hidden;
}
.auth-shell::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 55% 65% at 50% 25%, #000 30%, transparent 80%);
}
.auth-box {
    position: relative;
    background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
    padding: 40px 36px; max-width: 380px; width: 100%; margin: 0;
    box-shadow: var(--shadow-md);
}
.auth-logo {
    width: 46px; height: 46px; border-radius: 13px;
    background: var(--white); color: var(--on-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 800; letter-spacing: .2px;
    margin: 0 auto 18px;
}
.auth-title { font-size: 19px; font-weight: 800; letter-spacing: -.3px; color: var(--text); margin-bottom: 4px; text-align: center; }
.auth-sub { font-size: 12.5px; color: var(--text-dim); margin-bottom: 26px; text-align: center; }
.auth-switch { text-align: center; font-size: 12.5px; color: var(--text-dim); margin-top: 16px; }
.auth-switch a { color: var(--white); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* Sign in with Google — white pill button + "or" divider above the form */
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 10px; background: #fff; color: #1f1f1f;
    font-size: 13px; font-weight: 600; border-radius: 9px; border: 1px solid var(--border-2);
}
.btn-google:hover { background: #f0f0f0; }
.auth-or {
    display: flex; align-items: center; gap: 10px; margin: 18px 0;
    color: var(--text-dim2); font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .4px;
}
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Slide-puzzle CAPTCHA modal (forum/_puzzle_widget.php) ──────────────
   Hidden until the Login/Register button opens it; a centered card with an
   SVG "photo" with a puzzle-piece-shaped gap, dragged into place via the
   slider handle below it. ──────────────────────────────────────────────── */
.puzzle-modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(5,8,16,.6); backdrop-filter: blur(2px);
    align-items: center; justify-content: center; padding: 20px;
}
.puzzle-modal-overlay.open { display: flex; }
.puzzle-modal {
    position: relative; width: 100%; max-width: 360px;
    background: var(--panel); border: 1px solid var(--border); border-radius: 18px;
    padding: 26px 24px; box-shadow: var(--shadow-md);
    animation: puzzleModalIn .18s ease;
}
@keyframes puzzleModalIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
.puzzle-modal-title { font-size: 14px; font-weight: 800; color: var(--text); margin-bottom: 14px; text-align: center; }
.puzzle-modal-close {
    position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; padding: 0;
    border-radius: 50%; background: var(--panel-2); border: 1px solid var(--border); color: var(--text-dim);
    display: flex; align-items: center; justify-content: center;
}
.puzzle-modal-close:hover { background: var(--border); color: var(--text); }
.puzzle-modal-close svg { width: 13px; height: 13px; }

.puzzle-wrap {
    position: relative; width: 100%; max-width: 300px; aspect-ratio: 300 / 150;
    margin: 0 auto; border-radius: 10px; overflow: hidden; border: 1px solid var(--border-2);
    background: var(--panel-2);
}
.puzzle-bg, .puzzle-bg svg { display: block; width: 100%; height: 100%; }
.puzzle-piece {
    position: absolute; left: 0; width: 46px; pointer-events: none;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,.55));
}
.puzzle-piece svg { display: block; width: 100%; height: auto; }
.puzzle-reload {
    position: absolute; top: 7px; right: 7px; width: 26px; height: 26px;
    border-radius: 50%; background: rgba(0,0,0,.5);
    display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer;
}
.puzzle-reload:hover { background: rgba(0,0,0,.7); }
.puzzle-reload svg { width: 13px; height: 13px; }

.puzzle-slider { max-width: 300px; margin: 10px auto 0; }
.puzzle-track {
    position: relative; height: 38px; border-radius: 9px; overflow: hidden;
    background: var(--panel-2); border: 1px solid var(--border-2);
}
.puzzle-track-fill {
    position: absolute; left: 0; top: 0; height: 100%; width: 0;
    background: color-mix(in srgb, var(--white) 22%, var(--panel-2));
}
.puzzle-slider-label {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 11px; color: var(--text-dim); pointer-events: none; user-select: none;
    transition: opacity .15s;
}
.puzzle-handle {
    position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 9px;
    background: var(--white); color: var(--on-accent);
    display: flex; align-items: center; justify-content: center;
    cursor: grab; touch-action: none; box-shadow: var(--shadow-sm);
}
.puzzle-handle:active { cursor: grabbing; }
.puzzle-handle svg { width: 16px; height: 16px; }
.puzzle-hint {
    margin-top: 8px; font-size: 11px; color: #ef4444; cursor: pointer;
    text-decoration: underline; text-underline-offset: 2px;
}

/* Icon-adorned inputs — used on auth forms and the account page */
.field-icon { position: relative; }
.field-icon svg {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    width: 15px; height: 15px; color: var(--text-dim2); pointer-events: none;
}
.field-icon input { padding-left: 38px !important; }
.field-icon input:focus + svg,
.field-icon:focus-within svg { color: var(--white); }

/* ── Feed (Facebook-style admin broadcast posts) ─────────────────────── */
.feed-post {
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 10px; padding: 18px; margin-bottom: 14px;
}
.feed-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.feed-author-name { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--white); }
.verified-tick { width: 15px; height: 15px; flex-shrink: 0; }
.feed-time { font-size: 11px; color: var(--text-dim2); margin-top: 1px; }
.feed-content { font-size: 13.5px; color: var(--text); line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; margin-bottom: 12px; }

.feed-stats {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; font-size: 11.5px; color: var(--text-dim2);
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}
.reaction-summary { display: flex; align-items: center; gap: 5px; }
.reaction-summary .rx { font-size: 13px; }

.reaction-bar { display: flex; gap: 2px; margin-bottom: 10px; }
.reaction-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 10px; border-radius: 6px; border: 1px solid transparent;
    background: none; font-size: 12px; font-weight: 600; color: var(--text-dim);
    cursor: pointer; font-family: inherit;
}
.reaction-btn:hover { background: var(--panel-2); color: var(--white); }
.reaction-btn.mine { color: var(--white); background: var(--panel-2); border-color: var(--border-2); }
.reaction-btn .rx { font-size: 14px; }

.comment-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.comment-item { display: flex; gap: 10px; }
.comment-bubble { flex: 1; background: var(--panel-2); border-radius: 10px; padding: 8px 12px; }
.comment-author { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--white); }
.comment-text { font-size: 12.5px; color: var(--text); margin-top: 2px; white-space: pre-wrap; word-wrap: break-word; }
.comment-time { font-size: 10.5px; color: var(--text-dim2); margin-top: 4px; }

.comment-form { display: flex; gap: 10px; align-items: flex-start; }
.comment-form textarea {
    flex: 1; min-height: 38px; max-height: 120px; padding: 9px 12px;
    background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 18px;
    color: var(--text); font-size: 12.5px; font-family: inherit; resize: none;
}
.comment-form textarea:focus { outline: none; border-color: var(--white); }
.comment-form button { border-radius: 18px; }

.composer-box { margin-bottom: 18px; }
.composer-box textarea { min-height: 80px; }

/* ── Hero (home landing page) ────────────────────────────────────────── */
.hero-card {
    position: relative; overflow: hidden;
    background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
    padding: 56px 48px; box-shadow: var(--shadow-md);
}
.hero-card::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 100% 100% at 30% 0%, #000 40%, transparent 85%);
}
/* Faint blue glow tucked into the bottom-right corner only — ambient depth,
   not a visible shape on its own (kept very low opacity on purpose). */
.hero-card::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse 55% 55% at 100% 100%, color-mix(in srgb, var(--white) 12%, transparent) 0%, transparent 70%);
}
.hero-eyebrow {
    position: relative; display: flex; align-items: center; gap: 10px;
    font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
    color: var(--text-dim); margin-bottom: 20px;
}
.hero-eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--white); border-radius: 2px; }
.hero-title { position: relative; font-size: 44px; font-weight: 800; line-height: 1.12; letter-spacing: -.5px; color: var(--text); margin-bottom: 14px; }
.hero-title .accent { color: var(--white); display: block; }
.hero-desc { position: relative; font-size: 14.5px; color: var(--text-dim); line-height: 1.7; max-width: 560px; margin-bottom: 28px; }
.hero-ctas { position: relative; display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-ctas .btn svg { width: 15px; height: 15px; margin-right: 7px; }
.hero-btn-dark { background: var(--text); color: var(--bg); border: 1px solid var(--text); }
.hero-btn-dark:hover { opacity: .88; background: var(--text); }

.section-title { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -.3px; margin-bottom: 6px; }
.section-sub { font-size: 13px; color: var(--text-dim); margin-bottom: 22px; }

@media (max-width: 640px) {
    .hero-card { padding: 32px 22px; }
    .hero-title { font-size: 30px; }
}

/* ── "Why T4X" cards — icon badge instead of bare title+text ─────────── */
.why-card-icon {
    width: 34px; height: 34px; border-radius: 10px; margin-bottom: 12px;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--white) 12%, var(--panel-2)); color: var(--white);
}
.why-card-icon svg { width: 17px; height: 17px; }

/* ── Featured products strip (home.php) — live data from shop_products ─── */
.featured-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.featured-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
    padding: 16px 18px; transition: border-color .15s, transform .15s;
}
.featured-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.featured-name { font-size: 12.5px; font-weight: 700; color: var(--text); }
.featured-price { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 18px; font-weight: 800; color: var(--white); margin: 6px 0 10px; }
.featured-link { font-size: 11.5px; font-weight: 600; color: var(--white); display: flex; align-items: center; gap: 4px; }
.featured-link svg { width: 12px; height: 12px; transition: transform .15s; }
.featured-card:hover .featured-link svg { transform: translateX(2px); }

/* ── "How it works" steps — shared by home.php and shop.php ─────────────── */
.how-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 32px 0; }
.how-step { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.how-num {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    background: color-mix(in srgb, var(--white) 12%, var(--panel)); color: var(--white);
    display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
}
.how-title { font-size: 12.5px; font-weight: 700; color: var(--text); }
.how-desc { font-size: 11.5px; color: var(--text-dim2); margin-top: 2px; line-height: 1.5; }

/* ── FAQ accordion — native <details>, no JS ─────────────────────────────── */
.faq-item { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 2px 18px; margin-bottom: 10px; }
.faq-item summary {
    padding: 15px 0; font-size: 13px; font-weight: 700; color: var(--text);
    cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: ''; width: 8px; height: 8px; flex-shrink: 0; margin-top: -3px;
    border-right: 2px solid var(--text-dim2); border-bottom: 2px solid var(--text-dim2);
    transform: rotate(45deg); transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.faq-item .faq-answer { font-size: 12.5px; color: var(--text-dim); line-height: 1.65; padding-bottom: 16px; }

/* ── Closing CTA banner ───────────────────────────────────────────────────── */
.home-cta {
    position: relative; overflow: hidden; text-align: center;
    padding: 48px 24px; margin-top: 48px;
    background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
}
.home-cta::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: radial-gradient(ellipse 70% 90% at 50% 100%, #000 30%, transparent 85%);
}
.home-cta-title { position: relative; font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -.3px; margin-bottom: 8px; }
.home-cta-sub { position: relative; font-size: 13px; color: var(--text-dim); margin-bottom: 22px; }
.home-cta-row { position: relative; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── Alerts — colored by outcome instead of one flat neutral box ───────── */
.alert { display: flex; align-items: center; gap: 10px; }
.alert svg { width: 16px; height: 16px; flex-shrink: 0; }
.alert-error { border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.10); color: #ef4444; }
.alert-success { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.10); color: #16a34a; }

/* ── Empty state — icon instead of bare text ────────────────────────────── */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-state svg { width: 30px; height: 30px; color: var(--text-dim2); opacity: .7; }

/* ── Account dashboard shell (forum/_account_header.php / _account_footer.php)
   Sidebar (profile + nav) + main content — Key của tôi / Nạp tiền / Mật khẩu. */
.acct-shell { display: grid; grid-template-columns: 224px 1fr; gap: 22px; align-items: start; }
@media (max-width: 780px) { .acct-shell { grid-template-columns: 1fr; } }

.acct-sidebar {
    background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
    padding: 14px; position: sticky; top: 76px;
}
.acct-profile {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 6px 14px; margin-bottom: 10px; border-bottom: 1px solid var(--border);
}
.acct-profile-name { font-size: 13px; font-weight: 700; color: var(--text); }
.acct-profile-role { font-size: 11px; color: var(--text-dim2); margin-top: 2px; }
.acct-nav-label {
    font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
    color: var(--text-dim2); padding: 0 8px; margin-bottom: 6px;
}
.acct-nav-link {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
    font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 2px;
}
.acct-nav-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.acct-nav-link:hover { background: var(--panel-2); color: var(--text); }
.acct-nav-link.active { background: color-mix(in srgb, var(--white) 12%, var(--panel)); color: var(--white); }
.acct-main { min-width: 0; }

/* ── Payment page (order_pay.php / deposit_pay.php) — QR + copyable bank
   details + live countdown, shared by both key-purchase and wallet-topup
   checkout since they're the same PayOS flow underneath. ──────────────── */
.pay-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
    padding: 28px 26px; text-align: center; box-shadow: var(--shadow-md);
}
.pay-amount-label { font-size: 11px; color: var(--text-dim2); text-transform: uppercase; letter-spacing: .4px; }
.pay-amount-value { font-size: 32px; font-weight: 800; color: var(--white); margin: 6px 0 18px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.pay-qr-wrap { display: inline-block; padding: 10px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-sm); }
.pay-qr-wrap img { display: block; width: 200px; height: 200px; border-radius: 8px; }
.pay-timer { margin-top: 14px; font-size: 11.5px; color: var(--text-dim); }
.pay-timer b { color: var(--white); font-variant-numeric: tabular-nums; }

.pay-details { margin-top: 18px; text-align: left; }
.pay-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--border); }
.pay-detail-row:last-child { border-bottom: none; }
.pay-detail-label { font-size: 10.5px; color: var(--text-dim2); text-transform: uppercase; letter-spacing: .3px; }
.pay-detail-value { font-size: 13px; font-weight: 700; color: var(--text); margin-top: 2px; word-break: break-word; }
.pay-copy-btn {
    width: 30px; height: 30px; padding: 0; border-radius: 8px; flex-shrink: 0;
    background: var(--panel-2); border: 1px solid var(--border-2); color: var(--text-dim);
    display: flex; align-items: center; justify-content: center;
}
.pay-copy-btn:hover { color: var(--white); border-color: var(--white); background: var(--panel-2); transform: none; box-shadow: none; }
.pay-copy-btn svg { width: 13px; height: 13px; }
.pay-copy-btn.copied { color: #16a34a; border-color: #16a34a; }

.pay-status-card { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; margin-top: 14px; }
.pay-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--white); animation: payPulse 1.4s ease-in-out infinite; }
@keyframes payPulse { 0%, 100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.2); } }
.pay-status-text { font-size: 12.5px; color: var(--text-dim); }

/* ── Order success ────────────────────────────────────────────────────── */
.success-check {
    width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 16px;
    background: color-mix(in srgb, #16a34a 16%, var(--panel));
    display: flex; align-items: center; justify-content: center; color: #16a34a;
}
.success-check svg { width: 30px; height: 30px; }
.success-title { font-size: 17px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.success-sub { font-size: 12.5px; color: var(--text-dim); margin-bottom: 22px; }

/* Page-specific shop, vault and wallet components are consolidated in
   public-v2.css so PHP templates remain presentation-free. */

/* ── iPhone Web Clip profile ─────────────────────────────────────────── */
.ios-profile-card {
    display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 30px;
    align-items: center; overflow: hidden; padding: 30px;
    background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
    box-shadow: var(--shadow-md);
}
.ios-profile-art {
    width: 190px; height: 190px; display: grid; place-items: center;
    border-radius: 42px; overflow: hidden;
    background: radial-gradient(circle at 50% 35%, rgba(88, 101, 242, .25), transparent 62%), var(--panel-2);
    border: 1px solid var(--border-2);
}
.ios-profile-art img { width: 148px; height: 164px; object-fit: contain; }
.ios-profile-badge {
    display: inline-flex; padding: 5px 9px; border-radius: 999px;
    background: var(--accent-soft); color: var(--white); font-size: 10px;
    font-weight: 800; letter-spacing: .45px; text-transform: uppercase;
}
.ios-profile-copy h2 { margin: 12px 0 7px; color: var(--text); font-size: 24px; }
.ios-profile-copy > p { color: var(--text-dim); font-size: 13px; line-height: 1.6; }
.ios-profile-steps { margin: 18px 0 22px; padding-left: 20px; color: var(--text-dim); font-size: 12.5px; line-height: 1.9; }
.ios-profile-download { display: inline-flex; width: auto; align-items: center; gap: 8px; }
.ios-profile-download svg { width: 16px; height: 16px; }
@media (max-width: 620px) {
    .ios-profile-card { grid-template-columns: 1fr; padding: 22px; }
    .ios-profile-art { width: 132px; height: 132px; border-radius: 30px; }
    .ios-profile-art img { width: 104px; height: 114px; }
}
