:root {
    --bg-dark: #000000;
    --panel-bg: #0d0d0d;
    --row-hover: #161616;
    --text-main: #f5f5f5;
    --text-muted: #888;
    --btn-bg: #161a1d;
    --btn-hover: #2a2a2a;
    --success: #03A695;
    --danger: #ff4444;
    --border: #222;
    --radius: 8px;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-dark);
    color: var(--text-main);
    margin: 0;
    padding: 30px 20px 80px;
    overflow-x: hidden;
}

.main-wrapper {
    max-width: 1550px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 25px;
}

h1 {
    color: var(--text-main);
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

header p {
    color: var(--text-muted);
    font-size: .95rem;
    margin: 0;
}

.dashboard {
    background: var(--panel-bg);
    padding: 25px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.filter-row-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.filter-item label {
    font-size: .65rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
}

.filter-item input[type="number"],
.filter-item select {
    background: #161a1d;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 12px;
    border-radius: 6px;
    outline: none;
    font-family: 'Montserrat', sans-serif;
    font-size: .65rem;
    transition: border-color .2s;
    width: 100%;
    box-sizing: border-box;
}

.filter-item input:focus,
.filter-item select:focus {
    border-color: #555;
}

.filter-grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.dashboard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 15px;
}

.toggles-container {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    margin: 0 !important;
    background: #161a1d;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    transition: border-color .2s;
}

.toggle-label:hover {
    border-color: #444;
}

.toggle-label input {
    cursor: pointer;
    width: 14px;
    height: 14px;
    margin: 0;
}

.save-controls {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.btn {
    background: var(--btn-bg);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: .85rem;
    font-family: 'Montserrat', sans-serif;
    transition: all .2s;
    text-transform: uppercase;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
}

.btn:hover {
    background: var(--btn-hover);
    border-color: #555;
}

.btn-save {
    color: var(--success);
    border-color: var(--success);
    background: #0c1614;
}

.btn-save:hover {
    background: #152925;
    border-color: #04d9c4;
}

.btn-delete {
    color: var(--danger);
    border-color: var(--danger);
    background: #1a0808;
    padding: 10px 15px;
}

.btn-delete:hover {
    background: #2a0b0b;
    border-color: #f66;
}

.search-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000;
    border-radius: 22px 22px 0 0;
    padding: 14px 16px;
    z-index: 10000;
    box-shadow: 0 -5px 25px rgba(3, 166, 149, .35), 0 -2px 10px rgba(3, 166, 149, .25);
    overflow: visible;
}

#match-search {
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--radius);
    background: #000;
    border: 1px solid #000;
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color .2s;
}

#match-search:focus {
    border-color: #555;
    outline: none;
}

.search-results {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    z-index: 10001;
    max-height: 350px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .9);
}

.search-item {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background .2s;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: var(--row-hover);
}

.search-team {
    font-weight: 600;
    color: var(--text-main);
}

.search-league {
    font-size: .65rem;
    color: var(--text-muted);
    font-weight: 500;
}

#status {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: .9rem;
}

