/* ========== DEAL CARD MODAL ========== */
.deal-card-modal {
    /* Базовая ширина без отслеживания: 56rem (~896px), но не больше 95vw - Silva style */
    max-width: min(56rem, 95vw) !important;
    width: min(56rem, 95vw) !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    box-sizing: border-box !important;
}

/* Карточка с трек-номером: компактная как клиент (56rem = ~896px) */
.modal-content.deal-card-modal.with-tracking,
.deal-card-modal.with-tracking {
    max-width: min(56rem, 95vw) !important;
    width: min(56rem, 95vw) !important;
}

#deal-content-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    display: flex !important;
    gap: 15px !important;
    align-items: flex-start !important;
}

#deal-main-content {
    flex: 1 1 56rem !important;
    min-width: 0 !important;
    max-width: 56rem !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    box-sizing: border-box !important;
}

/* При трек-номере модалка расширяется, и основной контент должен использовать ширину (не быть зажатым в 56rem) */
.deal-card-modal.with-tracking #deal-main-content {
    flex: 1 1 auto !important;
    max-width: none !important;
}

#deal-tracking-block {
    flex: 0 0 350px !important;
    min-width: 0 !important;
    max-width: 350px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
}

.deal-items-list {
    /* Список товаров - отступы наследуются от .data-block-content (padding: var(--space-3) = 1rem) */
    /* Список сам по себе не имеет padding, чтобы не дублировать отступы */
    display: block;
}

.deal-item-row,
.deal-item-row.view-mode {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem !important;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.deal-item-row:last-child {
    margin-bottom: 0;
}

/* Убеждаемся, что контейнер товаров имеет правильные отступы */
#deal-items-view.data-block-content {
    padding: var(--space-3);
    overflow-x: hidden;
    min-width: 0;
    box-sizing: border-box;
}

.deal-item-name-block {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.deal-item-name-block > .pii-field {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    min-width: 0;
}

.deal-item-name {
    font-size: var(--font-size-sm);
    font-weight: 400;
    color: var(--text-primary);
}

.deal-item-generic-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.deal-item-qty,
.deal-item-quantity {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin: 0 1rem;
}

.deal-item-price,
.deal-item-total {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--primary);
}

.deal-item-delivery {
    background: rgba(54, 185, 204, 0.1);
    border-color: rgba(54, 185, 204, 0.3);
}

.deal-item-delivery .deal-item-name,
.deal-item-delivery .deal-item-price {
    color: var(--info);
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: var(--space-3);
    padding: 0.75rem var(--space-2);
}

.pagination .btn {
    padding: 0.25rem 0.5rem;
    font-size: var(--font-size-xs);
    min-width: 2rem;
    transition: all 0.2s ease;
}

.pagination .btn:not(:disabled):hover {
    transform: scale(1.05);
}

.pagination .btn svg {
    width: 14px;
    height: 14px;
}

#clients-page-info,
#deals-page-info,
#products-page-info,
#leads-page-info {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 3.5rem;
    text-align: center;
}

.pagination-per-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 0.75rem;
}

.pagination-per-page-label {
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
}

.pagination-per-page .form-input {
    width: auto;
    min-width: 3.5rem;
    padding: 0.25rem 0.5rem;
    font-size: var(--font-size-xs);
}

/* ========== TOAST NOTIFICATIONS - Silva Style ========== */
#toast-container {
    position: fixed;
    top: calc(var(--header-height) + var(--space-3));
    right: var(--space-4);
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    max-width: min(24rem, calc(100vw - var(--sidebar-width) - 3rem));
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-left: 4px solid var(--primary);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hiding {
    transform: translateX(120%);
    opacity: 0;
}

.toast-icon {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-icon svg {
    width: 0.875rem;
    height: 0.875rem;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--text-dark);
    margin-bottom: 0.125rem;
}

.toast-message {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.4;
    word-wrap: break-word;
}

.toast-close {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
    margin: -0.25rem -0.25rem -0.25rem 0;
}

.toast-close:hover {
    background: var(--bg-light);
    color: var(--text-secondary);
}

.toast-close svg {
    width: 1rem;
    height: 1rem;
}

