/* ==========================================================================
   Cubix World & Control Center — AAA Cyberpunk Glassmorphism 5.1 (Master System)
   Theme: Deep Space Obsidian, Electric Cyan, Neon Purple & Emerald Glow
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:ital,wght@0,400;0,600;0,700;0,800;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Color Palette */
    --bg-dark: #02050e;
    --bg-surface: #060b18;
    --card-bg: rgba(9, 14, 28, 0.88);
    --card-bg-hover: rgba(14, 22, 42, 0.95);
    --card-border: rgba(56, 189, 248, 0.25);
    --card-border-hover: rgba(56, 189, 248, 0.65);

    /* Neon Glow Tokens */
    --glow-cyan: rgba(56, 189, 248, 0.35);
    --glow-purple: rgba(168, 85, 247, 0.35);
    --glow-amber: rgba(245, 158, 11, 0.35);
    --glow-emerald: rgba(16, 185, 129, 0.35);

    /* Accents */
    --accent-cyan: #38bdf8;
    --accent-blue: #0284c7;
    --accent-indigo: #6366f1;
    --accent-purple: #a855f7;
    --accent-rose: #ef4444;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;

    /* Text Hierarchy */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Radius */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 26px;
    --radius-full: 9999px;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.16) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.16) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    margin: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(2, 5, 14, 0.95);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.5) 0%, rgba(168, 85, 247, 0.5) 100%);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #38bdf8 0%, #a855f7 100%);
}

/* --- ВЕРХНЕЕ НАВИГАЦИОННОЕ МЕНЮ (CYBER HEADER NAVBAR) - BACKUP STYLES --- */
.cyber-header,
.header-bar {
    background: linear-gradient(180deg, rgba(12, 19, 36, 0.95) 0%, rgba(4, 8, 18, 0.9) 100%) !important;
    border-bottom: 1px solid rgba(56, 189, 248, 0.3) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
}

/* --- CYBER COLLAPSIBLE SIDEBAR --- */
.cyber-sidebar-wrapper {
    position: relative;
    z-index: 1040;
}

.cyber-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 70px;
    background: rgba(4, 8, 20, 0.95);
    border-right: 1px solid rgba(56, 189, 248, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    z-index: 1050;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

.cyber-sidebar:hover {
    width: 240px;
}

.cyber-sidebar-brand {
    width: 100%;
    padding: 0 16px;
    margin-bottom: 30px;
}

.cyber-sidebar-brand .brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.cyber-sidebar-brand .brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.cyber-sidebar-brand .brand-info {
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
}

.cyber-sidebar:hover .cyber-sidebar-brand .brand-info {
    opacity: 1;
}

.cyber-sidebar-brand .brand-text {
    font-weight: 900;
    font-size: 0.95rem;
    white-space: nowrap;
    background: linear-gradient(135deg, #38bdf8, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.cyber-sidebar-brand .brand-subtext {
    font-size: 0.62rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.cyber-sidebar-nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 10px;
    flex-grow: 1;
}

.cyber-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    width: 100%;
    border: 1px solid transparent;
}

.cyber-sidebar-link i {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.cyber-sidebar-link .link-text {
    font-size: 0.85rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cyber-sidebar:hover .cyber-sidebar-link .link-text {
    opacity: 1;
}

.cyber-sidebar-link:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.15);
    color: #fff;
}

.cyber-sidebar-link.active {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.15), transparent);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #fff;
}

.cyber-sidebar-user {
    width: 100%;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border: 1px solid transparent;
}