.results-container {
    overflow-x: auto;
    padding-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel-bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

th,
td {
    padding: 14px 15px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    font-size: .85rem;
}

th {
    background: #050505;
    color: var(--text-muted);
    font-size: .7rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    transition: color .2s;
    user-select: none;
}

th:hover {
    color: var(--text-main);
}

.sort-icon {
    font-size: .6rem;
    margin-left: 4px;
    color: var(--success);
}

.main-row {
    cursor: pointer;
    transition: background .2s;
}

.main-row:hover {
    background: var(--row-hover);
}

.team-col {
    text-align: left;
    font-weight: 600;
    font-size: .75rem;
    white-space: nowrap;
}

.league-info {
    font-size: .7rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

.market-tag {
    background: #161a1d;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #333;
    font-weight: 700;
    font-size: .8rem;
    white-space: nowrap;
    display: inline-block;
    min-width: 90px;
    text-align: center;
    box-sizing: border-box;
}

.high-prob {
    color: var(--success);
    font-weight: 700;
    font-size: .95rem;
}

.low-prob {
    color: var(--danger);
    font-weight: 600;
    font-size: .95rem;
}

.value-odd {
    background: #161a1d;
    border-radius: 6px;
    padding: 6px 10px;
    font-weight: 700;
    border: 1px solid var(--border);
    font-size: .85rem;
    display: inline-block;
    min-width: 56px;
    text-align: center;
    box-sizing: border-box;
}

.fav-btn {
    background: none;
    border: none;
    color: #555;
    font-size: 1.4rem;
    cursor: pointer;
    transition: color .2s, transform .2s;
    line-height: 1;
    padding: 0;
}

.fav-btn:hover {
    color: #f1c40f;
    transform: scale(1.1);
}

.fav-btn.active {
    color: #f1c40f;
    text-shadow: 0 0 8px rgba(241, 196, 15, .6);
}

/* ── Shared icon-button style (desktop table Actions + mobile cards) ── */
.mc-icon-btn {
    background: #2a2a2a;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    color: #aaa;
    padding: 0;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s, color .2s;
    text-decoration: none;
    vertical-align: middle;
}

.mc-icon-btn:hover {
    background: #333;
    color: #fff;
}

.mc-fav {
    background: #2a2a2a;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    color: #555;
    padding: 0;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s, color .2s;
}

.mc-fav:hover {
    background: #333;
    color: #f1c40f;
}

.mc-fav.active {
    color: #f1c40f;
    background: #2a2a2a;
    text-shadow: 0 0 6px rgba(241, 196, 15, .5);
}

.link-btn {
    color: var(--text-muted);
    text-decoration: none;
    font-size: .75rem;
    font-weight: 700;
    border: 1px solid var(--border);
    background: #161a1d;
    padding: 6px 12px;
    border-radius: 4px;
    display: inline-block;
    transition: all .2s;
    text-transform: uppercase;
}

.link-btn:hover {
    background: var(--text-main);
    color: var(--bg-dark);
    border-color: var(--text-main);
}

.team-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 3px;
}

.team-logo-lg {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 4px;
}

.teams-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.team-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.panel-teams-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.3;
}

.panel-vs-sep {
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 500;
}

.ev-positive {
    color: var(--success);
    font-weight: 700;
}

.ev-negative {
    color: var(--danger);
    font-weight: 700;
}

.ev-cell {
    font-size: .9rem;
    letter-spacing: .5px;
}

.stat-card {
    background: #161a1d;
    border-radius: 14px;
    cursor: pointer;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: box-shadow 0.25s;
}

.stat-card:hover {
    box-shadow: 7px 7px 16px #0a0c0e, -7px -7px 16px #222729, 0 0 0 1px #03A69588;
}

.stat-card.selected {
    box-shadow: inset 4px 4px 10px #0a0c0e, inset -4px -4px 10px #222729;
}

.stat-name {
    font-size: .75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
    opacity: 0.7;
    font-weight: 600;
    background: #161a1d;
    box-shadow: inset 2px 2px 5px #0a0c0e, inset -2px -2px 5px #222729;
    border-radius: 8px;
    padding: 4px 10px;
    width: 100%;
    text-align: center;
}

.stat-val {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    background: #161a1d;
    box-shadow: inset 3px 3px 7px #0a0c0e, inset -3px -3px 7px #222729;
    border-radius: 10px;
    padding: 6px 16px;
    width: 100%;
    text-align: center;
}

.stat-odd {
    font-size: .7rem;
    color: #03A695;
    letter-spacing: 1px;
    background: #161a1d;
    box-shadow: inset 2px 2px 5px #0a0c0e, inset -2px -2px 5px #222729;
    border-radius: 8px;
    padding: 4px 10px;
    width: 100%;
    text-align: center;
}

.stat-card>div[style*="font-size:.65rem"] {
    background: #161a1d;
    box-shadow: inset 2px 2px 4px #0a0c0e, inset -2px -2px 4px #222729;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: .65rem;
    color: #555;
    width: 100%;
    text-align: center;
    margin-bottom: 2px;
}

