/* ============================================
   ФАЙЛ: style.css
   ОПИСАНИЕ: Основная таблица стилей для сайта
   СТРУКТУРА:
   1. БАЗОВЫЕ СТИЛИ И ОБЩИЕ НАСТРОЙКИ
   2. ШАПКА САЙТА (HEADER)
   3. БЛОК АВТОРИЗАЦИИ И ПОЛЬЗОВАТЕЛЬСКОЕ МЕНЮ
   4. СТРАНИЦА ВХОДА (LOGIN PAGE)
   5. КНОПКИ (BUTTONS)
   6. СПИСОК ТОВАРОВ / ЛОТОВ (PRODUCTS LIST)
   7. ОСНОВНОЙ КОНТЕНТ (MAIN CONTENT)
   8. БЛОК ПОИСКА (SEARCH)
   9. СТРАНИЦА ПЕРСОНАЖЕЙ (CHARACTERS PAGE)
   10. СТРАНИЦА ПОЛЬЗОВАТЕЛЕЙ (USERS PAGE)
   11. СТРАНИЦА КОДОВ (CODES PAGE)
   12. УВЕДОМЛЕНИЯ (NOTIFICATIONS)
   13. ФОРМЫ (FORMS)
   14. ПОДВАЛ (FOOTER)
   15. МОДАЛЬНЫЕ ОКНА (MODALS)
   16. СТРАНИЦА РЕДАКТОРА (EDITOR PAGE)
   17. СТРАНИЦЫ ОШИБОК (ERROR PAGES)
   18. СТИЛИ СТАТУСОВ (STATUS COLORS)
   19. ПРОГРЕСС-БАР ЛИМИТОВ (LOT LIMITS)
   20. АДАПТИВНЫЕ СТИЛИ (MEDIA QUERIES)
   21. ПАГИНАЦИЯ
   ============================================ */

/* ===== 1. БАЗОВЫЕ СТИЛИ И ОБЩИЕ НАСТРОЙКИ ===== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('../background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #333;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* ===== 2. ШАПКА САЙТА (HEADER) ===== */
.site-header {
    background: rgba(56, 68, 76, 0.75);
    color: white;
    padding: 0; /* Убираем старый padding */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    line-height: 1;
    font-size: 0;
    transition: transform 0.25s ease;
}

.logo-img {
    height: 90px;
    width: auto;
    display: block;
    transition: all 0.25s ease;
}

.logo:hover {
    transform: translateY(12px);
}

    .logo:hover .logo-img {
        transform: scale(1.3) rotate(-3deg);
        filter: drop-shadow(0 0 10px rgba(255,255,255,0.5));
    }

/* Переключатель языка в шапке для неавторизованных пользователей */
/* ===== HEADER: BETA LOGO ===== */
.beta-link {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
}

