/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
    line-height: 1.4;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 98%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Навигация */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 0.3rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0; /* Позволяет сжиматься */
    width: 100%;
    box-sizing: border-box;
    gap: 1rem;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    min-width: 0; /* Позволяет сжиматься */
    position: relative;
    flex: 1;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.navbar-menu li {
    flex-shrink: 0; /* Элементы не сжимаются */
    position: relative;
}

.navbar-menu > li > a {
    color: white;
    text-decoration: none;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 4px;
    transition: background-color 0.3s;
    white-space: nowrap;
    display: block;
    box-sizing: border-box;
}

.navbar-menu > li > a:hover,
.navbar-menu > li > a.active {
    background-color: #34495e;
}

.navbar-actions a:hover {
    background-color: #34495e;
}

/* Выпадающие меню */
.dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 0.7rem;
    margin-left: 0.3rem;
    transition: transform 0.3s;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    margin-top: 0.3rem;
    padding: 0.3rem 0;
    z-index: 1000;
    list-style: none;
    margin-left: 0;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background-color: #f0f0f0;
    color: #2c3e50;
}

.dropdown-divider {
    height: 1px;
    margin: 0.3rem 0;
    background-color: #e0e0e0;
    padding: 0 !important;
    pointer-events: none;
}

/* Основной контент */
.main-content {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.5rem 0;
}

/* Вкладки приложения */
.app-tabs {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.app-tabs .container {
    padding: 0 20px;
}

.tabs-container {
    display: flex;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f8f9fa;
    position: relative;
}

.tabs-container::before,
.tabs-container::after {
    content: '';
    position: sticky;
    width: 20px;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.2s;
}

.tabs-container::before {
    left: 0;
    background: linear-gradient(to right, rgba(248, 249, 250, 1), rgba(248, 249, 250, 0));
}

.tabs-container::after {
    right: 0;
    background: linear-gradient(to left, rgba(248, 249, 250, 1), rgba(248, 249, 250, 0));
}

.tabs-container::-webkit-scrollbar {
    height: 6px;
}

.tabs-container::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.tabs-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.tabs-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 40px;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-size: 0.8rem;
    color: #495057;
    text-decoration: none;
    position: relative;
    margin-top: 0.5rem;
}

.tab-item:hover {
    background-color: #dee2e6;
}

.tab-item:hover {
    background-color: #dee2e6;
    color: #212529;
}

.tab-item.active {
    background-color: white;
    color: #2c3e50;
    border-color: #dee2e6;
    border-bottom-color: white;
    font-weight: 500;
    margin-top: 0;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background-color: white;
}

.tab-label {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tab-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
    transition: all 0.2s;
    font-size: 0.7rem;
    color: inherit;
    flex-shrink: 0;
}

.tab-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.1);
}

.tab-item.active .tab-close:hover {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

/* Контекстное меню для вкладок */
.tab-context-menu {
    font-size: 0.85rem;
}

.tab-context-menu-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.15s;
}

.tab-context-menu-item:hover {
    background-color: #f0f0f0;
}

.tab-context-menu-shortcut {
    font-size: 0.75rem;
    color: #6c757d;
    font-family: monospace;
}

/* Счетчик вкладок */
.tab-counter {
    user-select: none;
}

/* Сообщения */
.messages {
    margin-bottom: 1.5rem;
    position: relative;
}

.alert {
    padding: 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    margin-left: 0.5rem;
    line-height: 1;
    color: inherit;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.alert-close:hover {
    opacity: 1;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Группировка сообщений */
.alert-group {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border-radius: 4px;
}

.alert-group-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.alert-group-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.alert-group-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
}

.alert-group-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
}

.alert-group-header {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.alert-group .alert {
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.5);
}

.alert-group .alert:last-child {
    margin-bottom: 0;
}

/* Улучшение видимости обязательных полей в формах */
.form-group label.required::after {
    content: ' *';
    color: #e74c3c;
    font-weight: bold;
}

.form-group input[required],
.form-group textarea[required],
.form-group select[required] {
    border-left: 3px solid #3498db;
}

.form-group input.field-invalid,
.form-group textarea.field-invalid,
.form-group select.field-invalid {
    border-color: #e74c3c;
    border-left-width: 3px;
}

