#bmbrc-stats {
        --yellow: #feed00;
        --yellow-soft: rgba(254, 237, 0, 0.12);
        --green: #16a34a;
        --red: #dc2626;
        --page-bg:
          radial-gradient(
            circle at top left,
            rgba(254, 237, 0, 0.22),
            transparent 34%
          ),
          linear-gradient(180deg, #fffbe0 0%, #fff 100%);
        --panel-bg: rgba(255, 255, 255, 0.96);
        --card-bg: #fff;
        --table-head: #080808;
        --table-head-text: #feed00;
        --text: #080808;
        --muted: rgba(0, 0, 0, 0.62);
        --border: rgba(0, 0, 0, 0.14);
        --shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
      }
body.dark #bmbrc-stats {
        --page-bg:
          radial-gradient(
            circle at top left,
            rgba(254, 237, 0, 0.14),
            transparent 34%
          ),
          linear-gradient(180deg, #000 0%, #111 100%);
        --panel-bg: rgba(21, 21, 21, 0.95);
        --card-bg: #151515;
        --table-head: #050505;
        --table-head-text: #feed00;
        --text: #feed00;
        --muted: rgba(254, 237, 0, 0.72);
        --border: rgba(254, 237, 0, 0.22);
        --shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
      }
#bmbrc-stats * {
        box-sizing: border-box;
      }
#bmbrc-stats {
        margin: 0;
        font-family: Montserrat, sans-serif;
        color: var(--text);
        background: var(--page-bg);
        min-height: 100vh;
      }
#bmbrc-stats .admin {
        padding: 42px 18px 70px;
      }
#bmbrc-stats .shell {
        max-width: 1180px;
        margin: 0 auto;
      }
#bmbrc-stats .topbar, #bmbrc-stats .panel {
        background: var(--panel-bg);
        border: 1px solid var(--border);
        border-radius: 28px;
        box-shadow: var(--shadow);
      }
#bmbrc-stats .topbar {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 18px;
        align-items: center;
        margin-bottom: 18px;
        padding: 24px 20px 22px;
        text-align: center;
      }
#bmbrc-stats .panel {
        padding: 24px;
      }
#bmbrc-stats .page-head {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
      }
#bmbrc-stats h1, #bmbrc-stats h2 {
        margin: 0;
        line-height: 1.1;
        font-weight: 800;
      }
#bmbrc-stats h1 {
        font-size: clamp(28px, 4vw, 44px);
      }
#bmbrc-stats h2 {
        font-size: 24px;
      }
#bmbrc-stats .text {
        color: var(--muted);
        line-height: 1.65;
        font-size: 14px;
        margin: 0;
      }
#bmbrc-stats .toolbar {
        display: flex;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
      }
#bmbrc-stats .btn {
        min-height: 44px;
        padding: 11px 18px;
        border-radius: 999px;
        border: 1px solid var(--border) !important;
        background: rgba(255, 255, 255, 0.72) !important;
        color: var(--text) !important;
        font-weight: 900;
        cursor: pointer;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
        transition:
          transform 0.18s ease,
          background 0.18s ease,
          box-shadow 0.18s ease;
      }
body.dark #bmbrc-stats .btn {
        background: rgba(255, 255, 255, 0.08) !important;
        color: rgba(235, 235, 235, 0.72) !important;
      }
#bmbrc-stats .btn:hover {
        transform: translateY(-2px);
      }
#bmbrc-stats .btn.is-active {
        background: var(--yellow) !important;
        color: #050505 !important;
        border-color: rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 14px 30px rgba(254, 237, 0, 0.28);
      }
body.dark #bmbrc-stats .btn.is-active {
        color: #feed00 !important;
      }
#bmbrc-stats .table-wrap {
        overflow: auto;
        max-height: 76vh;
        border: 1px solid var(--border);
        border-radius: 24px;
        background: var(--card-bg);
        isolation: isolate;
      }
#bmbrc-stats table {
        width: 100%;
        min-width: 930px;
        border-collapse: separate;
        border-spacing: 0;
      }
#bmbrc-stats th, #bmbrc-stats td {
        padding: 14px 12px;
        border-bottom: 1px solid var(--border);
        text-align: center;
        vertical-align: middle;
        white-space: nowrap;
      }
#bmbrc-stats th {
        position: sticky;
        top: 0;
        z-index: 30;
        background: var(--table-head);
        color: var(--table-head-text);
        font-size: 12px;
        font-weight: 800;
        text-transform: none;
        letter-spacing: 0.06em;
        cursor: pointer;
        user-select: none;
      }
#bmbrc-stats th.no-sort {
        cursor: default;
      }
