    :root {
        --bg: #071024;
        --card: #0b1220;
        --muted: #9aa4b2;
        --accent: #4f46e5;
        --accent-2: #06b6d4;
        --danger: #ef4444;
        --text: #e6eef8;
        --radius: 12px;
        font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    }

    /* Общие настройки */
    * {
        box-sizing: border-box;
    }

    html,
    body {
        height: 100%;
        margin: 0;
        background: linear-gradient(180deg, #071024, #061424);
        color: var(--text);
        -webkit-font-smoothing: antialiased;
    }

    /* Контейнер */
    .container {
        max-width: 900px;
        margin: 0 auto;
        padding: 16px;
        padding-bottom: 110px;
    }

    /* Заголовок */
    .header {
        display: flex;
        gap: 12px;
        align-items: center;
        margin-bottom: 14px;
    }

    .avatar {
        width: 66px;
        height: 66px;
        border-radius: 14px;
        overflow: hidden;
        flex: 0 0 66px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 22px;
    }

    .avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .h-info {
        flex: 1;
    }

    .h-info .name {
        font-weight: 700;
        font-size: 18px;
        margin-bottom: 4px;
    }

    .h-info .sub {
        font-size: 13px;
        color: var(--muted);
    }

/* Messages */
.messages {
  display: flex;
  flex-direction: column;
  margin-bottom: 5px;
}

.msg {
  padding: 3px;
  border-radius: 5px;
  font-size: 0.75rem;
  text-align: center;
}

.msg-success {
  background: rgba(47,133,90,0.08);
  color: var(--success);
  border: 1px solid rgba(47,133,90,0.12);
}

.msg-error {
  background: rgba(197,48,48,0.06);
  color: var(--err);
  border: 1px solid rgba(197,48,48,0.08);
}

    /* Карточка */
    .card {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
        border: 1px solid rgba(255, 255, 255, 0.03);
        padding: 14px;
        border-radius: var(--radius);
        margin-bottom: 12px;
        box-shadow: 0 8px 30px rgba(2, 6, 23, 0.6);
    }

    .ref-wrap {
        display: flex;
        gap: 8px;
        align-items: center;
    }

    .ref-input {
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.03);
        padding: 10px;
        border-radius: 10px;
        color: var(--text);
        flex: 1;
        font-size: 14px;
    }

    .btn {
        background: var(--accent);
        color: white;
        padding: 10px 12px;
        border-radius: 10px;
        border: 0;
        font-weight: 700;
        cursor: pointer;
        transition: background 0.3s, transform 0.2s ease-in-out;
    }

    .btn:hover {
        background: var(--accent-2);
        transform: scale(1.05);
    }

    .btn.secondary {
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.06);
        color: var(--text);
    }

    /* Карточка рекламы */
    .ad-card {
        padding: 12px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.03);
        background: rgba(255, 255, 255, 0.02);
        margin-bottom: 10px;
    }

    /* Нижнее меню */
    .bottom-nav {
        position: fixed;
        left:50%;
        transform: translateX(-50%);
        bottom: 14px;
        background: linear-gradient(180deg, #0b1220, #061424);
        border-radius: 7px;
        padding: 4px 7px;
        display: flex;
        gap: 12px;
        align-items: center;
        box-shadow: 0 10px 30px rgba(2, 6, 23, 0.6);
        z-index: 60;
        width: calc(100% - 32px);
        max-width: 330px;
        border: 1px solid rgba(255, 255, 255, 0.03);
    }

    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: var(--muted);
        text-decoration: none;
        font-size: 12px;
        padding: 1px 3px;
        border-radius: 2px;
    }

    .nav-item svg {
        width: 22px;
        height: 22px;
        margin-bottom: 4px;
        fill: currentColor;
    }

    .nav-item.active {
        color: var(--accent);
        font-weight: 700;
    }

    /* Плавающая кнопка */
    .fab {
        position: fixed;
        right: 20px;
        bottom: 84px;
        background: var(--accent);
        width: 56px;
        height: 56px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: 700;
        font-size: 22px;
        box-shadow: 0 12px 30px rgba(79, 70, 229, 0.25);
        border: 5px solid rgba(255, 255, 255, 0.02);
        z-index: 70;
    }

/* ------------------------------------------- */
/* Стиль таблицы */
/* ------------------------------------------- */

.table-container {
    overflow-x: auto; /* Позволяет прокручивать таблицу на маленьких экранах */
    background-color: transparent;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--muted); /* Белая рамка */
}

table {
    width: 100%;
    border-collapse: collapse; /* Убираем двойные границы */
}

th, td {
    padding: 12px 15px;
    text-align: center;
    white-space: nowrap; /* Предотвращает перенос текста в ячейках */
    border: 1px solid var(--muted); /* Белые границы ячеек */
    color: var(--muted); /* Белый текст */
    font-size:13px;
}

thead th {
    background-color: transparent;
    font-weight: bold;
    color: var(--muted); /* Белый текст заголовков */
}

