/* --- ОСНОВНЫЕ ПЕРЕМЕННЫЕ --- */
:root {
    --primary: #4361ee;
    --primary-dark: #3a0ca3;
    --secondary: #4cc9f0;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #ff9e00;
    --info: #3498db;
    --light: #f8f9fa;
    --dark: #343a40;
    --primary-rgb: 67, 97, 238;
    --success-rgb: 76, 201, 240;
    --danger-rgb: 247, 37, 133;
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-success: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 100%);
    --card-shadow: 0 5px 20px rgba(0,0,0,0.08);
    --light-bg: #f8f9fa;
    --header-height: 56px;
}

html {
    font-size: 14px;
}

/* --- ОСНОВНОЙ СТИЛЬ ТЕЛА --- */
body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    padding-top: 0 !important;
}

/* --- СТРУКТУРА ОБОЛОЧКИ --- */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- БОКОВАЯ ПАНЕЛЬ (САЙДБАР) --- */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #212529 0%, #343a40 100%);
    height: 100vh; /* Фиксируем высоту на весь экран */
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    overflow: hidden; /* Скрываем общий скролл, скроллить будем только меню */
    display: flex;
    flex-direction: column;
}

/* Область прокрутки меню */
.sidebar-menu-content {
    flex-grow: 1; /* Занимает все доступное место */
    overflow-y: auto; /* Вертикальная прокрутка */
    overflow-x: hidden;
    padding-bottom: 20px;
}

/* Стилизация скроллбара для меню (Webkit) */
.sidebar-menu-content::-webkit-scrollbar {
    width: 5px;
}
.sidebar-menu-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}
.sidebar-menu-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}
.sidebar-menu-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.sidebar .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, .9);
    padding: 0.8rem 1.5rem;
    border-radius: 0;
    margin-bottom: 0;
    border-left: 4px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, .05);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(67, 97, 238, 0.1);
    border-left-color: var(--primary);
}

.sidebar .nav-link i {
    margin-right: 12px;
    font-size: 1.2rem;
    vertical-align: text-bottom;
}

.sidebar-brand-wrapper {
    padding: 1.5rem 1rem;
    background: rgba(0,0,0,0.1);
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 0; /* Убрали отступ, он будет внутри скролла если нужно */
    flex-shrink: 0; /* Запрещаем сжимать логотип */
}

.sidebar-brand-wrapper img {
    height: 50px;
    width: auto;
    margin-bottom: 10px;
}

.sidebar-brand-text {
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    display: block;
}

.sidebar-footer {
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.05);
    width: 100%;
    flex-shrink: 0; /* Запрещаем сжимать подвал */
    margin-top: auto;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-profile-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* --- ОСНОВНОЙ КОНТЕНТ --- */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    min-height: 100vh;
    background-color: #f8f9fa;
    transition: margin-left 0.3s ease;
}

/* --- МОБИЛЬНОЕ МЕНЮ --- */
.navbar-mobile {
    background: var(--gradient-primary);
    z-index: 101;
    height: var(--header-height);
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

/* АНИМАЦИИ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* КАРТОЧКИ */
.custom-card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    background: white;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.custom-card:hover {
    box-shadow: 0 15px 35px rgba(67, 97, 238, 0.15);
    transform: translateY(-5px);
}

.custom-card .card-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: 15px 15px 0 0 !important;
    padding: 1rem 1.5rem;
    border: none;
}

/* КНОПКИ */
.btn-gradient {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.3);
}

.btn-outline-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                var(--gradient-primary) border-box;
    color: var(--primary);
    transition: all 0.3s ease;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    font-weight: 600;
}

.btn-outline-gradient:hover {
    background: var(--gradient-primary);
    color: white;
}

/* ПОЛЯ ВВОДА */
.custom-input {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.custom-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

/* ТАБЛИЦЫ */
.custom-table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    width: 100%;
}

.custom-table thead th {
    background: var(--light);
    border: none;
    padding: 1rem;
    font-weight: 600;
    color: var(--dark);
    position: sticky;
    top: 0;
    z-index: 10;
}

.custom-table tbody td {
    padding: 1rem;
    border-top: 1px solid #e9ecef;
}

.custom-table tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

/* СТАТУСЫ */
.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-active {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--success);
}

.status-warning {
    background-color: rgba(243, 156, 18, 0.1);
    color: var(--warning);
}

.status-danger {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

.status-info {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--info);
}

/* ПАГИНАЦИЯ */
.pagination .page-link {
    border: none;
    color: var(--primary);
    margin: 0 5px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: rgba(67, 97, 238, 0.1);
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    color: white;
}

/* МОДАЛЬНЫЕ ОКНА */
.custom-modal .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.custom-modal .modal-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px 20px 0 0 !important;
    border: none;
}

/* ОБЩИЙ СКРОЛЛБАР */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

/* СОРТИРОВКА ТАБЛИЦ */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 20px !important;
}

.sortable-header:hover {
    background-color: rgba(0,0,0,0.05);
}

.sort-icon {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

.sort-icon.active {
    opacity: 1;
    color: var(--primary);
}

.column-toggle-btn {
    border-radius: 20px;
    padding: 5px 15px;
    margin: 2px;
}

.column-toggle-btn.active {
    background-color: var(--primary) !important;
    color: white !important;
}

.hidden-column {
    display: none !important;
}

.date-status {
    font-size: 0.85em;
    font-weight: 500;
}

.status-expired {
    color: #dc3545;
}

.status-warning-text {
    color: #ffc107;
}

.status-ok {
    color: #198754;
}

.no-data {
    color: #6c757d;
    font-style: italic;
}

.date-simple {
    font-size: 0.85em;
    font-weight: 500;
}

/* УВЕДОМЛЕНИЯ */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notification-success {
    background-color: var(--success);
    color: white;
}

.notification-error {
    background-color: var(--danger);
    color: white;
}

.notification-warning {
    background-color: var(--warning);
    color: white;
}

/* СТАТИСТИКА */
.stat-card {
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-card.bg-danger {
    background-color: #dc3545 !important;
}

.stat-card.bg-warning {
    background-color: #ffc107 !important;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-right: 15px;
}

.stat-icon.employees {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.125) 0%, rgb(var(--primary-rgb)) 100%);
    color: rgb(var(--primary-rgb));
}

.stat-icon.training {
    background: linear-gradient(135deg, rgba(var(--success-rgb), 0.125) 0%, rgb(var(--success-rgb)) 100%);
    color: rgb(var(--success-rgb));
}

.stat-icon.medical {
    background: linear-gradient(135deg, rgba(var(--danger-rgb), 0.125) 0%, rgb(var(--danger-rgb)) 100%);
    color: rgb(var(--danger-rgb));
}

.user-badge {
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 5px 15px;
    backdrop-filter: blur(10px);
}

/* ПРОЧЕЕ */
.table-responsive {
    border-radius: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.alert {
    border-radius: 10px;
    border: none;
}

.input-group-text {
    border-radius: 10px 0 0 10px;
}

.form-select {
    border-radius: 0 10px 10px 0;
}

.main-content h1, .main-content h2, .main-content h3, .main-content h4, .main-content h5, .main-content h6 {
    color: var(--primary);
    font-weight: 600;
}

.btn-group .btn {
    border-radius: 8px;
    margin: 0 2px;
}

.border-bottom {
    border-color: rgba(0,0,0,0.1) !important;
    padding-bottom: 1rem;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 991.98px) {
    .wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1040;
        height: 100vh;
        width: 250px;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 80px 15px 15px 15px; 
    }
    
    .navbar-mobile {
        display: flex;
    }
    
    .notification {
        top: 70px;
        left: 15px;
        right: 15px;
        width: auto;
    }
}

@media (min-width: 992px) {
    .main-content {
        margin-left: 250px;
    }
}

@media (max-width: 768px) {
    .custom-table {
        font-size: 0.8rem;
    }
    
    .custom-table thead th,
    .custom-table tbody td {
        padding: 0.5rem;
    }
    
    .btn-gradient {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .custom-card {
        padding: 1rem !important;
    }
    
    .main-content {
        padding: 15px;
    }
}

footer {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    margin-top: auto;
    width: 100%;
}

.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

.main-content > .container-fluid,
.main-content > .container {
    padding: 0;
}

/* Стили для таблицы компаний (дополнительно) */
.company-header-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    border-left: 5px solid var(--primary);
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.company-header-wrapper h1 {
    font-weight: 700;
    color: var(--primary-dark);
}

#companiesTable {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
}

#companiesTable thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
    border-bottom: 2px solid var(--primary);
    color: var(--dark);
    font-weight: 600;
    padding: 1rem 0.75rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

#companiesTable tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

#companiesTable tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05) !important;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

#companiesTable tbody tr:nth-child(even) {
    background-color: #fafafa;
}

#companiesTable tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-top: none;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

#companiesTable .badge {
    font-weight: 500;
    padding: 0.5em 1em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

#companiesTable .badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.badge.bg-primary { background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%) !important; }
.badge.bg-success { background: linear-gradient(135deg, #4cc9f0 0%, #3a0ca3 100%) !important; }
.badge.bg-info { background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%) !important; }
.badge.bg-danger { background: linear-gradient(135deg, #f72585 0%, #b5179e 100%) !important; }
.badge.bg-warning { background: linear-gradient(135deg, #ff9e00 0%, #ff6d00 100%) !important; }

.progress {
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

.empty-state {
    padding: 3rem 1rem;
}

.empty-state i {
    opacity: 0.5;
}

#companySearch {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#companySearch:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

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

#companiesTable tbody tr {
    animation: fadeInRow 0.5s ease-out forwards;
}

#companiesTable tbody tr.selected {
    background-color: rgba(67, 97, 238, 0.1) !important;
    border-left: 3px solid var(--primary);
}
/* ==================== СТИЛИ CHAT.PHP ==================== */
.chat-container {
    height: calc(100vh - 160px);
    display: flex;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.chat-users-list {
    width: 30%;
    border-right: 1px solid #edf2f4;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
}

.chat-main {
    width: 70%;
    display: flex;
    flex-direction: column;
}

.user-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.user-item:hover, .user-item.active {
    background: #fff;
    border-left: 4px solid var(--primary);
}

.unread-badge {
    position: absolute;
    right: 15px;
    top: 15px;
    background: #e63946;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.last-message {
    font-size: 0.85rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.messages-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fdfdfd;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%234361ee' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.msg-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    margin-bottom: 15px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    word-wrap: break-word;
}

.msg-out {
    background: var(--primary);
    color: #fff;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.msg-in {
    background: #e9ecef;
    color: #2b2d42;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.msg-time {
    font-size: 0.65rem;
    opacity: 0.7;
    margin-top: 5px;
}

.chat-footer {
    padding: 15px 20px;
    background: #fff;
    border-top: 1px solid #edf2f4;
}

.attachment-preview {
    font-size: 0.8rem;
    background: rgba(0,0,0,0.05);
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    margin-top: 5px;
}

.file-icon {
    font-size: 1.2rem;
    margin-right: 5px;
}

.typing-indicator {
    font-size: 0.85rem;
    color: #6c757d;
    padding: 5px 15px;
    font-style: italic;
}

.search-box {
    border-radius: 20px;
    border: 1px solid #dee2e6;
    padding-left: 15px;
}

.search-box:focus {
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    border-color: var(--primary);
}

.online-indicator {
    width: 10px;
    height: 10px;
    background: #38b000;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
    border: 2px solid #fff;
}

/* Анимация для индикатора набора текста */
@keyframes typingDots {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

.typing-dots span {
    animation: typingDots 1.4s infinite;
    display: inline-block;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Стили для превью файлов в чате */
.file-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.file-preview-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    max-width: 200px;
}

.file-preview-item img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 5px;
}

/* ==================== СТИЛИ NAVIGATION.PHP ==================== */
.sidebar-brand-wrapper img {
    width: 50px;
    height: auto;
    margin-bottom: 10px;
}

.sidebar-brand-text {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
}

.sidebar-menu-content {
    flex: 1;
    overflow-y: auto;
}

.sidebar-menu-content .nav-link {
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 20px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    margin: 2px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.sidebar-menu-content .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--info);
}

.sidebar-menu-content .nav-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.2) 0%, rgba(52, 152, 219, 0.1) 100%);
    border-left-color: var(--info);
    font-weight: 500;
}

.sidebar-menu-content .nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 10px;
    font-size: 1.1rem;
}

.sidebar-divider {
    margin: 10px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.user-profile-btn {
    color: #fff;
    text-decoration: none;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background 0.3s;
}

.user-profile-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Стили для раскрывающегося меню склада */
#warehouseSubmenu {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    margin: 5px 15px;
    padding: 5px 0;
}

#warehouseSubmenu .nav-link {
    padding: 8px 15px;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    color: rgba(255, 255, 255, 0.9);
    margin: 2px 0;
}

#warehouseSubmenu .nav-link:hover,
#warehouseSubmenu .nav-link.active {
    background-color: rgba(52, 152, 219, 0.2);
    color: white;
    border-left-color: var(--info);
}

/* Анимация иконки стрелки */
.collapse-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}

/* Стили для активного состояния пункта склада */
.nav-link[aria-expanded="true"] {
    background-color: rgba(52, 152, 219, 0.15);
    color: white !important;
}

/* Бейдж для чата с анимацией */
#chatUnreadBadge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Анимация ripple эффекта для меню */
.nav-item .nav-link {
    position: relative;
    overflow: hidden;
}

.nav-item .nav-link::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.nav-item .nav-link:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* Адаптивность для чата и навигации */
@media (max-width: 992px) {
    .chat-container {
        flex-direction: column;
        height: calc(100vh - 200px);
    }
    
    .chat-users-list {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid #edf2f4;
    }
    
    .chat-main {
        width: 100%;
        height: calc(100% - 200px);
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1050;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-footer {
        position: absolute;
        bottom: 0;
        width: 100%;
    }
    
    .messages-area {
        padding: 15px;
    }
    
    .msg-bubble {
        max-width: 85%;
    }
}

@media (max-width: 768px) {
    .chat-container {
        height: calc(100vh - 180px);
    }
    
    .chat-users-list {
        height: 150px;
    }
    
    .chat-main {
        height: calc(100% - 150px);
    }
    
    .user-item {
        padding: 10px 15px;
    }
    
    .msg-bubble {
        max-width: 90%;
        padding: 10px 12px;
    }
    
    .attachment-preview {
        font-size: 0.7rem;
    }
}

/* Стили для модальных окон чата */
.modal-chat-search .modal-content {
    border-radius: 15px;
}

.modal-chat-search .modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-chat-search .modal-body {
    padding: 20px;
}

/* Стили для бейджей в таблице пользователей */
.user-status-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
}

/* Стили для списка участников в модальном окне группы */
.group-members-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
}

.group-members-list::-webkit-scrollbar {
    width: 5px;
}

.group-members-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.group-members-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

/* Стили для аватаров в чате */
.chat-avatar {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.chat-avatar-small {
    width: 35px;
    height: 35px;
}

/* Стили для времени сообщений */
.message-timestamp {
    font-size: 0.7rem;
    opacity: 0.6;
}

/* Стили для статуса доставки сообщений */
.message-status {
    font-size: 0.8rem;
    margin-left: 5px;
}

.message-status.read {
    color: var(--primary);
}

.message-status.sent {
    color: #6c757d;
}

/* Стили для пустого состояния чата */
.empty-chat-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-chat-state i {
    font-size: 4rem;
    opacity: 0.2;
    margin-bottom: 20px;
}

/* Анимация для появления новых сообщений */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.new-message {
    animation: slideInUp 0.3s ease-out;
}

/* Стили для поиска в чате */
.chat-search-container {
    position: relative;
    margin-bottom: 15px;
}

.chat-search-container .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.chat-search-container input {
    padding-left: 40px;
    border-radius: 20px;
    border: 1px solid #dee2e6;
}

/* Дополнительное правило из нового кода (фокус для поля поиска в чате) */
.chat-search-container input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* Стили для задач */
.task-priority-low { border-left: 4px solid #6c757d; }
.task-priority-medium { border-left: 4px solid #0dcaf0; }
.task-priority-high { border-left: 4px solid #ffc107; }
.task-priority-urgent { border-left: 4px solid #dc3545; }

.task-card {
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.task-status-open { background-color: #fff3cd; }
.task-status-in_progress { background-color: #cff4fc; }
.task-status-completed { background-color: #d1e7dd; }
.task-status-cancelled { background-color: #f8d7da; }

.task-deadline-overdue {
    color: #dc3545;
    font-weight: bold;
}

.task-deadline-soon {
    color: #ffc107;
    font-weight: bold;
}

.task-comments {
    max-height: 300px;
    overflow-y: auto;
}

.task-attachment {
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 5px;
}

.task-attachment:hover {
    background-color: #f8f9fa;
}

/* Стили для модального окна задачи */
.task-modal .modal-header {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .task-card .btn-group {
        flex-direction: column;
    }
    
    .task-card .btn {
        margin-bottom: 5px;
    }
}

/* ==========================================================================
   НОВЫЕ СТИЛИ: ЛЕНДИНГ (LANDING PAGE) И СТРАНИЦА ВХОДА
   ========================================================================== */

/* ---------- СТАРТОВАЯ СТРАНИЦА (LANDING PAGE) ---------- */
body.home-page {
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
}

.home-navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 15px 0;
}

.home-navbar .navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-dark) !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-login {
    background-color: #fff;
    color: var(--primary);
    border: 2px solid var(--primary);
    font-weight: 600;
    padding: 8px 25px;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-login:hover {
    background-color: var(--primary);
    color: #fff;
}

.btn-register {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    font-weight: 600;
    padding: 8px 25px;
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.2);
    display: flex;
    align-items: center;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4);
    color: #fff;
}

.hero-section {
    background: linear-gradient(rgba(10, 20, 40, 0.75), rgba(10, 20, 40, 0.85)), url('../img/backgraund_for_enter.jpg') center center / cover no-repeat;
    padding: 140px 0 120px;
    flex: 1;
    display: flex;
    align-items: center;
    min-height: 80vh;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.6;
}

.btn-primary-custom {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 15px 40px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(67, 97, 238, 0.4);
    color: #fff;
}

.features-section {
    padding: 80px 0;
    background-color: #fff;
}

.feature-card {
    padding: 30px;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    height: 100%;
    transition: transform 0.3s, border-color 0.3s;
    border: 1px solid rgba(0,0,0,0.02);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    display: inline-block;
    background: rgba(67, 97, 238, 0.1);
    width: 70px;
    height: 70px;
    line-height: 70px;
    text-align: center;
    border-radius: 20px;
    transition: all 0.3s;
}

.feature-card:hover .feature-icon {
    background: var(--primary);
    color: #fff;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.feature-text {
    color: #6c757d;
    line-height: 1.6;
}

.home-footer {
    background-color: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 20px;
    margin-top: auto;
}

.home-footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.home-footer a:hover {
    color: #fff;
}

/* Адаптив главной страницы */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-section {
        padding: 80px 0 60px;
        text-align: center;
        min-height: auto;
    }
}

/* ---------- СТРАНИЦА ВХОДА (LOGIN PAGE) ---------- */
body.login-page {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    position: relative;
    overflow: hidden;
}

body.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/backgraund_for_enter.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(3px);
    z-index: -2;
}

body.login-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.login-page .login-container {
    max-width: 420px;
    width: 100%;
    padding: 20px;
    z-index: 1;
    animation: fadeIn 0.8s ease-out;
}

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

.login-page .login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px 35px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-page .logo-section {
    text-align: center;
    margin-bottom: 35px;
}

.login-page .logo-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    background: white;
    border-radius: 50%;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 3px solid #4361ee;
    animation: float 6s ease-in-out infinite;
}

.login-page .logo-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-page .system-name {
    color: #2c3e50;
    font-weight: 700;
    font-size: 28px;
    margin-bottom: 5px;
    background: linear-gradient(45deg, #4361ee, #3a0ca3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.login-page .system-subtitle {
    color: #7b8a8b;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.login-page .form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 15px;
}

.login-page .form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.login-page .form-control:focus {
    border-color: #4361ee;
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
    background: white;
}

.login-page .form-control::placeholder {
    color: #a0aec0;
}

.login-page .btn-login-submit {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    border: none;
    color: white;
    padding: 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-top: 10px;
    width: 100%;
    letter-spacing: 0.5px;
}

.login-page .btn-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.4);
    background: linear-gradient(135deg, #3a0ca3 0%, #4361ee 100%);
    color: white;
}

.login-page .btn-login-submit:active {
    transform: translateY(0);
}

.login-page .alert-danger {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
    font-weight: 500;
}

.login-page .input-icon {
    position: relative;
}

.login-page .input-icon i.bi-person-fill,
.login-page .input-icon i.bi-lock-fill {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #7b8a8b;
    font-size: 18px;
}

.login-page .input-icon input {
    padding-left: 50px;
}

.login-page .password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #7b8a8b;
    cursor: pointer;
}

.login-page .footer-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 13px;
    color: #7b8a8b;
}

.login-page .footer-links a {
    color: #4361ee;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.login-page .footer-links a:hover {
    color: #3a0ca3;
    text-decoration: underline;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@media (max-width: 576px) {
    .login-page .login-container {
        padding: 15px;
        max-width: 95%;
    }
    .login-page .login-card {
        padding: 30px 25px;
    }
    .login-page .logo-image {
        width: 100px;
        height: 100px;
        padding: 15px;
    }
    .login-page .system-name {
        font-size: 24px;
    }
}

@media (max-height: 700px) {
    body.login-page {
        align-items: flex-start;
        padding-top: 30px;
    }
    .login-page .login-container {
        margin-top: 20px;
    }
}
/* ---------- СТРАНИЦА РЕГИСТРАЦИИ ---------- */
body.register-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    position: relative;
    overflow-x: hidden;
}

body.register-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/backgraund_for_enter.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(3px);
    z-index: -2;
}

body.register-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.register-page .register-container {
    max-width: 550px;
    width: 100%;
    padding: 20px;
    z-index: 1;
    animation: fadeIn 0.8s ease-out;
}

.register-page .card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.register-page .card-header {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
    border-radius: 20px 20px 0 0 !important;
    padding: 25px 20px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 600;
    border: none;
}

.register-page .form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.register-page .form-control:focus {
    border-color: #4361ee;
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
    background: white;
}

.register-page .btn-primary {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    border: none;
    color: white;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
    letter-spacing: 0.5px;
}

.register-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.4);
    background: linear-gradient(135deg, #3a0ca3 0%, #4361ee 100%);
}

.register-page .alert {
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.register-page .input-group-text {
    background: #e9ecef;
    border: 2px solid #e9ecef;
    border-left: none;
    border-radius: 0 12px 12px 0;
}

.register-page .input-group .form-control {
    border-right: none;
    border-radius: 12px 0 0 12px;
}

/* Адаптивность */
@media (max-width: 576px) {
    .register-page .register-container {
        padding: 15px;
        max-width: 95%;
    }
    .register-page .card-header {
        font-size: 1.4rem;
        padding: 20px 15px;
    }
}

/* ==========================================================================
   APP REDESIGN SYSTEM
   ========================================================================== */
body.app-shell {
    --primary: #1f5d77;
    --primary-dark: #14344b;
    --secondary: #2f8f83;
    --success: #2f8f83;
    --danger: #bc5a45;
    --warning: #d59a3a;
    --info: #5d8aa6;
    --light: #f8f4ed;
    --dark: #20303c;
    --primary-rgb: 31, 93, 119;
    --success-rgb: 47, 143, 131;
    --danger-rgb: 188, 90, 69;
    --gradient-primary: linear-gradient(135deg, #14344b 0%, #1f5d77 48%, #2f8f83 100%);
    --gradient-success: linear-gradient(135deg, #2f8f83 0%, #3b6c66 100%);
    --card-shadow: 0 18px 38px rgba(15, 37, 52, 0.09);
    --light-bg: #eef2ee;
    --surface-soft: rgba(255, 255, 255, 0.72);
    --surface-strong: rgba(255, 255, 255, 0.86);
    --surface-muted: rgba(20, 52, 75, 0.06);
    --border-soft: rgba(20, 52, 75, 0.1);
    --shadow-strong: 0 28px 55px rgba(15, 37, 52, 0.14);
    --shadow-soft: 0 16px 30px rgba(15, 37, 52, 0.07);
    --crm-font-body: 1rem;
    --crm-font-table-head: 0.88rem;
    --crm-font-table-cell: 0.96rem;
    --crm-font-label: 0.92rem;
    --crm-font-small: 0.82rem;
    --crm-btn-line-height: 1.45;
    --crm-sidebar-link-color: #ffffff;
    --bs-body-bg: #eef2ee;
    --bs-body-color: #263744;
    --bs-primary: #1f5d77;
    --bs-primary-rgb: 31, 93, 119;
    --bs-success: #2f8f83;
    --bs-success-rgb: 47, 143, 131;
    --bs-danger: #bc5a45;
    --bs-danger-rgb: 188, 90, 69;
    --bs-warning: #d59a3a;
    --bs-warning-rgb: 213, 154, 58;
    --bs-info: #5d8aa6;
    --bs-info-rgb: 93, 138, 166;
    --bs-secondary: #6b7c86;
    --bs-secondary-rgb: 107, 124, 134;
    background-color: var(--bs-body-bg);
    background-image:
        linear-gradient(180deg, rgba(244, 239, 231, 0.82) 0%, rgba(237, 242, 238, 0.82) 42%, rgba(238, 243, 246, 0.82) 100%),
        radial-gradient(circle at top left, rgba(47, 143, 131, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(213, 154, 58, 0.16), transparent 22%),
        url('../img/fon.png');
    background-position: center, top left, top right, center top;
    background-size: auto, auto, auto, cover;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
    background-attachment: scroll, scroll, scroll, fixed;
    color: var(--bs-body-color);
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: var(--crm-font-body);
    line-height: 1.45;
    position: relative;
    min-height: 100vh;
}

body.app-shell::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(20, 52, 75, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 52, 75, 0.025) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 80%);
}

body.app-shell .wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-left: 276px;
    box-sizing: border-box;
}

body.app-shell h1,
body.app-shell h2,
body.app-shell h3,
body.app-shell h4,
body.app-shell h5,
body.app-shell h6,
body.app-shell .sidebar-brand-text {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.03em;
}

body.app-shell .sidebar {
    width: 276px;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 26%),
        linear-gradient(180deg, rgba(12, 30, 44, 0.98) 0%, rgba(20, 52, 75, 0.98) 48%, rgba(22, 68, 76, 0.98) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 18px 0 44px rgba(8, 21, 31, 0.28);
}

body.app-shell .sidebar-brand-wrapper {
    padding: 1.6rem 1.2rem 1.3rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 100%);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.app-shell .sidebar-brand-wrapper img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 0.85rem;
}

body.app-shell .sidebar-brand-text {
    font-size: 1.08rem;
    font-weight: 700;
    color: #f6efe2;
}

body.app-shell .sidebar-menu-content {
    padding: 1rem 0.75rem 1.25rem;
}

body.app-shell .sidebar-menu-content .nav-link,
body.app-shell .sidebar .nav-link {
    margin: 0.22rem 0;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid transparent;
    border-left: none;
    color: var(--crm-sidebar-link-color);
    background: transparent;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body.app-shell .sidebar-menu-content .nav-link:hover,
body.app-shell .sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(3px);
}

body.app-shell .sidebar-menu-content .nav-link.active,
body.app-shell .sidebar .nav-link.active,
body.app-shell .nav-link[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(213, 154, 58, 0.18), rgba(47, 143, 131, 0.16));
    border-color: rgba(213, 154, 58, 0.16);
    color: #ffffff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.app-shell .sidebar-menu-content .nav-link i,
body.app-shell .sidebar .nav-link i {
    width: 26px;
    margin-right: 0.8rem;
}

body.app-shell .sidebar-divider {
    margin: 0.9rem 0.8rem;
    border-top-color: rgba(255, 255, 255, 0.12);
}

body.app-shell #warehouseSubmenu,
body.app-shell #helpSubmenu {
    margin: 0.3rem 0.2rem 0.6rem;
    padding: 0.4rem;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.12);
}

body.app-shell #warehouseSubmenu .nav-link,
body.app-shell #helpSubmenu .nav-link {
    padding: 0.72rem 0.9rem;
    margin: 0.18rem 0;
    font-size: 0.92rem;
}

body.app-shell .sidebar-placeholder-link {
    color: rgba(242, 247, 250, 0.88);
}

body.app-shell .sidebar-placeholder-link:hover {
    transform: none;
}

body.app-shell .sidebar-footer {
    padding: 1rem;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.14));
    border-top-color: rgba(255, 255, 255, 0.08);
}

