/* ============================
   GAMIFICATION & LAINNYA TAB CSS — v2.0
   ============================ */

/* ── CRITICAL: Section header icon sizing ──
   Without this, SVGs inside h2 render at 100% width */
.section-icon-svg {
    display: inline-block;
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
    vertical-align: middle;
    margin-right: 7px;
    color: var(--primary);
}

/* Fix: section-header h2 must be flex so SVG stays inline */
.section-header h2 {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 1rem !important;
    font-weight: 700;
    margin: 0;
}

/* ── Form group (missing from style.css) ── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.form-group label {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.form-group select,
.form-group input {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 0.82rem;
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ── Card title (missing from style.css) ── */
.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-title svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ── Badge strip (leaderboard inline) ── */
.badge-strip { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
.badge-icon-sm {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--primary-light); color: var(--primary);
    cursor: default; transition: transform 0.2s;
}
.badge-icon-sm:hover { transform: scale(1.15); }
.badge-icon-sm svg { width: 13px; height: 13px; }
.streak-indicator {
    font-size: 0.75rem; color: #f59e0b; font-weight: 600; margin-left: 4px;
}

/* ── Sub-navigation ── */
.sub-tabs {
    display: flex; gap: 4px; margin: 14px 0 18px;
    background: var(--border-light);
    border-radius: var(--radius-sm); padding: 3px;
    overflow-x: auto; scrollbar-width: none;
}
.sub-tabs::-webkit-scrollbar { display: none; }
[data-theme="dark"] .sub-tabs { background: rgba(255,255,255,0.06); }
.sub-tab {
    flex: 1; min-width: 72px; display: flex; align-items: center;
    justify-content: center; gap: 5px; padding: 9px 10px;
    font-size: 0.78rem; font-weight: 600; cursor: pointer;
    border-radius: calc(var(--radius-sm) - 2px);
    transition: all 0.2s ease; color: var(--text-light);
    background: transparent; border: none; white-space: nowrap;
}
.sub-tab:hover { color: var(--text); background: rgba(0,0,0,0.04); }
[data-theme="dark"] .sub-tab:hover { background: rgba(255,255,255,0.07); }
.sub-tab.active {
    background: var(--bg-card); color: var(--primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
[data-theme="dark"] .sub-tab.active {
    background: rgba(255,255,255,0.1); color: #fff; box-shadow: none;
}
.subtab-icon-svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.2px; transition: transform 0.2s; }
.sub-tab:hover .subtab-icon-svg { transform: scale(1.1); }
.subtab-label { font-size: 0.72rem; }
.subtab-content { display: none; }
.subtab-content.active { display: block; animation: fadeIn 0.25s ease; }

/* ── Gamification Summary Grid ── */
.g-summary-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px;
}
.g-card {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius); padding: 16px 12px;
    text-align: center; box-shadow: var(--shadow);
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; transition: transform 0.2s, box-shadow 0.2s;
    position: relative; overflow: hidden;
}
.g-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.g-card-icon {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; background: var(--primary-light);
    border-radius: 50%; margin-bottom: 8px; color: var(--primary);
}
.g-card-icon svg { width: 18px; height: 18px; }
.g-card-val { font-size: 1.6rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.g-card-label {
    font-size: 0.68rem; font-weight: 700; color: var(--text-light);
    margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em;
}
.g-card-sub { font-size: 0.63rem; color: var(--text-muted); margin-top: 5px; line-height: 1.35; }
.g-card.streak-hot { border-color: rgba(239,68,68,0.25); }
.g-card.streak-hot .g-card-icon { background: rgba(239,68,68,0.1); color: var(--danger); }
.g-card.streak-hot .g-card-val { color: var(--danger); }
.g-empty { text-align: center; padding: 28px 16px; color: var(--text-muted); font-size: 0.85rem; }

.g-user-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin: 8px 0 12px;
    box-shadow: var(--shadow);
}

.g-user-badge-name {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text);
}

