/* Импортируем цветовую тему */
@import url('themes/blue-teal.css');

/* ===== БАЗА ===== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--background-cream);
    color: var(--text-dark);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER ===== */
.site-header {
    height: 70px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1030;
    flex-shrink: 0;
}

.site-header .navbar {
  padding-left: 15px;
  padding-right: 15px;
}

.site-header .navbar-collapse {
    flex-grow: 1;
}

.site-header .navbar-brand {
  flex-shrink: 0 !important;
  padding: 0 !important;
  margin-right: 20px !important;
}

.site-header .navbar-brand img {
  max-height: 60px;
  width: auto !important;
  object-fit: contain;
}

.site-header .dropdown-menu {
  min-width: 160px;
  padding: 8px 0;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  margin-top: 4px;
}

.site-header .dropdown-item {
  padding: 8px 20px;
  font-size: 0.95rem;
  white-space: normal;
  line-height: 1.4;
}

.site-header .input-group {
  width: 100%;
}

.site-header .input-group input {
  border-radius: 4px 0 0 4px;
  height: 40px;
}

.site-header .dropdown .btn-outline-primary {
  height: 40px;
  padding: 0 14px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 4px;
  border-color: var(--border-color);
  background: white !important;
  color: var(--text-dark) !important;
}

.site-header .dropdown .btn-outline-primary:hover {
  background: white !important;
  color: var(--primary-light) !important;
  border-color: var(--primary-light);
}

.site-header .dropdown .btn-outline-primary::after {
  margin-left: 8px;
  vertical-align: middle;
}

.site-header .btn-auth {
  padding: 8px 18px;
  font-size: 0.95rem;
  line-height: 1.4;
  border-radius: 6px;
  height: 40px;
  margin-left: 8px;
  font-weight: 500;
}

.site-header .btn-outline-primary {
  padding: 7px 17px;
  font-size: 0.95rem;
  line-height: 1.4;
  border-radius: 6px;
  height: 40px;
  border-color: var(--border-color);
}

/* ===== SIDEBAR ===== */
#sidebar {
    width: 300px;
    height: calc(100vh - 70px);
    position: fixed;
    top: 70px;
    left: 0;
    background: white;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1020;
    display: block !important; 
    flex-shrink: 0;
}

/* Контент с сайдбаром */
.main-content-with-sidebar {
    margin-left: 300px !important; /* Принудительно */
    padding: 24px;
    min-height: calc(100vh - 70px);
    width: calc(100% - 300px);
    background-color: var(--background-cream);
}

/* ===== FOOTER ===== */
.footer-container {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 1rem 0; /* УМЕНЬШИЛИ высоту */
    margin-top: auto;
    flex-shrink: 0;
    width: 100%;
}

.footer-container .container {
    max-width: 100%;
    padding: 0 24px;
}

.footer-container .row {
    align-items: center;
    min-height: 60px; /* Фиксированная минимальная высота */
}

/* Для страницы аутентификации 
.auth-page .footer-container {
    position: relative;
    margin-top: 0;
}*/

/* Отключаем перенос для ссылок */
.footer-container .text-muted.small {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.footer-container .text-muted.small a {
    white-space: nowrap;
}

/* ===== СТРАНИЦЫ АУТЕНТИФИКАЦИИ ===== */
.auth-page {
    display: flex;
    flex-direction: column;
}

.auth-page main {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    width: 100%;
    overflow: hidden;
}

.auth-header {
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    color: white;
}

.auth-header i {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.auth-body {
    padding: 30px;
}

.auth-footer {
    padding: 16px 20px;
    text-align: center;
    border-top: 1px solid #eee;
    color: var(--text-light);
    font-size: 0.9rem;
}


/* ========== ОСНОВНОЙ КОНТЕНТ ========== */

/* класс для страниц без сайдбара 
.main-content-no-sidebar {
    margin-left: 0 !important;
    padding: 20px;
    min-height: calc(100vh - 70px);
}


:root {
    --sidebar-width: 280px;
}


#main-content {
    padding-left: var(--sidebar-width);
}*/

/* ===== НАВИГАЦИЯ ===== */
.nav-link {
    padding: 0.75rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    transform: translateX(5px);
}

.nav-link.active {
    box-shadow: 0 4px 10px rgba(52, 199, 89, 0.25) !important;
}

.nav-systems {
    padding-left: 0.5rem;
}

.nav-subheader {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    padding: 1rem 0 0.5rem 0;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

/* ===== КНОПКИ ===== */
.btn {
    transition: all 0.2s ease;
    padding: 0.375rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.btn-primary, .btn-auth {
    box-shadow: 0 2px 4px rgba(52, 199, 89, 0.2);
}

.btn-primary:hover, .btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 199, 89, 0.3);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 199, 89, 0.2);
}

.btn-auth {
  padding: 6px 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  border-radius: 6px;
}

.btn-outline-primary {
  padding: 6px 16px;
  font-size: 0.9rem;
}

/* Поисковая строка */
.search-btn {
  padding: 8px 16px;
  border-radius: 0 4px 4px 0;
}


/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */
@media (max-width: 767.98px) {
    .site-header {
        height: 60px;
    }
    
    #sidebar {
        top: 60px;
        height: calc(100vh - 60px);
        transform: translateX(-100%);
        width: 280px;
    }
    
    #sidebar.show {
        transform: translateX(0);
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }
    
    .main-content-with-sidebar {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 16px;
    }
    
    .footer-container {
        padding: 0.75rem 0;
    }
    
    .footer-container .text-muted.small {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .footer-container .text-muted.small a {
        white-space: normal;
    }
}

/* ===== СКРОЛЛБАР ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}