#table tfoot {
    display: table-header-group;
}

.dataTables_filter, .dataTables_info {
    display: none;
    /*
    color: #ffffff;
    background-color: #2a2a2a;
    font-size: 16px;
    text-align: center;
    padding: 8px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
     */
}

#table thead.buscador-contacto {
    margin-bottom: 20rem;
}

#table thead.buscador-contacto tr th:nth-child(2) {
    text-align: right;
    vertical-align: middle;
    color: #3e8ed5;
}

#table .dt-filter-text input {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    border-bottom: solid 1px #ccc;
}

#table .dt-filter-select select {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    border-bottom: solid 1px #ccc;
}

#table tbody {
    padding: 0 20px;
    background: #2a2a2a;
    box-shadow: 5px 5px 15px -2px rgba(0, 0, 0, 0.3);

}

#table tr.header-tabla-contacto {
    vertical-align: middle !important;
    border: 0px solid #ddd ! importat;
}

#table tr.header-tabla-contacto th {
    text-align: center;
}

#table tr {
    vertical-align: middle !important;
    border: 0px solid #ddd ! importat;
}

#table tr td {
    text-align: center;
    color: #ffffff;
}

#home {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    z-index: 0;
    font-size: 1em;
    padding: 0.5em 1em 0.5em 0.5em;
    border-radius: 0 0 1em 0;
    background-color: #2a2a2a;
    box-shadow: 0 0.13em 0.4em 0 rgba(0, 0, 0, 0.2);
}

#home > svg {
    fill: rgba(0, 0, 0);
    width: 1.5em;
    height: 1.5em;
}

input {
    background: transparent;
    border: 1px;
}

body {
    background-color: #2a2a2a;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Анимация появления элементов */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стилизация таблицы DataTables */
.table.dataTable {
    background-color: #2a2a2a; /* Темный фон для всей таблицы */
    color: #2a2a2a; /* Белый цвет текста для контраста */
    border-spacing: 0 1rem;
    text-align: center;
}

/* Стилизация заголовков таблицы */
.table.dataTable thead th {
    /* background-color: #2c2c2c; /* Чуть более темный цвет для заголовков */
    color: #FFFFFF;
    text-align: center;
}

/* Стилизация ячеек таблицы */
.table.dataTable tbody td {
    border-top: 1px solid #4a4a4a; /* Добавление границ между строками для лучшей видимости */
}

/* Стилизация строки при наведении */
.table.dataTable tbody tr:hover {
    background-color: #323232; /* Слегка светлее при наведении */
}

/* Убираем лишние границы и рамки */
.table.dataTable,
.table.dataTable th,
.table.dataTable td {
    border: none;
}

/* Улучшаем читаемость текста */
.table.dataTable th, .table.dataTable td {
    padding: 12px 15px; /* Отступы вокруг текста */
    font-weight: 500; /* Полужирное начертание */
    font-size: 20px; /* Размер шрифта */
}

.table a {
    text-decoration: none;
}

.table a[class=ign] {
    font-family: "Minecraft", "Inter", sans-serif;
}

.member {
    width: 64px;
    height: 64px;
}


/* Header and Back Button */
.page-header {
    display: flex;
    justify-content: center; /* Центрирование контента */
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    border-bottom: none;
}

.page-header .back-button {
    font-size: 24px;
    color: #ffffff;
    text-decoration: none;
    padding: 10px;
    background-color: #ffaf61;
    border-radius: 5px;
}

.page-header .back-button:hover {
    background-color: #ffaa42;
}

.page-header h1 {
    display: none; /* Скрываем заголовок, если он не нужен */
    font-size: 24px;
    margin: 0;
    color: #ffffff;
    text-align: center;
    flex-grow: 1;
}

.gexp-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    margin: 20px auto 0;
    max-width: 1440px;
    background: rgba(31, 31, 31, 0.65);
    border-radius: 14px;
    backdrop-filter: blur(10px);
}

.gexp-period-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 175, 97, 0.12);
    border: 1px solid rgba(255, 175, 97, 0.25);
    color: #fcfcfc;
    font-weight: 700;
    letter-spacing: 0.2px;
    user-select: none;
    white-space: nowrap;
}

.gexp-period-chip small {
    opacity: .85;
    font-weight: 600;
    color: #FFAF61;
}

.gexp-hint {
    opacity: .75;
    font-size: 13px;
    color: #fcfcfc;
    user-select: none;
    white-space: nowrap;
}

.g-exp-statistics {
    width: 100%;
    margin-top: 12px;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
}

#g-exp-chart {
    background: rgba(31, 31, 31, 0.65);
    border-radius: 14px;
    overflow: hidden;
    padding: 8px 10px;
}

.gexp-topbar .back-button {
    font-size: 24px;
    color: #ffffff;
    text-decoration: none;
    padding: 10px;
    background-color: #ffaf61;
    border-radius: 5px;
}

.gexp-topbar .back-button:hover {
    background-color: #ffaa42;
}

/* Highstock встроенные инпуты скрываем — выглядят как “админка” */
.highcharts-range-input text,
.highcharts-range-label text {
    display: none !important;
}

/* --- Mobile breakpoint --- */
@media (max-width: 768px) {
    .gexp-topbar {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "back chip"
            "hint hint";
        align-items: center;
        justify-content: initial; /* убираем space-between */
        gap: 10px;
        padding: 12px 12px;
    }

    .gexp-topbar .back-button {
        grid-area: back;
        padding: 10px 12px;
        font-size: 16px;
        line-height: 18px;
        border-radius: 10px;
        white-space: nowrap;
    }

    .gexp-period-chip {
        grid-area: chip;
        justify-self: end; /* справа, аккуратно */
        max-width: 100%;
        padding: 8px 10px;
        gap: 8px;
        font-size: 14px;
    }

    .gexp-period-chip small {
        font-size: 12px;
    }

    /* чип: пусть может ужиматься и красиво обрезается */
    .gexp-period-chip {
        min-width: 0;
        max-width: 100%;
    }

    #gexpPeriodTitle {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* подсказку тоже не раздуваем в одну линию на мобиле */
    .gexp-hint {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .gexp-hint {
        grid-area: hint;
        font-size: 12px;
        white-space: normal; /* разрешаем перенос */
        line-height: 1.2;
        opacity: 0.7;
    }

    /* body padding у тебя 20px — это уже минус ширина */
    body {
        padding: 12px;
    }

    /* container + row дают +/−15px и легко ломают ширину */
    #table.container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #table .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    #table .col-xs-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* таблица не должна раздувать ширину */
    #membersTable, .table.dataTable {
        width: 100% !important;
    }

    /* уменьшаем всё */
    .table.dataTable th, .table.dataTable td {
        font-size: 14px;
        padding: 8px 8px;
    }

    /* аватар меньше */
    .member {
        width: 44px;
        height: 44px;
    }

    /* имя можно переносить */
    #membersTable td:nth-child(2) {
        white-space: normal !important;
        word-break: break-word;
    }

    /* число можно оставить nowrap */
    #membersTable td:nth-child(3) {
        white-space: nowrap !important;
    }
}

@media (max-width: 420px) {
    .gexp-period-chip {
        justify-self: stretch; /* на совсем маленьких — чип на всю ширину */
        text-align: center;
        justify-content: center;
    }

    .gexp-hint {
        text-align: center;
    }
}