body.app-shell .user-profile-btn {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.app-shell .user-profile-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

body.app-shell .navbar-mobile {
    height: 62px;
    background: rgba(12, 30, 44, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 24px rgba(8, 21, 31, 0.22);
}

body.app-shell .main-content {
    margin-left: 0;
    min-width: 0;
    padding: 26px 28px 32px;
    background: transparent;
}

body.app-shell .main-content > .container,
body.app-shell .main-content > .container-fluid {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    min-width: 0;
    padding: 0 !important;
}

body.app-shell .main-content .row {
    --bs-gutter-x: 1.35rem;
    --bs-gutter-y: 1.35rem;
}

body.app-shell .main-content > .container-fluid > .d-flex.justify-content-between.align-items-center.mb-4:first-child,
body.app-shell .main-content > .container > .d-flex.justify-content-between.align-items-center.mb-4:first-child {
    padding: 1.15rem 1.35rem;
    border-radius: 24px;
    background: var(--surface-soft);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
}

body.app-shell .breadcrumb {
    margin-bottom: 0;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.05);
}

body.app-shell .breadcrumb-item,
body.app-shell .breadcrumb-item a {
    color: #60717d;
}

body.app-shell .breadcrumb-item.active {
    color: var(--primary-dark);
    font-weight: 600;
}

body.app-shell .card,
body.app-shell .custom-card,
body.app-shell .profile-card,
body.app-shell .stat-card {
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    background: var(--surface-strong);
    backdrop-filter: blur(18px);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

body.app-shell .card:hover,
body.app-shell .custom-card:hover,
body.app-shell .profile-card:hover,
body.app-shell .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(31, 93, 119, 0.16);
}

body.app-shell .card-header,
body.app-shell .custom-card .card-header {
    border: 0;
    padding: 1rem 1.35rem;
    background: linear-gradient(135deg, rgba(20, 52, 75, 0.08), rgba(31, 93, 119, 0.04));
    color: var(--primary-dark);
}

body.app-shell .card-header.bg-primary,
body.app-shell .card-header.bg-success,
body.app-shell .card-header.bg-danger,
body.app-shell .card-header.bg-warning,
body.app-shell .card-header.bg-info,
body.app-shell .card-header.bg-secondary,
body.app-shell .custom-card .card-header.bg-primary,
body.app-shell .custom-card .card-header.bg-success,
body.app-shell .custom-card .card-header.bg-danger,
body.app-shell .custom-card .card-header.bg-warning,
body.app-shell .custom-card .card-header.bg-info,
body.app-shell .custom-card .card-header.bg-secondary {
    color: #fff !important;
    border-radius: 24px 24px 0 0 !important;
}

body.app-shell .card-body,
body.app-shell .custom-card .card-body {
    padding: 1.35rem;
}

body.app-shell .form-label {
    color: #314653;
    font-size: var(--crm-font-label);
    line-height: 1.35;
    margin-bottom: 0.55rem;
}

body.app-shell small,
body.app-shell .small,
body.app-shell .text-muted {
    font-size: var(--crm-font-small);
    line-height: 1.4;
}

body.app-shell .form-control,
body.app-shell .form-select,
body.app-shell textarea,
body.app-shell .input-group-text {
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(20, 52, 75, 0.12);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

body.app-shell textarea.form-control {
    min-height: 120px;
}

body.app-shell .input-group-text {
    color: #6a7b86;
    padding: 0 1rem;
}

body.app-shell .form-control:focus,
body.app-shell .form-select:focus,
body.app-shell textarea:focus {
    border-color: rgba(31, 93, 119, 0.45);
    box-shadow: 0 0 0 0.25rem rgba(31, 93, 119, 0.12);
    background: #ffffff;
}

body.app-shell .btn {
    border-radius: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: var(--crm-btn-line-height);
    padding: 0.7rem 1.1rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

body.app-shell .btn:hover {
    transform: translateY(-1px);
}

body.app-shell .btn-primary,
body.app-shell .btn-gradient {
    border: none;
    color: #fff;
    background: var(--gradient-primary);
    box-shadow: 0 14px 24px rgba(31, 93, 119, 0.18);
}

body.app-shell .btn-primary:hover,
body.app-shell .btn-gradient:hover {
    color: #fff;
    box-shadow: 0 18px 28px rgba(31, 93, 119, 0.22);
}

body.app-shell .btn-outline-primary,
body.app-shell .btn-outline-secondary,
body.app-shell .btn-outline-success,
body.app-shell .btn-outline-danger,
body.app-shell .btn-outline-warning,
body.app-shell .btn-outline-info {
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(12px);
}

body.app-shell .btn-group > .btn {
    border-radius: 12px !important;
}

body.app-shell .alert {
    border: 1px solid transparent;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

body.app-shell .alert-success {
    border-color: rgba(47, 143, 131, 0.18);
    background: rgba(47, 143, 131, 0.11);
    color: #1f5f57;
}

body.app-shell .alert-danger {
    border-color: rgba(188, 90, 69, 0.18);
    background: rgba(188, 90, 69, 0.11);
    color: #7a3c2d;
}

body.app-shell .badge,
body.app-shell .status-badge {
    border-radius: 999px;
    padding: 0.5em 0.9em;
    font-weight: 700;
    letter-spacing: 0.01em;
}

body.app-shell .table-responsive {
    border-radius: 22px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.app-shell .table,
body.app-shell .custom-table {
    margin-bottom: 0;
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(31, 93, 119, 0.05);
}

body.app-shell .table thead th,
body.app-shell .custom-table thead th,
body.app-shell #companiesTable thead th {
    padding: 1rem 0.95rem;
    border-bottom: 1px solid rgba(20, 52, 75, 0.1);
    background: rgba(20, 52, 75, 0.06) !important;
    color: var(--primary-dark);
    font-size: var(--crm-font-table-head);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.app-shell .table tbody td,
body.app-shell .custom-table tbody td,
body.app-shell #companiesTable tbody td {
    padding: 0.95rem 0.95rem;
    vertical-align: middle;
    border-color: rgba(20, 52, 75, 0.08);
    font-size: var(--crm-font-table-cell);
    line-height: 1.45;
}

body.app-shell .table tbody tr:hover,
body.app-shell .custom-table tbody tr:hover,
body.app-shell #companiesTable tbody tr:hover {
    background-color: rgba(31, 93, 119, 0.05) !important;
    transform: none;
    box-shadow: none;
}

body.app-shell .pagination .page-link {
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(20, 52, 75, 0.1);
    background: rgba(255, 255, 255, 0.86);
    color: var(--primary-dark);
}

body.app-shell .pagination .page-item.active .page-link {
    border-color: transparent;
    color: #fff;
    background: var(--gradient-primary);
    box-shadow: 0 10px 18px rgba(31, 93, 119, 0.18);
}

body.app-shell .modal-content {
    border: 1px solid rgba(20, 52, 75, 0.12);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 32px 60px rgba(15, 37, 52, 0.16);
}

body.app-shell .modal {
    z-index: 2000;
}

body.app-shell .modal-backdrop {
    z-index: 1990;
    --bs-backdrop-opacity: 0.42;
}

body.app-shell .modal-dialog {
    position: relative;
    z-index: 2001;
}

body.app-shell .modal-header {
    border-bottom: 1px solid rgba(20, 52, 75, 0.08);
    padding: 1rem 1.35rem;
}

body.app-shell .modal-footer {
    border-top: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell .stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 14px 26px rgba(20, 52, 75, 0.08);
}

body.app-shell .notification {
    border-radius: 18px;
    backdrop-filter: blur(16px);
}

body.app-shell .app-footer {
    margin-left: 276px;
    padding: 0 28px 24px;
    background: transparent !important;
}

body.app-shell .app-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.35rem;
    border-radius: 22px;
    color: #f4f6f8;
    background: linear-gradient(135deg, rgba(20, 52, 75, 0.95), rgba(31, 93, 119, 0.95));
    box-shadow: 0 16px 30px rgba(15, 37, 52, 0.18);
}

body.app-shell .app-footer__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

body.app-shell .app-footer__text {
    color: rgba(244, 246, 248, 0.74);
}

body.app-shell .app-footer__links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

body.app-shell .app-footer__links a {
    color: rgba(244, 246, 248, 0.86);
    text-decoration: none;
}

body.app-shell .app-footer__links a:hover {
    color: #ffffff;
}

body.app-shell .settings-shell {
    max-width: 1180px;
}

body.app-shell .settings-layout {
    --bs-gutter-x: 1.5rem;
}

body.app-shell .settings-panel {
    height: 100%;
}

body.app-shell .settings-panel--summary {
    background:
        radial-gradient(circle at top, rgba(47, 143, 131, 0.14), transparent 38%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 252, 253, 0.84));
}

body.app-shell .settings-avatar-wrap {
    position: relative;
    width: 168px;
    height: 168px;
    margin: 0 auto;
}

body.app-shell .settings-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 36px;
    border: 4px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 22px 38px rgba(20, 52, 75, 0.14);
}

body.app-shell .settings-avatar-action {
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    background: var(--gradient-primary);
    box-shadow: 0 12px 20px rgba(31, 93, 119, 0.22);
}

body.app-shell .settings-avatar-action:hover {
    color: #fff;
}

body.app-shell .settings-user-name {
    color: var(--primary-dark);
}

body.app-shell .settings-meta-list {
    display: grid;
    gap: 0.85rem;
    text-align: left;
}

body.app-shell .settings-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: rgba(20, 52, 75, 0.05);
}

body.app-shell .settings-meta-label {
    color: #60717d;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

body.app-shell .settings-helper {
    color: #627480;
    font-size: 0.92rem;
    line-height: 1.65;
}

body.app-shell .settings-note {
    display: inline-flex;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: rgba(31, 93, 119, 0.08);
    color: #315364;
}

@media (max-width: 991.98px) {
    body.app-shell .sidebar {
        width: 280px;
    }

    body.app-shell .wrapper {
        padding-left: 0;
    }

    body.app-shell .main-content,
    body.app-shell .app-footer {
        margin-left: 0;
    }

    body.app-shell .main-content {
        padding: 84px 16px 20px;
    }

    body.app-shell .app-footer {
        padding: 0 16px 18px;
    }

    body.app-shell .app-footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767.98px) {
    body.app-shell .main-content > .container-fluid > .d-flex.justify-content-between.align-items-center.mb-4:first-child,
    body.app-shell .main-content > .container > .d-flex.justify-content-between.align-items-center.mb-4:first-child {
        align-items: flex-start !important;
        gap: 0.75rem;
        flex-direction: column;
    }

    body.app-shell .card,
    body.app-shell .custom-card {
        border-radius: 20px;
    }

    body.app-shell .settings-avatar-wrap {
        width: 144px;
        height: 144px;
    }
}

body.app-shell.dashboard-page {
    background-color: var(--bs-body-bg);
    background-image:
        linear-gradient(180deg, rgba(244, 239, 231, 0.82) 0%, rgba(237, 242, 238, 0.82) 42%, rgba(238, 243, 246, 0.82) 100%),
        radial-gradient(circle at top left, rgba(47, 143, 131, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(213, 154, 58, 0.16), transparent 22%),
        url('../img/fon.png');
    background-position: center, top left, top right, center top;
    background-size: auto, auto, auto, cover;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
    background-attachment: scroll, scroll, scroll, fixed;
}

body.app-shell.dashboard-page::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at top left, rgba(213, 154, 58, 0.2), transparent 28%),
        radial-gradient(circle at bottom right, rgba(31, 93, 119, 0.18), transparent 32%);
}

body.app-shell.dashboard-page .wrapper {
    position: relative;
    z-index: 1;
}

body.app-shell.dashboard-page .sidebar {
    background:
        linear-gradient(180deg, rgba(17, 35, 45, 0.68) 0%, rgba(20, 52, 63, 0.62) 52%, rgba(24, 63, 68, 0.58) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        18px 0 40px rgba(10, 24, 32, 0.16),
        inset -1px 0 0 rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(26px) saturate(155%);
}

body.app-shell.dashboard-page .sidebar-brand-wrapper {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
    border-bottom-color: rgba(255, 255, 255, 0.14);
}

body.app-shell.dashboard-page .sidebar-brand-text {
    color: #f8fbfc;
    text-shadow: 0 1px 10px rgba(6, 12, 16, 0.18);
}

body.app-shell.dashboard-page .sidebar-menu-content {
    padding: 1rem 0.8rem 1.3rem;
}

body.app-shell.dashboard-page .sidebar .nav-link,
body.app-shell.dashboard-page .sidebar-menu-content .nav-link {
    color: var(--crm-sidebar-link-color);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.app-shell.dashboard-page .sidebar .nav-link:hover,
body.app-shell.dashboard-page .sidebar-menu-content .nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.12);
}

body.app-shell.dashboard-page .sidebar .nav-link.active,
body.app-shell.dashboard-page .sidebar-menu-content .nav-link.active,
body.app-shell.dashboard-page .nav-link[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(213, 154, 58, 0.16), rgba(47, 143, 131, 0.16));
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 10px 18px rgba(12, 29, 38, 0.08);
}

body.app-shell.dashboard-page .sidebar-divider {
    border-top-color: rgba(255, 255, 255, 0.16);
}

body.app-shell.dashboard-page #warehouseSubmenu,
body.app-shell.dashboard-page #helpSubmenu {
    background: rgba(6, 14, 18, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.app-shell.dashboard-page .sidebar-footer {
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.16));
    border-top-color: rgba(255, 255, 255, 0.14);
}

body.app-shell.dashboard-page .user-profile-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.app-shell.dashboard-page .main-content,
body.app-shell.dashboard-page .app-footer {
    flex: 1 1 auto;
    width: auto;
    margin-left: 0;
}

body.app-shell.dashboard-page .main-content {
    padding: 26px 28px 22px;
}

body.app-shell.dashboard-page .app-footer {
    padding-top: 0;
}

body.app-shell.dashboard-page .app-footer__inner {
    background: linear-gradient(135deg, rgba(20, 52, 75, 0.78), rgba(31, 93, 119, 0.72));
    backdrop-filter: blur(22px);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

body.app-shell.dashboard-page .dashboard-shell {
    display: grid;
    gap: 1.35rem;
}

body.app-shell.dashboard-page .dashboard-mini-row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

body.app-shell.dashboard-page .dashboard-hero.custom-card,
body.app-shell.dashboard-page .dashboard-stat-card.custom-card,
body.app-shell.dashboard-page .dashboard-panel.custom-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.46), rgba(247, 250, 251, 0.2));
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.38),
        0 22px 40px rgba(18, 42, 56, 0.12);
    backdrop-filter: blur(28px) saturate(150%);
}

body.app-shell.dashboard-page .dashboard-hero {
    position: relative;
    overflow: hidden;
    padding: 1.8rem;
    border-radius: 32px;
}

body.app-shell.dashboard-page .dashboard-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.42), transparent 36%),
        radial-gradient(circle at bottom right, rgba(31, 93, 119, 0.14), transparent 34%);
    pointer-events: none;
}

body.app-shell.dashboard-page .dashboard-hero__layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
    gap: 1.35rem;
    align-items: stretch;
}

body.app-shell.dashboard-page .dashboard-hero__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.3rem;
}

body.app-shell.dashboard-page .dashboard-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #5e7481;
}

body.app-shell.dashboard-page .dashboard-hero__eyebrow-mark {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(213, 154, 58, 0.95), rgba(31, 93, 119, 0.95));
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.32);
}

body.app-shell.dashboard-page .dashboard-hero__title {
    font-size: clamp(2rem, 3vw, 2.8rem);
    color: #16384d;
}

body.app-shell.dashboard-page .dashboard-hero__text {
    max-width: 760px;
    color: #526570;
    font-size: 1.02rem;
    line-height: 1.7;
}

body.app-shell.dashboard-page .dashboard-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

body.app-shell.dashboard-page .dashboard-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.72rem 1rem;
    border-radius: 999px;
    color: #234557;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.44);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
    backdrop-filter: blur(18px);
}

body.app-shell.dashboard-page .dashboard-hero__summary {
    display: grid;
    gap: 1rem;
}

body.app-shell.dashboard-page .dashboard-focus-card,
body.app-shell.dashboard-page .dashboard-mini-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 24px;
    color: #f7fbfd;
    background: linear-gradient(160deg, rgba(14, 38, 53, 0.82), rgba(31, 93, 119, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 32px rgba(15, 37, 52, 0.18);
}

body.app-shell.dashboard-page .dashboard-focus-card {
    min-height: 196px;
    padding: 1.45rem;
}

body.app-shell.dashboard-page .dashboard-focus-card__label,
body.app-shell.dashboard-page .dashboard-mini-panel__label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(247, 251, 253, 0.72);
}

body.app-shell.dashboard-page .dashboard-focus-card__value {
    margin-top: 0.7rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.6rem, 4vw, 3.4rem);
    line-height: 1;
}

body.app-shell.dashboard-page .dashboard-focus-card__caption {
    margin-top: 0.55rem;
    color: rgba(247, 251, 253, 0.78);
}

body.app-shell.dashboard-page .dashboard-focus-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

body.app-shell.dashboard-page .dashboard-mini-panel {
    min-height: 120px;
    padding: 1.1rem 1.2rem;
}

body.app-shell.dashboard-page .dashboard-mini-panel strong {
    margin-top: 0.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    line-height: 1.1;
}

body.app-shell.dashboard-page .dashboard-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.3rem;
    border-radius: 28px;
}

body.app-shell.dashboard-page .dashboard-stat-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 16px 28px rgba(15, 37, 52, 0.12);
}

body.app-shell.dashboard-page .dashboard-stat-card__icon.employees {
    background: linear-gradient(135deg, rgba(31, 93, 119, 0.9), rgba(51, 122, 152, 0.95));
}

body.app-shell.dashboard-page .dashboard-stat-card__icon.companies {
    background: linear-gradient(135deg, rgba(47, 143, 131, 0.88), rgba(74, 174, 165, 0.96));
}

body.app-shell.dashboard-page .dashboard-stat-card__icon.warning {
    background: linear-gradient(135deg, rgba(213, 154, 58, 0.92), rgba(233, 186, 88, 0.96));
}

body.app-shell.dashboard-page .dashboard-stat-card__icon.danger {
    background: linear-gradient(135deg, rgba(188, 90, 69, 0.92), rgba(221, 112, 88, 0.97));
}

body.app-shell.dashboard-page .dashboard-stat-card__label {
    display: block;
    margin-bottom: 0.22rem;
    color: #667b86;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

body.app-shell.dashboard-page .dashboard-stat-card__value {
    margin: 0;
    color: #17384d;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
}

body.app-shell.dashboard-page .dashboard-stat-card__meta {
    color: #61737f;
    line-height: 1.55;
}

body.app-shell.dashboard-page .dashboard-panel {
    border-radius: 30px;
}

body.app-shell.dashboard-page .dashboard-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.35rem 0 -0.15rem;
}

body.app-shell.dashboard-page .dashboard-section-heading h2 {
    margin: 0;
    color: #173b4f;
    font-size: 1.22rem;
    font-weight: 800;
}

body.app-shell.dashboard-page .dashboard-section-heading p {
    margin: 0.2rem 0 0;
    color: #6d7f8a;
    font-size: 0.88rem;
}

body.app-shell.dashboard-page .dashboard-section-heading--sales {
    margin-top: 0.65rem;
}

body.app-shell.dashboard-page .dashboard-panel .card-header {
    padding: 1.35rem 1.35rem 0.5rem;
    background: transparent;
}

body.app-shell.dashboard-page .dashboard-panel__subtitle {
    color: #647883;
    font-size: 0.92rem;
}

body.app-shell.dashboard-page .dashboard-panel .card-body {
    padding: 0.8rem 1.35rem 1.35rem;
}

body.app-shell.dashboard-page .dashboard-column-row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

body.app-shell.dashboard-page .dashboard-panel--chart-column .card-header {
    padding: 0.92rem 0.95rem 0.2rem;
}

body.app-shell.dashboard-page .dashboard-panel--chart-column .card-body {
    padding: 0.35rem 0.95rem 0.8rem;
}

body.app-shell.dashboard-page .dashboard-panel--chart-column .dashboard-panel__subtitle {
    font-size: 0.76rem;
}

body.app-shell.dashboard-page .dashboard-panel--chart-column h5 {
    font-size: 0.98rem;
}

body.app-shell.dashboard-page .dashboard-panel--compact .card-header {
    padding: 0.82rem 0.9rem 0.18rem;
}

body.app-shell.dashboard-page .dashboard-panel--compact .card-body {
    padding: 0.4rem 0.9rem 0.7rem;
}

body.app-shell.dashboard-page .dashboard-panel--compact .dashboard-panel__subtitle {
    display: none;
}

body.app-shell.dashboard-page .dashboard-panel--compact h5 {
    font-size: 0.95rem;
}

body.app-shell.dashboard-page .dashboard-chart-wrap {
    position: relative;
    width: 100%;
}

body.app-shell.dashboard-page .dashboard-chart-wrap--large {
    min-height: 320px;
}

body.app-shell.dashboard-page .dashboard-chart-wrap--compact {
    min-height: 220px;
}

body.app-shell.dashboard-page .dashboard-panel--chart-column .dashboard-chart-wrap--compact {
    min-height: 118px;
    max-height: 118px;
}

body.app-shell.dashboard-page .dashboard-panel--compact.dashboard-panel--chart-column .dashboard-chart-wrap--compact {
    min-height: 84px;
    max-height: 84px;
}

body.app-shell.dashboard-page .dashboard-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

body.app-shell.dashboard-page .dashboard-table-card .card-header {
    padding-bottom: 0.8rem;
}

body.app-shell.dashboard-page .dashboard-table-shell {
    padding: 0 1rem 1rem;
}

body.app-shell.dashboard-page .dashboard-table-shell .table-responsive {
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.36);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(30px) saturate(155%);
}

body.app-shell.dashboard-page .dashboard-table-shell .custom-table {
    box-shadow: none;
}

body.app-shell.dashboard-page .dashboard-table-shell .custom-table thead th {
    background: rgba(255, 255, 255, 0.22) !important;
    border-bottom-color: rgba(20, 52, 75, 0.12);
    color: #16384d;
}

body.app-shell.dashboard-page .dashboard-table-shell .custom-table tbody td {
    background: rgba(255, 255, 255, 0.04);
}

body.app-shell.dashboard-page .dashboard-table-shell .custom-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

body.app-shell.dashboard-page .dashboard-table-shell .custom-table a {
    color: #1d617b;
}

body.app-shell.dashboard-page .dashboard-status-list {
    display: grid;
    gap: 0.8rem;
}

body.app-shell.dashboard-page .dashboard-status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    color: #244658;
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.36);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

body.app-shell.dashboard-page .dashboard-panel--compact .dashboard-status-list {
    gap: 0.35rem;
    margin-bottom: 0.5rem !important;
}

body.app-shell.dashboard-page .dashboard-panel--compact .dashboard-status-item {
    padding: 0.5rem 0.68rem;
    border-radius: 13px;
    font-size: 0.8rem;
}

body.app-shell.dashboard-page .dashboard-status-item strong {
    color: #16384d;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    line-height: 1;
}

body.app-shell.dashboard-page .dashboard-panel--compact .dashboard-status-item strong {
    font-size: 0.9rem;
}

body.app-shell.dashboard-page .dashboard-actions {
    display: grid;
    gap: 0.85rem;
}

body.app-shell.dashboard-page .dashboard-actions .btn {
    min-height: 54px;
    justify-content: flex-start;
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

body.app-shell.dashboard-page .dashboard-panel--compact .dashboard-actions {
    gap: 0.38rem;
}

body.app-shell.dashboard-page .dashboard-panel--compact .dashboard-actions .btn {
    min-height: 34px;
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    border-radius: 10px;
}

body.app-shell.dashboard-page .dashboard-panel--actions .dashboard-actions .btn {
    text-align: left;
}

body.app-shell.dashboard-page .dashboard-birthday-group {
    display: grid;
    gap: 0.42rem;
}

body.app-shell.dashboard-page .dashboard-birthday-table-wrap {
    max-height: 220px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid rgba(31, 93, 119, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.38);
}

body.app-shell.dashboard-page .dashboard-birthday-table {
    width: 100%;
    min-width: 420px;
    border-collapse: collapse;
    font-size: 0.68rem;
    line-height: 1.18;
}

body.app-shell.dashboard-page .dashboard-birthday-table th,
body.app-shell.dashboard-page .dashboard-birthday-table td {
    padding: 0.34rem 0.42rem;
    border-bottom: 1px solid rgba(31, 93, 119, 0.1);
    vertical-align: top;
}

body.app-shell.dashboard-page .dashboard-birthday-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #edf5f8;
    color: #173b4f;
    font-size: 0.63rem;
    font-weight: 800;
    text-transform: uppercase;
}

body.app-shell.dashboard-page .dashboard-birthday-table td {
    color: #425866;
}

body.app-shell.dashboard-page .dashboard-birthday-table a {
    color: #173b4f;
    font-weight: 800;
    text-decoration: none;
}

body.app-shell.dashboard-page .dashboard-birthday-table a:hover {
    color: #1f5d77;
}

body.app-shell.dashboard-page .dashboard-birthday-table .badge {
    font-size: 0.58rem;
    line-height: 1;
    white-space: nowrap;
}

body.app-shell.dashboard-page .dashboard-birthday-empty {
    color: #82939c;
    text-align: center;
}

body.app-shell.dashboard-page .dashboard-birthday-group > strong {
    color: #173b4f;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.app-shell.dashboard-page .dashboard-person-link {
    display: block;
    padding: 0.52rem 0.62rem;
    border: 1px solid rgba(31, 93, 119, 0.12);
    border-radius: 8px;
    color: #173b4f;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
    background: #f8fbfc;
}

body.app-shell.dashboard-page .dashboard-person-link:hover {
    border-color: rgba(31, 93, 119, 0.28);
    color: #1f5d77;
}

body.app-shell.dashboard-page .dashboard-person-link span {
    display: block;
    margin-top: 0.12rem;
    color: #6d7f8a;
    font-size: 0.74rem;
    font-weight: 600;
}

body.app-shell.dashboard-page .dashboard-empty-line {
    color: #82939c;
    font-size: 0.82rem;
}

body.app-shell.dashboard-page .dashboard-money-value {
    color: #173b4f;
    font-size: 1.85rem;
    font-weight: 900;
    line-height: 1.05;
}

@media (max-width: 1199.98px) {
    body.app-shell.dashboard-page .dashboard-hero__layout {
        grid-template-columns: 1fr;
    }

    body.app-shell.dashboard-page .dashboard-focus-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    body.app-shell.dashboard-page .main-content,
    body.app-shell.dashboard-page .app-footer {
        flex: 0 0 100%;
        width: 100%;
        margin-left: 0;
    }

    body.app-shell.dashboard-page .main-content {
        padding: 84px 16px 20px;
    }

    body.app-shell.dashboard-page .app-footer {
        padding: 0 16px 18px;
    }
}

@media (max-width: 767.98px) {
    body.app-shell.dashboard-page .dashboard-hero {
        padding: 1.25rem;
        border-radius: 26px;
    }

    body.app-shell.dashboard-page .dashboard-hero__header {
        flex-direction: column;
    }

    body.app-shell.dashboard-page .dashboard-focus-grid {
        grid-template-columns: 1fr;
    }

    body.app-shell.dashboard-page .dashboard-stat-card {
        align-items: flex-start;
    }

    body.app-shell.dashboard-page .dashboard-chart-wrap--large {
        min-height: 260px;
    }

    body.app-shell.dashboard-page .dashboard-chart-wrap--compact {
        min-height: 200px;
    }

    body.app-shell.dashboard-page .dashboard-panel--chart-column .dashboard-chart-wrap--compact {
        min-height: 132px;
        max-height: none;
    }

    body.app-shell.dashboard-page .dashboard-panel--compact.dashboard-panel--chart-column .dashboard-chart-wrap--compact {
        min-height: 132px;
        max-height: none;
    }

    body.app-shell.dashboard-page .dashboard-table-shell {
        padding: 0 0.75rem 0.75rem;
    }

    body.app-shell.dashboard-page .dashboard-status-item {
        align-items: flex-start;
        flex-direction: column;
    }
}

body.app-shell.news-page {
    background-color: var(--bs-body-bg);
    background-image:
        linear-gradient(180deg, rgba(244, 239, 231, 0.82) 0%, rgba(237, 242, 238, 0.82) 42%, rgba(238, 243, 246, 0.82) 100%),
        radial-gradient(circle at top left, rgba(47, 143, 131, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(213, 154, 58, 0.16), transparent 22%),
        url('../img/fon.png');
    background-position: center, top left, top right, center top;
    background-size: auto, auto, auto, cover;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
    background-attachment: scroll, scroll, scroll, fixed;
}

body.app-shell.news-page::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at top left, rgba(47, 143, 131, 0.18), transparent 26%),
        radial-gradient(circle at top right, rgba(213, 154, 58, 0.16), transparent 28%);
}

body.app-shell.news-page .wrapper {
    position: relative;
    z-index: 1;
}

