/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .content {
        padding: 12px;
    }

    /* Контент Умные Связи.ОТ / модулей: меньше «полей» на узком экране */
    .content.d-flex {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .top-bar {
        padding: 0 0.75rem;
    }
    
    .top-bar .display-4 {
        font-size: 1.125rem;
        padding-left: 0;
    }
    
    .calendar-panel {
        width: 100%;
        right: -100%;
    }
    
    .fc .fc-toolbar {
        justify-content: center;
    }
    
    .fc .fc-toolbar-title {
        order: -1;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .panel-controls {
        top: 10px;
        right: 10px;
        gap: 8px;
    }
    
    .panel-toggle-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 100px;
    }
    
    .calendar-panel,
    .chatbot-panel {
        width: 100%;
        right: -100%;
    }
    
    .message-content {
        max-width: 90%;
        font-size: 13px;
    }
    
    .chatbot-messages {
        max-height: calc(100vh - 180px);
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .welcome-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .login-card {
        margin: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .panel-controls {
        position: relative;
        top: auto;
        right: auto;
        flex-direction: row;
        justify-content: center;
        margin-bottom: 20px;
    }
    
    .panel-toggle-btn {
        min-width: 80px;
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .chatbot-input .form-control {
        font-size: 16px; /* Предотвращает зум на iOS */
    }
}