/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
    color: #1e2b3c;
    padding-bottom: 20px;
    -webkit-tap-highlight-color: transparent;
}

/* ===== LAYOUT & SIDEBAR ===== */
.sidebar-wrapper {
    position: relative;
    flex: 0 0 var(--sidebar-width, 220px);
    max-width: var(--sidebar-width, 220px);
    transition: flex-basis 0.2s, max-width 0.2s;
}

.sidebar {
    min-height: 100vh;
    background-color: #343a40;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    width: 100%;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ced4da;
    text-decoration: none;
    padding: 10px 15px;
    transition: all 0.2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: #495057;
    color: white;
}

.sidebar .nav-link .menu-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar .nav-link .badge {
    margin-left: auto;
}

.main-content { padding: 20px; }
.navbar-brand { font-weight: bold; }
.nav-tabs .nav-link { cursor: pointer; }

/* ===== LOGIN ===== */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1e24, #2d343d);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 24px;
    padding: 40px 30px;
    width: 100%;
    max-width: 360px;
    text-align: center;
}

.login-logo { font-size: 48px; margin-bottom: 10px; }
.login-card h1 { font-size: 28px; margin-bottom: 4px; }
.login-card .subtitle { color: #888; margin-bottom: 24px; }

.input-group { margin-bottom: 14px; }
.input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    background: #f9fafc;
}