body.app-shell.news-page .sidebar {
    background:
        linear-gradient(180deg, rgba(16, 35, 45, 0.74) 0%, rgba(19, 51, 66, 0.68) 54%, rgba(26, 68, 72, 0.62) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow:
        18px 0 40px rgba(10, 24, 32, 0.14),
        inset -1px 0 0 rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(26px) saturate(155%);
}

body.app-shell.news-page .sidebar-brand-wrapper {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
    border-bottom-color: rgba(255, 255, 255, 0.14);
}

body.app-shell.news-page .sidebar-brand-text {
    color: #f8fbfc;
}

body.app-shell.news-page .sidebar .nav-link,
body.app-shell.news-page .sidebar-menu-content .nav-link {
    color: var(--crm-sidebar-link-color);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

body.app-shell.news-page .sidebar .nav-link:hover,
body.app-shell.news-page .sidebar-menu-content .nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.12);
}

body.app-shell.news-page .sidebar .nav-link.active,
body.app-shell.news-page .sidebar-menu-content .nav-link.active,
body.app-shell.news-page .nav-link[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(47, 143, 131, 0.16), rgba(213, 154, 58, 0.16));
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 18px rgba(12, 29, 38, 0.08);
}

body.app-shell.news-page .sidebar-divider {
    border-top-color: rgba(255, 255, 255, 0.16);
}

body.app-shell.news-page #warehouseSubmenu,
body.app-shell.news-page #helpSubmenu {
    background: rgba(6, 14, 18, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.app-shell.news-page .sidebar-footer {
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.16));
    border-top-color: rgba(255, 255, 255, 0.14);
}

body.app-shell.news-page .user-profile-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}

body.app-shell.news-page .main-content {
    padding: 26px 28px 28px;
}

body.app-shell.news-page .news-shell {
    display: grid;
    gap: 1.35rem;
}

body.app-shell.news-page .news-hero,
body.app-shell.news-page .news-post,
body.app-shell.news-page .news-side-card,
body.app-shell.news-page .news-empty-state {
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.48), rgba(247, 250, 251, 0.22));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.36),
        0 22px 40px rgba(18, 42, 56, 0.12);
    backdrop-filter: blur(28px) saturate(150%);
}

body.app-shell.news-page .news-hero {
    padding: 1.8rem;
    border-radius: 32px;
    overflow: hidden;
}

body.app-shell.news-page .news-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
    gap: 1.25rem;
    align-items: stretch;
}

body.app-shell.news-page .news-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #5e7481;
}

body.app-shell.news-page .news-hero__eyebrow-mark {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(47, 143, 131, 0.95), rgba(213, 154, 58, 0.95));
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.3);
}

body.app-shell.news-page .news-hero__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

body.app-shell.news-page .news-hero__title {
    font-size: clamp(2rem, 3vw, 2.8rem);
    color: #16384d;
}

body.app-shell.news-page .news-hero__text {
    max-width: 760px;
    color: #526570;
    font-size: 1.02rem;
    line-height: 1.7;
}

body.app-shell.news-page .news-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-top: 1.4rem;
}

body.app-shell.news-page .news-hero__hint {
    display: inline-flex;
    align-items: center;
    padding: 0.78rem 1rem;
    border-radius: 999px;
    color: #32515f;
    background: rgba(255, 255, 255, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.42);
}

body.app-shell.news-page .news-create-btn {
    min-height: 52px;
}

body.app-shell.news-page .news-hero__stats {
    display: grid;
    gap: 1rem;
}

body.app-shell.news-page .news-stat-card,
body.app-shell.news-page .news-mini-stat {
    border-radius: 24px;
    color: #f7fbfd;
    background: linear-gradient(160deg, rgba(14, 38, 53, 0.82), rgba(31, 93, 119, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 32px rgba(15, 37, 52, 0.18);
}

body.app-shell.news-page .news-stat-card {
    min-height: 172px;
    padding: 1.4rem;
}

body.app-shell.news-page .news-stat-card__label,
body.app-shell.news-page .news-mini-stat__label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(247, 251, 253, 0.72);
}

body.app-shell.news-page .news-stat-card__value {
    display: block;
    margin-top: 0.7rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.7rem, 4vw, 3.4rem);
    line-height: 1;
}

body.app-shell.news-page .news-stat-card__meta {
    display: block;
    margin-top: 0.5rem;
    color: rgba(247, 251, 253, 0.78);
}

body.app-shell.news-page .news-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

body.app-shell.news-page .news-mini-stat {
    padding: 1rem 1.1rem;
}

body.app-shell.news-page .news-mini-stat strong {
    display: block;
    margin-top: 0.45rem;
    font-size: 1.08rem;
    line-height: 1.4;
}

body.app-shell.news-page .news-mini-stat--wide {
    grid-column: 1 / -1;
}

body.app-shell.news-page .news-feed {
    display: grid;
    gap: 1.15rem;
}

body.app-shell.news-page .news-feed-column,
body.app-shell.news-page .news-side-column {
    width: 100%;
}

body.app-shell.news-page .news-post {
    border-radius: 28px;
    overflow: hidden;
}

body.app-shell.news-page .news-post__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(20, 52, 75, 0.82), rgba(31, 93, 119, 0.74));
}

body.app-shell.news-page .news-author {
    display: flex;
    align-items: center;
    gap: 0.95rem;
}

body.app-shell.news-page .news-author__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.22);
}

body.app-shell.news-page .news-author__meta h6 {
    color: #fff;
}

body.app-shell.news-page .news-author__subline {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.82rem;
}

body.app-shell.news-page .news-author__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}

body.app-shell.news-page .news-post__menu {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
}

body.app-shell.news-page .news-post__body {
    padding: 1.4rem 1.35rem;
}

body.app-shell.news-page .news-post--with-image .news-post__body {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 1rem;
    scrollbar-width: thin;
}

body.app-shell.news-page .news-post--with-image .news-post__body::-webkit-scrollbar {
    width: 8px;
}

body.app-shell.news-page .news-post--with-image .news-post__body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.18);
}

body.app-shell.news-page .news-post__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #315364;
    background: rgba(31, 93, 119, 0.08);
    margin-bottom: 0.85rem;
}

body.app-shell.news-page .news-post__title {
    margin-bottom: 0.95rem;
    font-size: clamp(1.4rem, 2.2vw, 1.85rem);
    color: #16384d;
}

body.app-shell.news-page .news-post__content {
    color: #445965;
    line-height: 1.75;
}

body.app-shell.news-page .news-post__figure {
    margin: 1.1rem 0 0;
    min-height: 240px;
    max-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(20, 52, 75, 0.08), rgba(255, 255, 255, 0.36));
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

body.app-shell.news-page .news-post__image {
    width: 100%;
    height: clamp(220px, 28vh, 280px);
    max-height: 280px;
    object-fit: contain;
    object-position: center center;
    border-radius: 18px;
    box-shadow: 0 18px 28px rgba(15, 37, 52, 0.14);
}

body.app-shell.news-page .news-post__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.35rem 1rem;
}

body.app-shell.news-page .news-post__reactions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

body.app-shell.news-page .news-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.62rem 0.9rem;
    border-radius: 999px;
    text-decoration: none;
    color: #244658;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(20, 52, 75, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

body.app-shell.news-page .news-post__summary {
    color: #667983;
    font-size: 0.9rem;
}

body.app-shell.news-page .news-comments {
    padding: 1.15rem 1.35rem 1.35rem;
    background: rgba(255, 255, 255, 0.22);
    border-top: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.news-page .news-comments__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: #536873;
}

body.app-shell.news-page .news-comments__header span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    border-radius: 999px;
    background: rgba(31, 93, 119, 0.08);
    color: #234557;
    font-weight: 700;
}

body.app-shell.news-page .news-comments__list {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

body.app-shell.news-page .news-comment,
body.app-shell.news-page .news-reply {
    display: flex;
    gap: 0.75rem;
}

body.app-shell.news-page .news-comment__avatar,
body.app-shell.news-page .news-reply__avatar {
    border-radius: 50%;
    object-fit: cover;
}

body.app-shell.news-page .news-comment__avatar {
    width: 36px;
    height: 36px;
}

body.app-shell.news-page .news-reply {
    margin-top: 0.7rem;
    margin-left: 2.4rem;
}

body.app-shell.news-page .news-reply__avatar {
    width: 28px;
    height: 28px;
}

body.app-shell.news-page .news-comment__body,
body.app-shell.news-page .news-reply__body {
    flex: 1;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

body.app-shell.news-page .news-comment__body {
    padding: 0.8rem 0.95rem;
}

body.app-shell.news-page .news-reply__body {
    padding: 0.68rem 0.8rem;
    background: rgba(255, 255, 255, 0.4);
}

body.app-shell.news-page .news-comment__meta,
body.app-shell.news-page .news-reply__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

body.app-shell.news-page .news-comment__author,
body.app-shell.news-page .news-reply__author {
    color: #22485a;
    font-weight: 700;
}

body.app-shell.news-page .news-comment__time,
body.app-shell.news-page .news-reply__time {
    color: #7b8c95;
    font-size: 0.75rem;
}

body.app-shell.news-page .news-comment__text,
body.app-shell.news-page .news-reply__text {
    margin: 0;
    color: #445965;
    line-height: 1.6;
}

body.app-shell.news-page .news-comment__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.7rem;
    flex-wrap: wrap;
}

body.app-shell.news-page .news-comment__reactions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

body.app-shell.news-page .news-comment__actions .btn,
body.app-shell.news-page .news-inline-form__submit,
body.app-shell.news-page .news-comment-form__submit {
    min-height: 38px;
}

body.app-shell.news-page .news-inline-form,
body.app-shell.news-page .news-comment-form {
    display: flex;
    gap: 0.65rem;
}

body.app-shell.news-page .news-inline-form__input,
body.app-shell.news-page .news-comment-form__input {
    background: rgba(255, 255, 255, 0.74);
}

body.app-shell.news-page .news-comment-form__submit {
    min-width: 46px;
}

body.app-shell.news-page .news-side-stack {
    display: grid;
    gap: 1rem;
    position: sticky;
    top: 24px;
}

body.app-shell.news-page .news-side-card {
    border-radius: 26px;
}

body.app-shell.news-page .news-side-card .card-header {
    padding: 1rem 1.15rem 0.3rem;
    background: transparent;
}

body.app-shell.news-page .news-side-card .card-body {
    padding: 0.85rem 1.15rem 1.15rem;
}

body.app-shell.news-page .news-side-card--cta .card-body {
    padding: 1.25rem;
}

body.app-shell.news-page .news-side-card__eyebrow {
    display: inline-flex;
    margin-bottom: 0.75rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #315364;
    background: rgba(31, 93, 119, 0.08);
}

body.app-shell.news-page .news-side-card__title {
    margin-bottom: 0.55rem;
    color: #16384d;
}

body.app-shell.news-page .news-side-card__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

body.app-shell.news-page .news-side-card__counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 34px;
    padding: 0 0.8rem;
    border-radius: 999px;
    background: rgba(31, 93, 119, 0.08);
    color: #16384d;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

body.app-shell.news-page .news-side-card__text {
    margin-bottom: 1rem;
    color: #5c707b;
    line-height: 1.7;
}

body.app-shell.news-page .news-side-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(20, 52, 75, 0.08);
    color: #536873;
}

body.app-shell.news-page .news-side-metric:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

body.app-shell.news-page .news-side-metric strong {
    color: #16384d;
    font-family: 'Space Grotesk', sans-serif;
}

body.app-shell.news-page .news-side-list {
    margin: 0;
    padding-left: 1.15rem;
    color: #536873;
    display: grid;
    gap: 0.7rem;
    line-height: 1.65;
}

body.app-shell.news-page .news-side-empty {
    display: grid;
    justify-items: start;
    gap: 0.75rem;
    padding-top: 0.3rem;
    color: #60727d;
}

body.app-shell.news-page .news-side-empty i {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #1f5d77;
    background: rgba(31, 93, 119, 0.1);
}

body.app-shell.news-page .news-birthday-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}

body.app-shell.news-page .news-birthday-overview__item {
    padding: 0.75rem 0.85rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.news-page .news-birthday-overview__item span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #74868f;
}

body.app-shell.news-page .news-birthday-overview__item strong {
    color: #16384d;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
}

body.app-shell.news-page .news-entity-list {
    display: grid;
    gap: 0.85rem;
    padding-right: 0.3rem;
}

body.app-shell.news-page .news-entity-list--team,
body.app-shell.news-page .news-entity-list--clients {
    max-height: 520px;
    overflow-y: auto;
    scrollbar-width: thin;
}

body.app-shell.news-page .news-entity-list--team::-webkit-scrollbar,
body.app-shell.news-page .news-entity-list--clients::-webkit-scrollbar {
    width: 8px;
}

body.app-shell.news-page .news-entity-list--team::-webkit-scrollbar-thumb,
body.app-shell.news-page .news-entity-list--clients::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.18);
}

body.app-shell.news-page .news-entity-list--team:not(.is-expanded) .news-entity-card:nth-child(n + 6) {
    display: none;
}

body.app-shell.news-page .news-entity-card {
    padding: 0.95rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

body.app-shell.news-page .news-entity-card__top {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

body.app-shell.news-page .news-entity-card__avatar {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(20, 52, 75, 0.08);
}

body.app-shell.news-page .news-entity-card__main {
    min-width: 0;
    flex: 1;
    display: grid;
    gap: 0.38rem;
}

body.app-shell.news-page .news-entity-card__headline {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

body.app-shell.news-page .news-entity-card__name {
    color: #17394d;
    font-weight: 700;
    line-height: 1.35;
}

body.app-shell.news-page .news-entity-card__tag {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(31, 93, 119, 0.08);
    color: #315364;
    font-size: 0.72rem;
    font-weight: 700;
}

body.app-shell.news-page .news-entity-card__contact {
    color: #45606d;
    text-decoration: none;
    font-size: 0.88rem;
    line-height: 1.5;
    word-break: break-word;
}

body.app-shell.news-page .news-entity-card__contact:hover {
    color: #1f5d77;
}

body.app-shell.news-page .news-entity-card__contact.is-muted {
    color: #8a98a1;
}

body.app-shell.news-page .news-entity-card__meta {
    color: #6c7f89;
    font-size: 0.82rem;
    line-height: 1.5;
    word-break: break-word;
}

body.app-shell.news-page .news-entity-card__footer {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

body.app-shell.news-page .news-entity-card__action {
    width: 100%;
    margin-top: 0.85rem;
}

body.app-shell.news-page .news-birthday-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

body.app-shell.news-page .news-birthday-pill--today {
    background: rgba(47, 143, 131, 0.16);
    color: #1b6a5f;
}

body.app-shell.news-page .news-birthday-pill--soon {
    background: rgba(213, 154, 58, 0.18);
    color: #946321;
}

body.app-shell.news-page .news-birthday-pill--later {
    background: rgba(31, 93, 119, 0.12);
    color: #245269;
}

body.app-shell.news-page .news-birthday-pill--empty {
    background: rgba(110, 128, 138, 0.14);
    color: #5f727c;
}

body.app-shell.news-page .news-side-toggle {
    width: 100%;
    margin-top: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border-radius: 16px;
    border: 1px solid rgba(20, 52, 75, 0.1);
    background: rgba(255, 255, 255, 0.62);
    color: #234557;
}

body.app-shell.news-page .news-side-toggle:hover {
    background: rgba(255, 255, 255, 0.78);
    color: #16384d;
}

body.app-shell.news-page .news-side-note {
    margin-top: 0.9rem;
    padding: 0.8rem 0.95rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(20, 52, 75, 0.08);
    color: #5d707b;
    font-size: 0.86rem;
    line-height: 1.55;
}

body.app-shell.news-page .news-empty-state {
    padding: 2rem;
    text-align: center;
    border-radius: 28px;
}

body.app-shell.news-page .news-empty-state__icon {
    width: 82px;
    height: 82px;
    margin: 0 auto 1rem;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #1f5d77;
    background: rgba(31, 93, 119, 0.1);
}

body.app-shell.news-page .overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 17, 24, 0.42);
    backdrop-filter: blur(8px);
    z-index: 1040;
    display: none;
}

body.app-shell.news-page .overlay.show {
    display: block;
}

body.app-shell.news-page .news-panel {
    position: fixed;
    top: 18px;
    right: 18px;
    bottom: 18px;
    width: min(560px, calc(100vw - 36px));
    background: rgba(247, 250, 252, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 30px;
    box-shadow: 0 32px 60px rgba(12, 29, 38, 0.22);
    backdrop-filter: blur(28px) saturate(145%);
    z-index: 1050;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateX(calc(100% + 32px));
    opacity: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body.app-shell.news-page .news-panel.open {
    transform: translateX(0);
    opacity: 1;
}

body.app-shell.news-page .news-panel-header {
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    background: linear-gradient(135deg, rgba(20, 52, 75, 0.9), rgba(31, 93, 119, 0.82));
}

body.app-shell.news-page .news-panel-body {
    padding: 1.2rem;
    flex: 1;
    overflow-y: auto;
}

body.app-shell.news-page .news-panel-footer {
    padding: 1rem 1.2rem 1.2rem;
    border-top: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.52);
}

body.app-shell.news-page .close-panel {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
}

body.app-shell.news-page .editor-wrapper {
    position: relative;
    border: 1px solid rgba(20, 52, 75, 0.12);
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.8);
}

body.app-shell.news-page .custom-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.8rem;
    background: rgba(20, 52, 75, 0.04);
    border-bottom: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.news-page .custom-editor-toolbar button,
body.app-shell.news-page .custom-editor-toolbar select,
body.app-shell.news-page .color-picker-input {
    min-height: 38px;
    padding: 0.45rem 0.65rem;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(20, 52, 75, 0.12);
    border-radius: 12px;
    cursor: pointer;
}

body.app-shell.news-page .custom-editor-content {
    min-height: 240px;
    padding: 1rem;
    line-height: 1.65;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.74);
    outline: none;
}

body.app-shell.news-page .custom-editor-content:empty::before {
    content: attr(placeholder);
    color: #8a9aa4;
}

body.app-shell.news-page .emoji-picker {
    position: absolute;
    right: 0.9rem;
    bottom: calc(100% + 0.5rem);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(20, 52, 75, 0.12);
    border-radius: 18px;
    padding: 0.7rem;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.35rem;
    z-index: 1100;
    max-width: 280px;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 20px 30px rgba(12, 29, 38, 0.12);
}

body.app-shell.news-page .emoji-btn {
    font-size: 1.15rem;
    cursor: pointer;
    padding: 0.3rem;
    text-align: center;
    border-radius: 10px;
}

body.app-shell.news-page .emoji-btn:hover {
    background: rgba(31, 93, 119, 0.08);
}

@media (min-width: 1200px) {
    body.app-shell.news-page .news-feed-column {
        flex: 0 0 69.5%;
        max-width: 69.5%;
    }

    body.app-shell.news-page .news-side-column {
        flex: 0 0 30.5%;
        max-width: 30.5%;
    }
}

@media (max-width: 1199.98px) {
    body.app-shell.news-page .news-hero__layout {
        grid-template-columns: 1fr;
    }

    body.app-shell.news-page .news-side-stack {
        position: static;
    }
}

@media (max-width: 991.98px) {
    body.app-shell.news-page .main-content {
        padding: 84px 16px 20px;
    }
}

@media (max-width: 767.98px) {
    body.app-shell.news-page .news-hero {
        padding: 1.25rem;
        border-radius: 26px;
    }

    body.app-shell.news-page .news-hero__header,
    body.app-shell.news-page .news-hero__actions,
    body.app-shell.news-page .news-post__footer,
    body.app-shell.news-page .news-side-card__heading,
    body.app-shell.news-page .news-entity-card__top,
    body.app-shell.news-page .news-entity-card__footer,
    body.app-shell.news-page .news-comment__actions,
    body.app-shell.news-page .news-comment__meta,
    body.app-shell.news-page .news-reply__meta,
    body.app-shell.news-page .news-inline-form,
    body.app-shell.news-page .news-comment-form {
        flex-direction: column;
        align-items: flex-start;
    }

    body.app-shell.news-page .news-stat-grid {
        grid-template-columns: 1fr;
    }

    body.app-shell.news-page .news-birthday-overview {
        grid-template-columns: 1fr;
    }

    body.app-shell.news-page .news-entity-list--team,
    body.app-shell.news-page .news-entity-list--clients,
    body.app-shell.news-page .news-post--with-image .news-post__body {
        max-height: none;
    }

    body.app-shell.news-page .news-panel {
        top: 10px;
        right: 10px;
        bottom: 10px;
        width: calc(100vw - 20px);
        border-radius: 24px;
    }
}

/* ==========================================================================
   TASKS PAGE
   ========================================================================== */
body.app-shell.tasks-page .tasks-shell {
    max-width: 100%;
}

body.app-shell.tasks-page .tasks-import-errors {
    max-height: 180px;
    overflow-y: auto;
    padding-right: 0.35rem;
}

body.app-shell.tasks-page .tasks-hero {
    padding: 1.65rem;
    background:
        radial-gradient(circle at top right, rgba(213, 154, 58, 0.14), transparent 34%),
        radial-gradient(circle at bottom left, rgba(47, 143, 131, 0.16), transparent 42%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 252, 0.82));
}

body.app-shell.tasks-page .tasks-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
    gap: 1.4rem;
    align-items: stretch;
}

body.app-shell.tasks-page .tasks-hero__content {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

body.app-shell.tasks-page .tasks-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    width: fit-content;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.06);
    color: #48616f;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.app-shell.tasks-page .tasks-hero__eyebrow-mark {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #d59a3a, #2f8f83);
    box-shadow: 0 0 0 6px rgba(47, 143, 131, 0.12);
}

body.app-shell.tasks-page .tasks-hero__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

body.app-shell.tasks-page .tasks-hero__title {
    font-size: clamp(2rem, 2.6vw, 3rem);
    line-height: 0.96;
}

body.app-shell.tasks-page .tasks-hero__text {
    max-width: 720px;
    color: #5c707c;
    font-size: 1rem;
    line-height: 1.7;
}

body.app-shell.tasks-page .tasks-hero__actions,
body.app-shell.tasks-page .tasks-active-tags,
body.app-shell.tasks-page .tasks-title-cell__meta,
body.app-shell.tasks-page .tasks-links-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

body.app-shell.tasks-page .tasks-active-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.62rem 0.92rem;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(20, 52, 75, 0.1);
    color: #35505f;
    font-weight: 600;
}

body.app-shell.tasks-page .tasks-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

body.app-shell.tasks-page .tasks-summary-card {
    position: relative;
    min-height: 150px;
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
    padding: 1.15rem;
    border-radius: 24px;
    border: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    overflow: hidden;
}

body.app-shell.tasks-page .tasks-summary-card::after {
    content: '';
    position: absolute;
    inset: auto -14% -36% auto;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    filter: blur(2px);
}

body.app-shell.tasks-page .tasks-summary-card--primary {
    background: linear-gradient(145deg, rgba(20, 52, 75, 0.94), rgba(31, 93, 119, 0.86));
    color: #ffffff;
}

body.app-shell.tasks-page .tasks-summary-card--warning {
    background: linear-gradient(145deg, rgba(213, 154, 58, 0.18), rgba(255, 255, 255, 0.78));
}

body.app-shell.tasks-page .tasks-summary-card--danger {
    background: linear-gradient(145deg, rgba(188, 90, 69, 0.16), rgba(255, 255, 255, 0.78));
}

body.app-shell.tasks-page .tasks-summary-card--success {
    background: linear-gradient(145deg, rgba(47, 143, 131, 0.18), rgba(255, 255, 255, 0.78));
}

body.app-shell.tasks-page .tasks-summary-card__icon {
    position: relative;
    z-index: 1;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: inherit;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

body.app-shell.tasks-page .tasks-summary-card--primary .tasks-summary-card__icon {
    background: rgba(255, 255, 255, 0.14);
}

body.app-shell.tasks-page .tasks-summary-card__meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

body.app-shell.tasks-page .tasks-summary-card__label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.82;
}

body.app-shell.tasks-page .tasks-summary-card__value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 2vw, 2.45rem);
    line-height: 1;
}

body.app-shell.tasks-page .tasks-summary-card__hint {
    color: inherit;
    opacity: 0.84;
    line-height: 1.55;
}

body.app-shell.tasks-page .tasks-control-row {
    align-items: stretch;
}

body.app-shell.tasks-page .tasks-filter-card,
body.app-shell.tasks-page .tasks-focus-card,
body.app-shell.tasks-page .tasks-table-card {
    height: 100%;
}

body.app-shell.tasks-page .tasks-filter-card,
body.app-shell.tasks-page .tasks-focus-card {
    padding: 1.35rem;
}

body.app-shell.tasks-page .tasks-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 1.2rem;
}

body.app-shell.tasks-page .tasks-panel__header p {
    color: #637581;
    line-height: 1.55;
}

body.app-shell.tasks-page .tasks-panel__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.06);
    border: 1px solid rgba(20, 52, 75, 0.08);
    color: #31505f;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

body.app-shell.tasks-page .tasks-field-label {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: #35505f;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.app-shell.tasks-page .tasks-filter-input .input-group-text,
body.app-shell.tasks-page .tasks-filter-input .form-control,
body.app-shell.tasks-page .tasks-filter-input .form-select,
body.app-shell.tasks-page .tasks-bulk-toolbar .form-control,
body.app-shell.tasks-page .tasks-bulk-toolbar .form-select {
    min-height: 54px;
}

body.app-shell.tasks-page .tasks-toggle-card {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    border: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.56);
}

body.app-shell.tasks-page .tasks-filter-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

body.app-shell.tasks-page .tasks-filter-state,
body.app-shell.tasks-page .tasks-filter-state__muted {
    color: #5f7480;
}

body.app-shell.tasks-page .tasks-filter-state {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(20, 52, 75, 0.05);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.tasks-page .tasks-focus-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

body.app-shell.tasks-page .tasks-focus-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 110px;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.62);
}

body.app-shell.tasks-page .tasks-focus-item--warning {
    background: linear-gradient(145deg, rgba(213, 154, 58, 0.18), rgba(255, 255, 255, 0.75));
}

body.app-shell.tasks-page .tasks-focus-item--danger {
    background: linear-gradient(145deg, rgba(188, 90, 69, 0.16), rgba(255, 255, 255, 0.75));
}

body.app-shell.tasks-page .tasks-focus-item--info {
    background: linear-gradient(145deg, rgba(93, 138, 166, 0.16), rgba(255, 255, 255, 0.75));
}

body.app-shell.tasks-page .tasks-focus-item--success {
    background: linear-gradient(145deg, rgba(47, 143, 131, 0.16), rgba(255, 255, 255, 0.75));
}

body.app-shell.tasks-page .tasks-focus-item__icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #ffffff;
    background: var(--gradient-primary);
    box-shadow: 0 12px 22px rgba(20, 52, 75, 0.16);
}

body.app-shell.tasks-page .tasks-focus-item__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

body.app-shell.tasks-page .tasks-focus-item__meta strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    line-height: 1;
}

body.app-shell.tasks-page .tasks-focus-item__meta span {
    color: #546a77;
    line-height: 1.45;
}

body.app-shell.tasks-page .tasks-table-card {
    padding: 0;
}

body.app-shell.tasks-page .tasks-table-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.35rem 0.95rem;
}

body.app-shell.tasks-page .tasks-table-card__meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

body.app-shell.tasks-page .tasks-check-all {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.62rem 0.85rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.05);
    border: 1px solid rgba(20, 52, 75, 0.08);
    min-height: 42px;
    line-height: 1;
}

body.app-shell.tasks-page .tasks-check-all .form-check-input {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
    margin: 0;
    border-radius: 0.35rem;
    border: 1px solid rgba(20, 52, 75, 0.28);
    cursor: pointer;
    box-shadow: none;
}

body.app-shell.tasks-page .tasks-check-all .form-check-input:checked {
    background-color: #1f5d77;
    border-color: #1f5d77;
}

body.app-shell.tasks-page .tasks-check-all .form-check-input:focus {
    box-shadow: 0 0 0 0.18rem rgba(31, 93, 119, 0.16);
}

body.app-shell.tasks-page .tasks-check-all .form-check-label {
    margin: 0;
    color: #35505f;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

body.app-shell.tasks-page .tasks-bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.35rem 1rem;
}

body.app-shell.tasks-page .tasks-bulk-toolbar__form {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

body.app-shell.tasks-page .tasks-bulk-toolbar__form > .form-select,
body.app-shell.tasks-page .tasks-bulk-toolbar__form > div {
    min-width: 220px;
}

body.app-shell.tasks-page .tasks-bulk-toolbar__note {
    color: #61737f;
    font-size: 0.9rem;
}

body.app-shell.tasks-page .tasks-table-wrap {
    margin: 0 1rem 1rem;
    border: 1px solid rgba(20, 52, 75, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.54);
}

body.app-shell.tasks-page .tasks-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

body.app-shell.tasks-page .tasks-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #243f4d;
    text-decoration: none;
    font-weight: 800;
    white-space: nowrap;
}