.field-error {
    color: #e74c3c;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

/* Улучшение визуальной обратной связи при наведении */
.btn:hover,
a:hover {
    transition: all 0.2s ease;
}

/* Анимации переходов */
.page-transition {
    animation: fadeIn 0.3s ease-in;
}

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

/* Выделение строки при навигации с клавиатуры */
.data-table tbody tr.keyboard-selected {
    background-color: #e3f2fd !important;
    outline: 2px solid #2196f3;
    outline-offset: -2px;
}

.data-table tbody tr.keyboard-selected td {
    background-color: #e3f2fd !important;
}

/* Дашборд */
.dashboard {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.lead {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 2rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.dashboard-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    color: #2c3e50;
}

.dashboard-card p {
    color: #666;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* Таблицы данных */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table th {
    background: #2c3e50;
    color: white;
    padding: 0.6rem;
    text-align: left;
    border: 1px solid #ddd;
    font-weight: 500;
}

.data-table td {
    padding: 0.6rem;
    border: 1px solid #ddd;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Формы */
.filter-form {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

/* Быстрые действия */
.info-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.info-section h3 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: #2c3e50;
}

.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Заглушки страниц */
.stub-page {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stub-page h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: #2c3e50;
}

.stub-page p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.stub-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

/* Футер */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 0.35rem 0;
    margin-top: auto;
    text-align: center;
}

.footer p {
    margin: 0;
    font-size: 0.7rem;
}

/* Хлебные крошки */
.breadcrumbs {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0.5rem 0;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
}

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    margin: 0 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.breadcrumb-item span {
    color: #495057;
    font-weight: 500;
}

/* Навигация с клавиатуры */
.data-table tbody tr.keyboard-selected {
    background-color: #e3f2fd !important;
    outline: 2px solid #2196f3;
    outline-offset: -2px;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 90%;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.modal-body {
    padding: 0.5rem 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding-top: 0.75rem;
    margin-top: 1rem;
}

kbd {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 0.2rem 0.4rem;
    font-family: monospace;
    font-size: 0.85rem;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

/* Индикаторы загрузки */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
}

.spinner-container {
    position: relative;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-text {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Прогресс-бар */
.progress-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9998;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.progress-bar-text {
    font-size: 0.8rem;
    color: #495057;
    font-weight: 500;
    min-width: 40px;
    text-align: right;
}

/* Командная палитра */
.command-palette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.command-palette-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.command-palette-container {
    position: relative;
    z-index: 10001;
    width: 90%;
    max-width: 600px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 70vh;
}

.command-palette-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.command-palette-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #3498db;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
}

.command-palette-input:focus {
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.command-palette-results {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.command-palette-section {
    margin-bottom: 1rem;
}

.command-palette-section-title {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.command-palette-items {
    display: flex;
    flex-direction: column;
}

.command-palette-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s;
    gap: 0.75rem;
}

.command-palette-item:hover,
.command-palette-item.selected {
    background-color: #f0f7ff;
}

.command-palette-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.command-palette-label {
    flex: 1;
    font-size: 0.9rem;
    color: #333;
}

.command-palette-shortcut {
    font-size: 0.75rem;
    color: #6c757d;
    padding: 0.2rem 0.4rem;
    background: #f0f0f0;
    border-radius: 3px;
}

.command-palette-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
}

.command-palette-hints {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #6c757d;
    align-items: center;
}

.command-palette-hints kbd {
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 3px;
    padding: 0.2rem 0.4rem;
    font-family: monospace;
    font-size: 0.7rem;
}

/* Недавние элементы */
.recent-items-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 350px;
    max-height: 400px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.recent-items-header {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
}

.recent-items-list {
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
}

.recent-item {
    display: block;
    padding: 0.6rem 0.75rem;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s;
}

.recent-item:hover {
    background-color: #f8f9fa;
    text-decoration: none;
}

.recent-item-type {
    font-size: 0.7rem;
    color: #6c757d;
    margin-bottom: 0.2rem;
}

.recent-item-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-item-time {
    font-size: 0.7rem;
    color: #adb5bd;
}

.recent-items-empty {
    padding: 1.5rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.85rem;
}

.recent-items-footer {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.recent-items-clear {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 3px;
    transition: background-color 0.15s;
}

.recent-items-clear:hover {
    background-color: #e9ecef;
    color: #495057;
}

/* Улучшения форм */
.form-control.field-invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.form-control.field-valid {
    border-color: #27ae60;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.2);
}

.form-field-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.form-field-group:last-child {
    border-bottom: none;
}

/* Улучшения фильтров */
.active-filters-indicator {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

.active-filters-count {
    font-weight: 600;
    color: #856404;
}

.active-filters-label {
    color: #856404;
}

.filter-presets-menu {
    max-height: 300px;
    overflow-y: auto;
}


/* Адаптивность навбара для маленьких экранов */
@media (max-width: 1200px) {
    .navbar-menu {
        gap: 0.5rem;
    }
    
    .navbar-menu > li > a {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .dropdown-menu {
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.25rem 0;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .navbar-menu {
        gap: 0.4rem;
        justify-content: flex-start;
        padding: 0 0.5rem;
        width: 100%;
    }
    
    .navbar-menu > li > a {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .navbar-actions {
        width: 100%;
        justify-content: flex-end;
        padding: 0 0.5rem;
    }
    
    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        border-radius: 0;
        margin-top: 0;
        background-color: #34495e;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-menu a {
        color: white;
        padding: 0.4rem 1rem;
    }
    
    .dropdown-menu a:hover {
        background-color: #2c3e50;
    }
    
    .dropdown-divider {
        background-color: rgba(255, 255, 255, 0.2);
    }
}

@media (max-width: 480px) {
    .navbar-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0.3rem;
    }
    
    .navbar-menu > li {
        width: 100%;
    }
    
    .navbar-menu > li > a {
        width: 100%;
        text-align: left;
        padding: 0.4rem 0.5rem;
    }
    
    .dropdown-menu {
        position: static;
        width: 100%;
    }
}

/* Улучшения для больших экранов */
@media (min-width: 1200px) {
    .container {
        max-width: 98%;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