/* При раскрытии сайдбара превращаем блок профиля в карточку */
.cyber-sidebar:hover .cyber-sidebar-user {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(56, 189, 248, 0.12);
    border-radius: 12px;
    width: calc(100% - 20px);
    margin: 0 10px 10px 10px;
    padding: 10px 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cyber-sidebar-user .user-avatar-wrap {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    /* Квадратный аватар со скруглением */
    border: 2px solid var(--accent-cyan);
    overflow: hidden;
    flex-shrink: 0;
}

.cyber-sidebar-user .user-avatar-img {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    border-radius: 0 !important;
}

.cyber-sidebar-user .user-info {
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    flex-grow: 1;
    min-width: 0;
    /* Разрешаем flex сжимать блок */
}

.cyber-sidebar:hover .cyber-sidebar-user .user-info {
    opacity: 1;
}

.cyber-sidebar-user .user-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cyber-sidebar-user .badge-staff {
    font-size: 0.54rem !important;
    /* Добавили !important, чтобы перебить глобальный стиль */
    font-weight: 800 !important;
    padding: 2px 6px !important;
    /* Добавили !important */
    border-radius: 4px !important;
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(56, 189, 248, 0.3);
    align-self: flex-start;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    /* Обрезаем слишком длинные роли */
    box-shadow: none !important;
    /* Убираем тяжелую тень */
}

.cyber-sidebar-user .btn-logout {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cyber-sidebar:hover .cyber-sidebar-user .btn-logout {
    opacity: 1;
}

.cyber-sidebar-user .btn-logout:hover {
    color: #f87171;
}

.cyber-sidebar .sidebar-close-btn {
    display: none;
}

/* --- MOBILE HEADER & SIDEBAR ADAPTIVITY --- */
.cyber-mobile-header {
    display: none;
}

@media (max-width: 991.98px) {
    .cyber-sidebar {
        transform: translateX(-100%);
        width: 240px !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .cyber-sidebar.show {
        transform: translateX(0);
    }

    .cyber-sidebar .sidebar-close-btn {
        position: absolute;
        top: 20px;
        right: 20px;
        background: transparent;
        border: none;
        color: var(--text-secondary);
        font-size: 1.35rem;
        cursor: pointer;
        z-index: 1060;
        transition: color 0.2s;
    }

    .cyber-sidebar .sidebar-close-btn:hover {
        color: #ef4444;
    }

    .cyber-sidebar .cyber-sidebar-brand .brand-text,
    .cyber-sidebar .cyber-sidebar-brand .brand-info,
    .cyber-sidebar .cyber-sidebar-link .link-text,
    .cyber-sidebar .cyber-sidebar-user .user-info,
    .cyber-sidebar .cyber-sidebar-user .btn-logout {
        opacity: 1 !important;
    }

    .cyber-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: rgba(12, 19, 36, 0.95);
        border-bottom: 1px solid rgba(56, 189, 248, 0.3);
        padding: 12px 20px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        z-index: 1030;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .cyber-mobile-header .mobile-toggle {
        background: transparent;
        border: none;
        color: #fff;
        font-size: 1.25rem;
        cursor: pointer;
    }

    .cyber-mobile-header .mobile-brand {
        color: #fff;
        text-decoration: none;
        font-weight: 800;
        font-size: 0.95rem;
    }
}

@media (min-width: 992px) {
    body {
        padding-left: 70px !important;
    }
}

@media (max-width: 991.98px) {
    body {
        padding-top: 56px !important;
    }
}


.cyber-nav-pill,
.nav-module-btn {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    padding: 9px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cyber-nav-pill:hover,
.nav-module-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.5);
    color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.25);
}

.cyber-nav-pill.active,
.nav-module-btn.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.35) 0%, rgba(168, 85, 247, 0.35) 100%);
    border-color: rgba(56, 189, 248, 0.7);
    color: #ffffff;
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.35);
}

/* Pulse indicator for online systems */
.pulse-online {
    width: 10px;
    height: 10px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 14px #10b981;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* --- GLASSMORPHIC CARDS & PANELS --- */
.glass-panel,
.card-custom,
.stat-card,
.toolbar-card,
.exec-banner,
.server-card,
.staff-member-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.glass-panel:hover,
.card-custom:hover,
.stat-card:hover,
.server-card:hover,
.staff-member-card:hover {
    background: var(--card-bg-hover) !important;
    border-color: var(--card-border-hover) !important;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.85), 0 0 35px var(--glow-cyan);
    transform: translateY(-3px);
}

.glass-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    transition: all 0.25s ease;
}

