.statistics-portal-shell {
    width: min(1840px, calc(100vw - 28px));
    margin: 14px auto 32px;
    color: #eaf4fa;
}

.statistics-portal-main-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    padding: 5px;
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 11px;
    background: rgba(7, 19, 32, 0.97);
}

.statistics-portal-main-tabs button,
.statistics-portal-main-tabs a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 7px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #8fa4b7;
    background: transparent;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.035em;
    white-space: nowrap;
    cursor: pointer;
}

.statistics-portal-main-tabs button.is-active,
.statistics-portal-main-tabs a.is-active {
    border-color: rgba(239, 185, 87, 0.28);
    color: #f2cd80;
    background: rgba(239, 185, 87, 0.08);
}

.statistics-login-marker {
    padding: 2px 5px;
    border-radius: 5px;
    color: #7e93a7;
    background: rgba(148, 163, 184, 0.08);
    font-size: 0.5rem;
}

.statistics-main-panel {
    min-width: 0;
}

.statistics-main-panel[hidden] {
    display: none;
}

.statistics-server-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 9px;
    padding: 12px 15px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 11px;
    background:
        linear-gradient(
            100deg,
            rgba(12, 31, 50, 0.96),
            rgba(6, 17, 29, 0.98)
        );
}

.statistics-server-header h2 {
    margin: 4px 0;
    font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.statistics-server-header p {
    margin: 0;
    color: #8297aa;
    font-size: 0.68rem;
}

.statistics-server-summary {
    text-align: right;
}

.statistics-server-summary span {
    display: block;
    color: #f0c873;
    font-size: 1.7rem;
    font-weight: 900;
}

.statistics-server-summary small {
    color: #8297aa;
    font-size: 0.6rem;
    text-transform: uppercase;
}

.statistics-server-toolbar {
    display: grid;
    grid-template-columns:
        minmax(180px, 1.4fr)
        minmax(130px, 0.8fr)
        minmax(110px, 0.65fr)
        minmax(120px, 0.65fr)
        minmax(150px, 0.8fr);
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: rgba(10, 25, 41, 0.98);
}

.statistics-server-toolbar input,
.statistics-server-toolbar select {
    min-width: 0;
    height: 34px;
    padding: 0 9px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 6px;
    color: #dceaf2;
    background: #0d2135;
    font: inherit;
    font-size: 0.67rem;
}

.statistics-server-toolbar label {
    display: grid;
    grid-template-columns: auto minmax(52px, 1fr);
    align-items: center;
    gap: 6px;
    padding-left: 8px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 6px;
    color: #8297aa;
    background: #0d2135;
    font-size: 0.59rem;
}

.statistics-server-toolbar label input {
    border: 0;
    background: transparent;
}

.statistics-server-workspace {
    position: relative;
    height: calc(100vh - 245px);
    min-height: 580px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 0 0 10px 10px;
    background: #06121f;
}

.statistics-server-table-scroll {
    width: 100%;
    height: 100%;
    overflow: auto;
    padding-right: 32px;
    scrollbar-width: thin;
    scrollbar-color:
        rgba(101, 216, 239, 0.26)
        rgba(148, 163, 184, 0.04);
}

#statistics-server-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.64rem;
    font-variant-numeric: tabular-nums;
}

#statistics-server-table thead {
    position: sticky;
    z-index: 20;
    top: 0;
}

#statistics-server-table th {
    height: 31px;
    padding: 0 8px;
    border-right: 1px solid rgba(148, 163, 184, 0.07);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    color: #9fb3c4;
    background: #10263b;
    font-weight: 850;
    text-align: right;
    white-space: nowrap;
    cursor: pointer;
}

#statistics-server-table th:first-child {
    text-align: left;
}

#statistics-server-table th.is-active {
    color: #f0c873;
}

#statistics-server-table td {
    height: 29px;
    padding: 0 8px;
    border-right: 1px solid rgba(148, 163, 184, 0.045);
    border-bottom: 1px solid rgba(148, 163, 184, 0.055);
    color: #c6d4df;
    background: rgba(8, 20, 33, 0.97);
    text-align: right;
    white-space: nowrap;
}

