.page-hero { padding: 20px 0; background: linear-gradient(to bottom, var(--bg-subtle), var(--bg)); border-bottom: 1px solid var(--line); }
.page-title { font-size: 26px; font-weight: 800; display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

.shock-badge { padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; font-family: 'JetBrains Mono', monospace; display: inline-block; text-align: center; min-width: 40px; }
.sb-grn { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.sb-amb { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.sb-org { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.sb-red { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.diff-bar-wrap { display: flex; align-items: center; gap: 8px; width: 100px; }
.diff-bar { flex: 1; height: 6px; background: var(--line-subtle); border-radius: 3px; overflow: hidden; }
.diff-bar span { display: block; height: 100%; background: var(--ac); border-radius: 3px; }
.diff-val { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; width: 24px; text-align: right; }

.filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 24px; background: var(--surf); padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.filter-item { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 140px; }
.filter-item label { font-size: 11px; color: var(--tx-dim); text-transform: uppercase; font-weight: 600; }
.filter-item input, .filter-item select {
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--tx);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    width: 100%;
    outline: none;
    box-sizing: border-box;
    height: 34px;
    line-height: 1.2;
}
.filter-item input:focus, .filter-item select:focus {
    border-color: var(--ac);
}

.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cal-nav { display: flex; gap: 8px; }
.cal-btn { background: var(--bg-subtle); border: 1px solid var(--line); color: var(--tx); border-radius: 6px; padding: 4px 12px; font-size: 13px; cursor: pointer; transition: 0.2s; }
.cal-btn:hover { background: var(--line-subtle); color: var(--ac); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-day-head { text-align: center; font-size: 11px; color: var(--tx-dim); font-weight: 600; text-transform: uppercase; padding-bottom: 8px; }
.cal-cell { aspect-ratio: 1; border-radius: 6px; background: var(--bg-subtle); border: 1px solid var(--line-subtle); display: flex; align-items: center; justify-content: center; flex-direction: column; cursor: pointer; transition: 0.15s; position: relative; text-decoration: none !important; }
.cal-cell:hover { transform: scale(1.05); z-index: 2; box-shadow: var(--sh-card); border-color: var(--ac); }
.cal-cell.empty { background: transparent; border: none; cursor: default; }
.cal-cell.empty:hover { transform: none; box-shadow: none; }
.cal-num { font-size: 14px; font-weight: 800; color: var(--tx); }
.cal-sub { font-size: 9px; font-family: 'JetBrains Mono', monospace; opacity: 0.8; }

.cal-cell[data-color="grn"] { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.3); color: #10b981; }
.cal-cell[data-color="amb"] { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.3); color: #f59e0b; }
.cal-cell[data-color="org"] { background: rgba(249, 115, 22, 0.15); border-color: rgba(249, 115, 22, 0.3); color: #f97316; }
.cal-cell[data-color="red"] { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.3); color: #ef4444; }
.cal-cell[data-color] .cal-num { color: inherit; }

.table-custom { width: 100%; min-width: 800px; border-collapse: collapse; font-size: 13px; text-align: center; }
.table-custom th, .table-custom td { padding: 10px 8px; border-bottom: 1px solid var(--line-subtle); }
.table-custom th { background: var(--bg-subtle); color: var(--tx-muted); font-size: 12px; cursor: pointer; user-select: none; }
.table-custom th:hover { color: var(--ac); }

.tbl-scroll-x { width: 100% !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surf); }
.col-main, .col-side, .split { min-width: 0 !important; }

@media (max-width: 992px) {
    .split { display: flex !important; flex-direction: column !important; gap: 24px !important; }
    .col-main, .col-side { width: 100% !important; }
}

@media (max-width: 768px) {
    .draw-page .tbl-outer { overflow-x: visible !important; border: none; background: transparent; box-shadow: none; padding: 0; }
    
    .draw-page table.matches, .draw-page table.matches tbody, .draw-page table.matches thead { display: block; width: 100% !important; }
    .draw-page table.matches thead { display: none; }

    .draw-page table.matches tbody tr {
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr;
        background: var(--surf);
        border: 1px solid var(--line);
        border-radius: 12px;
        margin-bottom: 12px;
        padding: 12px 14px;
        box-shadow: var(--sh-card);
        row-gap: 6px; column-gap: 6px;
        width: 100% !important; box-sizing: border-box;
    }

    .draw-page table.matches td { border: none !important; padding: 0 !important; font-size: 0.86rem; background: transparent !important; }
    .draw-page table.matches td::before { content: none !important; }

    .draw-page table.matches td.s-idx { grid-column: 1 / 2; grid-row: 1; font-weight: 700; color: var(--tx-dim); display: flex; align-items: center; }
    .draw-page table.matches td.s-idx::before { content: "№ "; color: var(--tx-dim); }
    
    .draw-page table.matches td.s-time { grid-column: 2 / 4; grid-row: 1; display: flex; justify-content: flex-end; align-items: center; color: var(--tx-muted); font-size: 0.8rem; }
    
    .draw-page table.matches td.s-tour { grid-column: 1 / 4; grid-row: 2; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 2px 0 !important; text-align: left; }
    .draw-page table.matches td.s-tour a { color: var(--ac); text-decoration: none; }

    .draw-page table.matches td.s-match { grid-column: 1 / 4; grid-row: 3; display: block; font-size: 0.95rem; font-weight: 600; text-align: left; padding: 2px 0 0 !important; }

    .draw-page table.matches td.s-score { grid-column: 1 / 4; grid-row: 4; display: flex; justify-content: center; align-items: center; padding: 6px 0 8px !important; border-bottom: 1px solid var(--line-subtle) !important; }
    .draw-page table.matches td.s-score .score-badge { font-size: 0.85rem; padding: 3px 10px; margin: 0 auto; }

    .draw-page table.matches td:nth-child(n+6):nth-child(-n+11) { display: inline-flex; align-items: baseline; white-space: nowrap; font-size: 0.82rem; line-height: 1.4; font-variant-numeric: tabular-nums; }
    .draw-page table.matches td:nth-child(n+6):nth-child(-n+11)::after { content: "%"; font-size: 0.72rem; color: var(--tx-dim); margin-left: 1px; }
    
    .draw-page table.matches td:nth-child(6) { grid-column: 1; grid-row: 5; justify-content: flex-start; padding-top: 6px !important; }
    .draw-page table.matches td:nth-child(6)::before { content: "БК: П1:\00a0"; color: var(--tx-dim); font-weight: 500; }
    .draw-page table.matches td:nth-child(7) { grid-column: 2; grid-row: 5; justify-content: center; padding-top: 6px !important; }
    .draw-page table.matches td:nth-child(7)::before { content: "Н:\00a0"; color: var(--tx-dim); font-weight: 500; }
    .draw-page table.matches td:nth-child(8) { grid-column: 3; grid-row: 5; justify-content: flex-end; padding-top: 6px !important; }
    .draw-page table.matches td:nth-child(8)::before { content: "П2:\00a0"; color: var(--tx-dim); font-weight: 500; }

    .draw-page table.matches td:nth-child(9) { grid-column: 1; grid-row: 6; justify-content: flex-start; padding-bottom: 4px !important; }
    .draw-page table.matches td:nth-child(9)::before { content: "Пул: П1:\00a0"; color: var(--tx-dim); font-weight: 500; }
    .draw-page table.matches td:nth-child(10) { grid-column: 2; grid-row: 6; justify-content: center; padding-bottom: 4px !important; }
    .draw-page table.matches td:nth-child(10)::before { content: "Н:\00a0"; color: var(--tx-dim); font-weight: 500; }
    .draw-page table.matches td:nth-child(11) { grid-column: 3; grid-row: 6; justify-content: flex-end; padding-bottom: 4px !important; }
    .draw-page table.matches td:nth-child(11)::before { content: "П2:\00a0"; color: var(--tx-dim); font-weight: 500; }

    .draw-page table.matches td.win-cell { background-color: transparent !important; color: #10b981 !important; font-weight: 700; }
    .draw-page table.matches td.win-cell { border-radius: 4px; background: rgba(16, 185, 129, 0.14) !important; padding: 1px 4px !important; width: fit-content; }
    .draw-page table.matches td:nth-child(6).win-cell, .draw-page table.matches td:nth-child(9).win-cell { margin-right: auto; }
    .draw-page table.matches td:nth-child(7).win-cell, .draw-page table.matches td:nth-child(10).win-cell { margin-left: auto; margin-right: auto; }
    .draw-page table.matches td:nth-child(8).win-cell, .draw-page table.matches td:nth-child(11).win-cell { margin-left: auto; }

    .cal-cell .cal-sub { display: none; }
    .cal-cell .cal-num { font-size: 12px; }    
}

.page-btn { background: var(--surf); border: 1px solid var(--line); color: var(--tx); padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.page-btn:hover { border-color: var(--ac); color: var(--ac); }
.page-btn.active { background: var(--ac); border-color: var(--ac); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; border-color: var(--line); }

.skew-list { display: flex; flex-direction: column; gap: 8px; }
.skew-item { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 6px; background: var(--bg-subtle); border: 1px solid var(--line-subtle); }