.beta-logo {
    height: 60px;
    width: auto;
    display: block;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.beta-link:hover .beta-logo {
    transform: scale(1.08);
    filter: drop-shadow(0 0 4px rgba(255, 200, 0, 0.5));
}

.beta-link:focus-visible .beta-logo {
    outline: none;
    transform: scale(1.08);
    filter: drop-shadow(0 0 6px rgba(255, 200, 0, 0.7));
}

.language-switcher-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-left: 15px;
    padding-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

/* ===== HEADER: LANGUAGE FLAGS ===== */
.lang-link {
    display: inline-flex;
    align-items: center;
    background: transparent !important;
}

.lang-flag {
    display: block;
    height: 16px;
    width: auto;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    image-rendering: -webkit-optimize-contrast;
}

.lang-link:hover .lang-flag {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.lang-link.active .lang-flag {
    filter: brightness(1.2);
    outline: 1px solid rgba(0, 0, 0, 0.15);
}

/* Для планшетов */
@media (max-width: 768px) {
    .header-container {
        padding: 6px 20px;
    }

    .logo-img {
        height: 120px;
    }
}

/* Для мобильных телефонов */
@media (max-width: 480px) {
    .header-container {
        padding: 5px 15px;
    }

    .logo-img {
        height: 60px;
    }
}

/* ===== 3. БЛОК АВТОРИЗАЦИИ И ПОЛЬЗОВАТЕЛЬСКОЕ МЕНЮ ===== */
.auth-section {
    position: relative;
    z-index: 1001;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
}

.username {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 600;
}

    .username:hover {
        background: rgba(255,255,255,0.2);
    }

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: #374552;
    border-radius: 8px;
    padding: 15px;
    width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1002;
    margin-top: 10px;
}

.user-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.guest-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Элементы меню пользователя */
.status-info {
    color: #aaa;
    font-size: 0.9em;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3d4f5e;
}

.status-btn {
    display: block;
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    background: #3d4f5e;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

    .status-btn:hover {
        background: #4d5f6e;
    }

.status-divider {
    border-top: 1px solid #3d4f5e;
    margin: 10px 0;
}

.character-selector {
    margin: 10px 0;
}

    .character-selector label {
        display: block;
        color: #aaa;
        font-size: 0.9em;
        margin-bottom: 5px;
    }

.character-select {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    background: #3d4f5e;
    color: white;
    border: 1px solid #5d6f7e;
    font-size: 0.9em;
}

    .character-select:focus {
        outline: none;
        border-color: #3498db;
    }

.editor-admin-btn {
    display: block;
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    background: #3d4f5e;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.language-flags {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.flag-link {
    font-size: 1.2em;
    text-decoration: none;
    opacity: 0.7;
    transition: all 0.3s;
    filter: grayscale(50%);
    color: white;
}

    .flag-link:hover {
        opacity: 1;
        transform: scale(1.1);
        filter: grayscale(0%);
    }

    .flag-link.active {
        opacity: 1;
        filter: grayscale(0%) drop-shadow(0 0 5px rgba(255, 255, 255, 0.7));
        transform: scale(1.1);
        color: white;
    }

/* ===== 4. СТРАНИЦА ВХОДА (LOGIN PAGE) ===== */
.login-page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 20px;
}

.login-form-container {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 40px 30px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-title {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 600;
}

.login-alert {
    text-align: center;
    margin-bottom: 20px;
    border-radius: 6px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: none;
}

.form-field {
    margin-bottom: 0;
    padding-left: 0;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.login-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

    .login-input:focus {
        outline: none;
        border-color: #3498db;
        box-shadow: 0 0 8px rgba(52, 152, 219, 0.2);
        background: rgba(255, 255, 255, 0.95);
    }

.login-btn {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    margin-left: 0;
}

    .login-btn:hover {
        background: #2980b9;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    }

.login-register-link {
    text-align: center;
    margin-top: 25px;
    color: #666;
}

    .login-register-link a {
        color: #3498db;
        text-decoration: none;
        font-weight: 500;
    }

        .login-register-link a:hover {
            text-decoration: underline;
        }

/* ===== 5. КНОПКИ (BUTTONS) ===== */
.btn {
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-buy {
    background-color: #007bff;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    margin-left: 10px;
}

.btn-delete:hover,
.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 0.9;
}

.btn-buy:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

.btn-delete {
    background-color: #dc3545;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-edit {
    background-color: #007bff;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-login,
.btn-register,
.btn-logout {
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-login {
    background: #3498db;
    color: white;
}

.btn-register {
    background: #2ecc71;
    color: white;
}

.btn-logout {
    display: block;
    margin: 15px auto 0;
    padding: 8px;
    background: #e74c3c;
    color: white;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-login:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-register:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-logout:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Кнопка добавления лота */
.add-lot-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    bottom: 40px;
    right: 30px;
    z-index: 900;
    transition: all 0.3s ease;
}

.add-lot-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: rgba(230,68,0,0.8);
    color: white;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.plus-icon {
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    transition: transform 0.3s ease;
}

.add-lot-text {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(230,68,0,0.8);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-shadow: -1px -1px 0 white, 1px -1px 0 white, -1px 1px 0 white, 1px 1px 0 white;
}

.add-lot-container:hover {
    transform: translateY(-5px);
}

    .add-lot-container:hover .add-lot-btn {
        background-color: rgba(230,68,0,1);
        box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    }

    .add-lot-container:hover .plus-icon {
        transform: scale(1.1);
    }

    .add-lot-container:hover .add-lot-text {
        color: rgba(230,68,0,1);
        transform: translateY(-3px);
    }

.add-lot-btn:active {
    transform: scale(0.95);
}

/* ===== 6. СПИСОК ТОВАРОВ / ЛОТОВ (PRODUCTS LIST) ===== */
.products-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
    gap: 15px;
    background: rgba(53, 66, 74, 0.75);
    color: white;
    padding: 12px 15px;
    border-radius: 4px 4px 0 0;
    font-weight: bold;
    align-items: center;
}

.product-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
    gap: 15px;
    align-items: center;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px 15px;
    transition: all 0.2s;
    margin-bottom: 5px;
    backdrop-filter: blur(5px);
}

    .product-row:hover {
        background: rgba(255, 255, 255, 0.85);
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border-color: #3498db;
    }

    .product-row.my-lot {
        background: rgba(255, 255, 255, 0.95);
        border-left: 4px solid #3498db;
        position: relative;
    }

        .product-row.my-lot:hover {
            background: rgba(255, 255, 255, 0.98);
            border-left-color: #2980b9;
            box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
        }

.product-column {
    display: flex;
    align-items: center;
    min-height: 40px;
}

.product-actions {
    display: flex;
    gap: 6px; /* Расстояние между кнопками Удалить и Редактировать */
}

/* Колонки с фиксированной шириной */
.item-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.item-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.item-name-link:hover .item-name-text,
.item-name-link:focus-visible .item-name-text {
    text-decoration: underline;
}

.item-icon {
    width: 36px;
    height: 36px;
    padding: 2px;
    border-radius: 6px;
    background: radial-gradient(circle, rgba(58, 63, 69, 0.35) 0%, rgba(58, 63, 69, 0.25) 30%, rgba(58, 63, 69, 0) 66%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
    filter: drop-shadow(0 0 4px rgba(43, 48, 54, 0.9)) drop-shadow(0 0 8px rgba(43, 48, 54, 0.45));
    object-fit: contain;
    flex-shrink: 0;
    transition: filter 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.item-name-text {
    min-width: 0;
}

.product-row:hover .item-icon,
.product-row.my-lot .item-icon,
.product-row:focus-within .item-icon,
.editor-item-row:hover .item-icon,
.editor-item-row:focus-within .item-icon,
.item-name-link:hover .item-icon,
.item-icon-link:hover .item-icon,
.item-name-link:focus-visible .item-icon,
.item-icon-link:focus-visible .item-icon,
.suggestion-item:hover .item-icon {
    background: radial-gradient(circle, rgba(58, 63, 69, 0.35) 0%, rgba(58, 63, 69, 0.25) 30%, rgba(58, 63, 69, 0) 66%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
    filter: drop-shadow(0 0 4px rgba(43, 48, 54, 0.9)) drop-shadow(0 0 8px rgba(43, 48, 54, 0.45));
    transform: none;
}

.item-column {
    justify-content: flex-start;
}

.price-column {
    justify-content: center;
}

.seller-column {
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.actions-column {
    justify-content: flex-end;
    gap: 10px;
}

.product-info {
    display: contents;
}

.product-table {
    display: none;
}

/* ===== 7. ОСНОВНОЙ КОНТЕНТ (MAIN CONTENT) ===== */
main {
    min-height: calc(100vh - 120px);
    position: relative;
}

/* ===== 8. БЛОК ПОИСКА (SEARCH) ===== */
.search-container {
    background: transparent;
    margin-bottom: 20px;
    max-width: 400px;
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.suggestions {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    z-index: 1000;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    box-sizing: border-box;
}

    .suggestion-item:hover {
        background-color: #f8f9fa;
    }

    .suggestion-item:last-child {
        border-bottom: none;
    }

/* ===== 9. СТРАНИЦА ПЕРСОНАЖЕЙ (CHARACTERS PAGE) ===== */
.characters-page .characters-container {
    max-width: 900px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 25px;
}

.characters-management-section {
    flex-shrink: 0;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 10px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.character-stats,
.lots-stats {
    margin-bottom: 15px;
}

.stats-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 500;
}

.character-controls {
    margin-bottom: 20px;
}

.add-character-form .form-row {
    display: flex;
    gap: 10px;
}

.character-name-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.btn-add-character {
    padding: 10px 20px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

    .btn-add-character:hover {
        background: #27ae60;
        transform: translateY(-2px);
    }

.character-selector-section {
    margin-top: 10px;
}

.selector-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.selector-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.character-select-large {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background: white;
}

.btn-delete-character {
    padding: 12px 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

    .btn-delete-character:hover:not(:disabled) {
        background: #c0392b;
        transform: translateY(-2px);
    }

    .btn-delete-character:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* Секция лотов */
.character-lots-section {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-top: 10px;
}

.lots-header {
    flex-shrink: 0;
}

.lots-controls {
    flex-shrink: 0;
    margin: 15px 0;
}

.search-wrapper {
    display: flex;
    gap: 10px;
}

    .search-wrapper .search-input {
        flex: 1;
        padding: 10px 15px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 14px;
    }

/* Контейнер с лотами (прокручиваемый) */
.character-lots-list {
    flex: 1 1 auto;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    padding: 10px;
    min-height: 200px;
}

/* Сообщения */
.no-lots-message,
.error-message {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    z-index: 9999;
    animation: slideIn 0.3s;
}

.notification-success {
    background: #28a745;
}

.notification-info {
    background: #17a2b8;
}

.notification-error {
    background: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Кнопки в модальном окне редактирования */
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-cancel {
    background: #6c757d;
}

    .btn-cancel:hover {
        background: #5a6268;
    }

/* Адаптивность */
@media (max-width: 768px) {
    .add-character-form .form-row {
        flex-direction: column;
    }

    .selector-wrapper {
        flex-direction: column;
    }

    .btn-delete-character {
        width: 100%;
    }

    .character-lots-list .products-header {
        display: none;
    }

    .character-lots-list .product-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* ===== 10. СТРАНИЦА ПОЛЬЗОВАТЕЛЕЙ (USERS PAGE) ===== */
.user-row {
    cursor: pointer;
}

.users-toolbar {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.users-search-meta {
    color: #666;
    font-size: 14px;
    white-space: nowrap;
}

.users-header,
.users-row {
    grid-template-columns: 2fr 2fr 1fr 0.8fr 0.8fr;
}

.clickable-user-row {
    position: relative;
}

.clickable-user-row:hover {
    border-color: #3498db;
}

.clickable-user-row:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.users-login-column {
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.users-email-column {
    word-break: break-word;
}

.users-username {
    font-weight: 600;
}

.users-role-emoji {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.shadowbanned-username {
    color: #b00020;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: rgba(108, 117, 125, 0.15);
    color: #495057;
}

.role-user {
    background: rgba(108, 117, 125, 0.14);
    color: #495057;
}

.role-vip {
    background: rgba(253, 126, 20, 0.16);
    color: #c25a0b;
}

.role-moder {
    background: rgba(23, 162, 184, 0.16);
    color: #0c7285;
}

.role-admin {
    background: rgba(220, 53, 69, 0.14);
    color: #b02a37;
}

.user-details-modal {
    max-width: 920px;
    max-height: 85vh;
    overflow-y: auto;
}

.user-details-modal-header {
    margin-bottom: 18px;
    padding-right: 35px;
}

.user-details-subtitle {
    margin: 6px 0 0;
    color: #66727e;
    font-size: 14px;
}

.user-details-loading,
.user-details-empty {
    padding: 18px;
    color: #66727e;
    text-align: center;
    background: rgba(248, 249, 250, 0.9);
    border: 1px dashed #d8dee4;
    border-radius: 8px;
}

.user-details-feedback {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.user-details-feedback.is-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.user-details-feedback.is-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.user-details-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-details-section {
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
}

.user-details-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.user-details-section-header h4 {
    margin: 0;
    font-size: 18px;
}

.user-details-summary {
    color: #66727e;
    font-size: 13px;
    font-weight: 600;
}

.user-details-main-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.user-details-flags {
    margin-top: 14px;
}

.user-details-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-details-label {
    color: #66727e;
    font-size: 13px;
    font-weight: 600;
}

.user-details-value {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    word-break: break-word;
}

.user-role-management {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.user-role-controls {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.user-role-select-group {
    min-width: 220px;
    flex: 1 1 240px;
}

.user-role-select {
    margin-bottom: 0;
}

.user-role-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.user-management-primary-btn,
.user-management-secondary-btn,
.user-character-delete-btn {
    padding: 8px 14px;
    color: #fff;
    font-weight: 600;
}

.user-management-primary-btn {
    background: #2d7dd2;
}

.user-management-secondary-btn {
    background: #7a8699;
}

.user-character-delete-btn {
    background: #dc3545;
}

.user-management-primary-btn:hover,
.user-management-secondary-btn:hover,
.user-character-delete-btn:hover {
    transform: translateY(-1px);
}

.user-details-shadowban-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(176, 0, 32, 0.12);
    color: #b00020;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.user-details-note {
    margin: 0 0 12px;
    color: #66727e;
    font-size: 13px;
}

.user-details-character-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-details-character-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    background: rgba(248, 249, 250, 0.9);
}

.user-details-character-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-details-character-name {
    font-weight: 600;
    color: #2c3e50;
}

.user-details-character-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(52, 152, 219, 0.14);
    color: #2471a3;
    font-size: 12px;
    font-weight: 700;
}

.user-details-products {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-details-products-header,
.user-details-product-row {
    grid-template-columns: 2fr 1fr 1fr 1.25fr;
}

.user-details-product-actions {
    gap: 8px;
    flex-wrap: wrap;
}

/* ===== 11. СТРАНИЦА КОДОВ (CODES PAGE) ===== */
.code-generator {
    border: 1px solid #ddd;
}

.code-value {
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* ===== 12. УВЕДОМЛЕНИЯ (NOTIFICATIONS) ===== */
.copy-notification {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    pointer-events: none;
    z-index: 1000;
    animation: fadeOut 1.5s forwards;
    transform: translate(-50%, -100%);
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* ===== 13. ФОРМЫ (FORMS) ===== */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
}

input, button, select {
    padding: 0.5rem;
    font-size: 1rem;
}

/* ===== 14. ПОДВАЛ (FOOTER) ===== */
footer {
    text-align: center;
    padding: 1rem;
    background: rgba(53, 66, 74, 0.75);
    color: white;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.site-footer {
    padding: 0.75rem 1rem 0.65rem;
}

.footer-content,
.footer-meta {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
    flex-wrap: wrap;
}

.footer-brand,
.footer-links {
    display: flex;
    align-items: center;
    gap: 8px 14px;
    flex-wrap: wrap;
}

.footer-title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.footer-tagline {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.72);
}

.footer-links {
    justify-content: center;
}

.footer-link {
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease, opacity 0.2s ease;
}

    .footer-link:hover,
    .footer-link:focus-visible {
        color: #ffffff;
        text-decoration: underline;
    }

.footer-meta {
    margin-top: 4px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
}

.footer-separator {
    margin: 0 6px;
    color: rgba(255, 255, 255, 0.35);
}

/* ===== 15. МОДАЛЬНЫЕ ОКНА (MODALS) ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    overflow-y: auto;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2001;
}

    .modal-backdrop::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: var(--header-height, 80px);
        background: rgba(56, 68, 76, 0.75);
        z-index: 1;
    }

    .modal-backdrop::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: var(--footer-height, 60px);
        background: rgba(53, 66, 74, 0.75);
        z-index: 1;
    }

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s;
    color: #2c3e50;
    border: 1px solid #ddd;
    z-index: 2002;
}

.modal .close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #2c3e50;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

    .modal .close:hover {
        color: #e74c3c;
    }

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

body.modal-open {
    overflow: hidden;
}

/* Стили для формы в модальном окне */
.modal-input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    box-sizing: border-box;
    transition: all 0.3s ease;
}

    .modal-input:focus {
        outline: none;
        border-color: #3498db;
        box-shadow: 0 0 8px rgba(52, 152, 219, 0.2);
        background: rgba(255, 255, 255, 0.98);
    }

.modal-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
}

/* Стили для алертов в модальном окне */
.modal .alert {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
}

.modal .alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.modal .alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.trade-disclaimer-modal {
    max-width: 620px;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px 30px 26px;
}

.trade-disclaimer-modal h3 {
    margin: 0;
    padding-right: 30px;
    line-height: 1.3;
}

.trade-disclaimer-body {
    overflow-y: auto;
    padding-right: 8px;
}

.trade-disclaimer-body p {
    margin: 0;
    color: #42505e;
    font-size: 15px;
    line-height: 1.7;
}

.trade-disclaimer-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #42505e;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
}

.trade-disclaimer-checkbox input {
    margin-top: 3px;
    accent-color: #007bff;
}

.trade-disclaimer-confirm {
    margin-top: 0;
}

/* ===== 16. СТРАНИЦА РЕДАКТОРА (EDITOR PAGE) ===== */
.editor-container {
    max-width: 900px;
    min-width: 800px;
}

.editor-items-list {
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.editor-items-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    gap: 15px;
    background: rgba(53, 66, 74, 0.85);
    color: white;
    padding: 15px;
    font-weight: bold;
    align-items: center;
}

.editor-item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    gap: 15px;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

    .editor-item-row:hover {
        background: rgba(255, 255, 255, 0.95);
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .editor-item-row:last-child {
        border-bottom: none;
    }

.editor-item-name {
    display: flex;
    gap: 8px;
}

.editor-item-stat {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.editor-item-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.editor-action-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

    .editor-action-btn:hover {
        transform: scale(1.1);
    }

.no-items-message {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
}

/* ===== 17. СТРАНИЦЫ ОШИБОК (ERROR PAGES) ===== */
.error-container {
    max-width: 600px;
    margin: 50px auto;
    text-align: center;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

/* ===== 18. СТИЛИ СТАТУСОВ (STATUS COLORS) ===== */
#current-status {
    margin-left: 5px;
    font-weight: bold;
}

    #current-status.online {
        color: #28a745;
    }

    #current-status.ingame {
        color: #17a2b8;
    }

    #current-status.invisible {
        color: #dc3545;
    }

    #current-status.offline {
        color: #6c757d;
    }

.product-seller {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.role-emoji {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.character-link {
    color: inherit;
    text-decoration: none;
}

.character-link:hover .character-name,
.character-link:focus-visible .character-name {
    text-decoration: underline;
}

.product-seller.online {
    color: #28a745 !important;
}

.product-seller.ingame {
    color: #17a2b8 !important;
}

.product-seller.invisible {
    color: #dc3545 !important;
}

.product-seller.offline {
    color: #6c757d !important;
}

.product-seller.shadowbanned-seller {
    color: #b00020 !important;
}

/* ===== 19. ПРОГРЕСС-БАР ЛИМИТОВ (LOT LIMITS) ===== */
.lot-limits {
    margin: 15px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-weight: bold;
    max-width: 300px;
}

    .lot-limits .progress {
        height: 10px;
        margin-top: 8px;
        background-color: #e9ecef;
        border-radius: 5px;
        overflow: hidden;
        width: 100%;
    }

    .lot-limits .progress-bar {
        background-color: #28a745;
        height: 100%;
        transition: width 0.3s;
    }

    .lot-limits .progress-bar.limit-unlimited,
    .progress-bar.limit-unlimited {
        background: linear-gradient(90deg, #17a2b8, #5bc0de) !important;
    }

/* ===== 20. АДАПТИВНЫЕ СТИЛИ (MEDIA QUERIES) ===== */

/* Для мобильных устройств (максимальная ширина 768px) */
@media (max-width: 768px) {
    .language-switcher-header {
        margin-left: 10px;
        padding-left: 10px;
        gap: 5px;
    }

        .language-switcher-header .flag-link {
            font-size: 1.2em;
            padding: 4px;
        }

    .products-header,
    .product-row {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
    }

    .product-column {
        justify-content: center;
    }

    .actions-column {
        justify-content: center;
        flex-wrap: wrap;
    }

    .editor-items-header,
    .editor-item-row {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }

    .editor-item-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .users-toolbar,
    .user-role-controls,
    .user-role-actions,
    .user-details-character-row {
        flex-direction: column;
        align-items: stretch;
    }

    .user-details-main-grid {
        grid-template-columns: 1fr;
    }

    .user-details-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* Для очень маленьких экранов (максимальная ширина 480px) */
@media (max-width: 480px) {
    .guest-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .language-switcher-header {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        padding-top: 10px;
        width: 100%;
        justify-content: center;
        order: 3;
    }

    .guest-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .btn-login,
    .btn-register {
        width: 100%;
        text-align: center;
    }

    .login-form-container {
        padding: 30px 20px;
        margin: 20px;
    }

    .login-title {
        font-size: 1.7rem;
    }

    .characters-container {
        padding: 25px 20px;
    }

    .character-row {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .character-delete-btn {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .trade-disclaimer-modal {
        max-height: calc(100vh - 140px);
        padding: 22px 18px 20px;
    }

    .modal-backdrop {
        top: 70px;
        bottom: 50px;
    }
}

/* ===== 21. ПАГИНАЦИЯ ===== */

/* ==== Стили для редактора с пагинацией ==== */
.editor-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.search-box {
    flex-grow: 1;
}

#addItemBtn {
    flex-shrink: 0;
    width: auto;
    min-width: 150px;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding: 15px;
    border-top: 1px solid #eee;
}

.page-link {
    padding: 8px 15px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

    .page-link:hover {
        background: #2980b9;
        transform: translateY(-2px);
    }

.page-info {
    color: #666;
    font-weight: 500;
}
/* ==== Стили для поиска в редакторе ==== */
.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-grow: 1;
}

    .search-form .login-input {
        flex-grow: 1;
        margin-bottom: 0;
    }

.search-btn {
    padding: 12px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .search-btn:hover {
        background: #2980b9;
        transform: translateY(-2px);
    }

.clear-search {
    color: #e74c3c;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

    .clear-search:hover {
        background-color: #f8d7da;
        text-decoration: underline;
    }

/* =====  21. ПАГИНАЦИЯ ===== */

/* Стили для бесконечной прокрутки */
.products-list {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    position: relative;
}

.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #666;
}

.spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.end-message {
    text-align: center;
    padding: 20px;
    color: #999;
    font-style: italic;
}

/* Для фиксированной высоты на главной странице */
.page-content:not(.fixed-height-page) .products-list {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* =====  22.  ===== */

/* ===== 23. PUBLIC CHARACTER PAGE ===== */
.character-public-page {
    max-width: 1100px;
}

.character-public-card {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(33, 43, 53, 0.08);
}

.character-public-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.character-public-header-main {
    flex: 1 1 460px;
}

.character-public-title {
    margin: 0 0 12px;
    color: #2c3e50;
    font-size: 2rem;
    line-height: 1.2;
}

.character-public-role-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.character-public-role-line .role-badge {
    font-size: 14px;
    padding: 8px 14px;
}

.character-public-meta {
    min-width: 220px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.character-public-meta-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(248, 249, 250, 0.92);
    border: 1px solid rgba(221, 221, 221, 0.9);
}

.character-public-meta-label {
    color: #66727e;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.character-public-meta-value {
    color: #2c3e50;
    font-size: 1.05rem;
    font-weight: 700;
}

.character-public-section-heading {
    margin-bottom: 16px;
}

.character-public-section-heading h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.45rem;
}

.character-public-products {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.character-public-product-row {
    margin-bottom: 0;
}

.character-public-empty {
    text-align: center;
    padding: 48px 24px;
    border: 1px dashed #d8dee4;
    border-radius: 10px;
    background: rgba(248, 249, 250, 0.9);
    color: #66727e;
    font-style: italic;
}

@media (max-width: 768px) {
    .character-public-card {
        padding: 20px 18px;
    }

    .character-public-title {
        font-size: 1.6rem;
    }

    .character-public-meta {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ===== BETA PAGE ===== */
.beta-container {
    background: rgba(238, 242, 247, 0.86);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 18px 24px;
}

.beta-title {
    margin-bottom: 6px;
    color: #24313d;
}

.beta-section {
    padding: 2px 0;
}

.beta-section h3 {
    margin-bottom: 3px;
    font-weight: 600;
    color: #24313d;
}

.beta-section p {
    margin: 0;
    line-height: 1.6;
    color: #3e4a56;
}

.beta-container a {
    color: #2a5d9f;
    text-decoration: none;
    border-bottom: 1px solid rgba(42, 93, 159, 0.25);
    transition: all 0.15s ease;
}

.beta-container a:hover {
    color: #1f4c85;
    border-bottom-color: rgba(42, 93, 159, 0.6);
}

.beta-container a:focus-visible {
    outline: none;
    border-bottom-color: rgba(42, 93, 159, 0.9);
}

.beta-divider {
    height: 1px;
    width: 76%;
    max-width: 760px;
    margin: 10px auto;
    background: rgba(0, 0, 0, 0.07);
}

/* ===== RESOURCES PAGE ===== */
.resources-card {
    max-width: 880px;
    margin: 0 auto;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 40px rgba(29, 47, 61, 0.14);
}

.resources-header h2 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #23313d;
}

.resources-description {
    margin: 0;
    color: #4c5b66;
    line-height: 1.6;
}

.resources-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 24px 0;
}

.resources-meta-item {
    display: flex;
    flex-direction: column;
    padding: 16px 18px;
    border-radius: 10px;
    background: rgba(55, 69, 82, 0.08);
    border: 1px solid rgba(55, 69, 82, 0.12);
}

.resources-meta-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #60717c;
}

.resources-meta-value {
    color: #23313d;
    font-size: 1.05rem;
}

.resources-admin-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.resources-sync-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 42px;
    padding: 10px 18px;
    border: 0;
    border-radius: 8px;
    background: #2f7edb;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.resources-sync-btn:hover:not(:disabled) {
    background: #2467b5;
    transform: translateY(-1px);
}

.resources-sync-btn:disabled {
    opacity: 0.75;
    cursor: wait;
    transform: none;
}

.resources-sync-feedback,
.resources-sync-note {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
}

.resources-sync-feedback.is-info {
    color: #43525e;
}

.resources-sync-feedback.is-success {
    color: #1f7a3f;
}

.resources-sync-feedback.is-error {
    color: #b44040;
}

.resources-sync-note {
    color: #5d6a74;
}

.resources-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 8px;
    background: #2f7edb;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
}

.resources-download-btn:hover {
    background: #2467b5;
    transform: translateY(-1px);
}

.resources-empty-state,
.resources-file-placeholder {
    margin: 0;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(55, 69, 82, 0.06);
    color: #56646e;
}

.resources-files-section {
    margin-top: 24px;
}

.resources-files-section h3 {
    margin-bottom: 14px;
    color: #23313d;
}

.resources-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.resources-file-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(55, 69, 82, 0.1);
}

.resources-file-name {
    color: #23313d;
    word-break: break-word;
}

.resources-file-size {
    color: #60717c;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .resources-card {
        padding: 22px 18px;
    }

    .resources-file-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .resources-download-btn {
        width: 100%;
    }

    .resources-sync-btn {
        width: 100%;
        align-self: stretch;
    }
}
