@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #0c0c0e;
    --bg-alt: #131316;
    --bg-card: #18181c;
    --bg-input: #0e0e11;
    --border: #222227;
    --accent: #ff4d77;
    --white: #ffffff;
    --text-main: #e2e8f0;
    --gray: #828291;
    --dark-gray: #4a4a55;
    --green: #22c55e;
    --red: #ef4444;
    --blue: #3b82f6;
    --yellow: #eab308;
    --purple: #8b5cf6;
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    background-color: var(--bg);
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
}

/* КАСТОМНЫЕ СКРОЛЛБАРЫ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gray);
}

/* СЕТКА ПРИЛОЖЕНИЯ */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.main-content {
    background: transparent;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

/* ВЕРХНЯЯ ПАНЕЛЬ (TOPBAR) */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
    background: rgba(19, 19, 22, 0.4);
    backdrop-filter: blur(10px);
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
}

/* ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ */
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    transition: var(--transition-smooth);
}

.user-profile-badge:hover {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(255, 77, 119, 0.15);
}

.profile-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.logout-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.logout-link:hover {
    transform: scale(1.05);
}

/* РАЗДЕЛЫ И ЭКРАНЫ */
.view-section {
    display: none;
    padding: 30px;
    flex-grow: 1;
}

/* ПЛАВНАЯ АНИМАЦИЯ СМЕНЫ СТРАНИЦ */
.view-section.active {
    display: block;
    animation: sectionFadeIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.995);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* СЕТКА ДАШБОРДА */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

.dashboard-main-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-side-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ПАНЕЛЬ МЕТРИК */
.metrics-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.metric-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-label {
    font-size: 11px;
    color: var(--gray);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--white);
}

/* КАРТОЧКИ И ГРАФИКИ ДАШБОРДА */
.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
}

.dashboard-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-container-sm {
    position: relative;
    height: 180px;
    width: 100%;
}

.donut-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* СПИСОК ИГРОКОВ ОНЛАЙН */
.players-online-badge {
    background: rgba(34, 197, 94, 0.15);
    color: var(--green);
    border: 1px solid rgba(34, 197, 94, 0.25);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.players-scroller {
    max-height: 345px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.player-info-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-avatar-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--border);
}

.player-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
}

.player-ping-box {
    text-align: right;
    font-size: 11px;
    color: var(--gray);
}

/* ИНФОРМАЦИЯ О ХОСТЕ */
.host-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.host-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.host-info-label {
    color: var(--gray);
}

.host-info-val {
    color: var(--white);
    font-weight: 600;
}

/* ПАНЕЛИ ИНСТРУМЕНТОВ (TOOLBARS & CAPSULES) */
.tasks-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.capsule-toolbar {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 4px 16px;
    gap: 10px;
    height: 38px;
}

.capsule-icon {
    font-size: 14px;
    color: var(--gray);
    display: flex;
    align-items: center;
}

.capsule-input {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 13px;
    outline: none;
    width: 200px;
}

.capsule-select {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 13px;
    outline: none;
    cursor: pointer;
    padding-right: 10px;
}

.capsule-select option {
    background: var(--bg-card);
    color: var(--white);
}

.capsule-divider {
    width: 1px;
    height: 16px;
    background: var(--border);
}

/* КНОПКИ */
.btn-primary, .btn-secondary, .btn-demo-outline, .btn-steam-layout, .btn-take-task, .btn-delete {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-sizing: border-box;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    text-decoration: none;
    height: 38px;
}

