body {
    background-color: #0f1117;
    color: #e5e7eb;
    font-family: 'Segoe UI', sans-serif;
    overflow-x: hidden;
}

a {
    color:#86ab2c;
    text-decoration:none;
}

a:hover {
    text-decoration:underline;
}

.navbar {
    background-color: #0b0d12;
    border-bottom: 1px solid #1f2933;
    z-index: 1050;
}

.navbar-brand {
    font-weight: 600;
    color: #fff;
    position: relative;
    display: inline-block;
    text-decoration: none;
    transition: color 0.2s ease;
}

.navbar-brand:hover {
    color: #86ab2c;
    animation: pulse 0.6s ease;
    text-decoration: none;
}

@keyframes pulse {
    0% {
        text-shadow: 0 0 0 rgba(134, 171, 44, 0);
    }
    50% {
        text-shadow: 0 0 15px rgba(134, 171, 44, 0.8);
    }
    100% {
        text-shadow: 0 0 0 rgba(134, 171, 44, 0);
    }
}

.nav-link {
    color: #9ca3af !important;
}

.nav-link:hover {
    color: #86ab2c !important;
    text-decoration: none;
}

.filters {
    background-color: #0b0d12;
    border-bottom: 1px solid #1f2933;
    padding: 10px 15px;
}

.filter-group {
    margin-right: 20px;
}

.filter-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 3px;
}

.btn-filter {
    background-color: #111827;
    border: 1px solid #1f2933;
    color: #9ca3af;
    padding: 4px 10px;
    font-size: 13px;
}

.btn-filter:hover,
.btn-filter.active {
    background-color: #86ab2c;
    color: white;
    border-color: #86ab2c;
}

.select-header-color {
    text-align: center !important;
    border-color: #1f2933;
    background-color: #111827 !important;
}

.select-header-color:hover {
    background-color: #1f2933;
    color: #1f2933;
    border-color: #86ab2c;  
    cursor: pointer;
}

.table-sidebar-bg {
    background-color: #0b0d12;
    font-size: 12px;
}

.chart-card {
    background-color: #111827;
    border: 1px solid #1f2933;
    border-radius: 10px;
    height: 242px;

    display: flex;
    flex-direction: column;
    
    padding: 6px;
}

