/* Modern VPN Bot Admin Panel - Красивый дизайн */

/* Основные цвета */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    --info-gradient: linear-gradient(135deg, #209cff 0%, #68e0cf 100%);
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --danger-gradient: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --shadow-soft: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --shadow-hover: 0 15px 35px 0 rgba(31, 38, 135, 0.4);
}

/* Общие стили с градиентным фоном - улучшенная читаемость */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #1a202c;
    font-variant-numeric: normal;
    font-feature-settings: "lnum";
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Улучшенная читаемость на мобильных */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Убираем все проблемные анимации */
*, *::before, *::after {
    animation: none !important;
    animation-duration: 0s !important;
    animation-delay: 0s !important;
}

/* Минимальные transitions только для hover */
a, button, .btn {
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease !important;
}

.table tbody tr {
    transition: background-color 0.15s ease !important;
}

/* Убираем все transform */
*, *::before, *::after {
    transform: none !important;
}

.table tbody tr:hover,
.btn:hover,
.card:hover {
    transform: none !important;
}

/* Убираем наклон у всех цифр */
* {
    font-variant-numeric: normal !important;
    font-style: normal !important;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.text-gray-800,
.font-weight-bold {
    font-variant-numeric: normal !important;
    font-style: normal !important;
    font-feature-settings: "lnum" !important;
}

/* Специально для цифр в карточках статистики */
.card .h5,
.card .h6,
.card .font-weight-bold,
.card .text-gray-800 {
    font-variant-numeric: normal !important;
    font-style: normal !important;
    font-feature-settings: "lnum" !important;
    font-variant-ligatures: none !important;
}

/* Убираем наклон у всех чисел везде */
.card-body,
.table,
.table td,
.table th,
.badge,
.btn {
    font-variant-numeric: normal !important;
    font-style: normal !important;
    font-feature-settings: "lnum" !important;
}

/* Дополнительная защита для больших чисел */
.h1, .h2, .h3, .h4, .h5, .h6,
h1, h2, h3, h4, h5, h6 {
    font-variant-numeric: normal !important;
    font-feature-settings: "lnum", "kern" !important;
}

/* Для всех span и div с числами */
span, div {
    font-variant-numeric: normal !important;
}

/* Исправление выравнивания цифр в карточках статистики */
.card-body .h5,
.card-body .h6 {
    text-align: left !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    line-height: 1.2 !important;
    display: block !important;
    width: 100% !important;
}

.card-body .text-xs {
    text-align: left !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    display: block !important;
    width: 100% !important;
}

.card-body .row.no-gutters {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.card-body .col {
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: left !important;
}

.card-body .col.mr-2 {
    margin-right: 0.5rem !important;
}

/* Гарантируем правильное выравнивание всех чисел */
.card-body .font-weight-bold.text-gray-800 {
    text-align: left !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Стеклянный контейнер - улучшенная читаемость */
.container-fluid {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Навигация - улучшенная читаемость */
.navbar {
    background: rgba(255, 255, 255, 0.98) !important;
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin: 20px 20px 0 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1030;
}

.navbar-brand {
    color: #1a202c !important;
    font-weight: 700;
    font-size: 1.3rem;
}

.nav-link {
    color: #1a202c !important;
    font-weight: 600;
    border-radius: 8px;
    margin: 0 2px;
    padding: 8px 12px;
}

.nav-link:hover {
    color: #667eea !important;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}

/* Карточки - улучшенная читаемость */
.card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    color: #1a202c;
    margin-bottom: 20px;
}

.card-body {
    color: #1a202c !important;
    font-size: 0.95rem;
    line-height: 1.6;
}

.card-title {
    color: #1a202c !important;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.card-text {
    color: #1a202c !important;
    font-size: 0.95rem;
    line-height: 1.6;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: rgba(255, 255, 255, 1) !important;
    color: #1a202c !important;
    border: none;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 15px 15px 0 0 !important;
    font-weight: 700 !important;
    padding: 15px 20px !important;
}

.card-header *,
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.card-header .h1,
.card-header .h2,
.card-header .h3,
.card-header .h4,
.card-header .h5,
.card-header .h6,
.card-header .font-weight-bold,
.card-header .fw-bold,
.card-header .text-primary,
.card-header .text-success,
.card-header .text-info,
.card-header .text-warning,
.card-header .text-danger,
.card-header .text-white,
.card-header .text-dark,
.card-header .text-secondary,
.card-header .text-muted,
.card-header span,
.card-header div,
.card-header p,
.card-header i,
.card-header .fas,
.card-header .far,
.card-header .fa {
    color: #1a202c !important;
    font-weight: 700 !important;
}

/* Гарантируем черный цвет для иконок в заголовках */
.card-header i,
.card-header .fas,
.card-header .far,
.card-header .fa {
    color: #1a202c !important;
}

/* Статистические карточки с градиентами */
.border-left-primary {
    border-left: 5px solid transparent !important;
    background: linear-gradient(white, white) padding-box,
                var(--primary-gradient) border-box;
    border-radius: 20px;
}

.border-left-success {
    border-left: 5px solid transparent !important;
    background: linear-gradient(white, white) padding-box,
                var(--success-gradient) border-box;
    border-radius: 20px;
}

.border-left-info {
    border-left: 5px solid transparent !important;
    background: linear-gradient(white, white) padding-box,
                var(--info-gradient) border-box;
    border-radius: 20px;
}

.border-left-warning {
    border-left: 5px solid transparent !important;
    background: linear-gradient(white, white) padding-box,
                var(--warning-gradient) border-box;
    border-radius: 20px;
}

.border-left-danger {
    border-left: 5px solid transparent !important;
    background: linear-gradient(white, white) padding-box,
                var(--danger-gradient) border-box;
    border-radius: 20px;
}

/* Единообразные кнопки */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn i {
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
    background: linear-gradient(135deg, #5568d3 0%, #63378a 100%);
}

.btn-success {
    background: var(--success-gradient);
    border: none;
    box-shadow: 0 2px 8px rgba(86, 171, 47, 0.3);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #4a9628 0%, #8fd4b5 100%);
    color: white;
}

.btn-info {
    background: var(--info-gradient);
    border: none;
    box-shadow: 0 2px 8px rgba(32, 156, 255, 0.3);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #1a8ae6 0%, #54d2c5 100%);
    color: white;
}

.btn-warning {
    background: var(--warning-gradient);
    border: none;
    box-shadow: 0 2px 8px rgba(240, 147, 251, 0.3);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ee7fe9 0%, #f24555 100%);
    color: white;
}

.btn-danger {
    background: var(--danger-gradient);
    border: none;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff5252 0%, #fdb545 100%);
    color: white;
}

.btn-secondary {
    background: rgba(108, 117, 125, 0.15);
    border: 1px solid rgba(108, 117, 125, 0.4);
    color: #1a202c;
}

.btn-secondary:hover {
    background: rgba(108, 117, 125, 0.25);
    border-color: rgba(108, 117, 125, 0.5);
    color: #1a202c;
}

/* Гарантируем одинаковый размер для всех кнопок в группах */
.d-grid .btn,
.btn.w-100 {
    width: 100%;
    min-height: 40px;
}

/* Выравнивание текста и иконок в кнопках */
.btn {
    white-space: nowrap;
    text-align: center;
}

/* Заголовки - улучшенная читаемость */
h1 {
    color: #1a202c !important;
    font-weight: 700;
    font-size: 1.75rem;
    line-height: 1.3;
}

h2 {
    color: #1a202c !important;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.3;
}

h3 {
    color: #1a202c !important;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.4;
}

h4, h5, h6 {
    color: #1a202c !important;
    font-weight: 600;
    line-height: 1.4;
}

/* Таблицы с улучшенной читаемостью */
.table {
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table thead th {
    background: var(--primary-gradient);
    color: white !important;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 15px;
    font-size: 0.875rem;
}

.table tbody tr {
    background: rgba(255, 255, 255, 1) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.table tbody tr:nth-child(even) {
    background: rgba(249, 250, 251, 1) !important;
}

.table tbody tr:hover {
    background: rgba(102, 126, 234, 0.08) !important;
}

.table tbody td {
    padding: 12px 15px;
    border: none;
    vertical-align: middle;
    color: #1a202c !important;
    font-weight: 500;
    font-size: 0.95rem;
}

/* ID платежей - ярче */
.table tbody td a {
    color: #667eea !important;
    font-weight: 700;
    font-size: 1rem;
}

.table tbody td a:hover {
    color: #5568d3 !important;
    text-decoration: underline;
}

/* Современные бейджи с улучшенной видимостью */
.badge {
    border-radius: 12px;
    font-weight: 700;
    padding: 10px 18px;
    text-transform: none;
    letter-spacing: 0.3px;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
    white-space: nowrap;
}

.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
}

.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #5568d3 100%) !important;
    color: white !important;
}

.bg-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
}

.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
}

.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
}

.bg-dark {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 700 !important;
}

.bg-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
    color: white !important;
}

/* Специальные стили для статусов платежей */
.badge.bg-success {
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.4);
}