.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }
.btn-secondary { background: transparent; border-color: var(--border); color: var(--white); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.02); }
.btn-steam-layout { background: #171a21; border-color: #2a475e; color: #c7d5e0; }
.btn-steam-layout:hover { background: #2a475e; color: var(--white); box-shadow: 0 0 10px rgba(42, 71, 94, 0.4); }
.btn-demo-outline { background: rgba(255, 77, 119, 0.03); border-color: rgba(255, 77, 119, 0.15); color: var(--accent); }
.btn-demo-outline:hover { background: var(--accent); color: #000; box-shadow: 0 0 10px rgba(255, 77, 119, 0.2); }
.btn-take-task { background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.15); color: var(--blue); }
.btn-take-task:hover { background: var(--blue); color: var(--white); }
.btn-delete { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.15); color: var(--red); }
.btn-delete:hover { background: var(--red); color: var(--white); }

.card, .settings-section-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.form-control, .period-select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
    color: var(--white);
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .period-select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* ПРЕДЗАГРУЗКА И СБОИ */
.preloader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0c0c0e;
    backdrop-filter: blur(15px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.preloader-overlay.hide {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.preloader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255,77,119,0.1);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: preloaderSpin 1s linear infinite;
}

.preloader-logo {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--white);
}

.preloader-logo span {
    color: var(--accent);
}

.preloader-sub {
    font-size: 12px;
    color: var(--gray);
}

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

.offline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12,12,14,0.95);
    backdrop-filter: blur(10px);
    z-index: 99998;
    display: none;
    align-items: center;
    justify-content: center;
}

.offline-overlay.show {
    display: flex;
}

.offline-box {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    width: 420px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.offline-icon {
    font-size: 40px;
    color: var(--red);
    margin-bottom: 16px;
    animation: offlinePulse 1.5s infinite ease-in-out;
}

.offline-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 8px 0;
}

.offline-desc {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.5;
    margin: 0 0 20px 0;
}

@keyframes offlinePulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.08); opacity: 1; }
}

/* ЧАСТИЦЫ */
.ambient-glow-orbs {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.04;
    mix-blend-mode: screen;
}

.orb-1 { width: 600px; height: 600px; background: var(--accent); top: -10%; left: -5%; animation: floatOrb1 28s infinite alternate ease-in-out; }
.orb-2 { width: 700px; height: 700px; background: var(--blue); bottom: -15%; right: -10%; animation: floatOrb2 35s infinite alternate ease-in-out; }
.orb-3 { width: 500px; height: 500px; background: var(--purple); top: 45%; left: 45%; animation: floatOrb3 24s infinite alternate ease-in-out; }

@keyframes floatOrb1 { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(120px,90px) scale(1.15); } }
@keyframes floatOrb2 { 0% { transform: translate(0,0) scale(1.1); } 100% { transform: translate(-140px,-80px) scale(0.9); } }
@keyframes floatOrb3 { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(80px,-120px) scale(1.2); } }

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
    bottom: -10px;
}

.p-1 { left: 10%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: floatParticle 14s infinite linear; }
.p-2 { left: 25%; background: var(--blue); box-shadow: 0 0 10px var(--blue); animation: floatParticle 19s infinite linear; }
.p-3 { left: 45%; background: var(--purple); box-shadow: 0 0 10px var(--purple); animation: floatParticle 16s infinite linear; }
.p-4 { left: 65%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: floatParticle 22s infinite linear; }
.p-5 { left: 80%; background: var(--yellow); box-shadow: 0 0 10px var(--yellow); animation: floatParticle 18s infinite linear; }
.p-6 { left: 35%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: floatParticle 21s infinite linear; }
.p-7 { left: 90%; background: var(--blue); box-shadow: 0 0 10px var(--blue); animation: floatParticle 15s infinite linear; }

@keyframes floatParticle {
    0% { transform: translateY(0) translateX(0) scale(0.8); opacity: 0; }
    10% { opacity: 0.65; }
    90% { opacity: 0.65; }
    100% { transform: translateY(-105vh) translateX(60px) scale(1.2); opacity: 0; }
}

/* САЙДБАР (ЛЕВАЯ ПАНЕЛЬ) */
.sidebar {
    background: rgba(14, 14, 18, 0.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 20px;
    position: relative;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.4);
}

.sidebar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255, 77, 119, 0.1), transparent);
}