.chart-card:hover {
    border-color: #2a3441;
    box-shadow: 0 0 0 1px rgba(134, 171, 44, 0.15),
                0 8px 20px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

.chart-container {
    position: absolute;
    top:0;
    left:0;
    right:0;
    bottom:0;
}
        
.chart-info {
    background-color: #0b0d12;
    border: 1px solid #1f2933;
    border-radius: 10px;
    padding: 6px 10px;
    margin-bottom: 6px;
    font-size: 12px;
    color: #9ca3af;

    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
}

.chart-symbol {
    font-weight: 600;
    color: #e5e7eb;
    font-size: 13px;
}

.chart-stats {
    display: flex;
    gap: 10px;
}

.chart-stats span {
    opacity: 0.85;
}

.chart-wrapper {
    position: relative;
    flex: 1;
}

/* MAIN CONTENT SHIFT */
.app-content {
    padding: 15px;
    transition: margin-right 0.3s ease;
    margin-right: 60px; /* отступ справа */
}

.app-content.shifted {
    margin-right: 340px;
}

/* RIGHT ICON BAR */
.right-menu {
    position: fixed;
    top: 56px;
    right: 0;
    width: 60px;
    height: calc(100vh - 56px);
    background-color: #0b0d12;
    border-left: 1px solid #1f2933;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    gap: 15px;
    z-index: 1040;
}

.right-menu button {
    background: none;
    border: none;
    color: #9ca3af;
    padding: 10px;
    border-radius: 10px;
    transition: 0.2s;
}

.right-menu button:hover,
.right-menu button.active {
    background-color: #111827;
    color: #86ab2c;
}

/* SIDE PANEL */
.side-panel {
    position: fixed;
    top: 56px;
    right: 60px;
    width: 0;
    height: calc(100vh - 56px);
    background-color: #0b0d12;
    border-left: 1px solid #1f2933;
    overflow: hidden;
    transition: width 0.3s ease;
    z-index: 1035;
    display: flex;
    flex-direction: column;
}

.side-panel.open {
    width: 290px;
}

.side-panel-header {
    padding: 15px;
    border-bottom: 1px solid #1f2933;
    color: #9ca3af;
}

.side-panel-body {
    padding: 10px;
    overflow-y: auto;
    font-size: 13px;
    scrollbar-width: thin;
    scrollbar-color: #1f2933 #111827;
}

.side-panel-body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.side-panel-body::-webkit-scrollbar-track {
    background: #111827;
}

.right-menu i {
    font-size: 20px;
    display: block;
} 

.login-wrapper{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
}

.login-card{
    background:#0b0d12;
    border:1px solid #1f2933;
    border-radius:12px;
    padding:40px;
    width:100%;
    max-width:420px;
    box-shadow:0 20px 40px rgba(0,0,0,0.45);
    animation:fadeIn 0.6s ease;
}

.login-title{
    text-align:center;
    font-size:22px;
    font-weight:600;
    margin-bottom:25px;
}

.form-control{
    background:#111827;
    border:1px solid #1f2933;
    color:#e5e7eb;
}

.form-control:focus{
    background:#111827;
    border-color:#86ab2c;
    color:#fff;
    box-shadow:0 0 0 1px rgba(134,171,44,0.2);
}

.form-control::placeholder{
    color:#6b7280;
    opacity:1;
}

.btn-login{
    background:#86ab2c;
    border:none;
    color:white;
    font-weight:500;
    padding:10px;
    transition:0.25s;
}

.btn-login:hover{
    background:#769a24;
}

.login-links{
    font-size:13px;
    color:#9ca3af;
    text-align:center;
    margin-top:15px;
}

.form-check-input{
    background-color:#111827;
    border:1px solid #1f2933;
    width:16px;
    height:16px;
    cursor:pointer;
}

.form-check-input:hover{
    border-color:#2a3441;
}

.form-check-input:checked{
    background-color:#86ab2c;
    border-color:#86ab2c;
}

.form-check-input:focus{
    box-shadow:0 0 0 1px rgba(134,171,44,0.25);
}

.form-check-label{
    color:#9ca3af;
    cursor:pointer;
}

.navbar-avatar{
    width:34px;
    height:34px;
    border-radius:50%;
    object-fit:cover;
    border:2px solid #1f2933;
    transition:0.2s;
}

.navbar-avatar:hover{
    border-color:#86ab2c;
}

.dropdown-menu-profile {
    display: block;
    width: 100%;
    padding: 0.34rem 0.8rem;
    clear: both;
    font-weight: 400;
    color: #9ca3af;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;  
}

.dropdown-menu-profile:hover {
    color: #86ab2c;
    background-color: transparent;
    text-decoration: none;
}

/* NAV BUTTON BASE */

.nav-btn{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:6px 14px;
    font-size:14px;
    text-decoration:none;
    border-radius:8px;
    font-weight:500;
    transition:all .25s ease;
    position:relative;
    overflow:hidden;
}

.nav-btn i{
    font-size:15px;
    transition:transform .25s ease;
}

.nav-btn-login{
    color:#d1d5db;
    border:1px solid #1f2933;
    background:#0b0d12;
}

.nav-btn-login:hover{
    border-color:#2f3b46;
    background:#111827;
    color:#ffffff;
}

.nav-btn-login:hover i{
    transform:translateX(3px);
}

.nav-btn-register{
    color:#d1d5db;
    border:1px solid #1f2933;
    background:#0b0d12;
}

.nav-btn-register:hover{
    border-color:#2f3b46;
    background:#111827;
    color:#ffffff;
}

.nav-btn-register:hover i{
    transform:scale(1.15) rotate(8deg);
}

.nav-btn:active{
    transform:translateY(1px);
}

.auth-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.auth-overlay.show { opacity: 1; visibility: visible; }
.auth-popup {
    background: #1e222d; padding: 35px 30px; border-radius: 12px;
    max-width: 450px; width: 90%; text-align: center;
    transform: translateY(-30px) scale(0.95); transition: all 0.3s ease;
    position: relative; border: 1px solid #2a2e39; box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}
.auth-overlay.show .auth-popup { transform: translateY(0) scale(1); }
.auth-close {
    position: absolute; top: 12px; right: 18px; background: none; border: none;
    color: #8b92a5; font-size: 26px; line-height: 1; cursor: pointer; transition: 0.2s;
}
.auth-close:hover { color: #fff; transform: scale(1.1); }

.color-ticker-link {
    color: rgb(116 122 133) !important;   
}

.color-ticker-link:hover {
    color: #86ab2c !important;
    text-decoration: none;
}

.select-color-group {
    background: #111827;
    border: 1px #111827;
    outline: none; 
    cursor: pointer; 
    font-size: 12px;
}

.bell-color {
    color: #797f89;
    font-weight: 600;
}

.bell-color:hover {
    color: #86ab2c;
}

.custom-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 250px; /* Ограничение высоты */
    overflow-y: auto;
    background-color: #111827;
    border: 1px solid #1f2933;
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 1060;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}

.custom-dropdown-item {
    padding: 8px 12px;
    color: #d1d5db;
    cursor: pointer;
    border-bottom: 1px solid #1f2933;
    font-size: 13px;
    transition: background-color 0.15s;
}

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

.custom-dropdown-item:hover {
    background-color: #1f2933;
    color: #fff;
}

.custom-dropdown::-webkit-scrollbar { width: 6px; }
.custom-dropdown::-webkit-scrollbar-track { background: #0b0d12; border-radius: 0 0 8px 0; }
.custom-dropdown::-webkit-scrollbar-thumb { background: #2a3441; border-radius: 3px; }
.custom-dropdown::-webkit-scrollbar-thumb:hover { background: #86ab2c; }

.label-panel {
    font-size: 10px;
    color: #ffffff;
    text-align: center;
    white-space: nowrap;
    padding: 0.25em 0.7em;
    vertical-align: baseline;
    border-radius: 7px;    
}

.color-vol-panel {
    color: #86ab2c;
}

@keyframes fadeIn{
    from{
        opacity:0;
        transform:translateY(15px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

@media (min-width: 992px) {
    html, body {
        height: 100vh;
        overflow: hidden; /* Убираем главный скролл на ПК */
    }
    .app-content {
        /* Высота экрана минус высота меню и фильтров (обычно ~140px). Настройте цифру при необходимости */
        height: calc(100vh - 140px); 
        padding-bottom: 10px;
    }
    #chartsGrid {
        display: grid !important;
        gap: 8px; /* Расстояние между графиками */
        height: 100%;
        margin: 0;
    }
    .chart-grid-item {
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Расположение сетки (Колонки х Строки) в зависимости от выбора */
    #chartsGrid[data-count="4"]  { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
    #chartsGrid[data-count="6"]  { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); }
    #chartsGrid[data-count="9"]  { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
    #chartsGrid[data-count="15"] { grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(3, 1fr); }
    #chartsGrid[data-count="20"] { grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(4, 1fr); }

}

@media (max-width: 991px) {
    .right-menu,
    .side-panel {
        display: none;
    }

    html, body { 
        height: auto; 
        overflow: auto; 
    }
    
    /* Добавляем отступ между карточками */
    .chart-grid-item {
        margin-bottom: 20px !important;
    }
    
    /* ЖЕЛЕЗОБЕТОННАЯ высота для мобильной карточки (никаких Grid) */
    .chart-card {
        height: 380px !important; 
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .chart-info {
        white-space: normal;
        flex-wrap: wrap;
    }

    .chart-stats {
        flex-wrap: wrap;
        gap: 6px 10px;
    }
    
    .app-content {
        padding: 15px;
        transition: margin-right 0.3s ease;
        margin-right: 0px; 
    }  
    
    .login-card{
        padding:30px 22px;
    }   
}  

/* Десктоп */
@media (min-width: 769px) {
    
}