tbody tr:nth-child(even) {
    background-color: transparent; /* Чередующиеся строки для читаемости */
}

/* ------------------------------------------- */
/* Адаптивность для мобильных устройств */
/* ------------------------------------------- */

/* Для экранов до 768px */
        table { width: 100%; border-collapse: collapse; margin-top: 1px;}
        th, td { border: 1px solid var(--muted); padding: 5px; text-align: center;}
        th { background-color: transparent; }

/* ------------------------------------------- */
/* Стиль пагинации */
/* ------------------------------------------- */

.table-pagination {
    display: flex;
    justify-content: center; /* Центрируем пагинацию */
    margin-top: 25px;
    flex-wrap: wrap; /* Позволяет ссылкам переноситься на новую строку */
}

.table-pagination a {
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    transition: background-color .3s;
    border: 1px solid white; /* Белая рамка вокруг ссылок */
    margin: 0 4px;
    border-radius: 4px;
}

.table-pagination a.active {
        background: var(--accent);
        color: white;
        padding: 10px 12px;
        border-radius: 10px;
        border: 0;
        font-weight: 700;
        cursor: pointer;
        transition: background 0.3s, transform 0.2s ease-in-out;
}

.table-pagination a:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Toasts */
.toast.success {
  display: flex;
  flex-direction: column;
  margin-bottom: 5px;
  padding: 3px;
  border-radius: 5px;
  font-size: 0.75rem;
  background: rgba(47,133,90,0.08);
  color: var(--success);
  border: 1px solid rgba(47,133,90,0.12);
  text-align: center;
}

.toast.error {
  display: flex;
  flex-direction: column;
  margin-bottom: 2px;
  padding: 3px;
  border-radius: 4px;
  font-size: 0.75rem;
  background: rgba(197,48,48,0.06);
  color: var(--err);
  border: 1px solid rgba(197,48,48,0.08);
  text-align: center;
}

/* Общие стили для контейнера чата */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 10px;
    background-color: #f0f2f5;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Стили для окна с сообщениями */
.chat-window {
    flex-grow: 1;
    overflow-y: auto; /* Включает прокрутку, если содержимое превышает высоту */
    height: 300px; /* Устанавливаем фиксированную высоту */
    max-height: 300px; /* Дополнительная мера предосторожности */
    padding: 5px;
    background-color: #fff;
    border-radius: 5px;
    margin-bottom: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Стили для отдельного сообщения */
.message-bubble {
    padding: 5px 7px;
    border-radius: 5px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
    border: none;
}

/* Сообщения пользователя (отправленные) */
.user-message {
    align-self: flex-end;
    background-color: #0b93f6;
    color: #fff;
    border-bottom-right-radius: 5px;
}

/* Сообщения администратора (полученные) */
.admin-message {
    align-self: flex-start;
    background-color: #e5e5ea;
    color: #000;
    border-bottom-left-radius: 5px;
}

/* Метка времени */
.timestamp {
    display: block;
    font-size: 8px;
    color: #777;
    margin-top: 5px;
    text-align: right;
    opacity: 0.8;
}

.user-message .timestamp {
    color: #fff;
    opacity: 0.9;
}

/* Стили для формы ввода */
.support-form {
    display: flex;
    align-items: center;
    gap: 5px;
}

.support-form textarea {
    flex-grow: 1;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: none;
    font-size: 13px;
    max-height: 140px;
}

.support-form button {
    padding: 12px 20px;
    background-color: #0b93f6;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.support-form button:hover {
    background-color: #0779e4;
}

/* Стили индикатора сообщениями */
.nav-item {
    position: relative;
    /* Убедитесь, что родитель имеет position: relative */
}

.unread-count {
    position: absolute;
    top: 0px;
    right: 5px;
    /* Динамический размер, чтобы вмещать 1-2 цифры */
    min-width: 18px;
    height: 18px;
    line-height: 18px; /* Выравнивает текст по вертикали */
    padding: 0 4px; /* Добавляет немного пространства по бокам */
    background-color: #ff4136; /* Красный цвет */
    color: #fff;
    border-radius: 9px; /* Делает его овальным или круглым */
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    z-index: 10;
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.transactions-table th, .transactions-table td {
    padding: 5px;
    text-align: left;
    border-bottom: 1px solid #333;
    text-align: center;
}

.transactions-table th {
    background-color: #2c2f33;
    color: #9aa4b2;
    text-align: center;
}

.transactions-table tbody tr:hover {
    background-color: #3b3e42;
    text-align: center;
}

.status-cell {
    font-weight: bold;
    color: #fff;
    padding: 2px 4px;
    border-radius: 2px;
    text-transform: capitalize;
    text-align: center;
}

.status-completed {
    background-color: #10B981; /* Ярко-зеленый */
}

.status-pending {
    background-color: #F59E0B; /* Ярко-оранжевый */
}

.status-failed {
    background-color: #EF4444; /* Ярко-красный */
}

    /* Адаптивность */
    @media (min-width: 720px) {
        .container {
            padding: 24px;
        }
    }