.g-user-badge-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* ── Badge Cards (Pencapaian sub-tab) ── */
.badge-cards-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0;
}
.badge-card {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); padding: 10px 8px;
    text-align: center; box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s; cursor: default;
}
.badge-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.badge-card-icon {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%;
    margin: 0 auto 6px; transition: transform 0.2s;
}
.badge-card-icon svg { width: 18px; height: 18px; }
.badge-card:hover .badge-card-icon { transform: scale(1.1); }
.badge-card-name { font-size: 0.7rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.badge-card-desc { font-size: 0.58rem; color: var(--text-muted); line-height: 1.25; }
.badge-card-date { font-size: 0.56rem; color: var(--text-muted); margin-top: 4px; font-style: italic; }

@media (max-width: 420px) {
    .badge-cards-grid { gap: 7px; }
    .badge-card { padding: 9px 7px; }
    .badge-card-icon { width: 34px; height: 34px; }
    .badge-card-icon svg { width: 16px; height: 16px; }
}
.badges-empty {
    text-align: center; padding: 24px 16px; color: var(--text-muted);
    font-size: 0.82rem; background: var(--bg-card); border-radius: var(--radius-sm);
    border: 1px dashed var(--border-light); margin: 12px 0;
}

/* ── Activity Feed ── */
.activity-feed-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.activity-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: var(--bg-card);
    border: 1px solid var(--border-light); border-radius: var(--radius-sm);
    box-shadow: var(--shadow); transition: background 0.15s;
}
.activity-item:hover { background: var(--border-light); }
.activity-icon {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; background: var(--primary-light);
    border-radius: 50%; flex-shrink: 0; color: var(--primary);
}
.activity-icon svg { width: 14px; height: 14px; }
.activity-text { flex: 1; font-size: 0.8rem; color: var(--text); line-height: 1.35; }
.activity-text strong { color: var(--primary); }
.activity-time { font-size: 0.65rem; color: var(--text-muted); white-space: nowrap; }

/* ── Comments (Comment Wall & Trash Talk) ── */
.comments-list {
    display: flex; flex-direction: column; gap: 8px;
    max-height: 360px; overflow-y: auto;
    padding-right: 2px; margin-bottom: 12px;
    scrollbar-width: thin; scrollbar-color: var(--border-light) transparent;
}

.social-thread {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 10px;
}

.social-thread + .social-thread {
    margin-top: 10px;
}

.social-thread-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.social-thread-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.social-thread-badge.comment {
    background: rgba(26, 115, 232, 0.12);
    color: var(--primary);
}