/* Success toast */
.toast.success {
    border-left-color: var(--success);
}

.toast.success .toast-icon {
    background: rgba(28, 200, 138, 0.15);
    color: var(--success);
}

.toast.success .toast-title {
    color: #0f6848;
}

/* Error toast */
.toast.error {
    border-left-color: var(--danger);
}

.toast.error .toast-icon {
    background: rgba(231, 74, 59, 0.15);
    color: var(--danger);
}

.toast.error .toast-title {
    color: #9e2a1e;
}

/* Warning toast */
.toast.warning {
    border-left-color: var(--warning);
}

.toast.warning .toast-icon {
    background: rgba(246, 194, 62, 0.15);
    color: #b7791f;
}

.toast.warning .toast-title {
    color: #7a4b00;
}

/* Info toast */
.toast.info {
    border-left-color: var(--info);
}

.toast.info .toast-icon {
    background: rgba(54, 185, 204, 0.15);
    color: var(--info);
}

.toast.info .toast-title {
    color: #1a6d7d;
}

/* Mobile responsive */
@media (max-width: 768px) {
    #toast-container {
        left: var(--space-2);
        right: var(--space-2);
        max-width: none;
    }
}

/* ========== CONFIRM MODAL - Silva Style ========== */
.confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 12000;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.confirm-modal.show {
    display: flex;
    opacity: 1;
}

.confirm-modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.confirm-modal.show .confirm-modal-content {
    transform: scale(1);
}

.confirm-modal-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-modal-icon svg {
    width: 2rem;
    height: 2rem;
}

.confirm-modal-icon.danger {
    background: rgba(231, 74, 59, 0.12);
    color: var(--danger);
}

.confirm-modal-icon.warning {
    background: rgba(246, 194, 62, 0.15);
    color: #b7791f;
}

.confirm-modal-icon.info {
    background: rgba(54, 185, 204, 0.15);
    color: var(--info);
}

.confirm-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.confirm-modal-message {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    white-space: pre-line;
}

.confirm-modal-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.confirm-modal-buttons .btn {
    min-width: 100px;
    padding: 0.625rem 1.25rem;
}

/* ========== COMBO BADGE ========== */
.combo-badge-preview {
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    background: rgba(40, 127, 113, 0.14);
    color: var(--primary);
    font-size: 0.6rem;
    font-weight: 500;
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    z-index: 2;
}

/* ========== DEAL ITEM ROWS (combo view + deal edit) ========== */
#combo-items-list-view .deal-item-row,
#deal-items-edit .deal-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: var(--font-size-sm);
}

#combo-items-list-view .deal-item-name,
#deal-items-edit .deal-item-name {
    flex: 1;
    color: var(--text-dark);
}

#combo-items-list-view .deal-item-qty,
#deal-items-edit .deal-item-qty {
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
}

#combo-items-list-view .deal-item-price {
    color: var(--primary);
    font-weight: 500;
}

/* Deal items edit - новый стиль карточек */
#deal-items-edit .deal-item-row {
    background: #fff;
    border: 1px solid #e3e6f0;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: 1fr 110px 110px 110px auto;
    gap: 10px;
    align-items: end;
    transition: box-shadow 0.2s;
}

#deal-items-edit .deal-item-row:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#deal-items-edit .deal-item-field {
    display: flex;
    flex-direction: column;
}

#deal-items-edit .deal-item-field label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 3px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

#deal-items-edit .deal-item-field select,
#deal-items-edit .deal-item-field input {
    width: 100%;
    font-size: 13px;
    padding: 6px 10px;
}

#deal-items-edit .deal-item-total {
    font-weight: 600;
    color: var(--primary);
    font-size: 13px;
    white-space: nowrap;
    padding-top: 20px;
}

#deal-items-edit .btn-remove-item {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s;
    margin-top: 20px;
}

#deal-items-edit .btn-remove-item:hover {
    background: #c82333;
}

/* ========== TABS ========== */
.tabs-container {
    display: flex;
    gap: 0;
    margin-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 0.75rem var(--space-3);
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: 400;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: var(--text-dark);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========== UTILITIES ========== */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-secondary) !important; }