body.app-shell.tasks-page .tasks-sort-link i {
    color: #6d7f89;
    font-size: 0.82rem;
    opacity: 0.72;
    transition: color 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

body.app-shell.tasks-page .tasks-sort-link:hover,
body.app-shell.tasks-page .tasks-sort-link.is-active {
    color: #1f5d77;
}

body.app-shell.tasks-page .tasks-sort-link:hover i,
body.app-shell.tasks-page .tasks-sort-link.is-active i {
    color: #1f5d77;
    opacity: 1;
}

body.app-shell.tasks-page .tasks-table tbody tr {
    background: rgba(255, 255, 255, 0.26);
}

body.app-shell.tasks-page .tasks-table tbody tr td:first-child,
body.app-shell.tasks-page .tasks-table thead th:first-child {
    padding-left: 1.15rem;
}

body.app-shell.tasks-page .tasks-table tbody tr td:last-child,
body.app-shell.tasks-page .tasks-table thead th:last-child {
    padding-right: 1.15rem;
}

body.app-shell.tasks-page .tasks-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
}

body.app-shell.tasks-page .tasks-empty-state__icon {
    width: 86px;
    height: 86px;
    margin: 0 auto 1.15rem;
    border-radius: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    color: #1f5d77;
    background: rgba(31, 93, 119, 0.1);
}

body.app-shell.tasks-page .tasks-id-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    min-height: 32px;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.08);
    color: #355261;
    font-weight: 700;
}

body.app-shell.tasks-page .tasks-title-cell {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

body.app-shell.tasks-page .tasks-title-link--main {
    color: #173b4f;
    font-weight: 700;
    text-decoration: none;
}

body.app-shell.tasks-page .tasks-title-link--main:hover {
    color: #1f5d77;
}

body.app-shell.tasks-page .tasks-priority-chip,
body.app-shell.tasks-page .tasks-meta-chip,
body.app-shell.tasks-page .tasks-links-chip,
body.app-shell.tasks-page .tasks-unassigned-chip,
body.app-shell.tasks-page .tasks-deadline-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 34px;
    padding: 0.45rem 0.72rem;
    border-radius: 999px;
    font-weight: 700;
    line-height: 1;
}

body.app-shell.tasks-page .tasks-priority-chip--urgent {
    background: rgba(188, 90, 69, 0.14);
    color: #8b4a39;
}

body.app-shell.tasks-page .tasks-priority-chip--high {
    background: rgba(213, 154, 58, 0.14);
    color: #8a6325;
}

body.app-shell.tasks-page .tasks-priority-chip--medium {
    background: rgba(93, 138, 166, 0.14);
    color: #416378;
}

body.app-shell.tasks-page .tasks-priority-chip--low {
    background: rgba(47, 143, 131, 0.12);
    color: #2c6e65;
}

body.app-shell.tasks-page .tasks-meta-chip,
body.app-shell.tasks-page .tasks-links-chip {
    background: rgba(20, 52, 75, 0.06);
    color: #35505f;
    font-weight: 600;
}

body.app-shell.tasks-page .tasks-company-cell,
body.app-shell.tasks-page .tasks-person-cell {
    display: flex;
    gap: 0.85rem;
}

body.app-shell.tasks-page .tasks-company-cell {
    flex-direction: column;
    gap: 0.2rem;
}

body.app-shell.tasks-page .tasks-company-cell strong,
body.app-shell.tasks-page .tasks-person-cell strong {
    color: #203846;
    font-weight: 700;
}

body.app-shell.tasks-page .tasks-company-cell span,
body.app-shell.tasks-page .tasks-person-cell span,
body.app-shell.tasks-page .tasks-cell-muted {
    color: #657783;
}

body.app-shell.tasks-page .tasks-person-cell {
    align-items: center;
    min-width: 210px;
}

body.app-shell.tasks-page .tasks-person-cell img {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 15px;
    object-fit: cover;
    box-shadow: 0 12px 22px rgba(20, 52, 75, 0.14);
}

body.app-shell.tasks-page .tasks-unassigned-chip {
    background: rgba(20, 52, 75, 0.08);
    color: #355261;
}

body.app-shell.tasks-page .tasks-deadline-pill {
    background: rgba(47, 143, 131, 0.1);
    color: #2c6e65;
}

body.app-shell.tasks-page .tasks-deadline-pill--soon {
    background: rgba(213, 154, 58, 0.14);
    color: #8a6325;
}

body.app-shell.tasks-page .tasks-deadline-pill--overdue {
    background: rgba(188, 90, 69, 0.14);
    color: #8b4a39;
}

body.app-shell.tasks-page .tasks-action-group {
    display: inline-flex;
    gap: 0.45rem;
}

body.app-shell.tasks-page .tasks-pagination-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    padding: 0.35rem 1rem 1rem;
}

body.app-shell.tasks-page .tasks-pagination-status {
    color: #5f7480;
    font-size: 0.86rem;
    text-align: center;
}

body.app-shell.tasks-page .tasks-pagination-nav {
    width: 100%;
}

body.app-shell.tasks-page .tasks-pagination-nav .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
}

body.app-shell.tasks-page .tasks-pagination-nav .page-link {
    margin: 0;
    padding: 0.56rem 0.86rem;
    min-width: 42px;
    text-align: center;
}

body.app-shell.tasks-page .tasks-page-link--edge {
    min-width: 92px !important;
}

body.app-shell.tasks-page .tasks-pagination-ellipsis {
    pointer-events: none;
    color: #708490;
}

body.app-shell.tasks-page .tasks-pagination-jump {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    width: 100%;
}

body.app-shell.tasks-page .tasks-pagination-jump label {
    color: #4e6674;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.app-shell.tasks-page .tasks-pagination-jump .form-control {
    width: 96px;
    min-height: 42px;
    text-align: center;
}

@media (max-width: 1399.98px) {
    body.app-shell.tasks-page .tasks-hero__layout {
        grid-template-columns: 1fr;
    }

    body.app-shell.tasks-page .tasks-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    body.app-shell.tasks-page .tasks-summary-grid,
    body.app-shell.tasks-page .tasks-focus-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    body.app-shell.tasks-page .tasks-hero,
    body.app-shell.tasks-page .tasks-filter-card,
    body.app-shell.tasks-page .tasks-focus-card {
        padding: 1.2rem;
    }

    body.app-shell.tasks-page .tasks-hero__header,
    body.app-shell.tasks-page .tasks-table-card__header,
    body.app-shell.tasks-page .tasks-bulk-toolbar,
    body.app-shell.tasks-page .tasks-panel__header,
    body.app-shell.tasks-page .tasks-toggle-card,
    body.app-shell.tasks-page .tasks-filter-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    body.app-shell.tasks-page .tasks-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.app-shell.tasks-page .tasks-bulk-toolbar__form,
    body.app-shell.tasks-page .tasks-bulk-toolbar__form > .form-select,
    body.app-shell.tasks-page .tasks-bulk-toolbar__form > div {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 767.98px) {
    body.app-shell.tasks-page .tasks-hero__actions,
    body.app-shell.tasks-page .tasks-active-tags,
    body.app-shell.tasks-page .tasks-summary-grid,
    body.app-shell.tasks-page .tasks-focus-grid,
    body.app-shell.tasks-page .tasks-table-card__meta,
    body.app-shell.tasks-page .tasks-title-cell__meta,
    body.app-shell.tasks-page .tasks-links-stack {
        width: 100%;
    }

    body.app-shell.tasks-page .tasks-summary-grid,
    body.app-shell.tasks-page .tasks-focus-grid {
        grid-template-columns: 1fr;
    }

    body.app-shell.tasks-page .tasks-summary-card,
    body.app-shell.tasks-page .tasks-focus-item {
        min-height: 0;
    }

    body.app-shell.tasks-page .tasks-table-wrap,
    body.app-shell.tasks-page .tasks-pagination-wrap {
        margin-left: 0.75rem;
        margin-right: 0.75rem;
    }

    body.app-shell.tasks-page .tasks-pagination-wrap {
        padding-left: 0;
        padding-right: 0;
    }

    body.app-shell.tasks-page .tasks-page-link--edge {
        min-width: 0 !important;
    }

    body.app-shell.tasks-page .tasks-pagination-jump .form-control,
    body.app-shell.tasks-page .tasks-pagination-jump .btn {
        width: 100%;
    }

    body.app-shell.tasks-page .tasks-person-cell {
        min-width: 0;
    }
}

/* ==========================================================================
   CRM PAGE
   ========================================================================== */
body.app-shell.crm-page .crm-shell {
    max-width: 100%;
}

body.app-shell.crm-page .crm-import-errors {
    max-height: 180px;
    overflow-y: auto;
    padding-right: 0.35rem;
}

body.app-shell.crm-page .crm-hero {
    padding: 1.65rem;
    background:
        radial-gradient(circle at top right, rgba(57, 132, 187, 0.18), transparent 34%),
        radial-gradient(circle at bottom left, rgba(213, 154, 58, 0.16), transparent 40%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 252, 0.82));
}

body.app-shell.crm-page .crm-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
    gap: 1.4rem;
    align-items: stretch;
}

body.app-shell.crm-page .crm-hero__content {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

body.app-shell.crm-page .crm-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    width: fit-content;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.06);
    color: #48616f;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.app-shell.crm-page .crm-hero__eyebrow-mark {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2c80b3, #d59a3a);
    box-shadow: 0 0 0 6px rgba(44, 128, 179, 0.14);
}

body.app-shell.crm-page .crm-hero__header,
body.app-shell.crm-page .crm-filter-actions,
body.app-shell.crm-page .crm-table-card__header,
body.app-shell.crm-page .crm-bulk-toolbar,
body.app-shell.crm-page .crm-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

body.app-shell.crm-page .crm-hero__title {
    font-size: clamp(2rem, 2.6vw, 3rem);
    line-height: 0.96;
}

body.app-shell.crm-page .crm-hero__text {
    max-width: 720px;
    color: #5c707c;
    font-size: 1rem;
    line-height: 1.7;
}

body.app-shell.crm-page .crm-hero__actions,
body.app-shell.crm-page .crm-active-tags,
body.app-shell.crm-page .crm-title-cell__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

body.app-shell.crm-page .crm-active-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.62rem 0.92rem;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(20, 52, 75, 0.1);
    color: #35505f;
    font-weight: 600;
}

body.app-shell.crm-page .crm-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

body.app-shell.crm-page .crm-summary-card {
    position: relative;
    min-height: 150px;
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
    padding: 1.15rem;
    border-radius: 24px;
    border: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    overflow: hidden;
}

body.app-shell.crm-page .crm-summary-card::after {
    content: '';
    position: absolute;
    inset: auto -14% -36% auto;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    filter: blur(2px);
}

body.app-shell.crm-page .crm-summary-card--primary {
    background: linear-gradient(145deg, rgba(20, 52, 75, 0.94), rgba(31, 93, 119, 0.86));
    color: #ffffff;
}

body.app-shell.crm-page .crm-summary-card--warning {
    background: linear-gradient(145deg, rgba(213, 154, 58, 0.18), rgba(255, 255, 255, 0.78));
}

body.app-shell.crm-page .crm-summary-card--success {
    background: linear-gradient(145deg, rgba(47, 143, 131, 0.18), rgba(255, 255, 255, 0.78));
}

body.app-shell.crm-page .crm-summary-card--info {
    background: linear-gradient(145deg, rgba(44, 128, 179, 0.18), rgba(255, 255, 255, 0.78));
}

body.app-shell.crm-page .crm-summary-card__icon,
body.app-shell.crm-page .crm-focus-item__icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #ffffff;
    background: var(--gradient-primary);
    box-shadow: 0 12px 22px rgba(20, 52, 75, 0.16);
}

body.app-shell.crm-page .crm-summary-card--primary .crm-summary-card__icon {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

body.app-shell.crm-page .crm-summary-card__meta,
body.app-shell.crm-page .crm-focus-item__meta,
body.app-shell.crm-page .crm-company-cell,
body.app-shell.crm-page .crm-date-cell {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

body.app-shell.crm-page .crm-summary-card__label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.82;
}

body.app-shell.crm-page .crm-summary-card__value,
body.app-shell.crm-page .crm-focus-item__meta strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.75rem, 2vw, 2.35rem);
    line-height: 1;
}

body.app-shell.crm-page .crm-summary-card__hint,
body.app-shell.crm-page .crm-panel__header p,
body.app-shell.crm-page .crm-focus-item__meta span,
body.app-shell.crm-page .crm-company-cell span,
body.app-shell.crm-page .crm-date-cell span,
body.app-shell.crm-page .crm-cell-muted,
body.app-shell.crm-page .crm-bulk-toolbar__note,
body.app-shell.crm-page .crm-filter-state,
body.app-shell.crm-page .crm-filter-state__muted {
    color: #61737f;
}

body.app-shell.crm-page .crm-control-row {
    align-items: stretch;
}

body.app-shell.crm-page .crm-filter-card,
body.app-shell.crm-page .crm-focus-card,
body.app-shell.crm-page .crm-table-card {
    height: 100%;
}

body.app-shell.crm-page .crm-filter-card,
body.app-shell.crm-page .crm-focus-card {
    padding: 1.35rem;
}

body.app-shell.crm-page .crm-panel__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.06);
    border: 1px solid rgba(20, 52, 75, 0.08);
    color: #31505f;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

body.app-shell.crm-page .crm-field-label {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: #35505f;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.app-shell.crm-page .crm-filter-input .input-group-text,
body.app-shell.crm-page .crm-filter-input .form-control,
body.app-shell.crm-page .crm-filter-input .form-select,
body.app-shell.crm-page .crm-bulk-toolbar .form-select {
    min-height: 54px;
}

body.app-shell.crm-page .crm-filter-state {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(20, 52, 75, 0.05);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.crm-page .crm-focus-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

body.app-shell.crm-page .crm-focus-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 110px;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.62);
}

body.app-shell.crm-page .crm-focus-item--warning {
    background: linear-gradient(145deg, rgba(213, 154, 58, 0.18), rgba(255, 255, 255, 0.75));
}

body.app-shell.crm-page .crm-focus-item--danger {
    background: linear-gradient(145deg, rgba(188, 90, 69, 0.16), rgba(255, 255, 255, 0.75));
}

body.app-shell.crm-page .crm-focus-item--info {
    background: linear-gradient(145deg, rgba(44, 128, 179, 0.16), rgba(255, 255, 255, 0.75));
}

body.app-shell.crm-page .crm-focus-item--success {
    background: linear-gradient(145deg, rgba(47, 143, 131, 0.16), rgba(255, 255, 255, 0.75));
}

body.app-shell.crm-page .crm-funnel-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}

body.app-shell.crm-page .crm-funnel-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.crm-page .crm-funnel-list__meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

body.app-shell.crm-page .crm-funnel-list__meta strong,
body.app-shell.crm-page .crm-company-cell strong,
body.app-shell.crm-page .crm-person-cell strong,
body.app-shell.crm-page .crm-date-cell strong {
    color: #203846;
    font-weight: 700;
}

body.app-shell.crm-page .crm-funnel-list__amount {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.45rem 0.72rem;
    border-radius: 999px;
    background: rgba(44, 128, 179, 0.1);
    color: #24597a;
    font-weight: 700;
}

body.app-shell.crm-page .crm-focus-note {
    margin-top: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(20, 52, 75, 0.05);
    border: 1px solid rgba(20, 52, 75, 0.08);
    color: #536874;
}

body.app-shell.crm-page .crm-admin-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

body.app-shell.crm-page .crm-table-card {
    padding: 0;
}

body.app-shell.crm-page .crm-table-card__header,
body.app-shell.crm-page .crm-bulk-toolbar,
body.app-shell.crm-page .crm-pagination-wrap {
    padding-left: 1.35rem;
    padding-right: 1.35rem;
}

body.app-shell.crm-page .crm-table-card__header {
    padding-top: 1.35rem;
    padding-bottom: 0.95rem;
}

body.app-shell.crm-page .crm-table-card__meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

body.app-shell.crm-page .crm-check-all {
    margin: 0;
    padding: 0.62rem 0.85rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.05);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.crm-page .crm-bulk-toolbar {
    padding-bottom: 1rem;
}

body.app-shell.crm-page .crm-bulk-toolbar__form {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

body.app-shell.crm-page .crm-bulk-toolbar__form > .form-select,
body.app-shell.crm-page .crm-bulk-toolbar__form > div {
    min-width: 220px;
}

body.app-shell.crm-page .crm-table-wrap {
    margin: 0 1rem 1rem;
    border: 1px solid rgba(20, 52, 75, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.54);
}

body.app-shell.crm-page .crm-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

body.app-shell.crm-page .crm-table tbody tr {
    background: rgba(255, 255, 255, 0.26);
}

body.app-shell.crm-page .crm-table tbody tr td:first-child,
body.app-shell.crm-page .crm-table thead th:first-child {
    padding-left: 1.15rem;
}

body.app-shell.crm-page .crm-table tbody tr td:last-child,
body.app-shell.crm-page .crm-table thead th:last-child {
    padding-right: 1.15rem;
}

body.app-shell.crm-page .crm-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
}

body.app-shell.crm-page .crm-empty-state__icon {
    width: 86px;
    height: 86px;
    margin: 0 auto 1.15rem;
    border-radius: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    color: #1f5d77;
    background: rgba(31, 93, 119, 0.1);
}

body.app-shell.crm-page .crm-id-badge,
body.app-shell.crm-page .crm-funnel-pill,
body.app-shell.crm-page .crm-stage-pill,
body.app-shell.crm-page .crm-amount-pill,
body.app-shell.crm-page .crm-meta-chip,
body.app-shell.crm-page .crm-unassigned-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 34px;
    padding: 0.45rem 0.72rem;
    border-radius: 999px;
    font-weight: 700;
}

body.app-shell.crm-page .crm-id-badge,
body.app-shell.crm-page .crm-meta-chip,
body.app-shell.crm-page .crm-unassigned-chip {
    background: rgba(20, 52, 75, 0.08);
    color: #355261;
}