.input-group input:focus { outline: none; border-color: #3a7bd5; }

.login-card button {
    width: 100%;
    padding: 14px;
    background: #3a7bd5;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
}

.login-card button:disabled { opacity: 0.6; }
.error { color: #e53e3e; margin-top: 12px; font-size: 14px; }

/* ===== TABLES & ROWS ===== */
.table-container {
    position: relative;
    height: calc(100vh - 280px);
    overflow: auto;
}

.table-container table { border-collapse: collapse !important; }

.table-container table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-container table thead th {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    position: sticky;
    top: 0;
    z-index: 11;
    white-space: nowrap;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    border-bottom: 2px solid #dee2e6 !important;
}

.table-container table thead::after { display: none !important; content: none !important; }
.table-container table tbody tr:first-child td { border-top: none !important; }

.row-overdue { background-color: #ffcccc !important; }
.row-warning { background-color: #fff3cd !important; }
.row-default { background-color: transparent !important; }

.table-striped tbody tr.row-overdue:nth-of-type(odd),
.table-striped tbody tr.row-warning:nth-of-type(odd) { background-color: inherit !important; }

/* ===== COMPONENTS ===== */
.card-dashboard { transition: transform 0.2s; }
.card-dashboard:hover { transform: translateY(-5px); }

.dynamic-item {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background: #f9f9f9;
}

.remove-item { margin-top: 8px; }

.loading-spinner {
    text-align: center;
    padding: 30px;
    color: #6c757d;
}

.loading-spinner .spinner-border { width: 3rem; height: 3rem; }

/* ===== PERFORMANCE BARS ===== */
.performance-bar-wrapper {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.performance-bar-label {
    min-width: 120px;
    font-weight: 500;
    font-size: 14px;
    color: #1e2b3c;
}

.performance-bar-track {
    flex: 1;
    min-width: 150px;
    height: 28px;
    background: #e9ecef;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

.performance-bar {
    height: 100%;
    background: linear-gradient(90deg, #3a7bd5, #2d62b0);
    border-radius: 14px;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    min-width: 40px;
}

.performance-bar-value {
    color: white;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.performance-bar-extra {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #6c757d;
    min-width: 130px;
}

/* ===== CHAT WITH MASTERS ===== */
.chat-messages-masters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    padding-bottom: 20px;
}

.chat-message {
    background: #ffffff;
    border-radius: 12px;
    padding: 14px 18px;
    border: 1px solid #e8ecf2;
    transition: all 0.2s;
}

.chat-message.unread {
    background: #fff8e6;
    border-left: 4px solid #ffc107;
}

.chat-message:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.chat-message-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
    font-size: 13px;
}

.chat-message-time { color: #888; font-size: 12px; }
.chat-message-author { display: flex; align-items: center; gap: 6px; }
.chat-message-order { color: #3a7bd5; font-weight: 500; }
.chat-message-body { font-size: 15px; margin: 4px 0 8px 0; word-break: break-word; }

.chat-message-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

/* ===== CHANGELOG ===== */
.changelog-feature { background-color: #d1e7dd; border-left: 4px solid #198754; }
.changelog-improvement { background-color: #cfe2ff; border-left: 4px solid #0d6efd; }
.changelog-fix { background-color: #fff3cd; border-left: 4px solid #ffc107; }
.changelog-breaking { background-color: #f8d7da; border-left: 4px solid #dc3545; }

/* ===== FAB ===== */
.fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #3a7bd5;
    color: white;
    border: none;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(58, 123, 213, 0.4);
    cursor: pointer;
}

/* ============================================================
МОДАЛЬНЫЕ ОКНА (ЦЕНТРИРОВАННЫЕ, БЕЗ КОНФЛИКТОВ С BOOTSTRAP)
============================================================ */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
    padding: 20px !important;
}

.custom-modal {
    background: white !important;
    border-radius: 16px !important;
    width: 95% !important;
    max-width: 1000px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    padding: 30px !important;
    margin: 0 auto !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    animation: modalFadeIn 0.3s ease !important;
}

.custom-modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 24px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.custom-modal-header h2 {
    font-size: 24px !important;
    font-weight: 600 !important;
    color: #1e2b3c !important;
    margin: 0 !important;
}

.custom-modal-header .close-btn {
    background: none !important;
    border: none !important;
    font-size: 28px !important;
    cursor: pointer !important;
    color: #999 !important;
    padding: 0 !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: background 0.2s !important;
}

.custom-modal-header .close-btn:hover {
    background: #f1f5f9 !important;
}

.custom-modal-body {
    padding: 0 !important;
}

.custom-modal-footer {
    display: flex !important;
    gap: 12px !important;
    margin-top: 24px !important;
    padding-top: 24px !important;
    border-top: 1px solid #e2e8f0 !important;
    justify-content: flex-end !important;
}

.custom-modal-footer button {
    padding: 12px 24px !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.custom-modal-footer .btn-primary-modal {
    background: #3a7bd5 !important;
    color: white !important;
}

.custom-modal-footer .btn-primary-modal:hover {
    background: #2d62b0 !important;
}

.custom-modal-footer .btn-secondary-modal {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

.custom-modal-footer .btn-secondary-modal:hover {
    background: #e2e8f0 !important;
}

.modal-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-form .form-group.full-width {
    grid-column: 1 / -1;
}

.modal-form label {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

.modal-form input,
.modal-form textarea,
.modal-form select {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    width: 100%;
}

.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus {
    outline: none;
    border-color: #3a7bd5;
    box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.1);
}

.modal-form textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ============================================================
МЕССЕНДЖЕР MAX БОТ (РЕДИЗАЙН)
============================================================ */
.max-messenger {
    height: calc(100vh - 120px);
    min-height: 500px;
}

.messenger-container {
    display: flex;
    height: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.messenger-sidebar {
    width: 320px;
    min-width: 320px;
    background: #fff;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h5 { margin: 0; font-size: 20px; font-weight: 700; }

.sidebar-search { padding: 12px 16px; border-bottom: 1px solid #e9ecef; }

.sidebar-search input {
    border-radius: 20px; font-size: 14px; border: 1px solid #e9ecef;
    background: #f8f9fa; padding: 8px 16px; width: 100%;
}

.sidebar-search input:focus { outline: none; border-color: #0d6efd; background: #fff; }

.dialogs-list { flex: 1; overflow-y: auto; padding: 4px 0; }

.dialog-item {
    display: flex; align-items: center; padding: 12px 16px;
    cursor: pointer; transition: background 0.15s; position: relative; gap: 12px;
}

.dialog-item:hover { background: #f8f9fa; }
.dialog-item.active { background: #e7f3ff; }

.dialog-avatar {
    width: 48px; height: 48px; display: flex; align-items: center;
    justify-content: center; font-size: 22px; background: #e9ecef;
    border-radius: 50%; flex-shrink: 0;
}

.dialog-info { flex: 1; min-width: 0; }

.dialog-name-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; }
.dialog-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dialog-time { font-size: 12px; color: #adb5bd; flex-shrink: 0; margin-left: 8px; }
.dialog-last-msg { font-size: 13px; color: #6c757d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dialog-unread {
    background: #0d6efd; color: white; border-radius: 50%;
    min-width: 22px; height: 22px; font-size: 12px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 600;
}

.empty-list { text-align: center; padding: 40px 20px; }

.messenger-chat {
    flex: 1; display: flex; flex-direction: column; height: 100%;
    background: linear-gradient(180deg, #dbeafe 0%, #e0f2fe 50%, #f0f9ff 100%);
}

.chat-header {
    padding: 12px 20px; background: #fff; border-bottom: 1px solid #e9ecef;
    display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
}

.chat-user-info { display: flex; align-items: center; gap: 12px; cursor: pointer; }

.chat-avatar {
    width: 40px; height: 40px; display: flex; align-items: center;
    justify-content: center; font-size: 20px; background: #e9ecef; border-radius: 50%;
}

.chat-user-name { font-weight: 600; font-size: 16px; }
.chat-user-status { font-size: 12px; color: #6c757d; display: flex; align-items: center; gap: 6px; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #adb5bd; display: inline-block; }
.status-dot.online { background: #28a745; }

.date-separator { display: flex; justify-content: center; margin: 16px 0; }

.date-label {
    background: rgba(13, 110, 253, 0.15); color: #0d6efd;
    padding: 4px 12px; border-radius: 12px; font-size: 13px; font-weight: 500;
}

.chat-messages {
    flex: 1; overflow-y: auto; padding: 16px 20px;
    display: flex; flex-direction: column; gap: 6px;
    max-width: 720px; margin: 0 auto; width: 100%;
}

.message { display: flex; flex-direction: column; max-width: 85%; }
.message-client { align-self: flex-start; }
.message-manager { align-self: flex-end; }

.message-bubble { padding: 10px 14px; word-wrap: break-word; position: relative; }

.message-client .message-bubble {
    background: #fff; border-radius: 12px 12px 12px 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.message-manager .message-bubble {
    background: #dbeafe; color: #1e3a8a; border-radius: 12px 12px 4px 12px;
}

.message-text { font-size: 14px; line-height: 1.4; white-space: pre-wrap; }

.message-meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 4px; }
.message-time { font-size: 11px; opacity: 0.6; }
.message-status { font-size: 12px; color: #0d6efd; font-weight: 600; }

.chat-input {
    padding: 12px 20px; background: #fff; border-top: 1px solid #e9ecef;
    display: flex; align-items: center; gap: 10px; flex-shrink: 0;
    max-width: 720px; margin: 0 auto; width: 100%;
}

.btn-attach {
    background: none; border: none; font-size: 20px; cursor: pointer;
    padding: 8px; border-radius: 50%; transition: background 0.2s; color: #6c757d;
}

.btn-attach:hover { background: #f8f9fa; }

.chat-input .form-control {
    flex: 1; border: none; border-radius: 20px; background: #f8f9fa; padding: 10px 16px; font-size: 14px;
}

.chat-input .form-control:focus { outline: none; background: #fff; box-shadow: 0 0 0 2px #0d6efd; }

.btn-send {
    width: 40px; height: 40px; border-radius: 50%; background: #0d6efd; color: white;
    border: none; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.2s; flex-shrink: 0;
}

.btn-send:hover:not(:disabled) { background: #0b5ed7; }
.btn-send:disabled { background: #adb5bd; cursor: not-allowed; }

.messenger-info-panel {
    width: 300px; min-width: 300px; background: #fff; border-left: 1px solid #e9ecef;
    display: flex; flex-direction: column; height: 100%; overflow-y: auto;
}

.info-panel-header { padding: 12px 16px; border-bottom: 1px solid #e9ecef; display: flex; justify-content: flex-end; }

.btn-close-panel {
    background: none; border: none; font-size: 20px; cursor: pointer;
    color: #6c757d; padding: 4px 8px; border-radius: 50%; transition: background 0.2s;
}

.btn-close-panel:hover { background: #f8f9fa; }

.info-panel-content { padding: 20px; display: flex; flex-direction: column; gap: 20px; }

.info-avatar-section { text-align: center; padding-bottom: 20px; border-bottom: 1px solid #e9ecef; }

.info-avatar {
    width: 80px; height: 80px; margin: 0 auto 12px; display: flex; align-items: center;
    justify-content: center; font-size: 36px; background: #e9ecef; border-radius: 50%;
}

.info-name { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.info-status { font-size: 13px; color: #6c757d; display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 10px; }

.info-badges { display: flex; gap: 6px; justify-content: center; }
.badge-guest { font-size: 11px; background: #ffc107; color: #212529; padding: 2px 10px; border-radius: 10px; }
.badge-client { font-size: 11px; background: #28a745; color: white; padding: 2px 10px; border-radius: 10px; }

.info-details { display: flex; flex-direction: column; gap: 12px; }

.info-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.info-icon { font-size: 16px; width: 24px; text-align: center; }
.info-label { color: #6c757d; min-width: 80px; }
.info-value { font-weight: 500; }

.info-actions { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid #e9ecef; }

.btn-action {
    padding: 10px 16px; border: 1px solid #e9ecef; background: #fff; border-radius: 10px;
    font-size: 14px; cursor: pointer; transition: all 0.2s; text-align: left;
}

.btn-action:hover { background: #f8f9fa; border-color: #0d6efd; }
.btn-action.btn-danger { color: #dc3545; border-color: #f8d7da; }
.btn-action.btn-danger:hover { background: #f8d7da; border-color: #dc3545; }

.messenger-empty {
    flex: 1; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, #dbeafe 0%, #e0f2fe 50%, #f0f9ff 100%);
}

.empty-content { text-align: center; }
.empty-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.5; }
.empty-content h5 { font-size: 20px; margin-bottom: 8px; color: #495057; }
.empty-content p { font-size: 14px; }

.chat-messages,
.dialogs-list,
.messenger-info-panel {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.chat-messages::-webkit-scrollbar,
.dialogs-list::-webkit-scrollbar,
.messenger-info-panel::-webkit-scrollbar {
    display: none;
}

@media (max-width: 1200px) {
    .messenger-info-panel {
        width: 260px;
        min-width: 260px;
    }
}

@media (max-width: 992px) {
    .messenger-info-panel {
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        z-index: 10;
        box-shadow: -2px 0 8px rgba(0,0,0,0.1);
    }
}

@media (max-width: 768px) {
    .messenger-sidebar {
        width: 100%;
        min-width: unset;
        max-height: 300px;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    .messenger-container {
        flex-direction: column;
    }
    .messenger-chat {
        height: calc(100vh - 420px);
    }
    .custom-modal {
        width: 95% !important;
        max-width: 100% !important;
        max-height: 100vh !important;
        padding: 20px !important;
        border-radius: 12px !important;
    }
    .modal-form {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
НАСТРОЙКИ ИНТЕРФЕЙСА: РАЗМЕР ШРИФТА И КОМПАКТНОЕ МЕНЮ
============================================================ */

/* CSS-переменные */
:root {
    --sidebar-width: 220px;
    --table-font-size: 14px;
}

/* Размеры шрифта для таблиц */
body.font-small  { --table-font-size: 12px; }
body.font-medium { --table-font-size: 14px; }
body.font-large  { --table-font-size: 16px; }
body.font-xlarge { --table-font-size: 18px; }

/* Применяем размер ко всем таблицам */
.table-container table tbody td,
.table-container table thead th {
    font-size: var(--table-font-size) !important;
}

/* Компактный режим бокового меню */
body.sidebar-compact .sidebar {
    width: 65px !important;
    min-width: 65px !important;
    max-width: 65px !important;
    flex: 0 0 65px !important;
}

body.sidebar-compact .sidebar h5,
body.sidebar-compact .sidebar hr,
body.sidebar-compact .sidebar .menu-text,
body.sidebar-compact .sidebar .nav-link .badge {
    display: none !important;
}

body.sidebar-compact .sidebar .nav-link {
    justify-content: center !important;
    padding: 14px 0 !important;
    text-align: center;
    position: relative;
}

body.sidebar-compact .sidebar .nav-link i {
    margin: 0 !important;
    font-size: 20px;
}

body.sidebar-compact .sidebar .nav-item {
    position: relative;
}

body.sidebar-compact .sidebar .nav-link .badge {
    display: flex !important;
    position: absolute !important;
    top: 4px !important;
    right: 4px !important;
    margin: 0 !important;
    font-size: 10px !important;
    padding: 2px 5px !important;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
}

body.sidebar-compact .sidebar .btn-outline-light {
    padding: 12px 0 !important;
    font-size: 0 !important;
    justify-content: center;
}

body.sidebar-compact .sidebar .btn-outline-light i {
    font-size: 20px !important;
    margin: 0 !important;
    color: #ced4da !important;
}

body.sidebar-compact .sidebar .btn-outline-light:hover i {
    color: #ffffff !important;
}

/* Кнопка сворачивания меню */
.sidebar-toggle-btn {
    position: absolute;
    top: 50%;
    right: -14px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #343a40;
    color: white;
    border: 2px solid #495057;
    cursor: pointer;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.sidebar-toggle-btn:hover {
    background: #495057;
    border-color: #6c757d;
}

/* Обёртка sidebar */
body.sidebar-compact .sidebar-wrapper {
    flex: 0 0 65px !important;
    max-width: 65px !important;
}

/* Модалка настроек */
.settings-modal .settings-section {
    margin-bottom: 24px;
}

.settings-modal .settings-section h6 {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.settings-btn {
    flex: 1;
    min-width: 100px;
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    text-align: center;
}

.settings-btn:hover {
    border-color: #3a7bd5;
    background: #f0f7ff;
}

.settings-btn.active {
    border-color: #3a7bd5;
    background: #3a7bd5;
    color: white;
}

.settings-btn .preview-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.7;
}

/* Иконка настроек в меню */
.sidebar-settings-link {
    opacity: 0.8;
    font-size: 13px !important;
}

.sidebar-settings-link:hover {
    opacity: 1;
}

/* Основной контент */
.main-content-wrapper {
    flex: 1;
    min-width: 0;
    padding: 20px;
}

/* Адаптация таблицы под всю ширину */
.orders-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

/* Убираем лишние отступы у row */
.container-fluid > .row {
    margin-left: 0;
    margin-right: 0;
    display: flex;
    flex-wrap: nowrap;
}

/* Адаптивность */
@media (max-width: 768px) {
    .sidebar-wrapper {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transform: translateX(-100%);
    }
    
    body.sidebar-mobile-open .sidebar-wrapper {
        transform: translateX(0);
    }
    
    .main-content-wrapper {
        width: 100%;
    }
}