@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
@import url('fonts.css');

*,
::after,
::before {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    opacity: 1;
    overflow-y: scroll;
    margin: 0;
    padding: 0;
}

a {
    cursor: pointer;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}

li {
    list-style: none;
}

h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.275rem;
    color: var(--bs-emphasis-color);
}

/* Layout for admin dashboard skeleton */
.wrapper {
    max-width: 100vw;
    overflow-x: hidden;
}

/* ФИКСИРОВАННАЯ БОКОВАЯ ПАНЕЛЬ */
#sidebar {
    max-width: 264px;
    min-width: 264px;
    background: var(--bs-dark);
    transition: all 0.35s ease-in-out;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
}

.main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    overflow: hidden;
    transition: all 0.35s ease-in-out;
    width: calc(100% - 264px);
    margin-left: 264px;
    background: var(--bs-dark-bg-subtle);

}

/* Sidebar Elements Style */
.sidebar-logo {
    padding: 1.15rem;
    margin-left: 80px;
}

.sidebar-logo a {
    color: #e9ecef;
    font-size: 1.15rem;
    font-weight: 500;
}

.sidebar-nav {
    list-style: none;
    margin-bottom: 0;
    padding-left: 0;
    margin-left: 0;
}

.sidebar-header {
    color: #e9ecef;
    font-size: .75rem;
    padding: .5rem 1.5rem .375rem;
}

a.sidebar-link {
    padding: .625rem 1.625rem;
    color: #e9ecef;
    position: relative;
    display: block;
    font-size: 0.875rem;
}

.sidebar-link[data-bs-toggle="collapse"]::after {
    border: solid;
    border-width: 0 .075rem .075rem 0;
    content: "";
    display: inline-block;
    padding: 2px;
    position: absolute;
    right: 1.5rem;
    top: 1.4rem;
    transform: rotate(-135deg);
    transition: all .2s ease-out;
}

.sidebar-link[data-bs-toggle="collapse"].collapsed::after {
    transform: rotate(45deg);
    transition: all .2s ease-out;
}

.avatar {
    height: 70px;
    width: 70px;
}

.navbar-expand .navbar-nav {
    margin-left: auto;


}

.content {
    flex: 1;
    max-width: 100%;
    width: 100%;
}

@media (min-width:768px) {
    .content {
        max-width: auto;
        width: auto;
    }
}

.illustration {
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-emphasis-color);
}

.illustration-img {
    max-width: 150px;
    width: 100%;
}

/* Sidebar Toggle */
#sidebar.collapsed {
    margin-left: -264px;
}

#sidebar.collapsed ~ .main {
    width: 100%;
    margin-left: 0;
}



/* Адаптация для мобильных устройств */
@media (max-width: 767.98px) {
    #sidebar {
        position: fixed;
        margin-left: -264px;
        z-index: 1000;
    }

    #sidebar.collapsed {
        margin-left: 0;
    }

    .main {
        width: 100%;
        margin-left: 0;
    }

    #sidebar.collapsed ~ .main {
        margin-left: 0;
    }

    .navbar {
        /* Стили для навбара на мобильных */
    }
}

/* Theme Toggler */
.theme-toggle {
    position: fixed;
    top: 50%;
    transform: translateY(-65%);
    text-align: center;
    z-index: 10;
    right: 0;
    left: auto;
    border: none;
    background-color: var(--bs-body-color);
}

html[data-bs-theme="dark"] .theme-toggle .fa-sun,
html[data-bs-theme="light"] .theme-toggle .fa-moon {
    cursor: pointer;
    padding: 10px;
    display: block;
    font-size: 1.25rem;
    color: #FFF;
}

html[data-bs-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

html[data-bs-theme="light"] .theme-toggle .fa-sun {
    display: none;
}

.card {
    border: none;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)
}

.card-header {
    position: relative;
    padding: 2rem 2rem;
    border-bottom: none;
    background-color: #fff;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
    z-index: 2
}

.page-holder {
    display: flex;

    width: 100%;
    min-height: calc(100vh - 72px);
    padding-top: 2rem;
    padding-left: 2rem;
    padding-right: 2rem;
    flex-wrap: wrap
}

.card {
    --bs-card-spacer-y: 1rem;
    --bs-card-spacer-x: 2rem;
    --bs-card-title-spacer-y: 1rem;
    --bs-card-border-width: 1px;
    --bs-card-border-color: transparent;
    --bs-card-border-radius: 0.3rem;
    --bs-card-box-shadow: ;
    --bs-card-inner-border-radius: calc(1rem - 1px);
    --bs-card-cap-padding-y: 1rem;
    --bs-card-cap-padding-x: 2rem;
    --bs-card-cap-bg: rgba(0, 0, 0, 0.03);
    position: relative;
    display: flex;
}

h6 {
    font-family: Montserrat, sans-serif;
    font-weight: 600;
}

/* Дополнительно: плавная прокрутка */
html {
    scroll-behavior: smooth;
}


/*Стили для графиков по срокам лицензий*/
.license-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.license-progress-item {
    margin-bottom: 15px;
}

.license-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
}

.license-name {
    font-weight: bold;
}

.license-days {
    color: #666;
}

.progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    transition: width 0.3s ease;
}

/* Адаптивность */
@media (max-width: 568px) {
    .license-charts {
        grid-template-columns: 1fr;
    }
}
/*Стили для графиков по срокам лицензий*/
/* Стили для контейнеров графиков */
.chart-container {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Анимация загрузки */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Адаптивность графиков */
@media (max-width: 768px) {
    .plotly-graph-div {
        min-height: 300px !important;
    }

    .js-plotly-plot .plotly .modebar {
        display: none;
    }
}

/* Кастомные стили для тултипов */
 .plotly-notifier {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Улучшение читаемости легенды */
 .legend text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}
 /* Стили карточки полигона ГДП */
 .polygon-details .card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}
.polygon-details .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}
.polygon-details .card.text-white .card-body small {
    opacity: 0.9;
}
/* Стили для подсказок Plotly */
.js-plotly-plot .plotly .hoverlayer .hovertext {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

.js-plotly-plot .plotly .hoverlayer .hovertext path {
    fill: rgba(255, 255, 255, 0.95) !important;
    stroke: #2c3e50 !important;
    stroke-width: 2px !important;
}

.js-plotly-plot .plotly .hoverlayer .hovertext text {
    fill: #2c3e50 !important;
    font-weight: 500 !important;
}

/*Стили для анализа дна РВС начало*/
.executive-card {
    border-left: 4px solid #007bff;
}
.tolerance-violation {
    background-color: #ffe6e6;
    border-left: 4px solid #dc3545;
}
.tolerance-ok {
    background-color: #e6ffe6;
    border-left: 4px solid #28a745;
}
.diagram-container {
    position: relative;
    height: 300px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
}
.conclusion-box {
    border: 2px solid #333;
    padding: 1.5rem;
    background: #fff;
    margin: 1rem 0;
    border-radius: 8px;
}
.point-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}
@media print {
    .no-print { display: none !important; }
    .btn { display: none !important; }
}
/*Стили для анализа дна РВС конец*/