body.app-shell.crm-page .crm-title-cell {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

body.app-shell.crm-page .crm-title-link {
    color: #173b4f;
    font-weight: 700;
    text-decoration: none;
}

body.app-shell.crm-page .crm-title-link:hover {
    color: #1f5d77;
}

body.app-shell.crm-page .crm-funnel-cell {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

body.app-shell.crm-page .crm-funnel-pill {
    justify-content: flex-start;
    background: rgba(20, 52, 75, 0.08);
    color: #355261;
}

body.app-shell.crm-page .crm-stage-pill {
    justify-content: flex-start;
}

body.app-shell.crm-page .crm-stage-pill--success {
    background: rgba(47, 143, 131, 0.14);
    color: #2c6e65;
}

body.app-shell.crm-page .crm-stage-pill--danger {
    background: rgba(188, 90, 69, 0.14);
    color: #8b4a39;
}

body.app-shell.crm-page .crm-stage-pill--warning {
    background: rgba(213, 154, 58, 0.16);
    color: #8a6325;
}

body.app-shell.crm-page .crm-stage-pill--info,
body.app-shell.crm-page .crm-amount-pill {
    background: rgba(44, 128, 179, 0.12);
    color: #24597a;
}

body.app-shell.crm-page .crm-payment-stack {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.85rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.crm-page .crm-payment-stack--table {
    min-width: 210px;
    padding: 0;
    border: 0;
    background: transparent;
}

body.app-shell.crm-page .crm-payment-stack--wide {
    margin-bottom: 1rem;
}

body.app-shell.crm-page .crm-payment-line {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
}

body.app-shell.crm-page .crm-payment-line__label {
    color: #607580;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.app-shell.crm-page .crm-payment-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(22px, 1fr);
    min-height: 24px;
    overflow: hidden;
    border: 1px solid rgba(20, 52, 75, 0.12);
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body.app-shell.crm-page .crm-payment-track--compact {
    max-width: 180px;
}

body.app-shell.crm-page .crm-payment-track--full {
    min-height: 34px;
    grid-auto-columns: minmax(58px, 1fr);
}

body.app-shell.crm-page .crm-payment-cell {
    position: relative;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid rgba(255, 255, 255, 0.72);
    color: #526873;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
}

body.app-shell.crm-page .crm-payment-cell:first-child {
    border-left: 0;
}

body.app-shell.crm-page .crm-payment-cell--empty {
    background: linear-gradient(180deg, #eef3f6, #dfe8ed);
    color: #607580;
}

body.app-shell.crm-page .crm-payment-cell--pending {
    background: linear-gradient(180deg, #d96a5a, #bc5a45);
    color: #ffffff;
}

body.app-shell.crm-page .crm-payment-cell--done {
    background: linear-gradient(180deg, #3da28f, #2f8f83);
    color: #ffffff;
}

body.app-shell.crm-page .crm-payment-cell__label {
    max-width: 100%;
    overflow: hidden;
    padding: 0 0.35rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.app-shell.crm-page .crm-payment-empty-inline {
    color: #61737f;
    font-size: 0.78rem;
    font-weight: 700;
}

body.app-shell.crm-page .crm-payment-mini-summary {
    color: #61737f;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.45;
}

body.app-shell.crm-page .crm-payment-status {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.38rem 0.62rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
}

body.app-shell.crm-page .crm-payment-status--empty {
    background: rgba(20, 52, 75, 0.08);
    color: #536874;
}

body.app-shell.crm-page .crm-payment-status--pending {
    background: rgba(188, 90, 69, 0.14);
    color: #8b4a39;
}

body.app-shell.crm-page .crm-payment-status--done {
    background: rgba(47, 143, 131, 0.14);
    color: #2c6e65;
}

body.app-shell.crm-page .crm-payment-empty {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(20, 52, 75, 0.05);
    border: 1px solid rgba(20, 52, 75, 0.08);
    color: #607580;
    font-weight: 700;
}

body.app-shell.crm-page .crm-payment-empty i {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(44, 128, 179, 0.12);
    color: #24597a;
}

body.app-shell.crm-page .crm-payment-table-wrap,
body.app-shell.crm-page .crm-payment-editor-wrap {
    margin-top: 1rem;
}

body.app-shell.crm-page .crm-payment-editor-card {
    margin-top: 1.35rem;
}

body.app-shell.crm-page .crm-payment-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

body.app-shell.crm-page .crm-payment-legend {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    color: #607580;
    font-size: 0.78rem;
    font-weight: 700;
}

body.app-shell.crm-page .crm-payment-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
}

body.app-shell.crm-page .crm-payment-legend__dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
}

body.app-shell.crm-page .crm-payment-legend__dot--empty {
    background: #dfe8ed;
}

body.app-shell.crm-page .crm-payment-legend__dot--pending {
    background: #bc5a45;
}

body.app-shell.crm-page .crm-payment-legend__dot--done {
    background: #2f8f83;
}

body.app-shell.crm-page .crm-payment-editor-table .form-control-sm,
body.app-shell.crm-page .crm-payment-editor-table .form-select-sm {
    min-height: 36px;
}

body.app-shell.crm-page .crm-payment-period-number {
    color: #607580;
    font-weight: 800;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnels-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnels-save-state {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 42px;
    padding: 0.62rem 0.9rem;
    border-radius: 999px;
    background: rgba(47, 143, 131, 0.1);
    color: #2c6e65;
    border: 1px solid rgba(47, 143, 131, 0.14);
    font-weight: 700;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnels-save-state.is-saving {
    background: rgba(213, 154, 58, 0.13);
    color: #8a6325;
    border-color: rgba(213, 154, 58, 0.18);
}

body.app-shell.crm-page.crm-funnels-page .crm-funnels-save-state.is-saving i {
    animation: crmFunnelsSpin 0.9s linear infinite;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnels-save-state.is-error {
    background: rgba(188, 90, 69, 0.13);
    color: #8b4a39;
    border-color: rgba(188, 90, 69, 0.18);
}

@keyframes crmFunnelsSpin {
    to { transform: rotate(360deg); }
}

body.app-shell.crm-page.crm-funnels-page .crm-funnel-board {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(310px, 380px);
    gap: 1rem;
    overflow-x: auto;
    padding: 0.2rem 0 1rem;
    align-items: start;
    scroll-snap-type: x proximity;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnel-board::-webkit-scrollbar {
    height: 9px;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnel-board::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.22);
}

body.app-shell.crm-page.crm-funnels-page .crm-process-list {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-card {
    padding: 1.25rem;
    overflow: hidden;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-card__header h5 {
    color: #173b4f;
    font-weight: 800;
    overflow-wrap: anywhere;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-card__header p {
    color: #61737f;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-card__title {
    min-width: 0;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-card__title-row {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    min-width: 0;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-card__controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-icon-button {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(20, 52, 75, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    color: #4d6978;
    line-height: 1;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-icon-button:hover,
body.app-shell.crm-page.crm-funnels-page .crm-process-icon-button:focus {
    background: rgba(44, 128, 179, 0.12);
    border-color: rgba(44, 128, 179, 0.34);
    color: #2c6f98;
    box-shadow: 0 8px 18px rgba(44, 128, 179, 0.14);
}

body.app-shell.crm-page.crm-funnels-page .crm-process-icon-button:active {
    transform: scale(0.96);
}

body.app-shell.crm-page.crm-funnels-page .crm-process-scroll {
    overflow-x: auto;
    padding-bottom: 0.75rem;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-scroll::-webkit-scrollbar {
    height: 9px;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.22);
}

body.app-shell.crm-page.crm-funnels-page .crm-process-flow {
    position: relative;
    min-width: max-content;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    padding: 0.25rem 0.25rem 0.6rem;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-connectors {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-connector {
    fill: none;
    stroke: rgba(31, 93, 119, 0.34);
    stroke-width: 2.5;
    stroke-linecap: round;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-root-drop,
body.app-shell.crm-page.crm-funnels-page .crm-process-level,
body.app-shell.crm-page.crm-funnels-page .crm-process-stage {
    position: relative;
    z-index: 1;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-root-drop {
    width: 112px;
    min-height: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 18px;
    background: rgba(20, 52, 75, 0.06);
    border: 1px dashed rgba(20, 52, 75, 0.22);
    color: #355261;
    font-weight: 800;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-root-drop i {
    font-size: 1.45rem;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-levels {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 310px);
    gap: 1rem;
    align-items: start;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-level {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.82rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.46);
    border: 1px solid rgba(20, 52, 75, 0.07);
}

body.app-shell.crm-page.crm-funnels-page .crm-process-level__label {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 28px;
    padding: 0.35rem 0.62rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.07);
    color: #4c6572;
    font-size: 0.76rem;
    font-weight: 800;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-stage {
    width: 100%;
    min-height: 82px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem;
    border-radius: 16px;
    text-align: left;
    cursor: grab;
    box-shadow: 0 12px 22px rgba(18, 42, 56, 0.07);
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, outline-color 0.16s ease;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-stage:hover,
body.app-shell.crm-page.crm-funnels-page .crm-process-stage:focus {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(18, 42, 56, 0.11);
}

body.app-shell.crm-page.crm-funnels-page .crm-process-stage:active {
    cursor: grabbing;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-stage[draggable="false"],
body.app-shell.crm-page.crm-funnels-page .crm-process-stage[draggable="false"]:active {
    cursor: default;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-stage.is-dragging {
    opacity: 0.5;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-stage.is-drop-target,
body.app-shell.crm-page.crm-funnels-page .crm-process-root-drop.is-drop-target {
    outline: 3px solid rgba(213, 154, 58, 0.42);
    outline-offset: 3px;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-stage__handle {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.74);
    color: #56707d;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-stage__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.16rem;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-stage__body strong {
    overflow-wrap: anywhere;
    font-size: 0.98rem;
    line-height: 1.25;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-stage__name-row {
    display: flex;
    align-items: center;
    gap: 0.36rem;
    color: inherit;
    font-size: inherit;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-icon-button--stage {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    opacity: 0.84;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-stage__body span {
    color: #61737f;
    font-size: 0.82rem;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-stage__body .crm-process-stage__name-row {
    color: inherit;
    font-size: inherit;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-stage__actions {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.42rem;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-stage__meta {
    min-width: 34px;
    height: 34px;
    padding: 0 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    color: #203846;
    font-weight: 800;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-stage__delete {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(188, 90, 69, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #bc5a45;
    line-height: 1;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

body.app-shell.crm-page.crm-funnels-page .crm-process-stage__delete:hover,
body.app-shell.crm-page.crm-funnels-page .crm-process-stage__delete:focus {
    background: rgba(188, 90, 69, 0.13);
    border-color: rgba(188, 90, 69, 0.42);
    color: #8f3427;
    box-shadow: 0 8px 18px rgba(188, 90, 69, 0.18);
}

body.app-shell.crm-page.crm-funnels-page .crm-process-stage__delete:active {
    transform: scale(0.96);
}

body.app-shell.crm-page.crm-funnels-page .crm-funnel-column {
    min-width: 0;
    padding: 1rem;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(245, 249, 252, 0.68));
    border: 1px solid rgba(20, 52, 75, 0.08);
    box-shadow: 0 20px 36px rgba(18, 42, 56, 0.09);
    scroll-snap-align: start;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnel-column.is-dragging,
body.app-shell.crm-page.crm-funnels-page .crm-funnel-stage.is-dragging {
    opacity: 0.55;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnel-column__header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 64px;
    padding: 0.85rem 0.9rem;
    margin-bottom: 0.9rem;
    border-radius: 18px;
    background: rgba(20, 52, 75, 0.06);
    border: 1px solid rgba(20, 52, 75, 0.08);
    cursor: grab;
    user-select: none;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnel-column__header:active {
    cursor: grabbing;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnel-column__handle,
body.app-shell.crm-page.crm-funnels-page .crm-funnel-stage__handle {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.74);
    color: #56707d;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnel-column__title,
body.app-shell.crm-page.crm-funnels-page .crm-funnel-stage__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnel-column__title strong {
    color: #173b4f;
    font-weight: 800;
    overflow-wrap: anywhere;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnel-column__title span,
body.app-shell.crm-page.crm-funnels-page .crm-funnel-stage__body span {
    color: #61737f;
    font-size: 0.84rem;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnel-stage-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    min-height: 76px;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnel-stage {
    width: 100%;
    min-height: 72px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem;
    border-radius: 16px;
    text-align: left;
    cursor: grab;
    box-shadow: 0 12px 22px rgba(18, 42, 56, 0.07);
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnel-stage:hover,
body.app-shell.crm-page.crm-funnels-page .crm-funnel-stage:focus {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(18, 42, 56, 0.11);
}

body.app-shell.crm-page.crm-funnels-page .crm-funnel-stage:active {
    cursor: grabbing;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnel-stage__body strong {
    overflow-wrap: anywhere;
    font-size: 0.98rem;
    line-height: 1.25;
}

body.app-shell.crm-page.crm-funnels-page .crm-funnel-stage__count {
    min-width: 34px;
    height: 34px;
    padding: 0 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    color: #203846;
    font-weight: 800;
}

body.app-shell.crm-page.crm-funnels-page .crm-color-picker-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

body.app-shell.crm-page.crm-funnels-page .crm-color-swatches {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

body.app-shell.crm-page.crm-funnels-page .crm-color-swatch {
    width: 34px;
    height: 34px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(20, 52, 75, 0.14);
}

body.app-shell.crm-page.crm-funnels-page .crm-stage-type-switch {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    background: rgba(20, 52, 75, 0.05);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.crm-page.crm-funnels-page .crm-ai-prompt {
    min-height: 260px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.86rem;
    line-height: 1.45;
}

@media (max-width: 991px) {
    body.app-shell.crm-page.crm-funnels-page .crm-process-card__header {
        flex-direction: column;
    }

    body.app-shell.crm-page.crm-funnels-page .crm-process-card__controls {
        justify-content: flex-start;
    }

    body.app-shell.crm-page.crm-funnels-page .crm-process-levels {
        grid-auto-columns: minmax(235px, 78vw);
    }

    body.app-shell.crm-page.crm-funnels-page .crm-funnel-board {
        grid-auto-columns: minmax(286px, 86vw);
    }
}

@media (max-width: 575px) {
    body.app-shell.crm-page.crm-funnels-page .crm-funnels-toolbar {
        align-items: stretch;
    }

    body.app-shell.crm-page.crm-funnels-page .crm-funnels-toolbar > * {
        width: 100%;
    }

    body.app-shell.crm-page.crm-funnels-page .crm-process-flow {
        grid-template-columns: 86px minmax(0, 1fr);
        gap: 0.75rem;
    }

    body.app-shell.crm-page.crm-funnels-page .crm-process-root-drop {
        width: 86px;
    }

    body.app-shell.crm-page.crm-funnels-page .crm-process-stage {
        grid-template-columns: 28px minmax(0, 1fr);
    }

    body.app-shell.crm-page.crm-funnels-page .crm-process-stage__actions {
        grid-column: 2;
        justify-self: start;
        justify-content: flex-start;
    }

    body.app-shell.crm-page.crm-funnels-page .crm-process-stage__meta {
        grid-column: 2;
        justify-self: start;
    }

    body.app-shell.crm-page.crm-funnels-page .crm-funnel-stage {
        grid-template-columns: 28px minmax(0, 1fr);
    }

    body.app-shell.crm-page.crm-funnels-page .crm-funnel-stage__count {
        grid-column: 2;
        justify-self: start;
    }
}

body.app-shell.crm-page .crm-person-cell {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 210px;
}

body.app-shell.crm-page .crm-person-cell__avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(20, 52, 75, 0.9), rgba(44, 128, 179, 0.82));
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 12px 22px rgba(20, 52, 75, 0.14);
}

body.app-shell.crm-page .crm-action-group {
    display: inline-flex;
    gap: 0.45rem;
}

body.app-shell.crm-page .crm-title-link--trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

body.app-shell.crm-page .crm-offcanvas {
    width: min(76vw, 1240px);
    max-width: none;
    border-left: 1px solid rgba(20, 52, 75, 0.08);
    background:
        linear-gradient(180deg, rgba(245, 249, 252, 0.98), rgba(232, 239, 245, 0.96)),
        url('../img/fon.png') center/cover no-repeat;
    backdrop-filter: blur(22px);
    box-shadow: -24px 0 60px rgba(20, 52, 75, 0.18);
}

body.app-shell.crm-page .crm-offcanvas__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.2rem;
    padding: 1.3rem 1.4rem;
    background: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid rgba(20, 52, 75, 0.08);
    backdrop-filter: blur(16px);
}

body.app-shell.crm-page .crm-offcanvas__title-block {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 0 0 100%;
    order: 2;
}

body.app-shell.crm-page .crm-offcanvas__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #607580;
}

body.app-shell.crm-page .crm-offcanvas__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 0;
    color: #173b4f;
}

body.app-shell.crm-page .crm-offcanvas__summary-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    min-width: 0;
}

body.app-shell.crm-page .crm-offcanvas__tags,
body.app-shell.crm-page .crm-offcanvas__toolbar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

body.app-shell.crm-page .crm-offcanvas__toolbar {
    justify-content: flex-end;
    flex: 1 1 100%;
    order: 1;
}

body.app-shell.crm-page .crm-offcanvas__body {
    padding: 1.35rem;
}

body.app-shell.crm-page .crm-offcanvas__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.78fr);
    gap: 1.2rem;
    align-items: start;
}

body.app-shell.crm-page .crm-offcanvas__main,
body.app-shell.crm-page .crm-offcanvas__side {
    min-width: 0;
}

body.app-shell.crm-page .crm-offcanvas__side {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

body.app-shell.crm-page .crm-offcanvas__card {
    height: auto !important;
    min-height: 0;
}

body.app-shell.crm-page .crm-offcanvas__side .crm-offcanvas__card {
    flex: 0 0 auto;
}

body.app-shell.crm-page .crm-hero--deal .crm-hero__layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
}

body.app-shell.crm-page .crm-deal-layout {
    align-items: stretch;
}

body.app-shell.crm-page .crm-deal-card,
body.app-shell.crm-page .crm-side-card,
body.app-shell.crm-page .crm-deal-editor-card {
    height: 100%;
    padding: 1.35rem;
}

body.app-shell.crm-page .crm-deal-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

body.app-shell.crm-page .crm-deal-info-item,
body.app-shell.crm-page .crm-description-box,
body.app-shell.crm-page .crm-side-metric,
body.app-shell.crm-page .crm-observer-item,
body.app-shell.crm-page .crm-observer-check {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.crm-page .crm-deal-info-item,
body.app-shell.crm-page .crm-side-metric {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

body.app-shell.crm-page .crm-deal-info-item__label {
    color: #607580;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

body.app-shell.crm-page .crm-description-box {
    margin-top: 1rem;
    line-height: 1.7;
    color: #304652;
}

body.app-shell.crm-page .crm-deal-block {
    margin-top: 1.35rem;
}

body.app-shell.crm-page .crm-table-wrap--inner {
    margin: 0;
}

body.app-shell.crm-page .crm-history-list,
body.app-shell.crm-page .crm-comments-list,
body.app-shell.crm-page .crm-observer-list,
body.app-shell.crm-page .crm-relations-list,
body.app-shell.crm-page .crm-side-metrics,
body.app-shell.crm-page .crm-observer-picker {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

body.app-shell.crm-page .crm-history-item,
body.app-shell.crm-page .crm-observer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.crm-page .crm-observer-item {
    justify-content: flex-start;
}

body.app-shell.crm-page .crm-relation-item,
body.app-shell.crm-page .crm-relation-group {
    display: flex;
    gap: 0.8rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.crm-page .crm-relation-item {
    align-items: center;
}

body.app-shell.crm-page .crm-relation-group {
    flex-direction: column;
}

body.app-shell.crm-page .crm-relation-item__icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 128, 179, 0.12);
    color: #24597a;
}

body.app-shell.crm-page .crm-relation-item__label,
body.app-shell.crm-page .crm-relation-group__title {
    display: block;
    color: #607580;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.app-shell.crm-page .crm-relation-group__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: 0.04em;
}

body.app-shell.crm-page .crm-relation-item a,
body.app-shell.crm-page .crm-relation-line {
    color: #1e5d82;
    font-weight: 800;
    text-decoration: none;
}

body.app-shell.crm-page .crm-relation-line {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem 0;
    border-top: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.crm-page .crm-relation-line:first-of-type {
    border-top: 0;
    padding-top: 0;
}

body.app-shell.crm-page .crm-relation-line small,
body.app-shell.crm-page .crm-relation-item small {
    display: block;
    color: #607580;
    font-weight: 600;
}

body.app-shell.crm-page .crm-comments-list {
    max-height: 360px;
    overflow-y: auto;
    padding-right: 0.15rem;
}

body.app-shell.crm-page .crm-comment-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.crm-page .crm-comment-item__avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 128, 179, 0.12);
    color: #24597a;
    font-weight: 800;
    font-size: 0.78rem;
}

body.app-shell.crm-page .crm-comment-item__body {
    min-width: 0;
    flex: 1;
}

body.app-shell.crm-page .crm-comment-item__meta {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
    color: #5f7480;
    font-size: 0.83rem;
}

body.app-shell.crm-page .crm-comment-item__meta strong {
    color: #1f3542;
}

body.app-shell.crm-page .crm-comment-item__text {
    color: #304652;
    line-height: 1.55;
    word-break: break-word;
}

body.app-shell.crm-page .crm-comment-form textarea {
    resize: vertical;
}

body.app-shell.crm-page .crm-observer-item__icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 128, 179, 0.12);
    color: #24597a;
}

body.app-shell.crm-page .crm-deal-editor-card {
    margin-top: 1.35rem;
}

body.app-shell.crm-page .crm-editor-group {
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.crm-page .crm-item-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

body.app-shell.crm-page .crm-item-row {
    padding: 0.85rem;
    border-radius: 18px;
    background: rgba(20, 52, 75, 0.04);
    border: 1px solid rgba(20, 52, 75, 0.07);
}

body.app-shell.crm-page .crm-observer-check {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    cursor: pointer;
}

body.app-shell.crm-page .crm-observer-check .form-check-input {
    margin-top: 0;
}

body.app-shell.crm-page .crm-editor-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1.35rem;
}

@media (max-width: 1399.98px) {
    body.app-shell.crm-page .crm-hero__layout {
        grid-template-columns: 1fr;
    }

    body.app-shell.crm-page .crm-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    body.app-shell.crm-page .crm-hero--deal .crm-hero__layout {
        grid-template-columns: 1fr;
    }

    body.app-shell.crm-page .crm-offcanvas {
        width: min(86vw, 1160px);
    }
}

@media (max-width: 1199.98px) {
    body.app-shell.crm-page .crm-summary-grid,
    body.app-shell.crm-page .crm-focus-grid,
    body.app-shell.crm-page .crm-deal-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.app-shell.crm-page .crm-offcanvas__layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    body.app-shell.crm-page .crm-hero,
    body.app-shell.crm-page .crm-filter-card,
    body.app-shell.crm-page .crm-focus-card {
        padding: 1.2rem;
    }

    body.app-shell.crm-page .crm-hero__header,
    body.app-shell.crm-page .crm-table-card__header,
    body.app-shell.crm-page .crm-bulk-toolbar,
    body.app-shell.crm-page .crm-panel__header,
    body.app-shell.crm-page .crm-filter-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    body.app-shell.crm-page .crm-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.app-shell.crm-page .crm-bulk-toolbar__form,
    body.app-shell.crm-page .crm-bulk-toolbar__form > .form-select,
    body.app-shell.crm-page .crm-bulk-toolbar__form > div,
    body.app-shell.crm-page .crm-admin-tools {
        width: 100%;
        min-width: 0;
    }

    body.app-shell.crm-page .crm-offcanvas {
        width: 100vw;
    }

    body.app-shell.crm-page .crm-offcanvas__header,
    body.app-shell.crm-page .crm-offcanvas__toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767.98px) {
    body.app-shell.crm-page .crm-hero__actions,
    body.app-shell.crm-page .crm-active-tags,
    body.app-shell.crm-page .crm-summary-grid,
    body.app-shell.crm-page .crm-focus-grid,
    body.app-shell.crm-page .crm-deal-info-grid,
    body.app-shell.crm-page .crm-table-card__meta,
    body.app-shell.crm-page .crm-title-cell__meta,
    body.app-shell.crm-page .crm-admin-tools,
    body.app-shell.crm-page .crm-offcanvas__tags,
    body.app-shell.crm-page .crm-offcanvas__toolbar {
        width: 100%;
    }

    body.app-shell.crm-page .crm-summary-grid,
    body.app-shell.crm-page .crm-focus-grid,
    body.app-shell.crm-page .crm-deal-info-grid {
        grid-template-columns: 1fr;
    }

    body.app-shell.crm-page .crm-summary-card,
    body.app-shell.crm-page .crm-focus-item {
        min-height: 0;
    }

    body.app-shell.crm-page .crm-table-wrap {
        margin: 0 0.75rem 0.75rem;
    }

    body.app-shell.crm-page .crm-table-card__header,
    body.app-shell.crm-page .crm-bulk-toolbar {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    body.app-shell.crm-page .crm-person-cell {
        min-width: 0;
    }

    body.app-shell.crm-page .crm-history-item,
    body.app-shell.crm-page .crm-editor-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    body.app-shell.crm-page .crm-offcanvas__body {
        padding: 0.9rem;
    }
}

/* ==========================================================================
   COMPANIES PAGE
   ========================================================================== */
body.app-shell.companies-page .companies-shell {
    max-width: 100%;
}

body.app-shell.companies-page .companies-import-errors {
    max-height: 180px;
    overflow-y: auto;
    padding-right: 0.35rem;
}

body.app-shell.companies-page .companies-hero {
    padding: 1.65rem;
    background:
        radial-gradient(circle at top right, rgba(44, 128, 179, 0.16), transparent 34%),
        radial-gradient(circle at bottom left, rgba(213, 154, 58, 0.16), transparent 42%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 252, 0.82));
}

body.app-shell.companies-page .companies-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.9fr);
    gap: 1.4rem;
    align-items: stretch;
}

body.app-shell.companies-page .companies-hero__content {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

body.app-shell.companies-page .companies-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    width: fit-content;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.06);
    color: #48616f;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.app-shell.companies-page .companies-hero__eyebrow-mark {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1f5d77, #d59a3a);
    box-shadow: 0 0 0 6px rgba(31, 93, 119, 0.12);
}

body.app-shell.companies-page .companies-hero__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

body.app-shell.companies-page .companies-hero__title {
    font-size: clamp(2rem, 2.6vw, 3rem);
    line-height: 0.96;
}

body.app-shell.companies-page .companies-hero__text {
    max-width: 760px;
    color: #5c707c;
    font-size: 1rem;
    line-height: 1.7;
}

body.app-shell.companies-page .companies-hero__actions,
body.app-shell.companies-page .companies-active-tags,
body.app-shell.companies-page .companies-title-cell__meta,
body.app-shell.companies-page .companies-risk-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

body.app-shell.companies-page .companies-active-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.62rem 0.92rem;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(20, 52, 75, 0.1);
    color: #35505f;
    font-weight: 600;
}

body.app-shell.companies-page .companies-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

body.app-shell.companies-page .companies-summary-card {
    position: relative;
    min-height: 150px;
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
    padding: 1.15rem;
    border-radius: 24px;
    border: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    overflow: hidden;
}

body.app-shell.companies-page .companies-summary-card::after {
    content: '';
    position: absolute;
    inset: auto -14% -36% auto;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    filter: blur(2px);
}

body.app-shell.companies-page .companies-summary-card--primary {
    background: linear-gradient(145deg, rgba(20, 52, 75, 0.94), rgba(31, 93, 119, 0.86));
    color: #ffffff;
}

body.app-shell.companies-page .companies-summary-card--info {
    background: linear-gradient(145deg, rgba(93, 138, 166, 0.18), rgba(255, 255, 255, 0.78));
}

body.app-shell.companies-page .companies-summary-card--success {
    background: linear-gradient(145deg, rgba(47, 143, 131, 0.16), rgba(255, 255, 255, 0.78));
}

body.app-shell.companies-page .companies-summary-card--warning {
    background: linear-gradient(145deg, rgba(213, 154, 58, 0.18), rgba(255, 255, 255, 0.78));
}

body.app-shell.companies-page .companies-summary-card__icon {
    position: relative;
    z-index: 1;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: inherit;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

body.app-shell.companies-page .companies-summary-card--primary .companies-summary-card__icon {
    background: rgba(255, 255, 255, 0.14);
}

body.app-shell.companies-page .companies-summary-card__meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

body.app-shell.companies-page .companies-summary-card__label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.82;
}

body.app-shell.companies-page .companies-summary-card__value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 2vw, 2.45rem);
    line-height: 1;
}

body.app-shell.companies-page .companies-summary-card__hint {
    color: inherit;
    opacity: 0.84;
    line-height: 1.55;
}

body.app-shell.companies-page .companies-control-row {
    align-items: stretch;
}

body.app-shell.companies-page .companies-filter-card,
body.app-shell.companies-page .companies-focus-card,
body.app-shell.companies-page .companies-table-card {
    height: 100%;
}

body.app-shell.companies-page .companies-filter-card,
body.app-shell.companies-page .companies-focus-card {
    padding: 1.35rem;
}

body.app-shell.companies-page .companies-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 1.2rem;
}

body.app-shell.companies-page .companies-panel__header p,
body.app-shell.companies-page .companies-bulk-toolbar__note,
body.app-shell.companies-page .companies-cell-muted,
body.app-shell.companies-page .companies-filter-state__result,
body.app-shell.companies-page .companies-focus-note,
body.app-shell.companies-page .companies-team-cell {
    color: #5f7480;
}

body.app-shell.companies-page .companies-panel__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.06);
    border: 1px solid rgba(20, 52, 75, 0.08);
    color: #31505f;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

body.app-shell.companies-page .companies-field-label,
body.app-shell.companies-page .companies-filter-state__label {
    display: inline-block;
    color: #35505f;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.app-shell.companies-page .companies-field-label {
    margin-bottom: 0.45rem;
}

body.app-shell.companies-page .companies-filter-input .input-group-text,
body.app-shell.companies-page .companies-filter-input .form-control,
body.app-shell.companies-page .companies-filter-input .form-select {
    min-height: 54px;
}

body.app-shell.companies-page .companies-filter-actions {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

body.app-shell.companies-page .companies-filter-state {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1.05rem;
    border-radius: 20px;
    background: rgba(20, 52, 75, 0.05);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.companies-page .companies-filter-state__label {
    margin-bottom: 0.15rem;
    font-size: 0.76rem;
    color: #607580;
    letter-spacing: 0.12em;
}

body.app-shell.companies-page .companies-filter-state__badge {
    justify-self: start;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

body.app-shell.companies-page .companies-filter-state__badge--asc {
    background: rgba(47, 143, 131, 0.14);
    color: #25695f;
}

body.app-shell.companies-page .companies-filter-state__badge--desc {
    background: rgba(188, 90, 69, 0.12);
    color: #8b4a39;
}

body.app-shell.companies-page .companies-focus-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

body.app-shell.companies-page .companies-focus-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 110px;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.62);
}

body.app-shell.companies-page .companies-focus-item--danger {
    background: linear-gradient(145deg, rgba(188, 90, 69, 0.16), rgba(255, 255, 255, 0.75));
}

body.app-shell.companies-page .companies-focus-item--warning {
    background: linear-gradient(145deg, rgba(213, 154, 58, 0.18), rgba(255, 255, 255, 0.75));
}

body.app-shell.companies-page .companies-focus-item--info {
    background: linear-gradient(145deg, rgba(93, 138, 166, 0.16), rgba(255, 255, 255, 0.75));
}

body.app-shell.companies-page .companies-focus-item--success,
body.app-shell.companies-page .companies-focus-item--primary {
    background: linear-gradient(145deg, rgba(47, 143, 131, 0.16), rgba(255, 255, 255, 0.75));
}

body.app-shell.companies-page .companies-focus-item__icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #ffffff;
    background: var(--gradient-primary);
    box-shadow: 0 12px 22px rgba(20, 52, 75, 0.16);
}

body.app-shell.companies-page .companies-focus-item__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

body.app-shell.companies-page .companies-focus-item__meta strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    line-height: 1;
}

body.app-shell.companies-page .companies-focus-note {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(20, 52, 75, 0.05);
    border: 1px solid rgba(20, 52, 75, 0.08);
    line-height: 1.55;
}

body.app-shell.companies-page .companies-table-card {
    padding: 0;
}

body.app-shell.companies-page .companies-table-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.35rem 0.95rem;
}

body.app-shell.companies-page .companies-table-card__meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

body.app-shell.companies-page .companies-check-all {
    margin: 0;
    padding: 0.62rem 0.85rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.05);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.companies-page .companies-bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.35rem 1rem;
}

body.app-shell.companies-page .companies-bulk-toolbar__left {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

body.app-shell.companies-page .companies-bulk-toolbar__right {
    font-size: 0.9rem;
}

body.app-shell.companies-page .companies-table-wrap {
    margin: 0 1rem 1rem;
    border: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.54);
}

body.app-shell.companies-page .companies-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

body.app-shell.companies-page .companies-table tbody tr {
    background: rgba(255, 255, 255, 0.26);
}

body.app-shell.companies-page .companies-table tbody tr td:first-child,
body.app-shell.companies-page .companies-table thead th:first-child {
    padding-left: 1.15rem;
}

body.app-shell.companies-page .companies-table tbody tr td:last-child,
body.app-shell.companies-page .companies-table thead th:last-child {
    padding-right: 1.15rem;
}

body.app-shell.companies-page .companies-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
}

body.app-shell.companies-page .companies-empty-state__icon {
    width: 86px;
    height: 86px;
    margin: 0 auto 1.15rem;
    border-radius: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    color: #1f5d77;
    background: rgba(31, 93, 119, 0.1);
}

body.app-shell.companies-page .companies-id-badge,
body.app-shell.companies-page .companies-metric-pill,
body.app-shell.companies-page .companies-type-pill,
body.app-shell.companies-page .companies-client-pill,
body.app-shell.companies-page .companies-risk-pill,
body.app-shell.companies-page .companies-compliance {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.45rem 0.72rem;
    border-radius: 999px;
    font-weight: 700;
}

body.app-shell.companies-page .companies-id-badge {
    min-width: 52px;
    background: rgba(20, 52, 75, 0.08);
    color: #355261;
}

body.app-shell.companies-page .companies-sort-link,
body.app-shell.companies-page .companies-title-link,
body.app-shell.companies-page .companies-site-link {
    color: #1f5d77;
    font-weight: 700;
    text-decoration: none;
}

body.app-shell.companies-page .companies-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

body.app-shell.companies-page .companies-sort-link--center {
    justify-content: center;
}

body.app-shell.companies-page .companies-title-link:hover,
body.app-shell.companies-page .companies-site-link:hover,
body.app-shell.companies-page .companies-sort-link:hover {
    color: #14344b;
}

body.app-shell.companies-page .companies-title-cell {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

body.app-shell.companies-page .companies-code {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.45rem 0.72rem;
    border-radius: 12px;
    background: rgba(20, 52, 75, 0.06);
    color: #385360;
    font-weight: 600;
    font-family: 'IBM Plex Sans', sans-serif;
}

body.app-shell.companies-page .companies-type-pill--primary {
    background: rgba(20, 52, 75, 0.1);
    color: #274b5f;
}

body.app-shell.companies-page .companies-type-pill--success {
    background: rgba(47, 143, 131, 0.12);
    color: #25695f;
}

body.app-shell.companies-page .companies-client-pill--success {
    background: rgba(47, 143, 131, 0.12);
    color: #25695f;
}

body.app-shell.companies-page .companies-client-pill--warning {
    background: rgba(213, 154, 58, 0.16);
    color: #8a6325;
}

body.app-shell.companies-page .companies-client-pill--info,
body.app-shell.companies-page .companies-metric-pill,
body.app-shell.companies-page .companies-site-link {
    background: rgba(44, 128, 179, 0.12);
    color: #24597a;
}

body.app-shell.companies-page .companies-site-link {
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.45rem 0.72rem;
}

body.app-shell.companies-page .companies-contour-cell,
body.app-shell.companies-page .companies-team-cell {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

body.app-shell.companies-page .companies-contour-cell__title {
    color: #203846;
    font-weight: 700;
}

body.app-shell.companies-page .companies-risk-stack {
    gap: 0.5rem;
}

body.app-shell.companies-page .companies-risk-pill {
    gap: 0.4rem;
    border: 1px solid rgba(20, 52, 75, 0.06);
    background: rgba(255, 255, 255, 0.75);
    color: #3e5866;
}

body.app-shell.companies-page .companies-risk-pill--success {
    background: rgba(47, 143, 131, 0.12);
    color: #25695f;
}

body.app-shell.companies-page .companies-risk-pill--danger {
    background: rgba(188, 90, 69, 0.12);
    color: #8b4a39;
}

body.app-shell.companies-page .companies-risk-pill--warning {
    background: rgba(213, 154, 58, 0.16);
    color: #8a6325;
}

body.app-shell.companies-page .companies-risk-pill--info {
    background: rgba(44, 128, 179, 0.12);
    color: #24597a;
}

body.app-shell.companies-page .companies-compliance--success {
    background: rgba(47, 143, 131, 0.14);
    color: #25695f;
}

body.app-shell.companies-page .companies-compliance--warning {
    background: rgba(213, 154, 58, 0.16);
    color: #8a6325;
}

body.app-shell.companies-page .companies-compliance--danger {
    background: rgba(188, 90, 69, 0.14);
    color: #8b4a39;
}

body.app-shell.companies-page .companies-action-group {
    display: inline-flex;
    gap: 0.45rem;
}

body.app-shell.companies-page .companies-pagination-wrap {
    padding: 0 1rem 1rem;
}

@media (max-width: 1399.98px) {
    body.app-shell.companies-page .companies-hero__layout {
        grid-template-columns: 1fr;
    }

    body.app-shell.companies-page .companies-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    body.app-shell.companies-page .companies-summary-grid,
    body.app-shell.companies-page .companies-focus-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.app-shell.companies-page .companies-filter-state {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }
}

@media (max-width: 991.98px) {
    body.app-shell.companies-page .companies-hero,
    body.app-shell.companies-page .companies-filter-card,
    body.app-shell.companies-page .companies-focus-card {
        padding: 1.2rem;
    }

    body.app-shell.companies-page .companies-hero__header,
    body.app-shell.companies-page .companies-table-card__header,
    body.app-shell.companies-page .companies-bulk-toolbar,
    body.app-shell.companies-page .companies-panel__header {
        flex-direction: column;
        align-items: flex-start;
    }

    body.app-shell.companies-page .companies-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    body.app-shell.companies-page .companies-hero__actions,
    body.app-shell.companies-page .companies-active-tags,
    body.app-shell.companies-page .companies-summary-grid,
    body.app-shell.companies-page .companies-focus-grid,
    body.app-shell.companies-page .companies-table-card__meta,
    body.app-shell.companies-page .companies-filter-actions,
    body.app-shell.companies-page .companies-title-cell__meta,
    body.app-shell.companies-page .companies-risk-stack {
        width: 100%;
    }

    body.app-shell.companies-page .companies-summary-grid,
    body.app-shell.companies-page .companies-focus-grid {
        grid-template-columns: 1fr;
    }

    body.app-shell.companies-page .companies-summary-card,
    body.app-shell.companies-page .companies-focus-item {
        min-height: 0;
    }

    body.app-shell.companies-page .companies-table-wrap {
        margin: 0 0.75rem 0.75rem;
    }

    body.app-shell.companies-page .companies-table-card__header,
    body.app-shell.companies-page .companies-bulk-toolbar {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }
}

/* ==========================================================================
   EMPLOYEES PAGE
   ========================================================================== */
body.app-shell.employees-page .employees-shell {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
}

body.app-shell.employees-page .main-content {
    padding: 22px 18px 28px;
    display: block;
}

body.app-shell.employees-page .main-content > .employees-shell {
    flex: none;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

body.app-shell.employees-page {
    /* Обновлённые веса колонок – таблица становится компактнее */
    --employees-col-total-weight: 20.7;
    --employees-col-check-weight: 0.3;
    --employees-col-status-weight: 1.0;
    --employees-col-id-weight: 0.5;
    --employees-col-name-weight: 2.5;
    --employees-col-position-weight: 2.0;
    --employees-col-company-weight: 1.5;
    --employees-col-department-weight: 1.5;
    --employees-col-hire-date-weight: 1.2;
    --employees-col-birth-date-weight: 1.2;
    --employees-col-snils-weight: 1.2;
    --employees-col-training-weight: 1.2;
    --employees-col-medical-weight: 1.2;
    --employees-col-psychiatric-weight: 1.3;
    --employees-col-internship-weight: 1.1;
    --employees-col-sout-weight: 1.0;
    --employees-col-opr-weight: 1.0;
    --employees-col-actions-weight: 1.0;

    /* Вычисляемые ширины колонок */
    --employees-col-check: calc(100% * var(--employees-col-check-weight) / var(--employees-col-total-weight));
    --employees-col-status: calc(100% * var(--employees-col-status-weight) / var(--employees-col-total-weight));
    --employees-col-id: calc(100% * var(--employees-col-id-weight) / var(--employees-col-total-weight));
    --employees-col-name: calc(100% * var(--employees-col-name-weight) / var(--employees-col-total-weight));
    --employees-col-position: calc(100% * var(--employees-col-position-weight) / var(--employees-col-total-weight));
    --employees-col-company: calc(100% * var(--employees-col-company-weight) / var(--employees-col-total-weight));
    --employees-col-department: calc(100% * var(--employees-col-department-weight) / var(--employees-col-total-weight));
    --employees-col-hire-date: calc(100% * var(--employees-col-hire-date-weight) / var(--employees-col-total-weight));
    --employees-col-birth-date: calc(100% * var(--employees-col-birth-date-weight) / var(--employees-col-total-weight));
    --employees-col-snils: calc(100% * var(--employees-col-snils-weight) / var(--employees-col-total-weight));
    --employees-col-training: calc(100% * var(--employees-col-training-weight) / var(--employees-col-total-weight));
    --employees-col-medical: calc(100% * var(--employees-col-medical-weight) / var(--employees-col-total-weight));
    --employees-col-psychiatric: calc(100% * var(--employees-col-psychiatric-weight) / var(--employees-col-total-weight));
    --employees-col-internship: calc(100% * var(--employees-col-internship-weight) / var(--employees-col-total-weight));
    --employees-col-sout: calc(100% * var(--employees-col-sout-weight) / var(--employees-col-total-weight));
    --employees-col-opr: calc(100% * var(--employees-col-opr-weight) / var(--employees-col-total-weight));
    --employees-col-actions: calc(100% * var(--employees-col-actions-weight) / var(--employees-col-total-weight));
}

body.app-shell.employees-page .employees-import-errors {
    max-height: 180px;
    overflow-y: auto;
    padding-right: 0.35rem;
}

body.app-shell.employees-page .employees-hero {
    padding: 1.65rem;
    background:
        radial-gradient(circle at top right, rgba(213, 154, 58, 0.14), transparent 34%),
        radial-gradient(circle at bottom left, rgba(47, 143, 131, 0.18), transparent 40%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 252, 0.82));
}

body.app-shell.employees-page .employees-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.9fr);
    gap: 1.4rem;
    align-items: stretch;
}

body.app-shell.employees-page .employees-hero__content {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

body.app-shell.employees-page .employees-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    width: fit-content;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.06);
    color: #48616f;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.app-shell.employees-page .employees-hero__eyebrow-mark {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #d59a3a, #2f8f83);
    box-shadow: 0 0 0 6px rgba(47, 143, 131, 0.12);
}

body.app-shell.employees-page .employees-hero__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

body.app-shell.employees-page .employees-hero__title {
    font-size: clamp(2rem, 2.6vw, 3rem);
    line-height: 0.96;
}

body.app-shell.employees-page .employees-hero__text {
    max-width: 720px;
    color: #5c707c;
    font-size: 1rem;
    line-height: 1.7;
}

body.app-shell.employees-page .employees-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

body.app-shell.employees-page .employees-active-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

body.app-shell.employees-page .employees-active-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.62rem 0.92rem;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(20, 52, 75, 0.1);
    color: #35505f;
    font-weight: 600;
}

body.app-shell.employees-page a.employees-active-tag {
    text-decoration: none;
}

body.app-shell.employees-page a.employees-active-tag:hover,
body.app-shell.employees-page a.employees-active-tag:focus-visible {
    border-color: rgba(188, 90, 69, 0.28);
    color: #8b4a39;
}

body.app-shell.employees-page .employees-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

body.app-shell.employees-page .employees-summary-card {
    position: relative;
    min-height: 150px;
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
    padding: 1.15rem;
    border-radius: 24px;
    border: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    overflow: hidden;
}

body.app-shell.employees-page .employees-summary-card::after {
    content: '';
    position: absolute;
    inset: auto -14% -36% auto;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    filter: blur(2px);
}

body.app-shell.employees-page .employees-summary-card--primary {
    background: linear-gradient(145deg, rgba(20, 52, 75, 0.94), rgba(31, 93, 119, 0.86));
    color: #ffffff;
}

body.app-shell.employees-page .employees-summary-card--danger {
    background: linear-gradient(145deg, rgba(188, 90, 69, 0.16), rgba(255, 255, 255, 0.78));
}

body.app-shell.employees-page .employees-summary-card--warning {
    background: linear-gradient(145deg, rgba(213, 154, 58, 0.18), rgba(255, 255, 255, 0.78));
}

body.app-shell.employees-page .employees-summary-card--info {
    background: linear-gradient(145deg, rgba(93, 138, 166, 0.18), rgba(255, 255, 255, 0.78));
}

body.app-shell.employees-page .employees-summary-card__icon {
    position: relative;
    z-index: 1;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: inherit;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

body.app-shell.employees-page .employees-summary-card--primary .employees-summary-card__icon {
    background: rgba(255, 255, 255, 0.14);
}

body.app-shell.employees-page .employees-summary-card__meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

body.app-shell.employees-page .employees-summary-card__label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.82;
}

body.app-shell.employees-page .employees-summary-card__value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 2vw, 2.45rem);
    line-height: 1;
}

body.app-shell.employees-page .employees-summary-card__hint {
    color: inherit;
    opacity: 0.84;
    line-height: 1.55;
}

body.app-shell.employees-page .employees-control-row {
    align-items: stretch;
}

body.app-shell.employees-page .employees-filter-card,
body.app-shell.employees-page .employees-health-card,
body.app-shell.employees-page .employees-table-card {
    height: 100%;
}

body.app-shell.employees-page .employees-filter-card,
body.app-shell.employees-page .employees-health-card {
    padding: 1.35rem;
}

body.app-shell.employees-page .employees-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 1.2rem;
}

body.app-shell.employees-page .employees-panel__header p {
    color: #637581;
    line-height: 1.55;
}

body.app-shell.employees-page .employees-panel__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.06);
    border: 1px solid rgba(20, 52, 75, 0.08);
    color: #31505f;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

body.app-shell.employees-page .employees-field-label {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: #35505f;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.app-shell.employees-page .employees-filter-input .input-group-text,
body.app-shell.employees-page .employees-filter-input .form-control,
body.app-shell.employees-page .employees-filter-input .form-select {
    min-height: 54px;
}

body.app-shell.employees-page .employees-toggle-card {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    border: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.56);
}

body.app-shell.employees-page .employees-toggle-card p,
body.app-shell.employees-page .employees-sort-state__result {
    color: #5f7480;
}

body.app-shell.employees-page .employees-sort-state {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1.05rem;
    border-radius: 20px;
    background: rgba(20, 52, 75, 0.05);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.employees-page .employees-sort-state__label {
    display: block;
    margin-bottom: 0.15rem;
    color: #607580;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.app-shell.employees-page .employees-sort-state__badge {
    justify-self: start;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

body.app-shell.employees-page .employees-sort-state__badge--asc {
    background: rgba(47, 143, 131, 0.14);
    color: #25695f;
}

body.app-shell.employees-page .employees-sort-state__badge--desc {
    background: rgba(188, 90, 69, 0.12);
    color: #8b4a39;
}

body.app-shell.employees-page .employees-health-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

body.app-shell.employees-page .employees-health-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 110px;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.62);
    color: inherit;
    text-decoration: none;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

body.app-shell.employees-page a.employees-health-item:hover,
body.app-shell.employees-page a.employees-health-item:focus-visible,
body.app-shell.employees-page .employees-health-item.is-active {
    border-color: rgba(30, 126, 111, 0.35);
    box-shadow: 0 16px 34px rgba(20, 52, 75, 0.12);
    transform: translateY(-1px);
    outline: none;
}

body.app-shell.employees-page .employees-health-item--warning {
    background: linear-gradient(145deg, rgba(213, 154, 58, 0.18), rgba(255, 255, 255, 0.75));
}

body.app-shell.employees-page .employees-health-item--danger {
    background: linear-gradient(145deg, rgba(188, 90, 69, 0.16), rgba(255, 255, 255, 0.75));
}

body.app-shell.employees-page .employees-health-item--muted {
    background: linear-gradient(145deg, rgba(93, 138, 166, 0.16), rgba(255, 255, 255, 0.75));
}

body.app-shell.employees-page .employees-health-item__icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #ffffff;
    background: var(--gradient-primary);
    box-shadow: 0 12px 22px rgba(20, 52, 75, 0.16);
}

body.app-shell.employees-page .employees-health-item__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

body.app-shell.employees-page .employees-health-item__meta strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    line-height: 1;
}

body.app-shell.employees-page .employees-health-item__meta span {
    color: #546a77;
    line-height: 1.45;
}

body.app-shell.employees-page .employees-table-card {
    padding: 0;
}

body.app-shell.employees-page .employees-table-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.35rem 0.95rem;
}

body.app-shell.employees-page .employees-table-card__meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

body.app-shell.employees-page .employees-check-all {
    display: block !important;
    margin: 0;
    padding: 0.62rem 0.85rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.05);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.employees-page .employees-check-all .form-check-label {
    display: block;
    margin-top: 0.35rem;
}

body.app-shell.employees-page .employees-bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.35rem 1rem;
}

body.app-shell.employees-page .employees-bulk-toolbar__left {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

body.app-shell.employees-page .employees-bulk-toolbar__left .form-select {
    min-width: 280px;
}

body.app-shell.employees-page .employees-bulk-toolbar__right {
    color: #61737f;
    font-size: 0.9rem;
}

body.app-shell.employees-page .employees-table-wrap {
    margin: 0 1rem 1rem;
    border: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.54);
}

body.app-shell.employees-page .employees-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

body.app-shell.employees-page .employees-table tbody tr {
    background: rgba(255, 255, 255, 0.26);
}

body.app-shell.employees-page .employees-table tbody tr.table-secondary {
    --bs-table-bg: rgba(124, 137, 146, 0.08);
}

body.app-shell.employees-page .employees-table tbody tr td:first-child,
body.app-shell.employees-page .employees-table thead th:first-child {
    padding-left: 1.15rem;
}

body.app-shell.employees-page .employees-table tbody tr td:last-child,
body.app-shell.employees-page .employees-table thead th:last-child {
    padding-right: 1.15rem;
}

body.app-shell.employees-page .employees-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
}

body.app-shell.employees-page .employees-empty-state__icon {
    width: 86px;
    height: 86px;
    margin: 0 auto 1.15rem;
    border-radius: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    color: #1f5d77;
    background: rgba(31, 93, 119, 0.1);
}

body.app-shell.employees-page .employees-id-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 32px;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.08);
    color: #355261;
    font-weight: 700;
}

body.app-shell.employees-page .employees-person-cell {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 210px;
}

body.app-shell.employees-page .employees-person-cell__avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(20, 52, 75, 0.9), rgba(47, 143, 131, 0.78));
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 12px 22px rgba(20, 52, 75, 0.14);
}

body.app-shell.employees-page .employees-person-cell__name {
    color: #203846;
    font-weight: 700;
    line-height: 1.35;
}

body.app-shell.employees-page .employees-text-strong {
    color: #203846;
    font-weight: 600;
}

body.app-shell.employees-page .employees-company-link {
    color: #1f5d77;
    font-weight: 700;
    text-decoration: none;
}

body.app-shell.employees-page .employees-company-link:hover {
    color: #14344b;
    text-decoration: underline;
}

body.app-shell.employees-page .employees-company-link--plain {
    color: #36505e;
    text-decoration: none;
}

body.app-shell.employees-page .employees-cell-muted {
    color: #657783;
}

body.app-shell.employees-page .employees-date-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.45rem 0.72rem;
    border-radius: 999px;
    background: rgba(47, 143, 131, 0.1);
    color: #2c6e65;
    font-weight: 700;
}

body.app-shell.employees-page .employees-cell-code {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.45rem 0.72rem;
    border-radius: 12px;
    background: rgba(20, 52, 75, 0.06);
    color: #385360;
    font-weight: 600;
    font-family: 'IBM Plex Sans', sans-serif;
}

body.app-shell.employees-page .employees-action-group {
    display: inline-flex;
    gap: 0.45rem;
}

body.app-shell.employees-page .date-status,
body.app-shell.employees-page .date-simple {
    border-radius: 16px;
    padding: 0.7rem 0.82rem;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(20, 52, 75, 0.08);
    line-height: 1.45;
}

body.app-shell.employees-page .date-status.status-expired {
    background: rgba(188, 90, 69, 0.12);
    border-color: rgba(188, 90, 69, 0.18);
    color: #874333;
}

body.app-shell.employees-page .date-status.status-warning {
    background: rgba(213, 154, 58, 0.14);
    border-color: rgba(213, 154, 58, 0.2);
    color: #8a6325;
}

body.app-shell.employees-page .no-data {
    color: #768793;
    font-style: normal;
}

body.app-shell.employees-page .column-toggle-btn {
    min-height: 46px;
    border-radius: 14px;
}

body.app-shell.employees-page .employees-offcanvas {
    width: min(74vw, 1140px);
    max-width: none;
    border-left: 1px solid rgba(20, 52, 75, 0.08);
    background:
        linear-gradient(180deg, rgba(245, 249, 252, 0.98), rgba(232, 239, 245, 0.96)),
        url('../img/fon.png') center/cover no-repeat;
    backdrop-filter: blur(22px);
    box-shadow: -24px 0 60px rgba(20, 52, 75, 0.18);
}

body.app-shell.employees-page .employees-offcanvas__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.3rem 1.4rem;
    background: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid rgba(20, 52, 75, 0.08);
    backdrop-filter: blur(16px);
}

body.app-shell.employees-page .employees-offcanvas__title-block {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

body.app-shell.employees-page .employees-offcanvas__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #607580;
}

body.app-shell.employees-page .employees-offcanvas__eyebrow-mark {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #d59a3a, #2f8f83);
    box-shadow: 0 0 0 6px rgba(47, 143, 131, 0.12);
}

body.app-shell.employees-page .employees-offcanvas__title {
    margin: 0;
    color: #173b4f;
    font-size: clamp(1.55rem, 2vw, 2rem);
}

body.app-shell.employees-page .employees-offcanvas__subtitle {
    color: #5d7280;
    line-height: 1.55;
}

body.app-shell.employees-page .employees-offcanvas__toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
}

body.app-shell.employees-page .employees-offcanvas__body {
    padding: 1.35rem;
}

body.app-shell.employees-page .employees-offcanvas__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.82fr);
    gap: 1.2rem;
    align-items: start;
    min-height: 100%;
}

body.app-shell.employees-page .employees-offcanvas__main,
body.app-shell.employees-page .employees-offcanvas__side {
    min-width: 0;
}

body.app-shell.employees-page .employees-offcanvas__side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

body.app-shell.employees-page .employees-offcanvas__card {
    height: auto !important;
    padding: 1.35rem;
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(247, 250, 251, 0.34));
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.48),
        0 18px 36px rgba(18, 42, 56, 0.1);
    backdrop-filter: blur(22px) saturate(150%);
}

body.app-shell.employees-page .employees-offcanvas__card--accent {
    color: #f7fbfd;
    background: linear-gradient(160deg, rgba(14, 38, 53, 0.84), rgba(31, 93, 119, 0.76));
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 34px rgba(15, 37, 52, 0.18);
}

body.app-shell.employees-page .employees-offcanvas__accent-label {
    display: inline-block;
    margin-bottom: 0.7rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(247, 251, 253, 0.72);
}

body.app-shell.employees-page .employees-offcanvas__accent-value {
    margin-bottom: 0.7rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.7rem, 2.2vw, 2.4rem);
    line-height: 1.05;
}