.font-bold { font-weight: 500 !important; }

/* ========== OVERLAY для мобильного меню ========== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ========== RESPONSIVE ========== */
/* Средние экраны - вертикальная компоновка для карточки заказа если не хватает места */
@media (max-width: 1200px) {
    .deal-card-modal.with-tracking #deal-content-wrapper {
        flex-direction: column !important;
    }
    
    .deal-card-modal.with-tracking #deal-main-content {
        flex: 1 1 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
    
    .deal-card-modal.with-tracking #deal-tracking-block {
        flex: 1 1 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 1000;
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-header {
        left: 0;
    }
    
    .admin-main {
        margin-left: 0;
        width: 100%;
        padding: var(--space-2);
    }

    .message {
        left: var(--space-2);
        right: var(--space-2);
        width: calc(100vw - (2 * var(--space-2)));
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }
    
    .section-header > div {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-2);
    }
    
    .section-header .btn {
        flex: 1;
        min-width: 120px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .client-card-layout {
        grid-template-columns: 1fr;
    }
    
    .client-deals-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        max-height: 15rem;
    }
    
    /* Фильтры статусов - перенос на новую строку */
    .status-filters {
        gap: 0.375rem;
        margin-bottom: var(--space-3);
    }
    
    .status-filter {
        font-size: var(--font-size-xs);
        padding: 0.25rem 0.5rem;
        white-space: nowrap;
    }
    
    /* Панель фильтров - вертикальная на мобильных */
    .filters-bar {
        flex-direction: column;
        gap: var(--space-2);
    }
    
    .filter-input,
    .filter-select {
        width: 100%;
    }
    
    /* Горизонтальный скролл для таблиц на мобильных */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 calc(-1 * var(--space-2));
        padding: 0 var(--space-2);
    }
    
    /* Минимальная ширина таблицы, чтобы все колонки помещались */
    .table-compact {
        min-width: 600px;
    }
    
    /* Закрепляем колонку "Действия" справа на мобильных для лучшей видимости */
    .table-compact th:last-child,
    .table-compact td:last-child {
        position: sticky;
        right: 0;
        background: var(--bg-white);
        box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1);
        z-index: 10;
    }
    
    .table-compact thead th:last-child {
        background: var(--bg-light);
    }
    
    .table-compact tbody tr:hover td:last-child {
        background: var(--bg-light);
    }
    
    /* Модальные окна на мобильных */
    .modal {
        padding: var(--space-2);
        padding-top: 2vh;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 90vh;
        margin: 0;
    }
    
    /* Уменьшаем ширину меток в data-row на мобильных */
    .data-label {
        width: 6rem;
        font-size: var(--font-size-xs);
    }
    
    .data-value {
        font-size: var(--font-size-xs);
    }
    
    /* Кнопки в футере модальных окон */
    .modal-footer {
        flex-wrap: wrap;
    }
    
    .modal-footer .btn {
        flex: 1;
        min-width: 100px;
    }
    
    /* Карточки клиентов и заказов */
    .client-card-modal,
    .deal-card-modal {
        max-width: 95vw !important;
        width: 95vw !important;
    }
    
    .deal-card-modal.with-tracking {
        max-width: 95vw !important;
        width: 95vw !important;
    }
    
    #deal-main-content {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
    
    #deal-tracking-block {
        width: 100% !important;
    }
    
    /* Пагинация */
    .pagination {
        flex-wrap: wrap;
        gap: var(--space-1);
    }
    
    .pagination .btn {
        min-width: 40px;
        padding: 0.375rem 0.5rem;
    }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 0.375rem;
    height: 0.375rem;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========================================
   TRACKING META (данные отправления)
======================================== */

.tracking-meta {
    margin-bottom: 12px;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    line-height: 1.6;
}

.tracking-meta-row {
    padding: 1px 0;
}

.tracking-meta-label {
    color: var(--text-tertiary);
}

/* ========================================
   TRACKING TIMELINE (как на Почте России)
======================================== */

.tracking-timeline {
    position: relative;
    margin-top: 8px;
}