.add-bet-btn {
    background: #161a1d;
    box-shadow: 3px 3px 7px #0a0c0e, -3px -3px 7px #222729;
    border: none;
    border-radius: 10px;
    color: #03A695;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 2px;
    width: 100%;
    padding: 8px 0;
    cursor: pointer;
    transition: box-shadow 0.2s, color 0.2s;
    margin-top: 4px;
}

.add-bet-btn:hover {
    box-shadow: inset 2px 2px 5px #0a0c0e, inset -2px -2px 5px #222729;
    color: #ffffff;
}








.multi-select-wrapper {
    position: relative;
}

.multi-select-btn {
    background: #161a1d;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 12px;
    border-radius: 6px;
    width: 100%;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-size: .65rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .2s;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.multi-select-btn:hover {
    border-color: #555;
}

.multi-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    z-index: 1000;
    max-height: 320px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 15px 30px rgba(0, 0, 0, .8);
}

.multi-select-dropdown.active {
    display: block;
}

.multi-select-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background .2s;
}

.multi-select-item:last-child {
    border-bottom: none;
}

.multi-select-item:hover {
    background: var(--row-hover);
}

.multi-select-item input {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--success);
}

.multi-select-item label {
    flex: 1;
    cursor: pointer;
    margin: 0;
    font-size: .9rem;
    font-weight: 500;
}

.add-bet-btn {
    background: #1a3a2e;
    border: 1px solid var(--success);
    color: var(--success);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-left: 6px;
}

.add-bet-btn:hover {
    background: #0c1614;
    border-color: #04d9c4;
}

.floating-bet-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--success);
    color: #000;
    border: none;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: .95rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 25px rgba(3, 166, 149, .4);
    z-index: 990;
    display: none;
    align-items: center;
    gap: 10px;
    transition: transform .2s, background .2s;
}

.floating-bet-btn:hover {
    transform: scale(1.05);
    background: #04d9c4;
}

.floating-bet-btn .badge {
    background: #000;
    color: var(--success);
    border-radius: 50%;
    padding: 2px 8px;
    font-size: .85rem;
}

.bet-slip-container {
    position: fixed;
    top: 0;
    right: -450px;
    width: 400px;
    height: 100vh;
    background: var(--bg-dark);
    border-left: 1px solid var(--border);
    box-shadow: -10px 0 40px rgba(0, 0, 0, .9);
    display: flex;
    flex-direction: column;
    z-index: 1222000;
    transition: right .3s ease-in-out;
}

.bet-slip-container.active {
    right: 0;
}