/* СТИЛИЗАЦИЯ И ПУЛЬСАЦИЯ ЛОГОТИПА */
.sidebar-brand {
    font-size: 21px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.8px;
    padding-left: 10px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.03);
}

.sidebar-brand span {
    background: linear-gradient(90deg, var(--accent), #ff7ca1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: brandTextPulse 3s infinite ease-in-out;
}

@keyframes brandTextPulse {
    0%, 100% { filter: drop-shadow(0 0 1px rgba(255, 77, 119, 0.1)); }
    50% { filter: drop-shadow(0 0 6px rgba(255, 77, 119, 0.25)); }
}

.brand-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: logoDotGlow 2s infinite alternate ease-in-out;
}

@keyframes logoDotGlow {
    0% { transform: scale(1); box-shadow: 0 0 6px var(--accent); }
    100% { transform: scale(1.4); box-shadow: 0 0 14px var(--accent), 0 0 4px var(--accent); }
}

/* СПИСОК МЕНЮ */
.menu-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.menu-item {
    position: relative;
}

/* КНОПКИ И ССЫЛКИ САЙДБАРА */
.menu-list .menu-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--gray);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.menu-list .menu-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    transition: var(--transition-smooth);
}

.menu-list .menu-item a:hover::after {
    width: calc(100% - 32px);
}

.menu-list .menu-item a:hover {
    color: var(--white);
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.02);
}

.menu-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.menu-toggle-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.menu-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.menu-list .menu-item a:hover .menu-icon {
    transform: scale(1.08);
}

.arrow-icon {
    width: 14px;
    height: 14px;
    stroke: var(--gray);
    fill: none;
    stroke-width: 2.5;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.arrow-icon.rotated {
    transform: rotate(180deg);
}

/* АКТИВНЫЕ СОСТОЯНИЯ ВКЛАДОК */
.menu-item.active > a {
    background: linear-gradient(90deg, rgba(255, 77, 119, 0.04) 0%, transparent 100%);
    color: var(--white) !important;
}

#menu-tab-dash.menu-item.active > a::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 15%;
    height: 70%;
    width: 3px;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 12px var(--accent), 0 0 4px var(--accent);
    animation: activeGlowPulse 2.5s infinite ease-in-out;
}

@keyframes activeGlowPulse {
    0%, 100% { opacity: 0.8; height: 70%; }
    50% { opacity: 1; height: 76%; }
}

/* ВЫПАДАЮЩИЕ ПОДМЕНЮ (ЗАДАЧИ) */
.submenu-list {
    display: none;
    flex-direction: column;
    gap: 4px;
    border-left: 1.5px solid var(--border);
    margin-left: 24px;
    padding-left: 10px;
    list-style: none;
    margin-top: 5px;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.submenu-list.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    animation: slideDownFade 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideDownFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.submenu-item {
    position: relative;
}

.submenu-item a {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    font-weight: 500;
}

.submenu-item.active a {
    background: linear-gradient(90deg, rgba(255, 77, 119, 0.04) 0%, transparent 100%);
    color: var(--white) !important;
}

.submenu-item.active::before {
    content: '';
    position: absolute;
    left: -11.5px;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent), 0 0 3px var(--accent);
    border-radius: 4px;
    z-index: 10;
    animation: submenuLinePulse 2s infinite alternate ease-in-out;
}

@keyframes submenuLinePulse {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* ФУТЕР САЙДБАРА */
.sidebar-footer {
    border-top: 1px solid var(--border);
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-access-footer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 6px;
    color: var(--gray);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.sidebar-access-footer-btn:hover, .sidebar-access-footer-btn.active {
    color: var(--white);
    background: rgba(255, 77, 119, 0.03);
    border-color: rgba(255, 77, 119, 0.4);
    box-shadow: 0 0 15px rgba(255, 77, 119, 0.15);
    transform: translateY(-1.5px);
}

.sidebar-access-footer-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.footer-version-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--gray);
}