.glass-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* --- WIDE MODAL DIALOGS --- */
@media (min-width: 1200px) {

    .modal-dialog.modal-wide,
    .modal-dialog.modal-xl {
        max-width: 1560px !important;
        width: 94vw !important;
    }
}

/* --- TPS BADGES HIGH CONTRAST --- */
.tps-badge-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.35) 0%, rgba(4, 120, 87, 0.5) 100%) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(74, 222, 128, 0.7) !important;
    font-weight: 800 !important;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.6) !important;
    padding: 5px 11px !important;
    border-radius: 8px !important;
}

.tps-badge-yellow {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.35) 0%, rgba(180, 83, 9, 0.5) 100%) !important;
    color: #facc15 !important;
    border: 1px solid rgba(250, 204, 21, 0.7) !important;
    font-weight: 800 !important;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.6) !important;
    padding: 5px 11px !important;
    border-radius: 8px !important;
}

.tps-badge-red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.35) 0%, rgba(153, 27, 27, 0.5) 100%) !important;
    color: #f87171 !important;
    border: 1px solid rgba(248, 113, 113, 0.7) !important;
    font-weight: 800 !important;
    text-shadow: 0 0 10px rgba(248, 113, 113, 0.6) !important;
    padding: 5px 11px !important;
    border-radius: 8px !important;
}

/* --- PLAYER NICKNAME BADGE (TACTICAL ULTRA-CONTRAST CHIP) --- */
.player-badge,
.badge-player-nickname {
    background: #060b18 !important;
    color: #ffffff !important;
    border: 1.5px solid #38bdf8 !important;
    border-radius: 9px !important;
    padding: 6px 12px !important;
    font-size: 0.88rem !important;
    font-family: 'JetBrains Mono', 'Inter', monospace !important;
    font-weight: 800 !important;
    letter-spacing: 0.3px !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7), 0 0 10px rgba(56, 189, 248, 0.2) !important;
    text-shadow: 0 1px 2px #000000 !important;
    margin: 3px !important;
}

.player-badge *,
.badge-player-nickname * {
    color: inherit !important;
}

.player-badge i,
.badge-player-nickname i {
    color: #00e5ff !important;
    font-size: 0.85rem !important;
}

.player-badge:hover,
.badge-player-nickname:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #7dd3fc !important;
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.6) !important;
}

.player-badge:hover i,
.badge-player-nickname:hover i {
    color: #ffffff !important;
}

.player-badge.highlighted,
.badge-player-nickname.highlighted {
    background: #f59e0b !important;
    color: #000000 !important;
    font-weight: 900 !important;
    border-color: #fef08a !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.9) !important;
    text-shadow: none !important;
}

.player-badge.highlighted i,
.badge-player-nickname.highlighted i {
    color: #000000 !important;
}

/* --- USER AVATARS STRICT BOUNDS --- */
.user-avatar-img,
.avatar-img,
td img,
.staff-avatar,
.user-widget-avatar {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    border: 1.5px solid rgba(56, 189, 248, 0.4) !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

/* --- ВЫСОКОКЛАССНЫЕ КНОПКИ (BUTTONS) --- */
.btn-glow-primary {
    background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.35);
    transition: all 0.25s ease;
}

.btn-glow-primary:hover {
    background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
    color: #ffffff;
    box-shadow: 0 6px 30px rgba(56, 189, 248, 0.5);
    transform: translateY(-2px);
}

/* --- СТИЛИ БЕЙДЖЕЙ И ДОЛЖНОСТЕЙ КОМАНДЫ И ДОНАТОВ --- */
.badge-staff {
    padding: 6px 12px !important;
    border-radius: 9px !important;
    font-size: 0.76rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6) !important;
    text-shadow: 0 1px 3px #000000, 0 0 4px #000000 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
}

.badge-staff * {
    color: #ffffff !important;
}

.staff-owner {
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%) !important;
    color: #ffffff !important;
    border-color: #38bdf8 !important;
}