.bet-slip-header {
    padding: 25px;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bet-slip-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.bet-slip-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

.bet-slip-close:hover {
    color: var(--text-main);
}

.bet-slip-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.bet-slip-item {
    position: relative;
    background: #0f0f0f;
    border: 1px solid #272727;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    color: #fff;
    transition: background .2s, border .2s;
}

.bet-slip-item:hover {
    background: #181818;
    border-color: #3a3a3a;
}

.bet-slip-remove {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 50%;
    transition: background .2s, color .2s;
}

.bet-slip-remove:hover {
    background: #272727;
    color: #fff;
}

.bet-slip-item>span {
    display: block;
    font-size: 11px;
    color: #5e5e5e;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.bet-slip-match {
    font-size: 16px;
    padding: 8px 20px 8px 0;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.bet-slip-odds {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1f1f1f;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
}

.bet-slip-market {
    font-size: 13px;
    color: #ccc;
}

.bet-slip-odds-val {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.bet-slip-footer {
    padding: 25px;
    background: #050505;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bet-slip-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    font-size: .8rem;
}

.bet-slip-stat {
    background: #161a1d;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    text-align: center;
}

.bet-slip-stat-label {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: .7rem;
    letter-spacing: .5px;
}

.bet-slip-stat-value {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 6px;
}

.bet-slip-stake-row {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.bet-slip-stake-row input {
    flex: 1;
    background: #161a1d;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px 15px;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    outline: none;
}

.bet-slip-clear-btn {
    background: #1a0808;
    color: var(--danger);
    border: 1px solid var(--danger);
    padding: 12px;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: all .2s;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
}

.bet-slip-clear-btn:hover {
    background: #2a0b0b;
    border-color: #f66;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .8);
    z-index: 998;
    display: none;
    opacity: 0;
    transition: opacity .3s;
}

.overlay.active {
    display: block;
    opacity: 1;
}

.side-panel {
    position: fixed;
    top: 0;
    right: -550px;
    width: 500px;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 99999;
    box-shadow: -5px 0 25px rgba(0, 0, 0, .9);
    transition: right .3s ease-in-out;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border);
}

.side-panel.open {
    right: 0;
}

.panel-header {
    padding: 25px;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column-reverse;
}

.panel-title-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    justify-content: center;
    padding: 14px;
}

.panel-title {
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.panel-url {
    font-size: .75rem;
    color: var(--success);
    text-decoration: none;
    display: inline-block;
    margin-top: 6px;
    font-weight: 600;
    transition: color .2s;
}

.panel-url:hover {
    color: #fff;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    margin-left: 10px;
}

.close-btn:hover {
    color: var(--text-main);
}

.panel-controls {
    padding: 15px 25px;
    background: #080808;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-controls select,
.panel-controls input {
    background: #161a1d;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 8px 10px;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: .8rem;
    font-weight: 600;
    outline: none;
}

.panel-controls-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
    width: 100%;
}

.panel-save-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    margin-top: 6px;
}

.panel-controls .input-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-controls input[type="number"] {
    width: 100%;
}

.h2h-stat-box {
    background: #0c1614;
    border: 1px solid var(--success);
    border-radius: 6px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 14px 0;
}

.h2h-stat-box span {
    font-size: .8rem;
    font-weight: 700;
    color: var(--success);
}

.h2h-stat-box div {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.panel-tabs {
    display: flex;
    gap: 10px;
    padding: 15px 25px;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    background: #161a1d;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 10px;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: .65rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    text-align: center;
}

.tab-btn.active {
    color: var(--success);
    border-color: var(--success);
    background: #0c1614;
}

.tab-btn:hover:not(.active) {
    color: var(--text-main);
    border-color: #555;
}

.panel-content {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.team-history-section {
    margin-bottom: 10px;
}

.team-name-header {
    font-size: .95rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
    margin-bottom: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    display: flex;
    justify-content: space-between;
}

.h2h-header {
    color: var(--success);
    border-color: var(--success);
}

.hist-match {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: .85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hist-info {
    flex: 1;
    font-weight: 500;
}

.hist-date {
    color: var(--text-muted);
    font-size: .7rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.score-box {
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 1px;
    min-width: 50px;
    text-align: center;
    background: #161a1d;
}

.score-success {
    color: var(--success);
    border: 1px solid var(--success);
}

.score-fail {
    color: var(--danger);
    border: 1px solid var(--danger);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.stat-card {
    background: #161a1d;
    border: 1px solid var(--border);
    padding: 15px 12px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    transition: transform .1s, border-color .2s, box-shadow .2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #555;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .5);
}

.stat-name {
    font-size: .75rem;
    color: var(--text-muted);
    font-weight: 700;
    line-height: 1.3;
}

.stat-val {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-odd {
    font-size: .8rem;
    color: var(--text-main);
    font-weight: 700;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 6px;
    margin-top: 4px;
}

@media(max-width:900px) {
    .filter-row-container {
        grid-template-columns: 1fr 1fr;
    }
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #161a1d;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: .65rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: all .2s;
    white-space: nowrap;
    margin-bottom: 14px;
}

.filter-toggle-btn.open {
    border-color: var(--success);
    color: var(--success);
    background: #0c1614;
}

.filter-body {
    overflow: hidden;
    transition: max-height .35s ease, opacity .25s ease;
    max-height: 2000px;
    opacity: 1;
}

.filter-body.collapsed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.panel-filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: .68rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: all .2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.panel-filter-toggle-btn.open {
    border-color: var(--success);
    color: var(--success);
}

.panel-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0 8px;
}

.panel-filter-header-label {
    font-size: .62rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.panel-controls-body {
    overflow: hidden;
    transition: max-height .35s ease, opacity .25s ease;
    max-height: 600px;
    opacity: 1;
}

.panel-controls-body.collapsed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.panel-teams-row {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
}

.panel-teams-row .ptn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    font-size: clamp(.68rem, 2vw, 1rem);
    font-weight: 700;
}

.mobile-sort-bar {
    display: none;
}

#mobile-card-list {
    display: none;
}

@media(max-width:768px) {
    body {
        padding: 12px 10px 82px;
    }

    .floating-bet-btn {
        bottom: 78px;
        right: 12px;
        padding: 11px 18px;
        font-size: .85rem;
    }

    .filter-row-container {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 12px;
    }

    .dashboard {
        padding: 12px;
    }

    .dashboard-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .toggles-container {
        flex-wrap: wrap;
        gap: 6px;
    }

    .toggle-label {
        font-size: .7rem;
        padding: 7px 10px;
    }

    .save-controls {
        width: 100%;
    }

    #results-table {
        display: none !important;
    }

    #mobile-card-list {
        display: block !important;
    }

    #mobile-card-list.tp-hidden {
        display: none !important;
    }

    .mobile-sort-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 0 10px;
        flex-wrap: wrap;
    }

    .msb-label {
        font-size: .7rem;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
    }

    .mobile-sort-bar select {
        background: #161a1d;
        color: var(--text-main);
        border: 1px solid var(--border);
        border-radius: 6px;
        padding: 6px 10px;
        font-family: 'Montserrat', sans-serif;
        font-size: .75rem;
        font-weight: 600;
        outline: none;
    }

    .msb-dir-btn {
        background: #161a1d;
        border: 1px solid var(--border);
        color: var(--text-muted);
        padding: 6px 12px;
        border-radius: 6px;
        font-family: 'Montserrat', sans-serif;
        font-size: .72rem;
        font-weight: 700;
        cursor: pointer;
        transition: all .2s;
        white-space: nowrap;
    }

    .msb-dir-btn:hover {
        border-color: var(--success);
        color: var(--success);
    }

    :root {
        --teal: #03A695;
        --teal-dim: #03A69588;
        --teal-glow: #03A69544;
        --teal-dark: #02564f;
        --bg: #161a1d;
        --bg-dark: #0a0c0e;
        --bg-light: #222729;
    }

    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }


    .mc {
        border-radius: 12px;
        background: #121212;
        overflow: hidden;
        cursor: pointer;
        margin: 7px;
        padding: 14px;
    }

    .mc-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 10px;
        background: #121212;
        border-bottom: none;
        gap: 8px;
    }

    .mc-league {
        font-size: 11px;
        color: #B4B2A9;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
        flex: 1;
        max-width: calc(100% - 110px);
    }

    .mc-top-actions {
        display: flex;
        gap: 6px;
        flex-shrink: 0;
    }

    .mc-icon-btn {
        background: #2a2a2a;
        border: none;
        border-radius: 6px;
        font-size: 16px;
        cursor: pointer;
        color: #aaa;
        padding: 0;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: background .2s, color .2s;
    }

    .mc-icon-btn:hover {
        background: #333;
        color: #fff;
    }

    .mc-fav {
        background: #2a2a2a;
        border: none;
        border-radius: 6px;
        font-size: 16px;
        cursor: pointer;
        color: #555;
        padding: 0;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: background .2s, color .2s;
    }

    .mc-fav:hover {
        background: #333;
        color: #f1c40f;
    }

    .mc-fav.active {
        color: #f1c40f;
        background: #2a2a2a;
        text-shadow: 0 0 6px rgba(241, 196, 15, .5);
    }

    .mc-main {
        padding: 10px 12px 6px;
    }

    .mc-teams {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 22px;
    }

    .mc-team {
        flex: 1;
        display: flex;
        align-items: center;
        min-width: 0;
    }

    .mc-team.home {
        flex-direction: row-reverse;
        justify-content: flex-start;
        gap: 6px;
    }

    .mc-team.away {
        flex-direction: row;
        justify-content: flex-start;
        gap: 6px;
    }

    .mc-tname {
        font-size: 13px;
        font-weight: 500;
        color: #fff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }

    .mc-logo {
        width: 24px;
        height: 24px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .mc-time-wrap {
        flex: 0 0 60px;
        text-align: center;
        flex-shrink: 0;
    }

    .mc-time-val {
        font-size: 12px;
        font-weight: 500;
        color: #888780;
        background: #1e1e1e;
        border-radius: 4px;
        padding: 3px 8px;
        display: inline-block;
        white-space: nowrap;
    }

    .mc-stats {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 12px 10px;
        margin-top: 6px;
    }

    .mc-stat {
        flex: 1;
        text-align: center;
    }

    .mc-slabel {
        font-size: 11px;
        color: #555;
    }

    .mc-sval {
        font-size: 13px;
        font-weight: 500;
    }

    .mc-market-col {
        flex: 0 0 90px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }

    .mc-mval {
        font-size: 11px;
        color: #555;
    }

    .mc-odds {
        font-size: 16px;
        font-weight: 500;
        color: #fff;
    }



    .side-panel {
        width: 100%;
        right: -100%;
        height: 100%;
    }

    .panel-header {
        flex-shrink: 0;
        padding: 12px 14px;
    }

    .panel-controls {
        flex-shrink: 0;
        padding: 8px 14px;
        overflow: visible;
    }

    .panel-tabs {
        flex-shrink: 0;
        padding: 8px 14px;
        gap: 6px;
    }

    .panel-content {
        flex: 1;
        overflow-y: auto;
        padding: 12px 14px;
        min-height: 0;
    }

    .bet-slip-container {
        width: 100%;
        right: -100%;
    }
}

/* ── Top Picks Styles ────────────────────────────────────────── */
.tp-tab-btn {
    background: #161a1d;
    border: 1px solid #1a3a2e;
    color: #888;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.tp-tab-btn:hover {
    background: #2a3a35;
    color: #fff;
}

.tp-tab-btn.active {
    background: #03A695;
    border-color: #03A695;
    color: #000;
    box-shadow: 0 0 10px rgba(3, 166, 149, 0.4);
}

.top-picks-tabs-wrapper::-webkit-scrollbar {
    height: 6px;
}

.top-picks-tabs-wrapper::-webkit-scrollbar-track {
    background: #060e0b;
}

.top-picks-tabs-wrapper::-webkit-scrollbar-thumb {
    background: #1a3a2e;
    border-radius: 3px;
}

/* ── Top Picks Card (tpc) ────────────────────────────────────────── */
.tpc {
    background: #111518;
    border: 1px solid #1e2e28;
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s, transform .18s;
    display: flex;
    flex-direction: column;
    gap: 11px;
    overflow: hidden;
}

.tpc:hover {
    border-color: #03A695;
    box-shadow: 0 4px 18px rgba(3,166,149,.18);
    transform: translateY(-2px);
}

/* top row */
.tpc-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.tpc-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.tpc-league {
    font-size: .62rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: .4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tpc-time-row {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.tpc-time-pill {
    font-size: .65rem;
    font-weight: 700;
    color: #03A695;
    background: #061210;
    border: 1px solid #0d2920;
    border-radius: 4px;
    padding: 2px 7px;
    white-space: nowrap;
}

.tpc-date-pill {
    font-size: .62rem;
    font-weight: 600;
    color: #666;
    background: #0d1115;
    border: 1px solid #1e2e28;
    border-radius: 4px;
    padding: 2px 7px;
    white-space: nowrap;
}

/* action buttons */
.tpc-actions {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-shrink: 0;
}

.tpc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid #222;
    background: #1a1e22;
    color: #888;
    font-size: .85rem;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
    font-family: inherit;
    flex-shrink: 0;
}

.tpc-btn:hover { background: #252b30; color: #fff; border-color: #444; }

.tpc-fav { color: #555; }
.tpc-fav.active { color: #f1c40f; border-color: #5a4800; background: #1e1900; }
.tpc-fav:hover  { color: #f1c40f !important; }

.tpc-add { color: #03A695; border-color: #0d2920; background: #061210; font-size:1rem; font-weight:800; }
.tpc-add:hover { background: #03A695 !important; color: #000 !important; border-color: #03A695; }

/* teams */
.tpc-teams {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tpc-team {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.tpc-logo {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    flex-shrink: 0;
    object-fit: contain;
}

.tpc-tname {
    font-size: .85rem;
    font-weight: 700;
    color: #f0f0f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tpc-away-name { color: #999; font-weight: 600; }

/* market + context badges */
.tpc-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.tpc-market-badge {
    font-size: .68rem;
    font-weight: 800;
    color: #03A695;
    background: #061210;
    border: 1px solid #0d3028;
    border-radius: 5px;
    padding: 3px 9px;
    white-space: nowrap;
    letter-spacing: .02em;
}

.tpc-ctx-badge {
    font-size: .65rem;
    font-weight: 700;
    color: #7ab8d8;
    background: #08121c;
    border: 1px solid #102030;
    border-radius: 5px;
    padding: 3px 9px;
    white-space: nowrap;
}

/* bottom row: streak + odds */
.tpc-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0a0d10;
    border: 1px solid #1a2228;
    border-radius: 8px;
    padding: 9px 12px;
    gap: 8px;
}

.tpc-signals {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.tpc-streak {
    font-size: .88rem;
    font-weight: 800;
    color: #03A695;
    white-space: nowrap;
}

.tpc-opp-loss {
    font-size: .68rem;
    font-weight: 800;
    color: #ff4444;
    border: 1px solid #ff4444;
    border-radius: 4px;
    padding: 2px 6px;
    white-space: nowrap;
    display: inline-block;
    width: fit-content;
}

.tpc-odds {
    font-size: 1.15rem;
    font-weight: 900;
    color: #fff;
    background: #000;
    border: 1px solid #2a2a2a;
    border-radius: 7px;
    padding: 5px 13px;
    flex-shrink: 0;
    letter-spacing: .02em;
}

/* reason */
.tpc-reason {
    font-size: .63rem;
    font-weight: 700;
    color: #03A695;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-top: 1px dashed #1a3a2e;
    padding-top: 9px;
    text-align: center;
}

.tp-empty {
    grid-column: 1 / -1;
    color: #444;
    text-align: center;
    padding: 30px;
    font-size: .85rem;
}

.top-picks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 1100px) {
    .top-picks-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .top-picks-grid { grid-template-columns: 1fr; }
}
/* ── Best Games Section ──────────────────────────────────────────── */
.best-games-section {
    background: linear-gradient(135deg, #0a1612 0%, #0d1f18 100%);
    border: 1px solid #1a4a2e;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(3, 166, 149, 0.08);
}

.best-games-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    border-bottom: 1px solid #1a3a2e;
    background: linear-gradient(90deg, #0d2018 0%, #0a1612 100%);
    gap: 10px;
    flex-wrap: wrap;
    user-select: none;
    transition: background .2s;
}

.best-games-header:hover {
    background: linear-gradient(90deg, #102518 0%, #0c1a14 100%);
}

.best-games-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.best-games-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.best-games-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.best-games-toggle-btn {
    background: transparent;
    border: 1px solid #1a4a2e;
    color: #03A695;
    padding: 5px 12px;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: .7rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
    flex-shrink: 0;
}

.best-games-toggle-btn:hover {
    background: #03A695;
    color: #000;
}

.best-games-body {
    padding: 15px;
    transition: all .3s ease;
}

.best-games-body.collapsed {
    display: none;
}

/* Best Games card — Premium Glassmorphism styling */
.bg-card {
    background: rgba(14, 26, 22, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(26, 74, 46, 0.5);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    gap: 19px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.bg-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    
    opacity: 0.5;
    transition: opacity 0.3s;
}

.bg-card:hover {
    box-shadow: 0 10px 30px rgba(3, 166, 149, 0.15);
    border-color: rgba(3, 166, 149, 0.5);
    transform: translateY(-4px);
    background: rgba(20, 36, 30, 0.85);
}

.bg-card:hover::before {
    opacity: 1;
}

.bg-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
    margin-bottom: 4px;
}

.bg-league {
    font-size: .65rem;
    color: #aaa;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bg-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.bg-card-middle {
    display: flex;
    align-items: center;
    gap: 7px;
}

.bg-date-time {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding-right: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.bg-date {
    font-size: .65rem;
    color: #888;
    font-weight: 600;
}

.bg-time {
    font-size: .7rem;
    color: #03A695;
    font-weight: 700;
}

.bg-teams-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.bg-team-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bg-team-logo {
    width: 19px;
    height: 19px;
    border-radius: 4px;
    object-fit: contain;
    background: rgba(255,255,255,0.05);
    padding: 2px;
    flex-shrink: 0;
}

.bg-team-logo-placeholder {
    width: 19px;
    height: 19px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}


span.bg-market-badge {
    font-size: 11px;
}


.bg-team-score {
    font-size: 1rem;
    font-weight: 900;
    color: #03A695;
    min-width: 14px;
    text-align: center;
}

.bg-market-odds-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.bg-streak-ctx-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 0 0 auto;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}


span.bg-ctx-badge {
    font-size: 9px;
    font-weight: 800;
}

.bg-streak-label {
    font-size: .45rem;
    font-weight: 800;
    color: #888;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.bg-streak-val {
    font-size: 1.3rem;
    font-weight: 900;
    color: #03A695;
    line-height: 1;
    text-shadow: 0 0 10px rgba(3, 166, 149, 0.3);
}

.bg-streak-flames {
    font-size: 1rem;
    font-weight: 900;
    color: #03A695;
    letter-spacing: .03em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bg-odds-pill {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: .85rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .best-games-header {
        padding: 12px 14px;
    }
    .best-games-filters {
        width: 100%;
        justify-content: flex-start;
    }
    .best-games-body {
        padding: 10px;
    }
}

/* ── Top Picks Section Tabs ──────────────────────────────────────── */
.tp-section-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #1a3a2e;
    margin-bottom: 18px;
}

.tp-section-tab {
    flex: 1;
    padding: 13px 20px;
    background: #0a0d10;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    color: #666;
    font-family: 'Montserrat', sans-serif;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    transition: color .18s, border-color .18s, background .18s;
    text-transform: uppercase;
}

.tp-section-tab:first-child { border-radius: 8px 0 0 0; }
.tp-section-tab:last-child  { border-radius: 0 8px 0 0; }

.tp-section-tab:hover {
    color: #ccc;
    background: #0e1418;
}

.tp-section-tab.active {
    color: #03A695;
    border-bottom-color: #03A695;
    background: #081210;
}

.tp-section-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: visible;
}

/* ── Shared filter box ───────────────────────────────────────────── */
.tp-filter-box {
    background: #0a0d10;
    border: 1px solid #1a2e28;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: visible;
}

.tp-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    align-items: end;
}

.tp-filter-grid .filter-item label {
    font-size: .6rem;
    color: #666;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
    display: block;
}

.tp-filter-grid .filter-item input,
.tp-filter-grid .filter-item select {
    width: 100%;
    padding: 9px 11px;
    background: #111518;
    border: 1px solid #1e2830;
    color: #fff;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: .72rem;
    font-weight: 600;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s;
}

.tp-filter-grid .filter-item input:focus,
.tp-filter-grid .filter-item select:focus {
    border-color: #03A695;
}

/* save row inside filter box */
.tp-save-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid #1a2e28;
}

.tp-save-label {
    font-size: .6rem;
    color: #555;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
}

.tp-save-row select {
    flex: 1;
    min-width: 160px;
    height: 34px;
    padding: 0 10px;
    background: #111518;
    border: 1px solid #1e2830;
    color: #fff;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: .72rem;
    font-weight: 600;
    outline: none;
}

.tp-save-row .btn {
    height: 34px;
    padding: 0 12px;
    font-size: .72rem;
}

@media (max-width: 640px) {
    .tp-section-tab { font-size: .72rem; padding: 11px 10px; }
    .tp-filter-grid { grid-template-columns: 1fr 1fr; }
}