.footer-version {
    background: var(--border);
    padding: 3px 8px;
    border-radius: 6px;
}

/* КАНБАН ДОСКА */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.kanban-col {
    background: var(--bg-alt);
    border-radius: 8px;
    padding: 16px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.kanban-col.drag-over {
    border-color: var(--accent);
    background-color: rgba(255, 77, 119, 0.02);
}

.kanban-col-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 14px;
    align-items: center;
}

.kanban-col-count {
    font-size: 11px;
    border: 1px solid var(--border);
    color: var(--gray);
    padding: 2px 8px;
    border-radius: 4px;
}

.kanban-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
    position: relative;
}

.column-empty-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    border-radius: 6px;
    border: 1px dashed rgba(255, 255, 255, 0.03);
    margin-top: 10px;
}

.column-empty-icon {
    width: 48px;
    height: 48px;
    border: 3.5px dotted var(--border);
    border-radius: 50%;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.column-empty-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    margin-bottom: 4px;
}

.column-empty-subtitle {
    font-size: 11px;
    color: var(--dark-gray);
}

/* КАРТОЧКИ ЗАДАЧ */
.task-card {
    background-color: #18181c !important;
    border: 1px solid #222227 !important;
    border-radius: 8px !important;
    padding: 16px !important;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    box-sizing: border-box;
    transition: transform 0.25s cubic-bezier(0.2, 1, 0.2, 1), border-color 0.25s, box-shadow 0.25s;
}

.task-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--blue);
    border-radius: 3px 0 0 3px;
    transition: var(--transition-smooth);
}

.task-card.priority-Высокий::before { background: var(--red); box-shadow: 0 0 8px var(--red); }
.task-card.priority-Средний::before { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.task-card.priority-Низкий::before { background: var(--green); box-shadow: 0 0 8px var(--green); }

.task-card:hover {
    border-color: var(--gray);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.task-card.dragging {
    opacity: 0.4;
    transform: scale(0.96) rotate(1deg);
    border-style: dashed;
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 2px;
}

.task-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.4;
}

.task-card-desc {
    font-size: 12px;
    color: var(--gray);
    line-height: 1.5;
}

.subtasks-progress-bar {
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 6px;
    margin-bottom: 2px;
}

.subtasks-progress-inner {
    height: 100%;
    background: var(--accent);
    width: 0;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.assignee-badge-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #222227;
    color: #828291;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #2d2d35;
}

.badge {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

/* СТРОКИ СПИСКА ЗАДАЧ */
.list-view-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-task-row {
    background-color: #18181c !important;
    border: 1px solid #222227 !important;
    border-radius: 6px !important;
    padding: 14px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 10px;
    box-sizing: border-box;
    width: 100%;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.list-task-row:hover {
    border-color: var(--gray);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.list-task-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.list-task-archive-icon {
    width: 16px;
    height: 16px;
    color: var(--gray);
    flex-shrink: 0;
}

.list-task-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
}

.list-task-row.archived .list-task-title {
    text-decoration: line-through;
    color: var(--dark-gray);
}

.list-task-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge.priority-Высокий { background: rgba(239, 68, 68, 0.15); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.25); }
.badge.priority-Средний { background: rgba(234, 179, 8, 0.15); color: var(--yellow); border: 1px solid rgba(234, 179, 8, 0.25); }
.badge.priority-Низкий { background: rgba(34, 197, 94, 0.15); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.25); }

/* ПАНЕЛЬ ДОСТУПА */
.admin-access-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}

.admins-scroller {
    overflow-y: auto;
    max-height: 480px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}

.admins-scroller::-webkit-scrollbar {
    width: 4px;
}

.admins-scroller::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.admin-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.admin-item-row:hover {
    background: rgba(255,255,255,0.02);
}

.admin-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-nickname {
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
}