.social-thread-badge.trash {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.social-thread-count {
    font-size: 0.66rem;
    color: var(--text-muted);
    font-weight: 700;
}

.comments-list-trash .comment-item.comment-trash {
    border-left-width: 3px;
}
.comments-list::-webkit-scrollbar { width: 4px; }
.comments-list::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }
.comment-item {
    padding: 10px 14px; background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); transition: background 0.15s; position: relative;
}
.comment-item:hover { background: var(--border-light); }
.comment-item.comment-trash {
    border-left: 3px solid var(--danger);
    background: linear-gradient(to right, rgba(239,68,68,0.04), var(--bg-card));
}
.comment-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 5px; gap: 8px;
}
.comment-author { font-size: 0.78rem; font-weight: 700; color: var(--primary); }
.comment-time { font-size: 0.62rem; color: var(--text-muted); }
.comment-body { font-size: 0.82rem; color: var(--text); line-height: 1.4; word-break: break-word; }
.comment-flagged {
    display: flex; align-items: center; gap: 4px;
    font-size: 0.7rem; color: #f59e0b; margin-top: 6px;
    background: rgba(245,158,11,0.08); padding: 4px 8px;
    border-radius: var(--radius-xs); width: fit-content;
}
.comment-flagged svg { width: 12px; height: 12px; }
.comment-delete {
    position: absolute; top: 8px; right: 8px;
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; padding: 3px; border-radius: 4px; opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}
.comment-item:hover .comment-delete { opacity: 1; }
.comment-delete:hover { color: var(--danger); }
.comment-delete svg { width: 13px; height: 13px; }
.comment-form {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); padding: 10px; margin-top: 4px;
}
.comment-input-row { display: flex; gap: 8px; align-items: center; }
.comment-input {
    flex: 1; background: var(--bg); border: 1px solid var(--border-light);
    border-radius: var(--radius-xs); padding: 8px 10px;
    font-size: 0.82rem; color: var(--text); font-family: inherit;
    transition: border-color 0.2s;
}
.comment-input:focus { outline: none; border-color: var(--primary); }
.comment-input::placeholder { color: var(--text-muted); }
.btn-comment-send {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: var(--radius-xs);
    background: var(--primary); color: #fff; border: none; cursor: pointer;
    transition: background 0.2s, transform 0.1s; flex-shrink: 0;
}
.btn-comment-send:hover { background: var(--primary-dark, #1558d6); transform: scale(1.05); }
.btn-comment-send svg { width: 14px; height: 14px; }
.comment-char-count { font-size: 0.6rem; color: var(--text-muted); text-align: right; margin-top: 4px; }
.comments-empty, .reports-empty {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 8px; padding: 32px 20px;
    color: var(--text-muted); font-size: 0.82rem; text-align: center;
}

.social-thread .comments-empty {
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-xs);
    padding: 20px 14px;
}
.comments-empty-icon, .reports-empty-icon { color: var(--text-muted); opacity: 0.5; }

/* ── Fund Dashboard ── */
.fund-dashboard { display: flex; flex-direction: column; gap: 18px; }
.fund-hero {
    background: linear-gradient(135deg, var(--primary-light), rgba(26,115,232,0.03));
    border: 1px solid rgba(26,115,232,0.15);
    border-radius: var(--radius); padding: 24px 20px;
    text-align: center; box-shadow: var(--shadow);
    display: flex; flex-direction: column; align-items: center; gap: 5px;
}
[data-theme="dark"] .fund-hero {
    background: linear-gradient(135deg, rgba(74,154,245,0.12), rgba(74,154,245,0.03));
    border-color: rgba(74,154,245,0.2);
}
.fund-hero-icon {
    display: flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; background: var(--bg-card);
    border-radius: 50%; margin-bottom: 6px;
    box-shadow: var(--shadow); color: var(--primary);
}
.fund-hero-icon svg { width: 26px; height: 26px; }
.fund-hero-label {
    font-size: 0.72rem; font-weight: 700; color: var(--text-light);
    text-transform: uppercase; letter-spacing: 0.06em;
}
.fund-hero-amount {
    font-size: 2rem; font-weight: 900; color: var(--primary); line-height: 1.1;
}
.fund-hero-sub { font-size: 0.72rem; color: var(--text-muted); }

/* ── My Estimated Prize (current leaderboard position) ── */
.fund-myposition {
    border-radius: var(--radius-sm);
    padding: 16px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    position: relative;
    overflow: hidden;
}
.fund-myposition::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 4px;
    background: var(--text-muted);
}
.fund-myposition.mypos-gold::before { background: linear-gradient(180deg, #fbbf24, #f59e0b); }
.fund-myposition.mypos-silver::before { background: linear-gradient(180deg, #cbd5e1, #94a3b8); }
.fund-myposition.mypos-bronze::before { background: linear-gradient(180deg, #fb923c, #ea580c); }
.fund-myposition.mypos-outside::before { background: var(--border); }
.fund-myposition.mypos-gold { background: linear-gradient(135deg, rgba(251,191,36,0.10), transparent); }
.fund-myposition.mypos-silver { background: linear-gradient(135deg, rgba(148,163,184,0.10), transparent); }
.fund-myposition.mypos-bronze { background: linear-gradient(135deg, rgba(234,88,12,0.10), transparent); }

.mypos-head {
    display: flex; justify-content: space-between; align-items: center;
    gap: 8px; margin-bottom: 12px;
}
.mypos-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.7rem; font-weight: 700; color: var(--text-light);
    text-transform: uppercase; letter-spacing: 0.04em;
}
.mypos-rank {
    font-size: 0.82rem; font-weight: 800; color: var(--text);
    padding: 3px 10px; border-radius: 12px; background: var(--border-light);
}
.mypos-gold .mypos-rank { color: #b45309; background: rgba(251,191,36,0.18); }
.mypos-silver .mypos-rank { color: #475569; background: rgba(148,163,184,0.18); }
.mypos-bronze .mypos-rank { color: #c2410c; background: rgba(234,88,12,0.18); }

.mypos-eligible { text-align: left; }
.mypos-eligible-label { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 2px; }
.mypos-amount {
    font-size: 1.8rem; font-weight: 900; line-height: 1.1; color: var(--secondary);
}
.mypos-amount-zero { color: var(--text-muted); }
.mypos-net { font-size: 0.74rem; font-weight: 600; margin-top: 2px; color: var(--text-light); }
.mypos-net.up { color: var(--secondary); }
.mypos-net.down { color: var(--danger); }
.mypos-points {
    font-size: 0.72rem; font-weight: 600; color: var(--text-light);
    margin-top: 10px;
}
.mypos-tie {
    font-size: 0.7rem; color: #b45309; background: rgba(251,191,36,0.12);
    padding: 6px 10px; border-radius: var(--radius-xs); margin-top: 8px; line-height: 1.4;
}
.mypos-note {
    font-size: 0.66rem; color: var(--text-muted); margin: 8px 0 0; line-height: 1.4;
}
.fund-prizes h3, .fund-auditors h3, .fund-history h3 {
    font-size: 0.92rem; font-weight: 700; margin-bottom: 12px;
    display: flex; align-items: center; gap: 7px; color: var(--text);
}

.fund-profit h3 {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text);
}

.profit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.profit-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px 10px;
    box-shadow: var(--shadow);
    text-align: center;
}

.profit-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 4px;
}

.profit-main {
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.15;
}

.profit-main.up { color: var(--secondary); }
.profit-main.down { color: var(--danger); }

.profit-sub {
    margin-top: 4px;
    font-size: 0.64rem;
    color: var(--text-muted);
}

.profit-note {
    margin-top: 10px;
    font-size: 0.68rem;
    color: var(--text-muted);
}

.profit-top1 { border-color: rgba(251,191,36,0.28); }
.profit-top2 { border-color: rgba(148,163,184,0.3); }
.profit-top3 { border-color: rgba(249,115,22,0.28); }
.prize-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.prize-card {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); padding: 14px 8px;
    text-align: center; box-shadow: var(--shadow);
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    transition: transform 0.2s;
}
.prize-card:hover { transform: translateY(-2px); }
.prize-rank {
    font-size: 0.7rem; font-weight: 700; color: var(--text-light);
    display: flex; align-items: center; gap: 3px;
}
.prize-pct { font-size: 1.35rem; font-weight: 800; margin: 3px 0; }
.prize-amount { font-size: 0.8rem; font-weight: 700; color: var(--primary); }
.prize-gold { border-color: rgba(251,191,36,0.3); background: linear-gradient(180deg,var(--bg-card) 0%,rgba(251,191,36,0.05) 100%); }
.prize-gold .prize-pct { color: #fbbf24; }
.prize-silver { border-color: rgba(148,163,184,0.3); background: linear-gradient(180deg,var(--bg-card) 0%,rgba(148,163,184,0.05) 100%); }
.prize-silver .prize-pct { color: #94a3b8; }
.prize-bronze { border-color: rgba(249,115,22,0.3); background: linear-gradient(180deg,var(--bg-card) 0%,rgba(249,115,22,0.05) 100%); }
.prize-bronze .prize-pct { color: #ea580c; }
.auditor-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.auditor-card {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-xs); padding: 10px 12px;
    display: flex; align-items: center; gap: 8px;
    font-size: 0.75rem; box-shadow: var(--shadow);
}
.auditor-icon { display: flex; align-items: center; color: var(--secondary); flex-shrink: 0; }
.auditor-icon svg { width: 14px; height: 14px; }
.auditor-name { font-weight: 600; color: var(--text); }
.auditor-phone { color: var(--text-muted); margin-left: auto; font-size: 0.68rem; }
.auditor-note { font-size: 0.63rem; color: var(--text-muted); margin-top: 7px; font-style: italic; }
.fund-history-item {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); padding: 12px 16px;
    margin-bottom: 8px; box-shadow: var(--shadow);
}
.fh-date {
    font-size: 0.67rem; font-weight: 700; color: var(--text-light);
    text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px;
}
.fh-stats {
    display: flex; justify-content: space-between;
    font-size: 0.82rem; font-weight: 700; color: var(--text); margin-bottom: 3px;
}
.fh-note { font-size: 0.73rem; color: var(--text-light); margin-top: 4px; }
.fh-verified { font-size: 0.63rem; font-weight: 600; margin-top: 6px; }

/* ── Head-to-Head ── */
.h2h-vs { margin-top: 10px; }
.h2h-vs-title {
    text-align: center; font-size: 0.95rem; font-weight: 700;
    margin-bottom: 16px; color: var(--primary);
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.h2h-vs-grid {
    display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px;
    align-items: center; background: var(--border-light);
    border: 1px solid var(--border-light); padding: 18px 14px;
    border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px;
}
[data-theme="dark"] .h2h-vs-grid { background: rgba(0,0,0,0.18); }
.h2h-vs-stat { text-align: center; }
.h2h-vs-stat .val { font-size: 1.7rem; font-weight: 900; color: var(--primary); line-height: 1.1; }
.h2h-vs-stat .lbl { font-size: 0.78rem; font-weight: 700; color: var(--text-light); margin-top: 4px; }
.h2h-vs-stat .rank { font-size: 0.63rem; color: var(--text-muted); margin-top: 2px; }
.h2h-vs-divider {
    text-align: center; display: flex; flex-direction: column;
    gap: 5px; align-items: center; justify-content: center; min-width: 56px;
}
.h2h-vs-divider .vs-badge {
    font-size: 0.82rem; font-weight: 800; color: var(--primary);
    background: var(--primary-light); padding: 3px 10px; border-radius: 20px;
}
.h2h-vs-divider .draws { font-size: 0.62rem; color: var(--text-muted); }
.h2h-outcome-badges {
    display: flex; gap: 10px; justify-content: center; margin-bottom: 16px;
}
.h2h-outcome-badge { font-size: 0.72rem; font-weight: 700; padding: 4px 14px; border-radius: 20px; }
.h2h-outcome-badge.won { background: var(--secondary-light); color: var(--secondary); }
.h2h-outcome-badge.lost { background: rgba(239,68,68,0.1); color: var(--danger); }
.h2h-history-title { font-size: 0.82rem; font-weight: 700; color: var(--text-light); margin-bottom: 8px; }
.h2h-history-list {
    max-height: 240px; overflow-y: auto; display: flex;
    flex-direction: column; gap: 6px;
    scrollbar-width: thin; scrollbar-color: var(--border-light) transparent;
}
.h2h-history-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 13px; background: var(--bg-card);
    border: 1px solid var(--border-light); border-radius: var(--radius-xs);
    font-size: 0.78rem; transition: background 0.15s;
}
.h2h-history-item:hover { background: var(--border-light); }
.h2h-history-item .match-name { font-weight: 500; color: var(--text); }
.h2h-history-item .match-diff { font-weight: 700; }
.h2h-history-item .match-diff.won { color: var(--secondary); }
.h2h-history-item .match-diff.lost { color: var(--danger); }
.h2h-history-item .match-diff.draw { color: var(--text-muted); }

/* ── Reports ── */
.reports-list { display: flex; flex-direction: column; gap: 10px; }
.reports-count {
    font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.report-item {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); padding: 14px 16px; box-shadow: var(--shadow);
    transition: background 0.15s;
}
.report-item:hover { background: var(--border-light); }
.report-item-header {
    display: flex; justify-content: space-between; align-items: center;
    gap: 8px; margin-bottom: 6px;
}
.report-type {
    font-size: 0.78rem; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 5px;
}
.report-status {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.68rem; font-weight: 600; padding: 2px 8px;
    border-radius: 12px; background: var(--primary-light); color: var(--primary);
}
.report-status svg { width: 12px; height: 12px; }
.report-pending .report-status { background: rgba(245,158,11,0.1); color: #f59e0b; }
.report-investigating .report-status { background: rgba(99,102,241,0.1); color: #6366f1; }
.report-resolved .report-status { background: var(--secondary-light); color: var(--secondary); }
.report-dismissed .report-status { background: rgba(100,116,139,0.1); color: var(--text-muted); }
.report-escalated .report-status { background: rgba(239,68,68,0.1); color: var(--danger); }
.report-desc { font-size: 0.8rem; color: var(--text); line-height: 1.4; margin-bottom: 8px; }
.report-meta {
    display: flex; justify-content: space-between; gap: 8px;
    font-size: 0.68rem; color: var(--text-muted);
}
.report-admin-notes {
    display: flex; align-items: flex-start; gap: 6px; margin-top: 8px;
    font-size: 0.75rem; color: var(--text-light);
    background: var(--border-light); padding: 8px 10px;
    border-radius: var(--radius-xs); line-height: 1.4;
}
.report-admin-notes svg { flex-shrink: 0; margin-top: 2px; }

/* ── Report Form ── */
.report-form { display: flex; flex-direction: column; gap: 14px; padding: 4px 0; }
.report-form h4 {
    font-size: 0.9rem; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 7px; margin: 0;
}
.report-form h4 svg { color: var(--danger); }
.report-target {
    font-size: 0.82rem; color: var(--text-light); margin: 0;
    padding: 8px 12px; background: var(--border-light); border-radius: var(--radius-xs);
}
.report-target strong { color: var(--text); }
.report-field { display: flex; flex-direction: column; gap: 5px; }
.report-field label {
    font-size: 0.74rem; font-weight: 600; color: var(--text-light);
    text-transform: uppercase; letter-spacing: 0.03em;
}
.report-field select,
.report-field textarea,
.report-field input[type="text"] {
    width: 100%; padding: 9px 12px;
    background: var(--bg); border: 1px solid var(--border-light);
    border-radius: var(--radius-xs); font-size: 0.82rem; color: var(--text);
    font-family: inherit; transition: border-color 0.2s; box-sizing: border-box;
}
.report-field select:focus,
.report-field textarea:focus,
.report-field input[type="text"]:focus { outline: none; border-color: var(--primary); }
.report-field textarea { resize: vertical; min-height: 80px; line-height: 1.4; }
.char-count { font-size: 0.62rem; color: var(--text-muted); text-align: right; }
.report-info {
    background: var(--border-light); border-radius: var(--radius-xs);
    padding: 10px 12px; display: flex; flex-direction: column; gap: 6px;
}
.report-info p {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 0.76rem; color: var(--text-light); margin: 0; line-height: 1.45;
}
.report-info p svg { flex-shrink: 0; margin-top: 1px; opacity: 0.7; }
.report-info p strong { color: var(--text); }
.report-actions { display: flex; gap: 10px; }
.report-actions .btn { flex: 1; }

/* ── Inline report button ── */
.btn-report {
    display: inline-flex; align-items: center; gap: 4px;
    background: none; border: 1px solid rgba(239,68,68,0.3);
    color: var(--danger); font-size: 0.72rem; padding: 4px 10px;
    border-radius: var(--radius-xs); cursor: pointer; font-weight: 600;
    transition: background 0.2s, border-color 0.2s;
}
.btn-report:hover { background: rgba(239,68,68,0.08); border-color: var(--danger); }
.btn-report svg { width: 12px; height: 12px; }

/* ── Streak Badge (leaderboard) ── */
.streak-badge {
    display: inline-block; font-size: 0.63rem;
    background: #fef3c7; color: #92400e;
    padding: 1px 6px; border-radius: 8px; margin-left: 4px; font-weight: 600;
}
[data-theme="dark"] .streak-badge { background: rgba(245,158,11,0.15); color: #f59e0b; }

/* ── Prediction Stats Grid ── */
.pred-stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0;
}
.pstat {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-xs); padding: 10px 8px;
    text-align: center; box-shadow: var(--shadow);
}
.pstat-val { display: block; font-size: 1.15rem; font-weight: 800; color: var(--text); }
.pstat-label { display: block; font-size: 0.6rem; color: var(--text-muted); margin-top: 2px; }

/* ── Blind Submit Banner ── */
.bs-banner {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    font-size: 0.82rem; font-weight: 500; margin: 10px 0;
}
.bs-banner-open { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2); color: #10b981; }
.bs-banner-locked { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2); color: #f59e0b; }
.bs-banner-closed { background: rgba(100,116,139,0.08); border: 1px solid var(--border-light); color: var(--text-muted); }
.bs-icon { display: flex; align-items: center; flex-shrink: 0; }
.bs-badge {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 0.68rem; font-weight: 700; padding: 2px 8px;
    border-radius: 10px; border: 1px solid currentColor; opacity: 0.85;
}
.bs-badge svg { width: 12px; height: 12px; }
.bs-revealed { color: var(--primary); }
.bs-locked { color: #f59e0b; }
.bs-open { color: #10b981; }

.fund-section {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 20px; margin: 16px 0; border: 1px solid var(--border-light);
}

/* ── LAYOUT FIXES (override any conflicting base styles) ── */

/* Ensure batch-select is full-width when inside form-group */
.form-group .batch-select,
.form-group select {
    width: 100%;
    display: block;
    box-sizing: border-box;
    color: var(--text);
}
[data-theme="dark"] .form-group .batch-select,
[data-theme="dark"] .form-group select {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--border);
}

/* Ensure section-icon-svg never stretches — high specificity rule */
svg.section-icon-svg,
h2 svg.section-icon-svg,
h3 svg.section-icon-svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px;
    max-height: 18px;
    display: inline-block !important;
    flex-shrink: 0;
    vertical-align: middle;
}

/* Override style.css section-header h2 with display:flex for inline icon */
.section-header h2,
.subtab-content .section-header h2 {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    color: var(--text) !important;
}

/* Ensure card in subtab has proper dark mode */
[data-theme="dark"] .subtab-content .card {
    background: var(--bg-card);
    border: 1px solid var(--border);
}

/* Ensure form-group select has text color in dark mode */
[data-theme="dark"] select.batch-select {
    background: var(--bg-card) !important;
    color: var(--text) !important;
}