.site-tool-page {
    padding-bottom: 2rem;
    color: #1f2933;
}

.site-page-hero {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid rgba(23, 162, 184, 0.24);
    border-radius: 8px;
    background: #ffffff;
}

.site-page-kicker {
    color: #0f7c8c;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-page-hero h1,
.site-page-hero h2 {
    margin: 0.25rem 0 0.5rem;
    color: #17212b;
    font-size: clamp(2rem, 4vw, 3.35rem);
    font-weight: 800;
    letter-spacing: 0;
}

.site-page-hero p {
    max-width: 820px;
    margin-bottom: 0;
    color: #344452;
    font-size: 1.03rem;
    line-height: 1.6;
}

.site-panel {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: #ffffff;
}

.site-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.site-panel-heading h2,
.site-panel-heading h3,
.site-panel-heading h4 {
    margin-bottom: 0;
    color: #17212b;
    font-weight: 800;
}

.site-muted {
    color: #667784;
}

.site-table-panel .dataTables_wrapper .row:first-child {
    align-items: center;
    margin-bottom: 0.75rem;
}

.site-table-panel .dataTables_length label,
.site-table-panel .dataTables_filter label,
.site-table-panel .dataTables_info {
    color: #667784;
    font-weight: 700;
}

.site-table-panel .dataTables_filter input,
.site-table-panel .dataTables_length select {
    border-radius: 8px;
}

.site-table-panel table.dataTable,
.site-table-panel .table {
    margin-bottom: 0 !important;
}

.site-table-panel table.dataTable thead th,
.site-table-panel .table thead th {
    color: #42515f;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-table-panel .page-link {
    color: #0b6f7e;
}

.site-table-panel .page-item.active .page-link {
    border-color: #17a2b8;
    background-color: #17a2b8;
}

.site-control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.site-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.site-action-row .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.banlist-page #banlist-area {
    margin-top: 1rem;
}

.banlist-page .banlist-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.banlist-page .banlist-toolbar .btn-group {
    display: inline-flex !important;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.banlist-page .card-list-text {
    width: min(100%, 760px);
    margin-left: auto !important;
    margin-right: auto !important;
    border-radius: 8px;
    background: #ffffff;
}

.banlist-page .card-img {
    border-radius: 5px;
}

.custom-pack-square-img {
    width: 48px;
    height: 48px;
    margin-right: 0.65rem;
    border-radius: 6px;
    object-fit: cover;
    vertical-align: middle;
}

.custom-pack-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.custom-pack-actions a,
.custom-pack-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(23, 162, 184, 0.25);
    border-radius: 8px;
    background: #ffffff;
    color: #0b6f7e;
}

.custom-pack-actions button {
    cursor: pointer;
}

.custom-pack-actions a:hover,
.custom-pack-actions a:focus,
.custom-pack-actions button:hover,
.custom-pack-actions button:focus {
    border-color: rgba(23, 162, 184, 0.7);
    background: rgba(23, 162, 184, 0.08);
    outline: 0;
}

.users-page .user-search-panel {
    max-width: 680px;
}

.users-page .users-section {
    margin-top: 1rem;
}

.users-page .users-row {
    gap: 0.75rem;
}

.users-page .user-item {
    width: 132px;
    padding: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: #ffffff;
    box-sizing: border-box;
}

.users-page .user-item figure {
    margin: 0;
}

.users-page .user-item img {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
}

.users-page .user-block-figcaption {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 0.45rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.25;
}

.users-page .user-block-figcaption a {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    text-overflow: ellipsis;
}

.tournaments-page #buttons-container {
    gap: 0.5rem !important;
}

.tournaments-page #buttons-container .btn {
    min-height: 38px;
}

.tournaments-page #tournamentFilter .card {
    border-color: rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: #ffffff;
}

.tournaments-page #tournamentFilter .input-group {
    align-items: stretch;
    gap: 0.5rem;
}

.tournaments-page #filter-date {
    min-height: 38px;
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    background: #ffffff;
    color: #495057;
}

.name-ellipsis {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-bs-theme="dark"] .site-tool-page {
    color: #e5e7eb;
}

[data-bs-theme="dark"] .site-page-hero,
[data-bs-theme="dark"] .site-panel,
[data-bs-theme="dark"] .banlist-page .card-list-text,
[data-bs-theme="dark"] .custom-pack-actions a,
[data-bs-theme="dark"] .custom-pack-actions button,
[data-bs-theme="dark"] .users-page .user-item,
[data-bs-theme="dark"] .tournaments-page #tournamentFilter .card {
    border-color: rgba(255, 255, 255, 0.14);
    background: #202428;
}

[data-bs-theme="dark"] .site-page-hero h1,
[data-bs-theme="dark"] .site-page-hero h2,
[data-bs-theme="dark"] .site-panel-heading h2,
[data-bs-theme="dark"] .site-panel-heading h3,
[data-bs-theme="dark"] .site-panel-heading h4 {
    color: #e5e7eb;
}

[data-bs-theme="dark"] .site-page-hero p,
[data-bs-theme="dark"] .site-muted,
[data-bs-theme="dark"] .site-table-panel .dataTables_length label,
[data-bs-theme="dark"] .site-table-panel .dataTables_filter label,
[data-bs-theme="dark"] .site-table-panel .dataTables_info {
    color: #b8c2cc;
}

[data-bs-theme="dark"] .site-table-panel table.dataTable thead th,
[data-bs-theme="dark"] .site-table-panel .table thead th {
    color: #d8dee4;
}

[data-bs-theme="dark"] .custom-pack-actions a,
[data-bs-theme="dark"] .custom-pack-actions button {
    color: #67d2e3;
}

[data-bs-theme="dark"] .tournaments-page #filter-date {
    border-color: rgba(255, 255, 255, 0.18);
    background: #252d32;
    color: #e5e7eb;
}

@media (max-width: 767.98px) {
    .site-page-hero {
        padding: 1.15rem;
    }

    .site-panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .users-page .users-row {
        justify-content: center !important;
    }

    .tournaments-page #tournamentFilter .input-group {
        flex-direction: column;
    }

    .tournaments-page #tournamentFilter .input-group-prepend,
    .tournaments-page #tournamentFilter .input-group-text,
    .tournaments-page #tournamentFilter select,
    .tournaments-page #filter-date {
        width: 100%;
        margin-right: 0 !important;
    }
}

@media screen and (max-width: 450px) {
    .name-ellipsis {
        max-width: 250px;
    }
}

@media screen and (max-width: 320px) {
    .name-ellipsis {
        max-width: 200px;
    }
}

@media screen and (max-width: 280px) {
    .name-ellipsis {
        max-width: 100px;
    }
}