.admin-steamid {
    font-size: 11px;
    color: var(--gray);
    font-family: monospace;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-badge-role {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}

.role-Супер-админ { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.25); box-shadow: 0 0 8px rgba(239, 68, 68, 0.1); }
.role-Куратор { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.25); }
.role-Зам-Куратора { background: rgba(34, 197, 94, 0.15); color: #4ade80; border-color: rgba(34, 197, 94, 0.25); }
.role-Старший-администратор { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border-color: rgba(251, 191, 36, 0.25); }
.role-Администратор { background: rgba(52, 211, 153, 0.15); color: #34d399; border-color: rgba(52, 211, 153, 0.25); }
.role-Special-Admin { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.25); }
.role-Младший-Администратор { background: rgba(16, 185, 129, 0.15); color: #10b981; border-color: rgba(16, 185, 129, 0.25); }
.role-Старший-Хелпер { background: rgba(129, 140, 248, 0.15); color: #818cf8; border-color: rgba(129, 140, 248, 0.25); }
.role-Хелпер { background: rgba(165, 180, 252, 0.15); color: #a5b4fc; border-color: rgba(165, 180, 252, 0.25); }

/* ТОСТ-УВЕДОМЛЕНИЯ */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100000;
    pointer-events: none;
}

.toast {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    min-width: 280px;
    max-width: 360px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    pointer-events: auto;
    transform: translateX(120%);
    animation: toastSlideIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

@keyframes toastSlideIn {
    to { transform: translateX(0); }
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.toast-success .toast-icon { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.toast-info .toast-icon { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.toast-error .toast-icon { background: rgba(239, 68, 68, 0.15); color: var(--red); }

.toast-content {
    flex-grow: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    line-height: 1;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--green);
    width: 100%;
}

.toast-info .toast-progress { background: var(--blue); }
.toast-error .toast-progress { background: var(--red); }

/* МОДАЛЬНЫЕ ОКНА */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 460px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.show .modal-box {
    transform: scale(1) translateY(0);
}

.modal-box-large {
    width: 600px;
    max-height: 90vh;
}

.modal-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    align-items: start;
}

.modal-title-input {
    background: transparent;
    border: none;
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    outline: none;
    width: 100%;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.modal-title-input:focus {
    border-color: var(--border);
}

.modal-subtitle-server {
    font-size: 12px;
    color: var(--gray);
    margin-top: 4px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-body-scroll {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 160px);
}

.modal-grid-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--gray);
    font-weight: 700;
}

/* ПОДЗАДАЧИ */
.subtasks-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px;
}

.subtasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.subtask-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    background: rgba(255,255,255,0.01);
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid transparent;
}

.subtask-item:hover {
    background: rgba(255,255,255,0.02);
    border-color: var(--border);
}

.subtask-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.subtask-checkbox {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.subtask-checkbox:checked {
    background: var(--green);
    border-color: var(--green);
}

.subtask-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.subtask-text {
    transition: color 0.2s, text-decoration 0.2s;
}

.subtask-text.completed {
    text-decoration: line-through;
    color: var(--gray);
}

.btn-remove-subtask {
    background: none;
    border: none;
    color: var(--red);
    cursor: pointer;
    font-size: 11px;
    opacity: 0.5;
}

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

/* КОММЕНТАРИИ */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 150px;
    overflow-y: auto;
}

.comments-empty {
    font-size: 12px;
    color: var(--gray);
    text-align: center;
    padding: 15px 0;
}

.comment-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    padding: 10px;
    border: 1px solid var(--border);
    font-size: 12px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    color: var(--gray);
    font-size: 10px;
}

.comment-author {
    font-weight: 700;
    color: var(--accent);
}

.comment-text {
    color: var(--text-main);
}

.comment-input-row {
    display: flex;
    gap: 10px;
}

.btn-comment-send {
    background: var(--blue);
    border: none;
    border-radius: 6px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-comment-send svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

/* КРУГЛЫЕ ЦВЕТА (НАСТРОЙКИ) */
.color-picker-grid {
    display: flex;
    gap: 10px;
}

.color-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition-smooth);
}