#statistics-server-table tbody tr:nth-child(even) td {
    background: rgba(12, 27, 43, 0.97);
}

#statistics-server-table tbody tr:hover td {
    background: rgba(101, 216, 239, 0.055);
}

.statistics-sticky-tank {
    position: sticky;
    z-index: 12;
    left: 0;
    min-width: 180px;
    max-width: 220px;
    text-align: left !important;
    box-shadow: 1px 0 0 rgba(148, 163, 184, 0.12);
}

#statistics-server-table thead th:first-child {
    position: sticky;
    z-index: 24;
    left: 0;
    min-width: 180px;
    text-align: left;
    box-shadow: 1px 0 0 rgba(148, 163, 184, 0.12);
}

.statistics-server-tank-open {
    display: block;
    width: 100%;
    overflow: hidden;
    padding: 0;
    border: 0;
    color: #e6f1f7;
    background: transparent;
    font: inherit;
    font-weight: 800;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.statistics-server-tank-open:hover {
    color: #65d8ef;
}

.statistics-server-detail-rail {
    position: absolute;
    z-index: 35;
    top: 0;
    right: 0;
    width: 32px;
    height: 100%;
    border: 0;
    border-left: 1px solid rgba(148, 163, 184, 0.15);
    color: #9cb1c2;
    background: #0c2135;
    font-size: 1.15rem;
    cursor: pointer;
}

.statistics-server-detail {
    position: absolute;
    z-index: 40;
    top: 0;
    right: 32px;
    width: clamp(420px, 34vw, 560px);
    max-width: calc(100% - 190px);
    height: 100%;
    overflow: auto;
    border-left: 1px solid rgba(101, 216, 239, 0.25);
    background:
        linear-gradient(
            160deg,
            rgba(11, 30, 48, 0.995),
            rgba(5, 16, 27, 0.995)
        );
    box-shadow: -20px 0 55px rgba(0, 0, 0, 0.48);
}

.statistics-server-detail[hidden] {
    display: none;
}

.statistics-detail-header {
    position: sticky;
    z-index: 5;
    top: 0;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.13);
    background: rgba(8, 23, 38, 0.985);
}

.statistics-detail-image {
    display: grid;
    width: 92px;
    height: 64px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.04);
}

.statistics-detail-image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.statistics-tank-image-placeholder {
    color: #d6b366;
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.statistics-detail-header h3 {
    margin: 3px 0;
    font-size: 1.2rem;
}

.statistics-detail-header p {
    margin: 0;
    color: #8195a8;
    font-size: 0.62rem;
}

.statistics-detail-actions {
    display: flex;
    gap: 4px;
}

.statistics-detail-actions button {
    width: 29px;
    height: 29px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 6px;
    color: #afc0cd;
    background: rgba(148, 163, 184, 0.05);
    cursor: pointer;
}

.statistics-detail-tabs {
    display: flex;
    gap: 3px;
    padding: 7px;
    overflow-x: auto;
    border-bottom: 1px solid rgba(148, 163, 184, 0.11);
    background: rgba(8, 21, 35, 0.97);
}

.statistics-detail-tabs button {
    min-height: 31px;
    padding: 0 9px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #8ea3b5;
    background: transparent;
    font: inherit;
    font-size: 0.59rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.statistics-detail-tabs button.is-active {
    border-color: rgba(239, 185, 87, 0.25);
    color: #efc975;
    background: rgba(239, 185, 87, 0.07);
}

.statistics-detail-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 11px;
}

.statistics-detail-metrics article {
    min-width: 0;
    padding: 11px;
    border: 1px solid rgba(148, 163, 184, 0.11);
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.035);
}

.statistics-detail-metrics span {
    display: block;
    color: #8195a8;
    font-size: 0.55rem;
    font-weight: 850;
    text-transform: uppercase;
}