body.app-shell.employees-page .employees-offcanvas__section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

body.app-shell.employees-page .employees-offcanvas__section-head p {
    color: #617581;
    line-height: 1.55;
}

body.app-shell.employees-page .employees-offcanvas__section-head--compact {
    margin-bottom: 1rem;
}

body.app-shell.employees-page .employees-offcanvas .form-control,
body.app-shell.employees-page .employees-offcanvas .form-select {
    min-height: 52px;
    border-radius: 16px;
    border-color: rgba(20, 52, 75, 0.1);
    background: rgba(255, 255, 255, 0.8);
}

body.app-shell.employees-page .employees-offcanvas__meta-card {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    padding: 1rem 1.05rem;
    border-radius: 20px;
    background: rgba(20, 52, 75, 0.05);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.employees-page .employees-offcanvas__meta-label {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6d808b;
}

body.app-shell.employees-page .employees-offcanvas__meta-card strong {
    color: #203846;
}

body.app-shell.employees-page .employees-offcanvas__meta-card span:last-child {
    color: #627681;
    line-height: 1.45;
}

body.app-shell.employees-page .employees-offcanvas__hint-list {
    display: grid;
    gap: 0.85rem;
}

body.app-shell.employees-page .employees-offcanvas__hint-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.46);
    border: 1px solid rgba(20, 52, 75, 0.06);
}

body.app-shell.employees-page .employees-offcanvas__hint-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #1f5d77;
    background: rgba(31, 93, 119, 0.1);
}

body.app-shell.employees-page .employees-offcanvas__hint-item strong {
    display: block;
    margin-bottom: 0.18rem;
    color: #203846;
}

body.app-shell.employees-page .employees-offcanvas__hint-item span {
    color: #607480;
    line-height: 1.45;
}

body.app-shell.employees-page .employees-offcanvas__focus-note {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(20, 52, 75, 0.08);
    color: #4e6674;
    line-height: 1.55;
}

body.app-shell.employees-page .employees-offcanvas__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
}

body.app-shell.employees-page .employees-offcanvas__actions .btn {
    flex: 1 1 220px;
    min-height: 48px;
    border-radius: 16px;
}

@media (max-width: 1399.98px) {
    body.app-shell.employees-page .employees-hero__layout {
        grid-template-columns: 1fr;
    }

    body.app-shell.employees-page .employees-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    body.app-shell.employees-page .employees-offcanvas {
        width: min(86vw, 1080px);
    }
}

@media (max-width: 1199.98px) {
    body.app-shell.employees-page .employees-summary-grid,
    body.app-shell.employees-page .employees-health-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.app-shell.employees-page .employees-sort-state {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    body.app-shell.employees-page .employees-offcanvas__layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    body.app-shell.employees-page .employees-hero,
    body.app-shell.employees-page .employees-filter-card,
    body.app-shell.employees-page .employees-health-card {
        padding: 1.2rem;
    }

    body.app-shell.employees-page .employees-hero__header,
    body.app-shell.employees-page .employees-table-card__header,
    body.app-shell.employees-page .employees-bulk-toolbar,
    body.app-shell.employees-page .employees-panel__header,
    body.app-shell.employees-page .employees-toggle-card {
        flex-direction: column;
        align-items: flex-start;
    }

    body.app-shell.employees-page .employees-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.app-shell.employees-page .employees-bulk-toolbar__left .form-select {
        min-width: 0;
        width: 100%;
    }

    body.app-shell.employees-page .employees-offcanvas {
        width: 100vw;
    }

    body.app-shell.employees-page .employees-offcanvas__header,
    body.app-shell.employees-page .employees-offcanvas__toolbar,
    body.app-shell.employees-page .employees-offcanvas__section-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767.98px) {
    body.app-shell.employees-page .employees-hero__actions,
    body.app-shell.employees-page .employees-active-tags,
    body.app-shell.employees-page .employees-summary-grid,
    body.app-shell.employees-page .employees-health-grid,
    body.app-shell.employees-page .employees-bulk-toolbar__left,
    body.app-shell.employees-page .employees-table-card__meta {
        width: 100%;
    }

    body.app-shell.employees-page .employees-summary-grid,
    body.app-shell.employees-page .employees-health-grid {
        grid-template-columns: 1fr;
    }

    body.app-shell.employees-page .employees-summary-card,
    body.app-shell.employees-page .employees-health-item {
        min-height: 0;
    }

    body.app-shell.employees-page .employees-table-wrap {
        margin: 0 0.75rem 0.75rem;
    }

    body.app-shell.employees-page .employees-person-cell {
        min-width: 170px;
    }

    body.app-shell.employees-page .employees-offcanvas__body {
        padding: 0.9rem;
    }

    body.app-shell.employees-page .employees-offcanvas__actions,
    body.app-shell.employees-page .employees-offcanvas__actions .btn {
        width: 100%;
    }
}

body.app-shell.employees-page .employees-hero {
    padding: 1rem 1.15rem;
}

body.app-shell.employees-page .employees-hero__layout {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
}

body.app-shell.employees-page .employees-hero__content {
    gap: 0.65rem;
}

body.app-shell.employees-page .employees-hero__eyebrow {
    padding: 0.35rem 0.62rem;
    font-size: 0.68rem;
}

body.app-shell.employees-page .employees-hero__title {
    font-size: clamp(1.55rem, 1.7vw, 2.1rem);
}

body.app-shell.employees-page .employees-hero__text {
    font-size: 0.88rem;
    line-height: 1.45;
}

body.app-shell.employees-page .employees-hero__toolbar {
    display: flex;
    justify-content: flex-end;
    align-self: stretch;
}

body.app-shell.employees-page .employees-hero__actions {
    justify-content: flex-end;
    align-content: flex-start;
    gap: 0.45rem;
    max-width: 430px;
}

body.app-shell.employees-page .employees-hero__actions .btn {
    min-height: 34px;
    padding: 0.38rem 0.58rem;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

body.app-shell.employees-page .employees-control-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

body.app-shell.employees-page .employees-filter-card {
    padding: 1.05rem;
}

body.app-shell.employees-page .employees-health-card--compact {
    padding: 0.85rem 0.95rem;
}

body.app-shell.employees-page .employees-health-card--compact .employees-panel__header {
    align-items: center;
    margin-bottom: 0.65rem;
}

body.app-shell.employees-page .employees-health-card--compact .employees-panel__header h5 {
    font-size: 0.98rem;
}

body.app-shell.employees-page .employees-health-card--compact .employees-panel__header p {
    font-size: 0.76rem;
    line-height: 1.35;
}

body.app-shell.employees-page .employees-health-card--compact .employees-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
    gap: 0.45rem;
}

body.app-shell.employees-page .employees-health-card--compact .employees-health-item {
    min-height: 54px;
    gap: 0.45rem;
    padding: 0.46rem 0.5rem;
    border-radius: 12px;
}

body.app-shell.employees-page .employees-health-card--compact .employees-health-item__icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 9px;
    font-size: 0.82rem;
}

body.app-shell.employees-page .employees-health-card--compact .employees-health-item__meta {
    min-width: 0;
    gap: 0.04rem;
}

body.app-shell.employees-page .employees-health-card--compact .employees-health-item__meta strong {
    font-size: 1rem;
}

body.app-shell.employees-page .employees-health-card--compact .employees-health-item__meta span {
    display: -webkit-box;
    overflow: hidden;
    color: #405965;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.16;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

@media (max-width: 1399.98px) {
    body.app-shell.employees-page .employees-hero__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    body.app-shell.employees-page .employees-hero__toolbar,
    body.app-shell.employees-page .employees-hero__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    body.app-shell.employees-page .employees-hero__actions {
        max-width: none;
    }

    body.app-shell.employees-page .employees-hero__actions .btn {
        flex: 1 1 calc(50% - 0.45rem);
    }

    body.app-shell.employees-page .employees-health-card--compact .employees-health-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 479.98px) {
    body.app-shell.employees-page .employees-health-card--compact .employees-health-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   CONTACTS PAGE
   ========================================================================== */
body.app-shell.contacts-page .contacts-shell {
    display: grid;
    gap: 1.35rem;
    max-width: 100%;
}

body.app-shell.contacts-page .contacts-hero,
body.app-shell.contacts-page .contacts-filter-card,
body.app-shell.contacts-page .contacts-focus-card,
body.app-shell.contacts-page .contacts-table-card {
    transform: none !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.46), rgba(247, 250, 251, 0.2));
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.38),
        0 22px 40px rgba(18, 42, 56, 0.12);
    backdrop-filter: blur(28px) saturate(150%);
}

body.app-shell.contacts-page .contacts-hero {
    position: relative;
    overflow: hidden;
    padding: 1.65rem;
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(47, 143, 131, 0.18), transparent 32%),
        radial-gradient(circle at bottom left, rgba(213, 154, 58, 0.18), transparent 36%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 252, 0.84));
}

body.app-shell.contacts-page .contacts-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
    gap: 1.4rem;
    align-items: stretch;
}

body.app-shell.contacts-page .contacts-hero__content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

body.app-shell.contacts-page .contacts-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #5e7481;
}

body.app-shell.contacts-page .contacts-hero__eyebrow-mark {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(213, 154, 58, 0.95), rgba(31, 93, 119, 0.95));
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.32);
}

body.app-shell.contacts-page .contacts-hero__header,
body.app-shell.contacts-page .contacts-table-card__header,
body.app-shell.contacts-page .contacts-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

body.app-shell.contacts-page .contacts-hero__title {
    font-size: clamp(2rem, 3vw, 2.65rem);
    color: #16384d;
}

body.app-shell.contacts-page .contacts-hero__text {
    max-width: 760px;
    color: #526570;
    font-size: 1.02rem;
    line-height: 1.7;
}

body.app-shell.contacts-page .contacts-hero__actions,
body.app-shell.contacts-page .contacts-active-tags,
body.app-shell.contacts-page .contacts-focus-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

body.app-shell.contacts-page .contacts-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    align-content: start;
}

body.app-shell.contacts-page .contacts-active-tag,
body.app-shell.contacts-page .contacts-panel__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 36px;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.52);
    color: #325261;
    font-weight: 600;
}

body.app-shell.contacts-page .contacts-summary-card {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    min-height: 122px;
    padding: 1rem 1.1rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.46);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

body.app-shell.contacts-page .contacts-summary-card__icon,
body.app-shell.contacts-page .contacts-focus-item__icon,
body.app-shell.contacts-page .contacts-empty-state__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}

body.app-shell.contacts-page .contacts-summary-card__icon {
    width: 52px;
    height: 52px;
    font-size: 1.35rem;
}

body.app-shell.contacts-page .contacts-summary-card__meta,
body.app-shell.contacts-page .contacts-focus-item__meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

body.app-shell.contacts-page .contacts-summary-card__label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6d7f89;
}

body.app-shell.contacts-page .contacts-summary-card__value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    line-height: 1;
    color: #17384c;
}

body.app-shell.contacts-page .contacts-summary-card__hint {
    color: #61747f;
    line-height: 1.45;
}

body.app-shell.contacts-page .contacts-summary-card--primary .contacts-summary-card__icon {
    color: #1f5d77;
    background: rgba(31, 93, 119, 0.12);
}

body.app-shell.contacts-page .contacts-summary-card--info .contacts-summary-card__icon {
    color: #365c7d;
    background: rgba(54, 92, 125, 0.12);
}

body.app-shell.contacts-page .contacts-summary-card--success .contacts-summary-card__icon {
    color: #2f7967;
    background: rgba(47, 143, 131, 0.14);
}

body.app-shell.contacts-page .contacts-summary-card--warning .contacts-summary-card__icon {
    color: #946720;
    background: rgba(213, 154, 58, 0.16);
}