.color-circle.selected {
    border-color: var(--white);
    transform: scale(1.1);
}

.color-preview-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: #3b82f6;
}

.tag-create-layout {
    display: flex;
    gap: 20px;
    align-items: flex-end;
}

.flex-grow-input {
    flex-grow: 1;
}

.input-with-tag-icon {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0 14px;
}

.tag-input-icon {
    width: 16px;
    height: 16px;
    color: var(--gray);
    margin-right: 10px;
}

.form-control-unstyled {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 13px;
    padding: 10px 0;
    outline: none;
    width: 100%;
}

/* СПИСОК ТЕГОВ В НАСТРОЙКАХ */
.tags-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.tag-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.tag-item-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.tag-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tag-solid-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.tag-name-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    min-width: 100px;
}

.tag-item-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tag-action-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition-smooth);
}

.tag-action-icon:hover {
    color: var(--white);
}

.tag-action-icon.text-red:hover {
    color: var(--red);
}

/* ТАБЛИЦЫ СТАТИСТИКИ (SAM) */
.sam-table {
    width: 100%;
    border-collapse: collapse;
}

.sam-table th {
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--gray);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sam-table td {
    padding: 14px 20px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    transition: var(--transition-smooth);
}

.sam-table tr {
    transition: var(--transition-smooth);
}

.sam-table tr:hover td {
    background: rgba(255, 255, 255, 0.015);
    color: var(--white);
}

/* ПАНЕЛЬ ВКЛАДОК ДЕТАЛЬНОГО ПРОФИЛЯ ИГРОКА (SAM) */
.sam-p-tabs-bar {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    width: 100%;
}

.sam-p-tab-btn {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.sam-p-tab-btn.active, .sam-p-tab-btn:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.03);
}

/* ДЕТАЛЬНЫЙ ПРОФИЛЬ АДМИНИСТРАТОРА (PROFILE MODAL) */
.profile-modal-box {
    width: 440px !important;
}

.profile-modal-body {
    padding: 24px;
    padding-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.profile-avatar-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-large-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    box-shadow: 0 0 25px rgba(255, 77, 119, 0.35);
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-avatar-container:hover .profile-large-avatar {
    transform: scale(1.06) rotate(3deg);
}

.profile-meta-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.profile-nickname {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 0.5px;
}

.profile-info-card {
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.01) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 12px;
}

.profile-info-row-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-info-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--gray);
    font-weight: 700;
    letter-spacing: 0.8px;
}

.profile-steamid-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 18px;
}

.profile-steamid-text {
    font-size: 12px;
    font-family: monospace;
    color: var(--white);
    letter-spacing: 0.5px;
    line-height: 1;
}

.btn-copy-steamid {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--blue);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
    height: 14px;
}

.btn-copy-steamid svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.btn-copy-steamid:hover {
    color: var(--white);
    transform: scale(1.15);
}

.profile-status-active {
    font-size: 12px;
    color: var(--green);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.15);
}

.profile-channels-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.profile-channel-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    color: var(--blue);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.05);
}

.profile-channel-badge.zisty {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.15);
    color: var(--purple);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.05);
}

.profile-channel-badge.global {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.15);
    color: var(--green);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.05);
}

/* ДЕТАЛЬНЫЙ ПРОФИЛЬ ИГРОКА (SAM PLAYER MODAL) */
.sam-p-tab-content {
    padding: 24px;
    padding-top: 24px; /* Изменено с 15px на 24px */
    padding-bottom: 24px;
}

.sam-cards-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sam-card-row {
    display: grid;
    /* Точное соответствие колонкам шапки таблицы */
    grid-template-columns: 1.5fr 1.2fr 1fr 1fr 1fr;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-sizing: border-box;
}

.sam-card-row:hover {
    border-color: var(--gray);
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sam-card-row > div {
    /* Защита от переполнения ячеек длинным текстом */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 10px;
}