.badge.bg-warning {
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.4);
}

.badge.bg-dark {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    font-weight: 700 !important;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.5);
}

.badge.bg-danger {
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.4);
}

/* Улучшенные цвета для методов оплаты - яркий синий для ЮKassa */
.badge.bg-primary {
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%) !important;
    color: white !important;
    box-shadow: 0 3px 10px rgba(66, 133, 244, 0.4);
}

/* Улучшенная контрастность для таблиц */
.table-bordered {
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.table-bordered td,
.table-bordered th {
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* Дополнительные стили для лучшей читаемости */
.table tbody td {
    font-size: 0.9rem;
}

.table tbody td a {
    transition: color 0.2s ease;
}

/* Формы с улучшенной читаемостью */
.form-control {
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 10px 15px;
    color: #1a202c;
    font-weight: 400;
    font-size: 0.95rem;
}

.form-control:focus {
    background: rgba(255, 255, 255, 1);
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

.form-select {
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 0.95rem;
}

/* Алерты с улучшенной читаемостью */
.alert {
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    border-left: 4px solid;
    color: #1a202c;
}

.alert-success {
    border-left-color: #56ab2f;
}

.alert-danger {
    border-left-color: #ff6b6b;
}

.alert-warning {
    border-left-color: #f093fb;
}

.alert-info {
    border-left-color: #209cff;
}

/* Прогресс бары */
.progress {
    height: 10px;
    border-radius: 10px;
    background: rgba(229, 231, 235, 1);
    overflow: hidden;
}

.progress-bar {
    background: var(--primary-gradient);
    border-radius: 10px;
}

/* Хлебные крошки - улучшенная читаемость */
.breadcrumb {
    background: rgba(255, 255, 255, 1) !important;
    border-radius: 8px;
    padding: 10px 15px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.breadcrumb.bg-transparent {
    background: rgba(255, 255, 255, 0.98) !important;
}

.breadcrumb-item a {
    color: #4c63d2 !important;
    text-decoration: none;
    font-weight: 600 !important;
}

.breadcrumb-item a:hover {
    color: #5568d3 !important;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #1a202c !important;
    font-weight: 700 !important;
}

.breadcrumb-item i {
    color: inherit;
    margin-right: 4px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6b7280 !important;
    font-weight: 700;
    padding: 0 8px;
}

/* Дополнительные стили для четкого текста */
.font-weight-bold, 
.fw-bold,
strong {
    color: #1a202c !important;
    font-weight: 600 !important;
}

.text-muted,
.text-secondary {
    color: #1f2937 !important;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 600 !important;
}

/* Улучшенная читаемость везде */
p, span, div, li, td, th {
    color: #1a202c !important;
    line-height: 1.6;
}

/* Гарантируем контрастный текст везде - максимальная контрастность */
.text-muted {
    color: #1f2937 !important;
    font-weight: 600 !important;
}

.text-secondary {
    color: #374151 !important;
    font-weight: 600 !important;
}

/* Улучшенная читаемость для всех текстовых элементов */
.card-body *,
.card-body p,
.card-body span,
.card-body div,
.card-body li {
    color: #1a202c !important;
}

/* Улучшенная читаемость для мелких текстов в карточках */
.card-body small,
.card-body .text-muted,
.card-body .text-secondary,
.card-body .text-xs {
    color: #1f2937 !important;
    font-weight: 600 !important;
}

/* Улучшенная читаемость для вложенных элементов */
.card-body div small,
.card-body div .text-muted,
.card-body span small,
.card-body span .text-muted,
.card-body p small,
.card-body p .text-muted {
    color: #1f2937 !important;
    font-weight: 600 !important;
}

/* Специально для меток в статистических карточках */
.text-xs {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    line-height: 1.5;
    color: #1f2937 !important;
}

/* Мелкий текст везде - улучшенная читаемость */
small,
.text-sm {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    line-height: 1.5;
}

small.text-muted,
.text-sm.text-muted {
    color: #1f2937 !important;
    font-weight: 600 !important;
}

/* Гарантируем контрастность для всех текстовых элементов */
.card-body .text-gray-800,
.card-body .font-weight-bold {
    color: #111827 !important;
    font-weight: 700 !important;
}

.card-body .text-gray-300 {
    color: #6b7280 !important;
    opacity: 1 !important;
}

/* Убираем все размытия полностью */
*, *::before, *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Улучшенная контрастность цветного текста */
.text-primary {
    color: #4c63d2 !important;
    font-weight: 700;
}

.text-success {
    color: #16a34a !important;
    font-weight: 700;
}

.text-info {
    color: #0ea5e9 !important;
    font-weight: 700;
}

.text-warning {
    color: #ea580c !important;
    font-weight: 700;
}

.text-danger {
    color: #dc2626 !important;
    font-weight: 700;
}

.text-gray-800 {
    color: #1a202c !important;
    font-weight: 800;
}

/* В карточках статистики - более контрастные и яркие цвета */
.card .text-primary {
    color: #4338ca !important;
    font-weight: 700 !important;
    text-shadow: none;
}

.card .text-success {
    color: #15803d !important;
    font-weight: 700 !important;
}

.card .text-info {
    color: #0284c7 !important;
    font-weight: 700 !important;
}

.card .text-warning {
    color: #c2410c !important;
    font-weight: 700 !important;
}

.card .text-danger {
    color: #b91c1c !important;
    font-weight: 700 !important;
}

.card .text-secondary,
.card .text-dark {
    color: #374151 !important;
    font-weight: 700 !important;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    /* Улучшенная читаемость шрифтов на мобильных */
    body {
        font-size: 16px !important;
        line-height: 1.6 !important;
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    .container-fluid {
        margin: 5px;
        padding: 15px;
        border-radius: 12px;
    }
    
    .navbar {
        margin: 5px 5px 0 5px;
        border-radius: 12px;
        padding: 10px 15px !important;
    }
    
    .navbar-brand {
        font-size: 1.1rem !important;
    }
    
    .nav-link {
        font-size: 0.9rem !important;
        padding: 6px 10px !important;
    }
    
    /* Заголовки на мобильных */
    h1 {
        font-size: 1.5rem !important;
        line-height: 1.4 !important;
    }
    
    h2 {
        font-size: 1.3rem !important;
        line-height: 1.4 !important;
    }
    
    h3 {
        font-size: 1.1rem !important;
        line-height: 1.4 !important;
    }
    
    h4, h5, h6 {
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }
    
    .card {
        margin-bottom: 15px;
        border-radius: 12px;
    }
    
    .card-header {
        padding: 12px 15px !important;
        font-size: 0.95rem !important;
    }
    
    .card-body {
        padding: 15px !important;
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    
    .card-title {
        font-size: 1rem !important;
    }
    
    /* Улучшенная читаемость текста в карточках */
    .card-body p,
    .card-body span,
    .card-body div,
    .card-body li {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    
    .card-body small,
    .card-body .text-muted {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
    }
    
    /* Кнопки на мобильных */
    .btn {
        padding: 12px 20px !important;
        border-radius: 8px !important;
        font-size: 0.95rem !important;
        min-height: 44px !important;
    }
    
    .btn-sm {
        padding: 8px 16px !important;
        font-size: 0.9rem !important;
        min-height: 36px !important;
    }
    
    /* Таблицы на мобильных */
    .table {
        font-size: 0.9rem !important;
    }
    
    .table thead th {
        font-size: 0.85rem !important;
        padding: 10px 8px !important;
    }
    
    .table tbody td {
        font-size: 0.9rem !important;
        padding: 10px 8px !important;
        line-height: 1.5 !important;
    }
    
    .table tbody td small,
    .table tbody td .text-muted {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
    }
    
    .table tbody td strong {
        font-size: 0.95rem !important;
    }
    
    /* Статистические карточки */
    .card-body .h5,
    .card-body .h6 {
        font-size: 1.3rem !important;
    }
    
    .text-xs {
        font-size: 0.8rem !important;
    }
    
    /* Формы на мобильных */
    .form-control,
    .form-select {
        font-size: 16px !important; /* Предотвращает zoom на iOS */
        padding: 10px 12px !important;
        line-height: 1.5 !important;
    }
    
    /* Dropdown меню */
    .navbar-nav .dropdown-menu {
        font-size: 0.9rem !important;
        padding: 8px 0 !important;
    }
    
    .navbar-nav .dropdown-menu .dropdown-item {
        padding: 10px 20px !important;
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
    
    /* Breadcrumbs */
    .breadcrumb {
        font-size: 0.85rem !important;
        padding: 8px 12px !important;
    }
    
    /* Badges */
    .badge {
        font-size: 0.8rem !important;
        padding: 5px 10px !important;
        line-height: 1.4 !important;
    }
    
    /* Улучшенная читаемость для всех текстов на мобильных */
    p, span, div, li, td, th {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    
    .text-muted,
    .text-secondary {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        color: #374151 !important;
        font-weight: 500 !important;
    }
    
    /* Улучшенная читаемость для всех вложенных элементов */
    .table tbody td div,
    .table tbody td span {
        font-size: 0.9rem !important;
    }
    
    .table tbody td div small,
    .table tbody td div .text-muted {
        font-size: 0.8rem !important;
        color: #1f2937 !important;
        font-weight: 600 !important;
    }
    
    /* Улучшенная читаемость для карточек статистики */
    .card-body .h5,
    .card-body .h6 {
        font-size: 1.3rem !important;
        line-height: 1.3 !important;
    }
    
    /* Улучшенная читаемость для ссылок */
    a {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }
}

/* Выпадающие меню - улучшенная читаемость */
.navbar-nav .dropdown-menu {
    background: rgba(255, 255, 255, 1) !important;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    padding: 6px;
    margin-top: 8px;
    z-index: 1050 !important;
}

.navbar-nav .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(255, 255, 255, 0.95);
}

.navbar-nav .dropdown-menu .dropdown-item {
    color: #1a202c !important;
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 10px;
    margin: 3px 0;
    display: block;
    width: 100%;
    transition: all 0.2s ease;
    background: transparent;
}

.navbar-nav .dropdown-menu .dropdown-item:hover,
.navbar-nav .dropdown-menu .dropdown-item:focus {
    background: rgba(102, 126, 234, 0.1) !important;
    color: #667eea !important;
}

.navbar-nav .dropdown-menu .dropdown-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* Стили для разделителей в dropdown */
.navbar-nav .dropdown-menu .dropdown-divider {
    margin: 8px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0.5;
}

/* Дополнительная видимость для активных элементов */
.navbar-nav .dropdown-menu .dropdown-item.active {
    background: var(--primary-gradient);
    color: white !important;
}

/* Исправление z-index для корректного отображения поверх других элементов */
.navbar-nav .dropdown {
    position: relative;
    z-index: 1040;
}

.navbar-nav .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050 !important;
}

.navbar-nav .dropdown-menu.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Исправление для dropdown справа (пользователь) */
.navbar-nav:last-child .dropdown-menu {
    right: 0;
    left: auto;
}

.navbar-nav:last-child .dropdown-menu::before {
    right: 20px;
    left: auto;
}

/* Исправление для модальных окон */
.modal {
    z-index: 1060;
}

.modal-backdrop {
    z-index: 1055;
}

/* Исправление для таблиц - убрать проблемные анимации при прокрутке */
.table-responsive {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Улучшенные цвета для текста в таблицах */
.table tbody td {
    color: #1a202c !important;
    font-size: 0.95rem;
    line-height: 1.5;
}

.table tbody td small.text-muted,
.table tbody td small,
.table tbody td .text-muted {
    color: #1f2937 !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    font-weight: 600 !important;
}

.table tbody td strong {
    color: #1a202c !important;
    font-weight: 600;
    font-size: 1rem;
}

/* Улучшенная читаемость для мета-информации в таблицах */
.table tbody td .text-muted,
.table tbody td small,
.table tbody td .text-secondary {
    color: #1f2937 !important;
    font-weight: 600 !important;
}

/* Улучшенная читаемость для всех вложенных текстов */
.table tbody td div,
.table tbody td span,
.table tbody td p {
    color: #1a202c !important;
}

.table tbody td div small,
.table tbody td div .text-muted {
    color: #374151 !important;
    font-weight: 500 !important;
}

/* Улучшенные ссылки */
.table tbody td a.text-decoration-none {
    color: #667eea !important;
    font-weight: 600;
}

.table tbody td a.text-decoration-none:hover {
    color: #5568d3 !important;
    text-decoration: underline !important;
}

/* Кнопки действий в таблицах */
.table .btn-sm {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.table .btn-sm:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Отключаем проблемные анимации при быстрой прокрутке */
.table tbody tr {
    will-change: auto;
}

.table tbody tr:hover {
    transition: background-color 0.15s ease !important;
}

.card:hover {
    transform: none !important;
}