body.app-shell.contacts-page .contacts-filter-card,
body.app-shell.contacts-page .contacts-focus-card,
body.app-shell.contacts-page .contacts-table-card {
    padding: 1.4rem;
    border-radius: 28px;
}

body.app-shell.contacts-page .contacts-field-label {
    margin-bottom: 0.55rem;
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6a7d88;
}

body.app-shell.contacts-page .contacts-filter-input .input-group-text,
body.app-shell.contacts-page .contacts-filter-input .form-control,
body.app-shell.contacts-page .contacts-filter-input .form-select {
    min-height: 52px;
    border-radius: 16px;
    border-color: rgba(20, 52, 75, 0.1);
}

body.app-shell.contacts-page .contacts-filter-input .input-group-text {
    color: #496371;
    background: rgba(255, 255, 255, 0.72);
}

body.app-shell.contacts-page .contacts-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    min-height: 100%;
}

body.app-shell.contacts-page .contacts-filter-state {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.46);
}

body.app-shell.contacts-page .contacts-filter-state__label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #71848f;
}

body.app-shell.contacts-page .contacts-filter-state__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.08);
    color: #31515f;
    font-weight: 700;
}

body.app-shell.contacts-page .contacts-focus-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.app-shell.contacts-page .contacts-focus-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.46);
}

body.app-shell.contacts-page .contacts-focus-item__icon {
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
}

body.app-shell.contacts-page .contacts-focus-item__meta strong {
    font-size: 1.15rem;
    color: #17384c;
}

body.app-shell.contacts-page .contacts-focus-item__meta span {
    color: #627682;
    line-height: 1.35;
}

body.app-shell.contacts-page .contacts-focus-item--primary .contacts-focus-item__icon {
    color: #1f5d77;
    background: rgba(31, 93, 119, 0.12);
}

body.app-shell.contacts-page .contacts-focus-item--success .contacts-focus-item__icon {
    color: #2f7967;
    background: rgba(47, 143, 131, 0.14);
}

body.app-shell.contacts-page .contacts-focus-item--info .contacts-focus-item__icon {
    color: #365c7d;
    background: rgba(54, 92, 125, 0.12);
}

body.app-shell.contacts-page .contacts-focus-item--danger .contacts-focus-item__icon {
    color: #9e4b3a;
    background: rgba(188, 90, 69, 0.14);
}

body.app-shell.contacts-page .contacts-focus-list {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.contacts-page .contacts-focus-list__title {
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6e808a;
}

body.app-shell.contacts-page .contacts-focus-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.72rem 0.9rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.42);
}

body.app-shell.contacts-page .contacts-focus-list__item + .contacts-focus-list__item {
    margin-top: 0.6rem;
}

body.app-shell.contacts-page .contacts-focus-list__item span {
    color: #445d6b;
}

body.app-shell.contacts-page .contacts-focus-list__item strong,
body.app-shell.contacts-page .contacts-focus-note {
    color: #203846;
}

body.app-shell.contacts-page .contacts-focus-note {
    margin-top: 1rem;
    line-height: 1.55;
}

body.app-shell.contacts-page .contacts-table-card__header {
    margin-bottom: 1rem;
}

body.app-shell.contacts-page .contacts-table-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

body.app-shell.contacts-page .contacts-table-wrap {
    margin: 0 -0.4rem -0.4rem;
    padding: 0 0.4rem 0.4rem;
}

body.app-shell.contacts-page .contacts-table thead th {
    border: 0;
    background: rgba(255, 255, 255, 0.54);
    color: #5f7380;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.app-shell.contacts-page .contacts-table thead th:first-child,
body.app-shell.contacts-page .contacts-table tbody td:first-child {
    padding-left: 1.15rem;
}

body.app-shell.contacts-page .contacts-table thead th:last-child,
body.app-shell.contacts-page .contacts-table tbody td:last-child {
    padding-right: 1.15rem;
}

body.app-shell.contacts-page .contacts-table tbody tr {
    background: rgba(255, 255, 255, 0.24);
}

body.app-shell.contacts-page .contacts-person-cell {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 220px;
}

body.app-shell.contacts-page .contacts-person-cell__avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(20, 52, 75, 0.92), rgba(47, 143, 131, 0.78));
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 12px 22px rgba(20, 52, 75, 0.14);
}

body.app-shell.contacts-page .contacts-person-cell__meta {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

body.app-shell.contacts-page .contacts-person-cell__name,
body.app-shell.contacts-page .contacts-text-strong {
    color: #203846;
    font-weight: 700;
}

body.app-shell.contacts-page .contacts-person-cell__hint,
body.app-shell.contacts-page .contacts-cell-muted {
    color: #6d7f89;
}

body.app-shell.contacts-page .contacts-company-link,
body.app-shell.contacts-page .contacts-channel-link {
    color: #1f5d77;
    text-decoration: none;
    font-weight: 600;
}

body.app-shell.contacts-page .contacts-company-link:hover,
body.app-shell.contacts-page .contacts-channel-link:hover {
    color: #14344b;
    text-decoration: underline;
}

body.app-shell.contacts-page .contacts-channel-stack,
body.app-shell.contacts-page .contacts-status-stack {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

body.app-shell.contacts-page .contacts-channel-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

body.app-shell.contacts-page .contacts-company-pill,
body.app-shell.contacts-page .contacts-quality-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.82rem;
    width: fit-content;
}

body.app-shell.contacts-page .contacts-company-pill--success {
    background: rgba(47, 143, 131, 0.12);
    color: #2c6e65;
}

body.app-shell.contacts-page .contacts-company-pill--muted {
    background: rgba(20, 52, 75, 0.08);
    color: #5e7480;
}

body.app-shell.contacts-page .contacts-quality-pill--success {
    background: rgba(47, 143, 131, 0.14);
    color: #2c6e65;
}

body.app-shell.contacts-page .contacts-quality-pill--warning {
    background: rgba(213, 154, 58, 0.16);
    color: #8a6325;
}

body.app-shell.contacts-page .contacts-quality-pill--danger {
    background: rgba(188, 90, 69, 0.14);
    color: #874333;
}

body.app-shell.contacts-page .contacts-action-group {
    display: inline-flex;
    gap: 0.45rem;
}

body.app-shell.contacts-page .contacts-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
}

body.app-shell.contacts-page .contacts-empty-state__icon {
    width: 86px;
    height: 86px;
    margin: 0 auto 1.15rem;
    font-size: 2.15rem;
    color: #1f5d77;
    background: rgba(31, 93, 119, 0.1);
}

body.app-shell.contacts-page .contacts-modal .modal-content {
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(47, 143, 131, 0.12), transparent 34%),
        radial-gradient(circle at bottom left, rgba(213, 154, 58, 0.12), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 252, 0.92));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.56),
        0 24px 44px rgba(16, 37, 49, 0.18);
    backdrop-filter: blur(24px);
}

body.app-shell.contacts-page .contacts-modal .modal-header,
body.app-shell.contacts-page .contacts-modal .modal-footer {
    border-color: rgba(20, 52, 75, 0.08);
}

body.app-shell.contacts-page .contacts-modal .modal-body,
body.app-shell.contacts-page .contacts-modal .modal-header,
body.app-shell.contacts-page .contacts-modal .modal-footer {
    padding-left: 1.35rem;
    padding-right: 1.35rem;
}

body.app-shell.contacts-page .contacts-modal .form-control,
body.app-shell.contacts-page .contacts-modal .form-select {
    min-height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(20, 52, 75, 0.1);
}

@media (max-width: 1399.98px) {
    body.app-shell.contacts-page .contacts-hero__layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1199.98px) {
    body.app-shell.contacts-page .contacts-summary-grid,
    body.app-shell.contacts-page .contacts-focus-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    body.app-shell.contacts-page .contacts-hero,
    body.app-shell.contacts-page .contacts-filter-card,
    body.app-shell.contacts-page .contacts-focus-card,
    body.app-shell.contacts-page .contacts-table-card {
        padding: 1.2rem;
    }

    body.app-shell.contacts-page .contacts-hero__header,
    body.app-shell.contacts-page .contacts-table-card__header,
    body.app-shell.contacts-page .contacts-panel__header,
    body.app-shell.contacts-page .contacts-filter-state {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767.98px) {
    body.app-shell.contacts-page .contacts-summary-grid,
    body.app-shell.contacts-page .contacts-focus-grid {
        grid-template-columns: 1fr;
    }

    body.app-shell.contacts-page .contacts-hero__actions,
    body.app-shell.contacts-page .contacts-active-tags,
    body.app-shell.contacts-page .contacts-filter-actions {
        width: 100%;
    }

    body.app-shell.contacts-page .contacts-hero__actions .btn,
    body.app-shell.contacts-page .contacts-filter-actions .btn {
        width: 100%;
    }

    body.app-shell.contacts-page .contacts-table-wrap {
        margin: 0 0.2rem 0.2rem;
        padding: 0;
    }
}

/* ==========================================================================
   CHAT PAGE
   ========================================================================== */
body.app-shell.chat-page .chat-shell {
    max-width: 100%;
    --chat-panel-height: clamp(560px, calc(100vh - 300px), 780px);
}

body.app-shell.chat-page .chat-hero,
body.app-shell.chat-page .chat-directory-card,
body.app-shell.chat-page .chat-conversation-card {
    transform: none !important;
}

body.app-shell.chat-page .chat-hero {
    padding: 1.65rem;
    background:
        radial-gradient(circle at top right, rgba(47, 143, 131, 0.18), transparent 32%),
        radial-gradient(circle at bottom left, rgba(213, 154, 58, 0.18), transparent 36%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 252, 0.84));
}

body.app-shell.chat-page .chat-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.95fr);
    gap: 1.4rem;
    align-items: stretch;
}

body.app-shell.chat-page .chat-hero__content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

body.app-shell.chat-page .chat-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    width: fit-content;
    padding: 0.5rem 0.82rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.06);
    color: #48616f;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.app-shell.chat-page .chat-hero__eyebrow-mark {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #d59a3a, #2f8f83);
    box-shadow: 0 0 0 6px rgba(47, 143, 131, 0.1);
}

body.app-shell.chat-page .chat-hero__header,
body.app-shell.chat-page .chat-hero__title-row,
body.app-shell.chat-page .chat-hero__actions,
body.app-shell.chat-page .chat-hero__chips {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

body.app-shell.chat-page .chat-hero__title {
    font-size: clamp(2rem, 2.8vw, 3rem);
    line-height: 0.96;
}

body.app-shell.chat-page .chat-hero__text {
    max-width: 760px;
    color: #5c707c;
    line-height: 1.7;
}

body.app-shell.chat-page .chat-hero__badge {
    min-width: 42px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.app-shell.chat-page .chat-hero__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.92rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(20, 52, 75, 0.1);
    color: #35505f;
    font-weight: 600;
}

body.app-shell.chat-page .chat-hero__chip img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

body.app-shell.chat-page .chat-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

body.app-shell.chat-page .chat-summary-card {
    min-height: 150px;
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
    padding: 1.15rem;
    border-radius: 24px;
    border: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

body.app-shell.chat-page .chat-summary-card--primary {
    background: linear-gradient(145deg, rgba(20, 52, 75, 0.94), rgba(31, 93, 119, 0.86));
    color: #ffffff;
}

body.app-shell.chat-page .chat-summary-card--danger {
    background: linear-gradient(145deg, rgba(188, 90, 69, 0.16), rgba(255, 255, 255, 0.78));
}

body.app-shell.chat-page .chat-summary-card--success {
    background: linear-gradient(145deg, rgba(47, 143, 131, 0.16), rgba(255, 255, 255, 0.78));
}

body.app-shell.chat-page .chat-summary-card--info {
    background: linear-gradient(145deg, rgba(93, 138, 166, 0.16), rgba(255, 255, 255, 0.78));
}

body.app-shell.chat-page .chat-summary-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

body.app-shell.chat-page .chat-summary-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

body.app-shell.chat-page .chat-summary-card__label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.82;
}

body.app-shell.chat-page .chat-summary-card__value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.9rem, 2vw, 2.5rem);
    line-height: 1;
}

body.app-shell.chat-page .chat-summary-card__hint {
    line-height: 1.55;
    opacity: 0.84;
}

body.app-shell.chat-page .chat-directory-card,
body.app-shell.chat-page .chat-conversation-card {
    height: var(--chat-panel-height);
    min-height: 0;
}

body.app-shell.chat-page .chat-directory-card {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
}

body.app-shell.chat-page .chat-conversation-card {
    padding: 0;
    overflow: hidden;
}

body.app-shell.chat-page .chat-directory-card__header,
body.app-shell.chat-page .chat-thread-header__top,
body.app-shell.chat-page .chat-thread-header__actions,
body.app-shell.chat-page .chat-thread-header__meta,
body.app-shell.chat-page .chat-empty-state__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    flex-wrap: wrap;
}

body.app-shell.chat-page .chat-directory-card__header p,
body.app-shell.chat-page .chat-thread-header__meta,
body.app-shell.chat-page .chat-empty-state p {
    color: #617480;
}

body.app-shell.chat-page .chat-directory-pill,
body.app-shell.chat-page .chat-thread-chip,
body.app-shell.chat-page .chat-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.58rem 0.84rem;
    border-radius: 999px;
    border: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(20, 52, 75, 0.05);
    color: #35505f;
    font-size: 0.8rem;
    font-weight: 700;
}

body.app-shell.chat-page .chat-directory-search__label {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: #35505f;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.app-shell.chat-page .chat-users-list {
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    border-right: 0;
    background: transparent;
}

body.app-shell.chat-page .chat-directory-section {
    margin: 0.35rem 0 0.1rem;
    color: #6a7d88;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.app-shell.chat-page #usersContainer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    padding-right: 0.25rem;
}

body.app-shell.chat-page .user-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem;
    border-radius: 22px;
    border: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.58);
    color: #213947;
    text-decoration: none;
    position: relative;
}

body.app-shell.chat-page .user-item:hover,
body.app-shell.chat-page .user-item.active {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(31, 93, 119, 0.16);
    box-shadow: 0 14px 26px rgba(15, 37, 52, 0.08);
    transform: translateY(-1px);
}

body.app-shell.chat-page .chat-user-card__avatar-wrap {
    position: relative;
    flex: 0 0 auto;
}

body.app-shell.chat-page .chat-avatar {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 12px 22px rgba(15, 37, 52, 0.14);
}

body.app-shell.chat-page .chat-avatar-small {
    width: 56px;
    height: 56px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 14px 26px rgba(15, 37, 52, 0.16);
}

body.app-shell.chat-page .chat-group-avatar {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #ffffff;
    background: linear-gradient(135deg, #2f8f83, #1f5d77);
    box-shadow: 0 12px 22px rgba(15, 37, 52, 0.14);
}

body.app-shell.chat-page .chat-group-avatar.chat-avatar-small {
    width: 56px;
    height: 56px;
    border-radius: 20px;
    font-size: 1.3rem;
}

body.app-shell.chat-page .online-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    right: 3px;
    bottom: 3px;
    background: #36b37e;
    border: 2px solid #ffffff;
}

body.app-shell.chat-page .chat-user-card__content {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

body.app-shell.chat-page .chat-user-card__top,
body.app-shell.chat-page .chat-user-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}

body.app-shell.chat-page .chat-user-card__name {
    color: #203846;
    font-weight: 700;
}

body.app-shell.chat-page .chat-user-card__time {
    color: #6b7c86;
    font-size: 0.78rem;
    white-space: nowrap;
}

body.app-shell.chat-page .chat-user-card__preview {
    color: #5e7380;
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.app-shell.chat-page .chat-user-card__status {
    color: #6a7d88;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.app-shell.chat-page .unread-badge {
    position: static;
    min-width: 30px;
    height: 30px;
    padding: 0 0.55rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #bc5a45, #d96d56);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 10px 16px rgba(188, 90, 69, 0.2);
}

body.app-shell.chat-page .chat-directory-empty,
body.app-shell.chat-page .chat-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
}

body.app-shell.chat-page .chat-directory-empty {
    min-height: 320px;
    padding: 1.2rem;
}

body.app-shell.chat-page .chat-empty-state {
    height: 100%;
    min-height: 0;
    padding: 2rem;
}

body.app-shell.chat-page .chat-directory-empty__icon,
body.app-shell.chat-page .chat-empty-state__icon {
    width: 86px;
    height: 86px;
    border-radius: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #1f5d77;
    background: rgba(31, 93, 119, 0.1);
}

body.app-shell.chat-page .chat-main {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.36);
}

body.app-shell.chat-page .chat-thread-header {
    flex: 0 0 auto;
    padding: 1.2rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px);
}

body.app-shell.chat-page .chat-thread-header__identity {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

body.app-shell.chat-page .chat-thread-header__status-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

body.app-shell.chat-page .typing-indicator {
    color: #6b7c86;
    font-size: 0.85rem;
}

body.app-shell.chat-page .messages-area {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1.35rem;
    background:
        linear-gradient(180deg, rgba(247, 250, 252, 0.9), rgba(239, 244, 247, 0.8)),
        url('../img/fon.png');
    background-size: auto, cover;
    background-position: center, center;
}

body.app-shell.chat-page .msg-bubble {
    max-width: min(78%, 680px);
    padding: 0.95rem 1rem;
    margin-bottom: 0.95rem;
    border-radius: 24px;
    position: relative;
    box-shadow: 0 14px 26px rgba(15, 37, 52, 0.08);
    word-break: break-word;
}

body.app-shell.chat-page .msg-out {
    align-self: flex-end;
    margin-left: auto;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(20, 52, 75, 0.95), rgba(31, 93, 119, 0.88));
    border-bottom-right-radius: 8px;
}

body.app-shell.chat-page .msg-in {
    align-self: flex-start;
    color: #243744;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(20, 52, 75, 0.08);
    border-bottom-left-radius: 8px;
}

body.app-shell.chat-page .chat-message-author {
    display: block;
    margin-bottom: 0.4rem;
    color: #6b7c86;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

body.app-shell.chat-page .message-text {
    line-height: 1.65;
}

body.app-shell.chat-page .msg-time {
    margin-top: 0.65rem;
    font-size: 0.72rem;
    opacity: 0.82;
}

body.app-shell.chat-page .message-status {
    font-size: 0.82rem;
}

body.app-shell.chat-page .chat-attachment-stack {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

body.app-shell.chat-page .chat-attachment-item {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

body.app-shell.chat-page .chat-attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    width: fit-content;
    max-width: 100%;
    padding: 0.72rem 0.88rem;
    border-radius: 16px;
    background: rgba(20, 52, 75, 0.08);
    color: inherit;
    text-decoration: none;
}

body.app-shell.chat-page .msg-out .chat-attachment-link {
    background: rgba(255, 255, 255, 0.14);
}

body.app-shell.chat-page .chat-attachment-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.app-shell.chat-page .chat-image-preview {
    display: block;
    width: fit-content;
    padding: 0.35rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.chat-page .chat-image-preview img {
    display: block;
    max-width: 220px;
    max-height: 220px;
    border-radius: 14px;
    object-fit: cover;
}

body.app-shell.chat-page .chat-footer {
    flex: 0 0 auto;
    padding: 1rem 1.2rem 1.2rem;
    background: rgba(255, 255, 255, 0.86);
    border-top: 1px solid rgba(20, 52, 75, 0.08);
    backdrop-filter: blur(18px);
}

body.app-shell.chat-page .chat-composer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
}

body.app-shell.chat-page .chat-file-trigger,
body.app-shell.chat-page .chat-send-btn {
    width: 52px;
    height: 52px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

body.app-shell.chat-page .chat-composer__input {
    min-height: 52px;
}

body.app-shell.chat-page .chat-file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.8rem;
}

body.app-shell.chat-page .attachment-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 0.8rem;
    border-radius: 14px;
    background: rgba(20, 52, 75, 0.06);
    border: 1px solid rgba(20, 52, 75, 0.08);
    color: #36505f;
    font-size: 0.84rem;
}

body.app-shell.chat-page .attachment-preview .btn-close {
    font-size: 0.68rem;
}

body.app-shell.chat-page .chat-composer__hint {
    display: block;
    margin-top: 0.65rem;
    color: #71838d;
    font-size: 0.78rem;
}

body.app-shell.chat-page .modal-chat-search .modal-content,
body.app-shell.chat-page #newGroupModal .modal-content,
body.app-shell.chat-page #userInfoModal .modal-content {
    border-radius: 24px;
}

body.app-shell.chat-page .chat-search-container input,
body.app-shell.chat-page .group-members-list {
    background: rgba(255, 255, 255, 0.88);
}

body.app-shell.chat-page .chat-group-members-modal {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 280px;
    overflow-y: auto;
}

body.app-shell.chat-page .chat-group-member-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border-radius: 14px;
    background: rgba(20, 52, 75, 0.05);
}

body.app-shell.chat-page .chat-group-member-row img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

@media (max-width: 1399.98px) {
    body.app-shell.chat-page .chat-hero__layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1199.98px) {
    body.app-shell.chat-page .chat-shell {
        --chat-panel-height: min(680px, 72vh);
    }

    body.app-shell.chat-page .chat-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    body.app-shell.chat-page .chat-directory-card,
    body.app-shell.chat-page .chat-conversation-card,
    body.app-shell.chat-page .chat-main,
    body.app-shell.chat-page .chat-empty-state {
        min-height: auto;
    }

    body.app-shell.chat-page .chat-directory-card {
        height: min(560px, 58vh);
    }
}

@media (max-width: 991.98px) {
    body.app-shell.chat-page .chat-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.app-shell.chat-page .chat-thread-header__top,
    body.app-shell.chat-page .chat-thread-header__actions,
    body.app-shell.chat-page .chat-thread-header__meta {
        align-items: flex-start;
    }

    body.app-shell.chat-page .chat-main {
        height: 100%;
        min-height: 0;
    }
}

@media (max-width: 767.98px) {
    body.app-shell.chat-page .chat-shell {
        --chat-panel-height: 78vh;
    }

    body.app-shell.chat-page .chat-hero,
    body.app-shell.chat-page .chat-directory-card {
        padding: 1.2rem;
    }

    body.app-shell.chat-page .chat-directory-card {
        height: 54vh;
        min-height: 360px;
    }

    body.app-shell.chat-page .chat-conversation-card {
        min-height: 460px;
    }

    body.app-shell.chat-page .chat-summary-grid,
    body.app-shell.chat-page .chat-hero__actions,
    body.app-shell.chat-page .chat-hero__chips,
    body.app-shell.chat-page .chat-empty-state__actions {
        width: 100%;
    }

    body.app-shell.chat-page .chat-summary-grid {
        grid-template-columns: 1fr;
    }

    body.app-shell.chat-page .messages-area {
        padding: 1rem;
    }

    body.app-shell.chat-page .msg-bubble {
        max-width: 100%;
    }

    body.app-shell.chat-page .chat-composer {
        grid-template-columns: 1fr auto;
    }

    body.app-shell.chat-page .chat-file-trigger {
        grid-column: 1 / 2;
        justify-self: start;
    }

    body.app-shell.chat-page .chat-composer__input {
        grid-column: 1 / -1;
    }

    body.app-shell.chat-page .chat-send-btn {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }
}

/* Keep the sidebar identical across app-shell pages. */
body.app-shell .sidebar {
    background:
        linear-gradient(180deg, rgba(17, 35, 45, 0.68) 0%, rgba(20, 52, 63, 0.62) 52%, rgba(24, 63, 68, 0.58) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        18px 0 40px rgba(10, 24, 32, 0.16),
        inset -1px 0 0 rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(26px) saturate(155%);
}

body.app-shell .sidebar-brand-wrapper {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
    border-bottom-color: rgba(255, 255, 255, 0.14);
}

body.app-shell .sidebar-brand-text {
    color: #f8fbfc;
    text-shadow: 0 1px 10px rgba(6, 12, 16, 0.18);
}

body.app-shell .sidebar-menu-content {
    padding: 1rem 0.8rem 1.3rem;
}

body.app-shell .sidebar .nav-link,
body.app-shell .sidebar-menu-content .nav-link {
    color: var(--crm-sidebar-link-color);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.app-shell .sidebar .nav-link:hover,
body.app-shell .sidebar-menu-content .nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.12);
}

body.app-shell .sidebar .nav-link.active,
body.app-shell .sidebar-menu-content .nav-link.active,
body.app-shell .nav-link[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(213, 154, 58, 0.16), rgba(47, 143, 131, 0.16));
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 10px 18px rgba(12, 29, 38, 0.08);
}

body.app-shell .sidebar-divider {
    border-top-color: rgba(255, 255, 255, 0.16);
}

body.app-shell #warehouseSubmenu,
body.app-shell #helpSubmenu {
    background: rgba(6, 14, 18, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.app-shell .sidebar-footer {
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.16));
    border-top-color: rgba(255, 255, 255, 0.14);
}

body.app-shell .user-profile-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Slightly reduce headline sizes across the site. */
body h1,
body .h1 {
    font-size: 2.375rem;
}

body h2,
body .h2 {
    font-size: 1.875rem;
}

body h3,
body .h3 {
    font-size: 1.625rem;
}

.hero-title {
    font-size: 3.375rem;
}

.feature-title {
    font-size: 1.125rem;
}

body.app-shell.dashboard-page .dashboard-hero__title,
body.app-shell.news-page .news-hero__title {
    font-size: clamp(1.875rem, 3vw, 2.675rem);
}

body.app-shell.tasks-page .tasks-hero__title,
body.app-shell.crm-page .crm-hero__title,
body.app-shell.companies-page .companies-hero__title,
body.app-shell.employees-page .employees-hero__title {
    font-size: clamp(1.875rem, 2.6vw, 2.875rem);
}

body.app-shell.contacts-page .contacts-hero__title {
    font-size: clamp(1.875rem, 3vw, 2.525rem);
}

body.app-shell.chat-page .chat-hero__title {
    font-size: clamp(1.875rem, 2.8vw, 2.875rem);
}

body.app-shell.news-page .news-post__title {
    font-size: clamp(1.275rem, 2.2vw, 1.725rem);
}

body.app-shell.employees-page .employees-offcanvas__title {
    font-size: clamp(1.425rem, 2vw, 1.875rem);
}

body.app-shell.employees-page .employees-table-card__header {
    padding: 1rem 1rem 0.7rem;
}

body.app-shell.employees-page .employees-table-card__meta,
body.app-shell.employees-page .employees-bulk-toolbar__right {
    font-size: 0.82rem;
}

body.app-shell.employees-page .employees-bulk-toolbar {
    padding: 0 1rem 0.75rem;
}

body.app-shell.employees-page .employees-table-wrap {
    margin: 0 0.5rem 0.75rem;
    border: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.54);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.app-shell.employees-page .employees-table {
    width: 100%;
    table-layout: fixed;
    font-size: 0.76rem;
    line-height: 1.15;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1300px;
}

@media (max-width: 1400px) {
    body.app-shell.employees-page .employees-table-wrap {
        overflow-x: auto;
    }

    body.app-shell.employees-page .employees-table {
        min-width: 1200px;
    }
}

body.app-shell.employees-page .employees-table thead th,
body.app-shell.employees-page .employees-table tbody td {
    padding: 0.48rem 0.28rem;
    border-right: 1px solid rgba(20, 52, 75, 0.14);
    border-bottom: 1px solid rgba(20, 52, 75, 0.12);
    vertical-align: middle;
    white-space: normal;
    word-break: break-word;
}

body.app-shell.employees-page .employees-table thead th {
    font-size: 0.64rem;
    line-height: 1.08;
    letter-spacing: 0.03em;
    text-transform: none;
    background: rgba(255, 255, 255, 0.76) !important;
    border-top: 1px solid rgba(20, 52, 75, 0.14);
}

body.app-shell.employees-page .employees-table tbody td {
    background: rgba(255, 255, 255, 0.36);
}

body.app-shell.employees-page .employees-table thead th:first-child,
body.app-shell.employees-page .employees-table tbody td:first-child {
    border-left: 1px solid rgba(20, 52, 75, 0.14);
}

body.app-shell.employees-page .employees-table tbody tr:hover td {
    background: rgba(244, 249, 251, 0.88);
}

body.app-shell.employees-page .employees-table tbody tr.table-secondary td {
    background: rgba(234, 238, 241, 0.76);
}

body.app-shell.employees-page .employees-table tbody tr td:first-child,
body.app-shell.employees-page .employees-table thead th:first-child {
    padding-left: 0.58rem;
}

body.app-shell.employees-page .employees-table tbody tr td:last-child,
body.app-shell.employees-page .employees-table thead th:last-child {
    padding-right: 0.58rem;
}

body.app-shell.employees-page .employees-id-badge {
    min-width: 0;
    width: 100%;
    max-width: 2.9rem;
    min-height: 22px;
    padding: 0.16rem 0.22rem;
    font-size: 0.7rem;
}

body.app-shell.employees-page .employees-person-cell {
    display: block;
    gap: 0;
    min-width: 0;
}