.staff-curator {
    background: linear-gradient(135deg, #dc2626 0%, #7f1d1d 100%) !important;
    color: #ffffff !important;
    border-color: #f87171 !important;
}

.staff-tech {
    background: linear-gradient(135deg, #d946ef 0%, #a855f7 100%) !important;
    color: #ffffff !important;
    border-color: #f0abfc !important;
}

.staff-editor {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
    color: #ffffff !important;
    border-color: #6ee7b7 !important;
}

.staff-executive {
    background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%) !important;
    color: #ffffff !important;
    border-color: #fca5a5 !important;
}

.staff-admin {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
    color: #ffffff !important;
}

.staff-stadmin {
    background: linear-gradient(135deg, #ea580c 0%, #9a3412 100%) !important;
    color: #ffffff !important;
    border-color: #fdba74 !important;
}

.staff-mladmin {
    background: linear-gradient(135deg, #f97316 0%, #c2410c 100%) !important;
    color: #ffffff !important;
}

.staff-moder {
    background: linear-gradient(135deg, #d97706 0%, #78350f 100%) !important;
    color: #ffffff !important;
    border-color: #fcd34d !important;
}

.staff-stmoder {
    background: linear-gradient(135deg, #ca8a04 0%, #854d0e 100%) !important;
    color: #ffffff !important;
}

.staff-mlmoder {
    background: linear-gradient(135deg, #eab308 0%, #a16207 100%) !important;
    color: #ffffff !important;
}

.staff-helper {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
    color: #ffffff !important;
    border-color: #93c5fd !important;
}

.staff-builder {
    background: linear-gradient(135deg, #9333ea 0%, #581c87 100%) !important;
    color: #ffffff !important;
    border-color: #c084fc !important;
}

/* Dockets & Privileges */
.badge-bmoder {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
    color: #ffffff !important;
}

.badge-agent {
    background: linear-gradient(135deg, #059669 0%, #064e3b 100%) !important;
    color: #ffffff !important;
}

.badge-shpion {
    background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%) !important;
    color: #ffffff !important;
}

.badge-deluxe {
    background: linear-gradient(135deg, #c026d3 0%, #701a75 100%) !important;
    color: #ffffff !important;
}

.badge-vip {
    background: linear-gradient(135deg, #d97706 0%, #78350f 100%) !important;
    color: #ffffff !important;
}

.badge-premium {
    background: linear-gradient(135deg, #db2777 0%, #831843 100%) !important;
    color: #ffffff !important;
}

.badge-sponsor {
    background: linear-gradient(135deg, #d97706 0%, #78350f 100%) !important;
    color: #ffffff !important;
}

.badge-media {
    background: linear-gradient(135deg, #0891b2 0%, #164e63 100%) !important;
    color: #ffffff !important;
}

.staff-other {
    background: linear-gradient(135deg, #334155 0%, #0f172a 100%) !important;
    color: #ffffff !important;
    border-color: #64748b !important;
}

/* Form Inputs & Selects Dark Overrides */
.form-control,
.form-select {
    background-color: rgba(11, 16, 26, 0.95) !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    color: #f8fafc !important;
    border-radius: var(--radius-md) !important;
    padding: 11px 16px !important;
    font-size: 0.88rem !important;
    transition: all 0.2s ease !important;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(15, 23, 42, 0.98) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3) !important;
    color: #fff !important;
}

.form-control::placeholder {
    color: #64748b !important;
}

option {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}

/* Custom Tables Dark Overrides */
.table,
.table> :not(caption)>*>*,
.table-custom,
.table-custom tbody,
.table-custom tr,
.table-custom td {
    background-color: transparent !important;
    background: transparent !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
}

.table-custom th {
    background: rgba(15, 23, 42, 0.95) !important;
    color: var(--text-secondary) !important;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.table-custom td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    vertical-align: middle;
}

.table-custom tr:hover td {
    background: rgba(56, 189, 248, 0.06) !important;
}

.modal-content {
    background-color: rgba(11, 16, 26, 0.98) !important;
    border: 1px solid rgba(56, 189, 248, 0.5) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 40px rgba(56, 189, 248, 0.28) !important;
    border-radius: var(--radius-lg) !important;
}

/* --- МОБИЛЬНАЯ АДАПТАЦИЯ И КИБЕР БУРГЕР МЕНЮ --- */
@media (max-width: 991.98px) {
    .cyber-header .navbar-collapse {
        background: rgba(8, 14, 28, 0.98);
        border: 1px solid rgba(56, 189, 248, 0.35);
        border-radius: var(--radius-md);
        padding: 16px;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
        margin-top: 12px;
    }

    .cyber-nav-pill {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .badge-staff,
    .player-badge {
        max-width: 140px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 576px) {

    .container,
    .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .badge-staff,
    .badge-player-nickname {
        font-size: 0.72rem !important;
    }
}

/* --- СВЕРХСОВРЕМЕННЫЕ УВЕДОМЛЕНИЯ (CYBER TOAST NOTIFICATIONS) --- */
.toast-container-custom {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    width: calc(100% - 48px);
    pointer-events: none;
}

.toast-custom {
    pointer-events: auto;
    background: rgba(10, 16, 32, 0.96);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(56, 189, 248, 0.2);
    backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateX(40px) scale(0.95);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #f8fafc;
}

.toast-custom.show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.toast-custom.toast-success {
    border-color: rgba(16, 185, 129, 0.55);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(16, 185, 129, 0.25);
}

.toast-custom.toast-danger {
    border-color: rgba(239, 68, 68, 0.55);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(239, 68, 68, 0.25);
}

.toast-custom.toast-warning {
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(245, 158, 11, 0.25);
}

.toast-custom.toast-info {
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(56, 189, 248, 0.25);
}

/* --- CYBER GLASSMORPHIC FLOATING TOOLTIP --- */
.cyber-tooltip-box {
    position: fixed;
    z-index: 999999;
    background: rgba(8, 12, 22, 0.96);
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(56, 189, 248, 0.25);
    backdrop-filter: blur(20px);
    padding: 10px 14px;
    color: #f8fafc;
    font-size: 0.8rem;
    pointer-events: none;
    display: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    max-width: 340px;
}

.cyber-tooltip-box.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.cyber-tooltip-box .tooltip-header {
    font-weight: 700;
    color: #38bdf8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 5px;
    margin-bottom: 6px;
    font-size: 0.82rem;
}

.cyber-tooltip-box .tooltip-row {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #e2e8f0;
    font-size: 0.78rem;
    padding: 2px 0;
}

/* ==========================================================================
   Fix Badge Color Bleeding & Enforce Readability
   ========================================================================== */

/* Запрещаем выделение текста на бейджах, чтобы предотвратить системный highlight */
.badge,
.btn,
.filter-btn,
.player-badge,
.cyber-nav-pill,
.badge-staff {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Настройки контрастности текста для бейджей */
.badge {
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* Бейджи PC / Mobile (bg-info и bg-warning с опасити) */
.badge.bg-info.bg-opacity-20,
.badge.bg-info-custom {
    background-color: rgba(56, 189, 248, 0.15) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

.badge.bg-warning.bg-opacity-20,
.badge.bg-warning-custom {
    background-color: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

/* TPS бейджи */
.tps-badge-green {
    background-color: rgba(16, 185, 129, 0.18) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

.tps-badge-yellow {
    background-color: rgba(245, 158, 11, 0.18) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

.tps-badge-red {
    background-color: rgba(239, 68, 68, 0.18) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

/* Стандартные бейджи Bootstrap (типа количества записей в таблицах БД и т.д.) */
.badge.bg-secondary,
.badge.bg-dark {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Бейджи Донатеры / Команда в Ридере */
.badge-forum,
.badge-achievements {
    color: #fff !important;
}

/* Активные элементы списков/вкладок (например, ТАБЛИЦЫ БД) */
.list-group-item.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.25) 0%, rgba(168, 85, 247, 0.25) 100%) !important;
    border-color: rgba(56, 189, 248, 0.5) !important;
    color: #ffffff !important;
}

/* Сброс автозаполнения input элементов */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #02050e inset !important;
    -webkit-text-fill-color: #fff !important;
}