.tracking-timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #287f71;
}

.tracking-timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding-left: 24px;
}

.tracking-timeline-item:last-child {
    margin-bottom: 0;
}

.tracking-timeline-item-latest {
    background: rgba(40, 127, 113, 0.05);
    padding: 8px 12px 8px 36px; /* Увеличиваем padding-left для отступа от кружочка */
    border-radius: 4px;
    margin-left: -12px;
    margin-right: -12px;
}

.tracking-timeline-dot {
    position: absolute;
    left: 6px; /* Центр линии (5px + 2px/2 = 6px) */
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #287f71;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #287f71;
    z-index: 2;
    transform: translate(-50%, -50%);
}

.tracking-timeline-item-latest .tracking-timeline-dot {
    background: #287f71;
    box-shadow: 0 0 0 2px #287f71, 0 0 0 4px rgba(40, 127, 113, 0.2);
    width: 14px;
    height: 14px;
    /* Компенсируем margin-left: -12px родителя */
    left: 18px; /* 6px + 12px */
    transform: translate(-50%, -50%);
}

.tracking-timeline-content {
    background: transparent;
    padding: 0;
}

.tracking-timeline-item-latest .tracking-timeline-content {
    padding-left: 0;
    margin-left: 0;
}

.tracking-timeline-status {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.tracking-timeline-date {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    margin-bottom: 2px;
    line-height: 1.4;
}

.tracking-timeline-address {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    line-height: 1.4;
}

/* ========== ADMIN FOOTER ========== */
.admin-footer {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 1.5rem;
    z-index: 100;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.05);
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.global-search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.global-search-input {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    transition: all 0.2s;
    background: var(--bg-white);
    color: var(--text-primary);
    font-family: var(--font-family);
}

.global-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.global-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #dee2e6;
    border: none;
    color: #495057;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    padding: 0;
    display: none;
}

.global-search-clear.visible {
    display: block;
}

.global-search-clear:hover {
    background: var(--danger);
    color: white;
}

.global-search-container .search-icon {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    pointer-events: none;
}

.global-search-results {
    position: absolute;
    bottom: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 450px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.global-search-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

.global-search-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    position: relative;
    font-family: var(--font-family);
}

.global-search-tab:hover {
    color: var(--text-primary);
    background: var(--bg-white);
}

.global-search-tab.active {
    color: var(--primary);
    background: var(--bg-white);
    border-bottom-color: var(--primary);
}

.global-search-tab-count {
    margin-left: 0.25rem;
    color: var(--text-muted);
    font-size: var(--font-size-xs);
}

.global-search-tab.active .global-search-tab-count {
    color: var(--primary);
}

.global-search-tab-goto {
    margin-left: 6px;
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0;
    transition: all 0.2s;
    padding: 2px 4px;
    border-radius: 3px;
}

.global-search-tab:hover .global-search-tab-goto {
    opacity: 1;
}

.global-search-tab-goto:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.global-search-tab-content {
    display: none;
    flex-direction: column;
    max-height: 350px;
    overflow-y: auto;
}

.global-search-tab-content.active {
    display: flex;
}

.global-search-result-item {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.global-search-result-item:last-child {
    border-bottom: none;
}

.global-search-result-item:hover {
    background: var(--primary-light);
}

.global-search-result-item .result-icon {
    width: 18px;
    height: 18px;
    color: var(--primary);
    flex-shrink: 0;
}

.global-search-result-item .result-content {
    flex: 1;
    min-width: 0;
}

.global-search-result-item .result-title {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.125rem;
    font-size: var(--font-size-sm);
}

.global-search-result-item .result-subtitle {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.global-search-result-item .result-date {
    font-size: var(--font-size-xs);
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.global-search-no-results {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* Отступ для контента, чтобы footer не перекрывал */
.admin-main {
    padding-bottom: 60px;
}

@media (max-width: 768px) {
    .admin-footer {
        left: 0;
        padding: 0.5rem 1rem;
    }
    
    .global-search-results {
        max-height: 350px;
    }
    
    .global-search-tab-content {
        max-height: 280px;
    }
}