body.app-shell.employees-page .employees-person-cell__avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 12px;
    font-size: 0.82rem;
}

body.app-shell.employees-page .employees-person-cell__name,
body.app-shell.employees-page .employees-text-strong,
body.app-shell.employees-page .employees-company-link {
    font-size: 0.88rem;
    line-height: 1.2;
}

body.app-shell.employees-page .employees-person-cell__name,
body.app-shell.employees-page .employees-table td:nth-child(5) .employees-text-strong,
body.app-shell.employees-page .employees-table td:nth-child(6) .employees-company-link,
body.app-shell.employees-page .employees-table td:nth-child(6) .employees-company-link--plain,
body.app-shell.employees-page .employees-table td:nth-child(7) .employees-cell-muted {
    display: block;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.2;
}

body.app-shell.employees-page .employees-cell-muted,
body.app-shell.employees-page .employees-bulk-toolbar__right span {
    font-size: 0.74rem;
}

body.app-shell.employees-page .employees-date-pill,
body.app-shell.employees-page .employees-cell-code,
body.app-shell.employees-page .date-status,
body.app-shell.employees-page .date-simple,
body.app-shell.employees-page .no-data {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 0.24rem 0.28rem;
    font-size: 0.67rem;
    line-height: 1.05;
    text-align: center;
    border-radius: 10px;
}

body.app-shell.employees-page .employees-cell-code {
    letter-spacing: -0.01em;
}

body.app-shell.employees-page .employees-action-group {
    display: grid;
    width: 100%;
    gap: 0.18rem;
}

body.app-shell.employees-page .employees-table td:nth-child(2) .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    white-space: normal;
    text-align: center;
    line-height: 1.05;
    font-size: 0.65rem;
    padding: 0.32rem 0.38rem;
}

body.app-shell.employees-page .employees-table td:nth-child(16) .btn {
    width: 100%;
    padding: 0.22rem 0.26rem;
}

body.app-shell.employees-page .employees-table-card__header {
    padding: 0.9rem 0.85rem 0.55rem;
}

body.app-shell.employees-page .employees-bulk-toolbar {
    gap: 0.75rem;
    padding: 0 0.85rem 0.65rem;
}

body.app-shell.employees-page .employees-bulk-toolbar__left {
    gap: 0.5rem;
}

body.app-shell.employees-page .employees-bulk-toolbar__left .form-select {
    min-width: 220px;
}

body.app-shell.employees-page .employees-table .sortable-header {
    padding-right: 0.36rem !important;
}

body.app-shell.employees-page .employees-table .sort-icon {
    position: static;
    display: block;
    margin-top: 0.16rem;
    transform: none;
    line-height: 1;
}

body.app-shell.employees-page .employees-table th:nth-child(1),
body.app-shell.employees-page .employees-table td:nth-child(1) {
    width: var(--employees-col-check);
}

body.app-shell.employees-page .employees-table th:nth-child(2),
body.app-shell.employees-page .employees-table td:nth-child(2) {
    width: var(--employees-col-status);
}

body.app-shell.employees-page .employees-table th:nth-child(3),
body.app-shell.employees-page .employees-table td:nth-child(3) {
    width: var(--employees-col-id);
}

body.app-shell.employees-page .employees-table th:nth-child(4),
body.app-shell.employees-page .employees-table td:nth-child(4) {
    width: var(--employees-col-name);
}

body.app-shell.employees-page .employees-table th:nth-child(5),
body.app-shell.employees-page .employees-table td:nth-child(5) {
    width: var(--employees-col-position);
}

body.app-shell.employees-page .employees-table th:nth-child(6),
body.app-shell.employees-page .employees-table td:nth-child(6) {
    width: var(--employees-col-company);
}

body.app-shell.employees-page .employees-table th:nth-child(7),
body.app-shell.employees-page .employees-table td:nth-child(7) {
    width: var(--employees-col-department);
}

body.app-shell.employees-page .employees-table th:nth-child(8),
body.app-shell.employees-page .employees-table td:nth-child(8) {
    width: var(--employees-col-hire-date);
}

body.app-shell.employees-page .employees-table th:nth-child(9),
body.app-shell.employees-page .employees-table td:nth-child(9) {
    width: var(--employees-col-birth-date);
}

body.app-shell.employees-page .employees-table th:nth-child(10),
body.app-shell.employees-page .employees-table td:nth-child(10) {
    width: var(--employees-col-snils);
}

body.app-shell.employees-page .employees-table th:nth-child(11),
body.app-shell.employees-page .employees-table td:nth-child(11) {
    width: var(--employees-col-training);
}

body.app-shell.employees-page .employees-table th:nth-child(12),
body.app-shell.employees-page .employees-table td:nth-child(12) {
    width: var(--employees-col-medical);
}

body.app-shell.employees-page .employees-table th:nth-child(13),
body.app-shell.employees-page .employees-table td:nth-child(13) {
    width: var(--employees-col-psychiatric);
}

body.app-shell.employees-page .employees-table th:nth-child(14),
body.app-shell.employees-page .employees-table td:nth-child(14) {
    width: var(--employees-col-internship);
}

body.app-shell.employees-page .employees-table th:nth-child(15),
body.app-shell.employees-page .employees-table td:nth-child(15) {
    width: var(--employees-col-sout);
}

body.app-shell.employees-page .employees-table th:nth-child(16),
body.app-shell.employees-page .employees-table td:nth-child(16) {
    width: var(--employees-col-opr);
}

body.app-shell.employees-page .employees-table th:nth-child(17),
body.app-shell.employees-page .employees-table td:nth-child(17) {
    width: var(--employees-col-actions);
}

body.app-shell.employees-page .date-status small {
    display: block;
    margin-top: 0.14rem;
    font-size: 0.58rem;
    line-height: 1.05;
}

body.app-shell.employees-page .employees-action-group .btn {
    width: 100%;
    padding: 0.22rem 0.26rem;
}

/* Final employees table width enforcement */
body.app-shell.employees-page .employees-table-wrap .employees-table {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 1000px !important;
    font-size: 0.84rem !important;
    word-break: break-word;
    overflow-wrap: break-word;
}

body.app-shell.employees-page .employees-table th,
body.app-shell.employees-page .employees-table td {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 1px;
}

body.app-shell.employees-page .employees-id-badge,
body.app-shell.employees-page .employees-date-pill,
body.app-shell.employees-page .employees-cell-code,
body.app-shell.employees-page .date-status,
body.app-shell.employees-page .date-simple,
body.app-shell.employees-page .badge {
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
}

@media (max-width: 1400px) {
    body.app-shell.employees-page .employees-table {
        min-width: 900px !important;
    }
}

@media (max-width: 1200px) {
    body.app-shell.employees-page .employees-table {
        min-width: 800px !important;
    }
}

@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.375rem;
    }
}

body.app-shell.profile-page .profile-page-shell {
    width: 100%;
}

body.app-shell.profile-page .profile-page-container {
    padding: 0 !important;
}

body.app-shell.profile-page .profile-hero {
    padding: 1.55rem;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(145deg, rgba(20, 52, 75, 0.92), rgba(31, 93, 119, 0.84), rgba(47, 143, 131, 0.74));
    color: #f4fbfd;
    box-shadow:
        0 28px 48px rgba(12, 34, 44, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

body.app-shell.profile-page .profile-hero__header,
body.app-shell.profile-page .profile-hero__actions,
body.app-shell.profile-page .profile-hero__meta,
body.app-shell.profile-page .profile-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

body.app-shell.profile-page .profile-hero__header {
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
}

body.app-shell.profile-page .profile-hero__lead {
    min-width: 0;
    flex: 1 1 540px;
}

body.app-shell.profile-page .profile-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(242, 249, 252, 0.76);
}

body.app-shell.profile-page .profile-hero__eyebrow-mark {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(213, 154, 58, 0.92));
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12);
}

body.app-shell.profile-page .profile-hero__title {
    margin: 0;
    font-size: clamp(2rem, 2.8vw, 3.05rem);
    color: #ffffff;
    text-shadow: 0 10px 30px rgba(8, 19, 24, 0.28);
}

body.app-shell.profile-page .profile-hero__meta {
    margin-top: 0.9rem;
}

body.app-shell.profile-page .profile-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 40px;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(247, 251, 252, 0.92);
}

body.app-shell.profile-page .profile-hero__actions {
    justify-content: flex-end;
    flex: 0 0 auto;
}

body.app-shell.profile-page .profile-hero__summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1.3rem;
}

body.app-shell.profile-page .profile-hero__metric {
    padding: 1rem 1.05rem;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.app-shell.profile-page .profile-hero__metric-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(241, 248, 252, 0.72);
}

body.app-shell.profile-page .profile-hero__metric strong {
    font-size: 1.2rem;
    color: #ffffff;
}

body.app-shell.profile-page .profile-hero__chips {
    margin-top: 1rem;
}

body.app-shell.profile-page .profile-hero__chips--secondary {
    margin-top: 0.85rem;
}

body.app-shell.profile-page .profile-hero__chip,
body.app-shell.profile-page .profile-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 38px;
    padding: 0.5rem 0.78rem;
    border-radius: 999px;
    font-weight: 600;
    border: 1px solid transparent;
}

body.app-shell.profile-page .profile-hero__chip.is-active {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
}

body.app-shell.profile-page .profile-hero__chip.is-muted {
    background: rgba(11, 25, 31, 0.22);
    color: rgba(244, 249, 252, 0.78);
    border-color: rgba(255, 255, 255, 0.1);
}

body.app-shell.profile-page .profile-hero__chip.is-info {
    background: rgba(93, 138, 166, 0.18);
    color: #eaf7fb;
    border-color: rgba(179, 214, 230, 0.18);
}

body.app-shell.profile-page .profile-hero__chip.is-neutral {
    background: rgba(213, 154, 58, 0.14);
    color: #fff6df;
    border-color: rgba(255, 226, 180, 0.18);
}

body.app-shell.profile-page .profile-status-chip {
    color: #ffffff;
}

body.app-shell.profile-page .profile-status-chip--success {
    background: rgba(47, 143, 131, 0.22);
    border-color: rgba(164, 230, 215, 0.24);
}

body.app-shell.profile-page .profile-status-chip--danger {
    background: rgba(188, 90, 69, 0.24);
    border-color: rgba(255, 198, 186, 0.22);
}

body.app-shell.profile-page .profile-status-chip--warning {
    background: rgba(213, 154, 58, 0.22);
    border-color: rgba(255, 234, 191, 0.22);
}

body.app-shell.profile-page .profile-hero__alert {
    margin-top: 1rem;
    border: 1px solid rgba(213, 154, 58, 0.24);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(255, 247, 221, 0.88), rgba(255, 255, 255, 0.74));
    box-shadow: 0 14px 28px rgba(157, 119, 38, 0.08);
}

body.app-shell.profile-page .profile-layout {
    align-items: flex-start;
}

body.app-shell.profile-page .profile-sidebar-column,
body.app-shell.profile-page .profile-content-column {
    display: flex;
    flex-direction: column;
}

body.app-shell.profile-page .profile-sidebar-card {
    position: sticky;
    top: 0.4rem;
}

body.app-shell.profile-page .profile-tabs {
    flex-wrap: nowrap;
    gap: 0.55rem;
    padding: 0.6rem;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid rgba(20, 52, 75, 0.08);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.34), rgba(247, 250, 251, 0.18));
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 36px rgba(20, 52, 75, 0.08);
}

body.app-shell.profile-page .profile-tabs .nav-item {
    flex: 0 0 auto;
}

body.app-shell.profile-page .profile-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.72rem 1rem;
    border: 1px solid transparent;
    border-radius: 16px;
    color: #3b5260;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.55);
}

body.app-shell.profile-page .profile-tabs .nav-link.active,
body.app-shell.profile-page .profile-tabs .nav-link:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.22);
    background: linear-gradient(135deg, rgba(20, 52, 75, 0.88), rgba(31, 93, 119, 0.84));
    box-shadow: 0 14px 24px rgba(20, 52, 75, 0.16);
}

body.app-shell.profile-page .profile-tab-content > .tab-pane > .card,
body.app-shell.profile-page .profile-tab-content > .tab-pane > .custom-card {
    border-radius: 28px;
}

body.app-shell.profile-page .section-title {
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #69808d;
    border-bottom: 1px solid rgba(20, 52, 75, 0.08);
}

body.app-shell.profile-page .border-dashed {
    border: 1px dashed rgba(20, 52, 75, 0.16) !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(247, 250, 251, 0.14));
}

body.app-shell.profile-page .notification {
    border-radius: 20px;
}

body.app-shell.profile-page .table-responsive {
    border-radius: 24px;
    border: 1px solid rgba(20, 52, 75, 0.08);
    background: rgba(255, 255, 255, 0.38);
}

body.app-shell.profile-page .table thead th {
    background: rgba(255, 255, 255, 0.72) !important;
}

body.app-shell.profile-page .table tbody td {
    background: rgba(255, 255, 255, 0.24);
}

body.app-shell.profile-page .table tbody tr:hover td {
    background: rgba(245, 249, 251, 0.78) !important;
}

body.app-shell.profile-page .modal-content {
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(245, 248, 250, 0.8));
    backdrop-filter: blur(22px);
    box-shadow: 0 26px 48px rgba(20, 52, 75, 0.16);
}

body.app-shell.profile-page .modal-header,
body.app-shell.profile-page .modal-footer {
    border-color: rgba(20, 52, 75, 0.08);
}

body.app-shell.profile-page .progress {
    height: 16px;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.08);
    overflow: hidden;
}

body.app-shell.profile-page .list-unstyled li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.28rem 0;
}

body.app-shell.profile-page .card.bg-primary,
body.app-shell.profile-page .card.bg-success,
body.app-shell.profile-page .card.bg-warning,
body.app-shell.profile-page .card.bg-danger {
    border: 0;
    box-shadow: 0 16px 28px rgba(20, 52, 75, 0.12);
}

body.app-shell.profile-page .btn.file-upload-btn {
    min-height: 38px;
}

@media (max-width: 1399.98px) {
    body.app-shell.profile-page .profile-hero__summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    body.app-shell.profile-page .profile-sidebar-card {
        position: static;
    }
}

@media (max-width: 991.98px) {
    body.app-shell.profile-page .profile-hero,
    body.app-shell.profile-page .profile-tabs {
        padding: 1.2rem;
    }

    body.app-shell.profile-page .profile-hero__header {
        flex-direction: column;
    }

    body.app-shell.profile-page .profile-hero__actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    body.app-shell.profile-page .profile-hero__summary {
        grid-template-columns: 1fr;
    }

    body.app-shell.profile-page .profile-hero__actions .btn {
        width: 100%;
    }
}

/* ==========================================================================
   AUTH PAGES
   ========================================================================== */
body.login-page,
body.register-page {
    --auth-primary: #1f5d77;
    --auth-primary-dark: #14344b;
    --auth-accent: #d59a3a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    overflow-y: auto;
    font-family: 'IBM Plex Sans', sans-serif;
    background:
        radial-gradient(circle at 12% 16%, rgba(213, 154, 58, 0.18), transparent 23%),
        radial-gradient(circle at 85% 82%, rgba(47, 143, 131, 0.18), transparent 24%),
        linear-gradient(145deg, rgba(10, 27, 39, 0.82), rgba(20, 52, 75, 0.72)),
        url('../img/fon.png');
    background-size: auto, auto, auto, cover;
    background-position: center;
    background-repeat: no-repeat;
}

body.login-page::before,
body.register-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 55%);
    pointer-events: none;
    z-index: 0;
    filter: none;
}

body.login-page::after,
body.register-page::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(6, 19, 28, 0.2);
    z-index: 0;
}

.login-page .login-container,
.register-page .login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 540px;
    padding: 0;
    animation: fadeIn 0.5s ease-out;
}

.login-page .login-container.auth-shell--wide,
.register-page .login-container.auth-shell--wide {
    max-width: 1120px;
}

.login-page .login-card,
.register-page .login-card {
    padding: 2rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(245, 248, 250, 0.56));
    backdrop-filter: blur(24px);
    box-shadow: 0 28px 60px rgba(7, 22, 30, 0.22);
}

.login-page .auth-brand,
.register-page .auth-brand {
    text-align: center;
}

.login-page .auth-kicker,
.register-page .auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 34px;
    padding: 0.45rem 0.85rem;
    margin-bottom: 0.85rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.08);
    color: var(--auth-primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.login-page .logo-image,
.register-page .logo-image {
    width: 92px;
    height: 92px;
    margin: 0 auto 1rem;
    padding: 1rem;
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(240, 246, 248, 0.72));
    border: 1px solid rgba(20, 52, 75, 0.1);
    box-shadow: 0 18px 36px rgba(20, 52, 75, 0.12);
    animation: none;
}

.login-page .logo-image img,
.register-page .logo-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-page .system-name,
.register-page .system-name {
    margin-bottom: 0.55rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 2.8vw, 2.6rem);
    color: var(--auth-primary-dark);
    background: linear-gradient(135deg, var(--auth-primary-dark), var(--auth-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.04em;
}

.login-page .system-subtitle,
.register-page .system-subtitle {
    color: #5f7280;
    font-size: 0.95rem;
    line-height: 1.6;
    letter-spacing: 0;
    text-transform: none;
}

.login-page .form-label,
.register-page .form-label {
    margin-bottom: 0.55rem;
    color: #26404d;
    font-size: 0.92rem;
}

.login-page .form-control,
.login-page .form-select,
.login-page .input-group-text,
.login-page .btn-outline-secondary,
.register-page .form-control,
.register-page .form-select,
.register-page .input-group-text,
.register-page .btn-outline-secondary {
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(20, 52, 75, 0.14);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: none;
}

.login-page .input-group > .form-control:not(:last-child),
.login-page .input-group > .form-select:not(:last-child),
.register-page .input-group > .form-control:not(:last-child),
.register-page .input-group > .form-select:not(:last-child) {
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

.login-page .input-group-text,
.register-page .input-group-text {
    color: #60717d;
    padding: 0 1rem;
}

.login-page .form-control:focus,
.login-page .form-select:focus,
.register-page .form-control:focus,
.register-page .form-select:focus {
    border-color: rgba(31, 93, 119, 0.35);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 0 0 0.18rem rgba(31, 93, 119, 0.14);
}

.login-page .btn-login-submit,
.register-page .btn-login-submit {
    margin-top: 0;
    min-height: 50px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--auth-primary-dark), var(--auth-primary));
    box-shadow: 0 16px 28px rgba(20, 52, 75, 0.18);
}

.login-page .btn-login-submit:hover,
.register-page .btn-login-submit:hover {
    box-shadow: 0 20px 34px rgba(20, 52, 75, 0.2);
}

.login-page .btn-outline-primary,
.register-page .btn-outline-primary,
.login-page .btn-outline-secondary,
.register-page .btn-outline-secondary {
    min-height: 48px;
    border-radius: 16px;
}

.login-page .alert,
.register-page .alert {
    border-radius: 20px;
    padding: 1rem 1.1rem;
}

.login-page .alert-danger,
.register-page .alert-danger {
    background: rgba(188, 90, 69, 0.12);
    border-color: rgba(188, 90, 69, 0.18);
    color: #8f3d2f;
}

.login-page .alert-success,
.register-page .alert-success {
    background: rgba(47, 143, 131, 0.12);
    border-color: rgba(47, 143, 131, 0.18);
    color: #245a55;
}

.login-page .alert-info,
.register-page .alert-info {
    background: rgba(31, 93, 119, 0.09);
    border-color: rgba(31, 93, 119, 0.14);
    color: var(--auth-primary-dark);
}

.login-page .footer-links,
.register-page .footer-links {
    border-top-color: rgba(20, 52, 75, 0.1);
    color: #5f7280;
}

.login-page .footer-links a,
.register-page .footer-links a {
    color: var(--auth-primary);
}

.auth-main-site-card {
    padding: 1rem 0.5rem;
}

.auth-domain-example code {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(20, 52, 75, 0.08);
    color: var(--auth-primary-dark);
}

.auth-domain-suffix {
    font-weight: 700;
}

.auth-register-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
    gap: 1.25rem;
}

body.login-page.auth-register-page {
    align-items: flex-start;
    padding-top: 0.8rem;
    padding-bottom: 1.4rem;
}

.auth-register-page .login-container.auth-shell--wide {
    max-width: 1080px;
}

.auth-register-page .login-card {
    padding: 1.35rem;
}

.auth-register-page .auth-brand {
    margin-bottom: 1rem !important;
}

.auth-register-page .auth-logo-image {
    width: 72px;
    height: 72px;
    margin-bottom: 0.7rem;
    padding: 0.8rem;
    border-radius: 22px;
}

.auth-register-page .auth-kicker {
    min-height: 30px;
    padding: 0.35rem 0.7rem;
    margin-bottom: 0.55rem;
    font-size: 0.72rem;
}

.auth-register-page .system-name {
    font-size: clamp(1.55rem, 2.3vw, 2.1rem);
    margin-bottom: 0.35rem;
}

.auth-register-page .system-subtitle {
    font-size: 0.88rem;
    line-height: 1.45;
}

.auth-register-page .auth-register-layout {
    gap: 1rem;
}

.auth-register-page .auth-panel,
.auth-register-page .auth-side-card {
    border-radius: 20px;
}

.auth-register-page .auth-panel {
    padding: 1rem;
}

.auth-register-page .auth-panel__header {
    margin-bottom: 0.75rem;
}

.auth-register-page .auth-panel__title {
    font-size: 1.05rem;
}

.auth-register-page .auth-panel__lead,
.auth-register-page .auth-side-card__text,
.auth-register-page .auth-checklist li {
    font-size: 0.88rem;
    line-height: 1.5;
}

.auth-register-page .auth-side-card {
    padding: 1rem;
}

.auth-register-page .auth-side-card + .auth-side-card {
    margin-top: 0.75rem;
}

.auth-register-page .auth-company-preview {
    font-size: 1.22rem;
    margin-bottom: 0.55rem;
}

.auth-register-page .form-label {
    margin-bottom: 0.4rem;
    font-size: 0.86rem;
}

.auth-register-page .form-text {
    font-size: 0.76rem;
}

.auth-register-page .form-control,
.auth-register-page .form-select,
.auth-register-page .input-group-text,
.auth-register-page .btn-outline-secondary {
    min-height: 44px;
}

.auth-register-page .auth-panel--captcha {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.auth-panel,
.auth-side-card,
.auth-state-card {
    border: 1px solid rgba(20, 52, 75, 0.1);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(245, 249, 251, 0.42));
    backdrop-filter: blur(18px);
}

.auth-panel {
    padding: 1.25rem;
}

.auth-panel__header {
    margin-bottom: 1rem;
}

.auth-panel__title {
    margin: 0 0 0.35rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    color: var(--auth-primary-dark);
}

.auth-panel__lead,
.auth-side-card__text,
.auth-state-text {
    margin: 0;
    color: #5f7280;
    line-height: 1.65;
}

.auth-side-card {
    padding: 1.25rem;
}

.auth-side-card + .auth-side-card {
    margin-top: 1rem;
}

.auth-side-card__eyebrow {
    margin-bottom: 0.8rem;
    color: #60717d;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.auth-company-preview {
    margin-bottom: 0.75rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.45rem;
    color: var(--auth-primary-dark);
}

.auth-checklist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    color: #46606d;
}

.auth-checklist li + li {
    margin-top: 0.8rem;
}

.auth-checklist i {
    color: var(--auth-primary);
}

.auth-panel--captcha {
    background: linear-gradient(145deg, rgba(31, 93, 119, 0.08), rgba(255, 255, 255, 0.42));
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.captcha-image {
    border-radius: 16px;
    border: 1px solid rgba(20, 52, 75, 0.12);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.captcha-container .btn {
    width: 38px;
    min-height: 38px;
    padding: 0;
}

.auth-state-card {
    padding: 1.6rem;
}

.auth-state-card .logo-image {
    margin-bottom: 1rem;
}

.auth-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.auth-code-input {
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
}

@media (max-width: 991.98px) {
    .auth-register-layout {
        grid-template-columns: 1fr;
    }

    body.login-page.auth-register-page {
        padding-top: 0.75rem;
    }

    .auth-register-page .auth-register-side {
        display: none;
    }
}

@media (max-width: 767.98px) {
    body.login-page,
    body.register-page {
        padding: 1rem 0.9rem;
    }

    .login-page .login-card,
    .register-page .login-card {
        padding: 1.2rem;
        border-radius: 24px;
    }

    .auth-panel,
    .auth-side-card,
    .auth-state-card {
        border-radius: 20px;
    }

    .auth-actions {
        flex-direction: column;
    }

    .auth-actions .btn {
        width: 100%;
    }
}

/* Employees table scroll layout */
body.app-shell.employees-page #bulkForm,
body.app-shell.employees-page .employees-shell,
body.app-shell.employees-page .main-content > .employees-shell,
body.app-shell.employees-page .employees-table-card,
body.app-shell.employees-page .employees-table-wrap {
    min-width: 0;
    max-width: 100%;
}

body.app-shell.employees-page .employees-table-wrap {
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

body.app-shell.employees-page .employees-table-wrap .employees-table {
    width: auto !important;
    min-width: 100% !important;
    table-layout: auto !important;
    font-size: 0.84rem !important;
}

body.app-shell.employees-page .employees-table col,
body.app-shell.employees-page .employees-table th,
body.app-shell.employees-page .employees-table td {
    width: auto !important;
    max-width: none !important;
}

body.app-shell.employees-page .employees-table th {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

body.app-shell.employees-page .employees-table tbody td {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

body.app-shell.employees-page .employees-table td:nth-child(4),
body.app-shell.employees-page .employees-table td:nth-child(5),
body.app-shell.employees-page .employees-table td:nth-child(6),
body.app-shell.employees-page .employees-table td:nth-child(7) {
    white-space: normal !important;
    min-width: 170px;
    max-width: 260px;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

body.app-shell.employees-page .employees-id-badge,
body.app-shell.employees-page .employees-date-pill,
body.app-shell.employees-page .employees-cell-code,
body.app-shell.employees-page .date-status,
body.app-shell.employees-page .date-simple,
body.app-shell.employees-page .employees-table td:nth-child(2) .badge {
    display: inline-flex !important;
    width: auto !important;
    max-width: none !important;
    white-space: nowrap !important;
}

body.app-shell.employees-page .date-status {
    flex-direction: column;
    align-items: center;
}

body.app-shell.employees-page .employees-action-group {
    display: inline-flex !important;
    width: auto !important;
    gap: 0.3rem;
}

body.app-shell.employees-page .employees-table td:nth-child(16) .btn {
    width: auto !important;
}

body.app-shell.employees-page .employees-pagination-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    padding: 0.35rem 1rem 1rem;
}

body.app-shell.employees-page .employees-pagination-status {
    color: #5f7480;
    font-size: 0.86rem;
    text-align: center;
}

body.app-shell.employees-page .employees-pagination-nav {
    width: 100%;
}

body.app-shell.employees-page .employees-pagination-nav .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
}

body.app-shell.employees-page .employees-pagination-nav .page-link {
    margin: 0;
    padding: 0.62rem 0.9rem;
    min-width: 44px;
}

body.app-shell.employees-page .employees-page-link--edge {
    min-width: 92px !important;
}

body.app-shell.employees-page .employees-pagination-ellipsis {
    pointer-events: none;
    color: #708490;
}

body.app-shell.employees-page .employees-pagination-jump {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    width: 100%;
}

body.app-shell.employees-page .employees-pagination-jump label {
    color: #4e6674;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.app-shell.employees-page .employees-pagination-jump .form-control {
    width: 96px;
    min-height: 42px;
    text-align: center;
}

@media (max-width: 767.98px) {
    body.app-shell.employees-page .employees-pagination-wrap {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    body.app-shell.employees-page .employees-page-link--edge {
        min-width: 0 !important;
    }

    body.app-shell.employees-page .employees-pagination-jump .form-control,
    body.app-shell.employees-page .employees-pagination-jump .btn {
        width: 100%;
    }
}

/* Readability floor for dense CRM screens. Keep page-level styling, but do not let core text fall below usable sizes. */
body.app-shell .form-label {
    font-size: var(--crm-font-label) !important;
    line-height: 1.35;
}

body.app-shell small,
body.app-shell .small,
body.app-shell .text-muted {
    font-size: var(--crm-font-small) !important;
    line-height: 1.4;
}

body.app-shell .btn {
    line-height: var(--crm-btn-line-height) !important;
}

body.app-shell table thead th {
    font-size: var(--crm-font-table-head) !important;
    line-height: 1.35;
}

body.app-shell table tbody td {
    font-size: var(--crm-font-table-cell) !important;
    line-height: 1.45;
}

body.app-shell .sidebar .nav-link,
body.app-shell .sidebar-menu-content .nav-link {
    color: var(--crm-sidebar-link-color) !important;
}