.statistics-detail-metrics strong {
    display: block;
    margin: 6px 0 3px;
    font-size: 1.05rem;
}

.statistics-detail-metrics small {
    color: #73889b;
    font-size: 0.55rem;
}

.statistics-detail-chart-placeholder,
.statistics-data-placeholder {
    margin: 0 11px 11px;
    padding: 24px;
    border: 1px dashed rgba(148, 163, 184, 0.16);
    border-radius: 9px;
    color: #8094a7;
    background: rgba(148, 163, 184, 0.025);
    text-align: center;
}

.statistics-detail-chart-placeholder p {
    margin: 5px 0 0;
    font-size: 0.65rem;
}

.statistics-auth-gate {
    display: grid;
    min-height: 420px;
    place-items: center;
    padding: 30px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 11px;
    background: rgba(7, 19, 32, 0.96);
    text-align: center;
}

.statistics-auth-gate[hidden] {
    display: none;
}

.statistics-auth-gate > div {
    max-width: 480px;
}

.statistics-auth-gate strong {
    font-size: 1.25rem;
}

.statistics-auth-gate p {
    color: #8297aa;
    line-height: 1.6;
}

.statistics-search-area {
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 11px;
    background: rgba(7, 19, 32, 0.96);
}

.statistics-search-area[hidden] {
    display: none;
}

.statistics-search-area h2 {
    margin: 5px 0;
}

.statistics-search-area header p {
    max-width: 850px;
    color: #8297aa;
    line-height: 1.55;
}

.statistics-search-form,
.statistics-clan-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 14px 0;
}

.statistics-search-form input,
.statistics-search-form select {
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 7px;
    color: #dce9f1;
    background: #0d2135;
    font: inherit;
}

.statistics-search-form input {
    min-width: 260px;
}

#statistics-me-content > #player-portal-authenticated {
    display: block;
}

@media (max-width: 900px) {
    .statistics-portal-shell {
        width: calc(100vw - 12px);
    }

    .statistics-server-toolbar {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .statistics-server-workspace {
        height: calc(100vh - 270px);
    }

    .statistics-server-detail {
        right: 0;
        width: 100%;
        max-width: 100%;
    }

    .statistics-server-detail-rail {
        display: none;
    }

    .statistics-server-table-scroll {
        padding-right: 0;
    }
}

@media (max-width: 560px) {
    .statistics-server-header {
        align-items: flex-start;
    }

    .statistics-server-toolbar {
        grid-template-columns: 1fr;
    }

    .statistics-detail-metrics {
        grid-template-columns: 1fr;
    }
}


/* CIR overall statistics portal tab */

.statistics-portal-main-tabs a {
    justify-content: center;
    text-decoration: none;
}

.statistics-portal-main-tabs button:hover,
.statistics-portal-main-tabs a:hover {
    border-color: rgba(148, 163, 184, 0.22);
    color: #dceaf2;
    background: rgba(148, 163, 184, 0.06);
}

.statistics-public-overview-tabs {
    width: min(1840px, calc(100vw - 28px));
    margin: 14px auto 10px;
}

.statistics-public-overview-tabs a.is-active {
    border-color: rgba(239, 185, 87, 0.28);
    color: #f2cd80;
    background: rgba(239, 185, 87, 0.08);
}


/* CIR integrated overall statistics tab 2026-07-18 */

.statistics-portal-main-tabs a {
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.statistics-portal-main-tabs button:hover,
.statistics-portal-main-tabs a:hover {
    border-color: rgba(239, 185, 87, 0.22);
    color: #dceaf2;
    background: rgba(239, 185, 87, 0.05);
}

.statistics-portal-main-tabs .statistics-public-link {
    margin-left: 0;
}

.statistics-public-overview-tabs {
    width: min(1840px, calc(100vw - 28px));
    margin: 14px auto 10px;
}

.statistics-public-overview-tabs a.is-active {
    border-color: rgba(239, 185, 87, 0.28);
    color: #f2cd80;
    background: rgba(239, 185, 87, 0.08);
}