#bmbrc-stats td {
        font-size: 14px;
        font-weight: 700;
        background: var(--card-bg);
      }
#bmbrc-stats tbody tr {
        background: var(--card-bg);
      }
#bmbrc-stats tbody tr:nth-child(even), #bmbrc-stats tbody tr:nth-child(odd) {
        background: var(--card-bg);
      }
#bmbrc-stats tbody tr:nth-child(even) td, #bmbrc-stats tbody tr:nth-child(odd) td {
        background: var(--card-bg);
      }
#bmbrc-stats tbody tr:last-child td {
        border-bottom: 0;
      }
#bmbrc-stats th.photo-col, #bmbrc-stats td.photo-col {
        position: sticky;
        left: 0;
        width: 74px;
        min-width: 74px;
        max-width: 74px;
        text-align: center;
        background: var(--card-bg);
        box-shadow: 10px 0 20px rgba(0, 0, 0, 0.12);
      }
#bmbrc-stats th.photo-col {
        z-index: 50;
        background: var(--table-head);
      }
#bmbrc-stats td.photo-col {
        z-index: 25;
        background: var(--card-bg) !important;
        background-clip: padding-box;
      }
#bmbrc-stats th.name-col, #bmbrc-stats td.name-col {
        text-align: left;
        min-width: 190px;
      }
body.dark #bmbrc-stats th.photo-col, body.dark #bmbrc-stats td.photo-col {
        box-shadow: 8px 0 18px rgba(0, 0, 0, 0.28);
      }
#bmbrc-stats .player-cell {
        display: flex;
        align-items: center;
        gap: 12px;
      }
#bmbrc-stats .player-photo-wrap {
        width: 46px;
        height: 46px;
        min-width: 46px;
        border-radius: 50%;
        overflow: hidden;
        flex: 0 0 46px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        background: transparent;
        clip-path: circle(50% at 50% 50%);
      }
#bmbrc-stats .player-photo {
        width: 100% !important;
        height: 100% !important;
        min-width: 100% !important;
        max-width: none !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        object-position: center !important;
        border: 0 !important;
        background: transparent !important;
        display: block !important;
        aspect-ratio: 1 / 1;
        clip-path: circle(50% at 50% 50%);
      }
#bmbrc-stats .player-name {
        color: var(--text);
        font-size: 15px;
        font-weight: 800;
      }
#bmbrc-stats .stat-value {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 46px;
        min-height: 32px;
        padding: 6px 10px;
        border-radius: 999px;
        color: var(--text);
        font-weight: 800;
        border: 2px solid transparent;
      }
#bmbrc-stats .stat-value.is-best {
        border-color: #080808;
        box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
      }
body.dark #bmbrc-stats .stat-value.is-best {
        border-color: var(--yellow);
        box-shadow: 0 0 0 3px rgba(254, 237, 0, 0.16);
      }
#bmbrc-stats .empty-state {
        padding: 26px;
        color: var(--muted);
        line-height: 1.65;
      }
      @media (max-width: 760px) {
#bmbrc-stats .admin {
          padding: 32px 10px 50px;
        }
#bmbrc-stats .panel {
          padding: 16px;
        }
#bmbrc-stats th, #bmbrc-stats td {
          padding: 12px 10px;
        }
#bmbrc-stats th.photo-col, #bmbrc-stats td.photo-col {
          width: 68px;
          min-width: 68px;
          max-width: 68px;
        }
#bmbrc-stats th.name-col, #bmbrc-stats td.name-col {
          min-width: 178px;
        }
      }
    
#bmbrc-stats h1, #bmbrc-stats h2 { font-family: "Montserrat", sans-serif !important; font-weight: 800 !important; }

#bmbrc-stats .btn {

        min-height: 44px !important;
        padding: 11px 18px !important;
        border-radius: 999px !important;
        border: 1px solid var(--border) !important;
        background: rgba(255, 255, 255, 0.72) !important;
        color: var(--text) !important;
        font-weight: 900 !important;
        cursor: pointer !important;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08) !important;
        transition:
          transform 0.18s ease,
          background 0.18s ease,
          box-shadow 0.18s ease !important;
      
}
body.dark #bmbrc-stats .btn {

        background: rgba(255, 255, 255, 0.08) !important;
        color: rgba(235, 235, 235, 0.72) !important;
      
}
#bmbrc-stats .btn:hover {

        transform: translateY(-2px) !important;
      
}
#bmbrc-stats .btn.is-active {

        background: var(--yellow) !important;
        color: #050505 !important;
        border-color: rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 14px 30px rgba(254, 237, 0, 0.28) !important;
      
}
body.dark #bmbrc-stats .btn.is-active {

        color: #feed00 !important;
      
}
