/* Новые стили для интерфейса в стиле Postman */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Mobile menu scroll lock */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Mobile Menu Burger Button */
.mobile-menu-burger {
    position: relative;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    margin-right: 15px;
}

.mobile-menu-burger:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.mobile-menu-burger span {
    width: 18px;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.mobile-menu-burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-burger.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.show {
    display: block;
    opacity: 1;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.show {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-logo img {
    width: 40px;
    height: 40px;
}

.mobile-logo span {
    font-size: 18px;
    font-weight: bold;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-content {
    padding: 0;
    height: calc(100% - 80px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.mobile-user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    margin-right: 15px;
}

.mobile-user-details {
    flex: 1;
}

.mobile-user-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.mobile-business-name {
    font-size: 14px;
    color: #6c757d;
}

.mobile-nav-section {
    padding: 10px 0;
}

.mobile-nav-item {
    border-bottom: 1px solid #f1f3f4;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s ease;
    cursor: pointer;
}

.mobile-nav-link:hover {
    background: #f8f9fa;
    text-decoration: none;
    color: #333;
}

.mobile-nav-link i {
    width: 24px;
    margin-right: 15px;
    color: #667eea;
    font-size: 18px;
}

.mobile-nav-link span {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
}

.mobile-nav-arrow {
    font-size: 16px;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.mobile-nav-arrow.rotated {
    transform: rotate(90deg);
}

.mobile-submenu {
    background: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-submenu.show {
    max-height: 1000px;
}

.mobile-submenu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px 12px 25px;
    color: #495057;
    text-decoration: none;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.3s ease;
    font-size: 14px;
}

.mobile-submenu-item:hover {
    background: #e9ecef;
    text-decoration: none;
    color: #495057;
}

.mobile-submenu-item i {
    width: 20px;
    margin-right: 10px;
    color: #6c757d;
    font-size: 14px;
}

.mobile-menu-bottom {
    margin-top: auto;
    border-top: 2px solid #e9ecef;
    background: #e9ecef;
}

/* Show mobile menu only on mobile devices */
@media (max-width: 768px) {
    .mobile-menu-burger {
        display: flex;
    }
    
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-panel {
        display: none;
    }
    
    .sidebar-overlay {
        display: none;
    }
    
    /* Скрыть переключатель языка в мобильной версии контакт-центра */
    body.page-cc .lang-switcher {
        display: none !important;
    }
}

/* Hide mobile menu on desktop */
@media (min-width: 769px) {
    .mobile-menu-burger,
    .mobile-menu-overlay,
    .mobile-menu {
        display: none !important;
    }
}

.sidebar {
    width: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 8px 5px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.logo {
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 5px;
}

.logo img {
    width: 100%;
    max-width: 60px;
    height: auto;
    margin-bottom: 3px;
}

.bot-selector {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 12px;
}

.bot-selector:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 8px;
    text-align: center;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
}

.nav-link.active {
    background: rgba(255,255,255,0.15);
    color: white;
}

.nav-link i {
    font-size: 20px;
    margin-bottom: 3px;
}

.nav-link span {
    font-size: 9px;
    font-weight: 500;
    line-height: 1.1;
}

.sidebar-panel {
    width: 280px;
    background: white;
    position: fixed;
    left: 80px;
    top: 0;
    height: 100vh;
    z-index: 999;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-panel.show {
    transform: translateX(0);
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.panel-content {
    padding: 0;
}

.panel-item {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f1f3f4;
    transition: background 0.2s ease;
}

.panel-item:hover {
    background: #f8f9fa;
    text-decoration: none;
    color: #333;
}

.panel-item i {
    width: 20px;
    margin-right: 10px;
    color: #6c757d;
}

.main-content {
    flex: 1;
    margin-left: 80px;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-header {
    background: white;
    padding: 8px 20px; /* Уменьшаем отступы: было 15px 30px */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    min-height: 50px; /* Устанавливаем минимальную высоту */
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px; /* Уменьшаем gap: было 20px */
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px; /* Уменьшаем gap: было 20px */
}

.lang-switcher, .user-menu, .business-switcher {
    position: relative;
}

.dropdown-toggle {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 6px 12px; /* Уменьшаем отступы: было 8px 16px */
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px; /* Уменьшаем gap: было 8px */
    font-size: 13px; /* Уменьшаем размер шрифта: было 14px */
    color: #495057;
}

.dropdown-toggle:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
    text-decoration: none;
}

.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 20px;
}

.breadcrumb-item {
    color: #6c757d;
}

.breadcrumb-item.active {
    color: #495057;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

.footer {
    background: white;
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    margin-top: auto;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.operator-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.operator-status.online {
    background: #d4edda;
    color: #155724;
}

.operator-status.offline {
    background: #f8d7da;
    color: #721c24;
}

/* Красивый переключатель онлайн/оффлайн */
.status-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.status-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.status-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 30px;
}

.status-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .status-slider {
    background-color: #4CAF50;
}

input:checked + .status-slider:before {
    transform: translateX(30px);
}

.status-label {
    margin-left: 10px;
    font-size: 14px;
    color: #495057;
}

/* Overlay для закрытия панели */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 998;
    display: none;
}

.sidebar-overlay.show {
    display: block;
}

/* Адаптивность */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* Анимации */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu {
    animation: slideIn 0.2s ease;
}

/* Дополнительные стили для улучшения интерфейса */
.business-switcher .dropdown-toggle,
.lang-switcher .dropdown-toggle,
.user-menu .dropdown-toggle {
    height: 36px; 
    min-height: 36px; 
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.business-switcher .dropdown-menu,
.lang-switcher .dropdown-menu {
    left: 0;
    right: auto;
}

.bots-list-dropdown {
    max-height: 300px;
    overflow-y: auto;
}

.bots-list-dropdown::-webkit-scrollbar {
    width: 6px;
}

.bots-list-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.bots-list-dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.bots-list-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.dropdown-item.post {
    transition: all 0.2s ease;
}

.dropdown-item.post:hover {
    background: #f8f9fa;
    padding-left: 20px;
}

/* Компактный статус оператора */
.operator-status-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    text-decoration: none;
    white-space: nowrap;
}

.operator-status-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    text-decoration: none;
    color: #495057;
}

.operator-status-btn.online {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.operator-status-btn.online:hover {
    background: #c3e6cb;
    border-color: #b8dacc;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc3545;
    flex-shrink: 0;
}

.status-dot.online {
    background: #28a745;
}
}

.form-control {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.dropdown-divider {
    margin: 8px 0;
    border-top: 1px solid #e9ecef;
}

.dropdown-header {
    padding: 8px 16px;
    font-size: 12px;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
}

/* Стили для переключателя статуса оператора */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:focus + .slider {
    box-shadow: 0 0 1px #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.status-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-label {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

/* Mobile Menu Responsive Styles */
@media (max-width: 768px) {
    .mobile-menu-burger {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
    
    /* Hide burger button when menu is open */
    .mobile-menu-open .mobile-menu-burger {
        opacity: 0;
        pointer-events: none;
        transform: scale(0.8);
    }
}

@media (min-width: 769px) {
    .mobile-menu-burger {
        display: none;
    }
    
    .mobile-menu {
        display: none;
    }
    
    .mobile-menu-overlay {
        display: none;
    }
}


