/* === Toast-уведомления === */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #3b82f6;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    pointer-events: auto;
    animation: toast-slide-in 0.25s ease-out;
    word-break: break-word;
}

.toast--success { border-left-color: #10b981; }
.toast--error { border-left-color: #ef4444; }
.toast--warn { border-left-color: #f59e0b; }
.toast--info { border-left-color: #3b82f6; }

.toast__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}
.toast--success .toast__icon { background: #10b981; }
.toast--error .toast__icon { background: #ef4444; }
.toast--warn .toast__icon { background: #f59e0b; }
.toast--info .toast__icon { background: #3b82f6; }

.toast__body { flex: 1; min-width: 0; }
.toast__title { font-weight: 600; margin-bottom: 2px; }
.toast__msg { color: #4b5563; }

.toast__close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 0 0 8px;
}
.toast__close:hover { color: #6b7280; }

.toast.toast--leaving { animation: toast-slide-out 0.25s ease-in forwards; }

@keyframes toast-slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toast-slide-out {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* === Пагинация === */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    padding: 16px 0;
    flex-wrap: wrap;
}
.pagination__link,
.pagination__current,
.pagination__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    color: #374151;
    transition: all 0.15s;
}
.pagination__link:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}
.pagination__current {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    font-weight: 600;
}
.pagination__dots { border: none; color: #9ca3af; }
.pagination__info {
    font-size: 13px;
    color: #6b7280;
    margin-left: 12px;
}

/* === Сортируемые заголовки таблиц === */
th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 24px;
}
th.sortable:hover { color: #3b82f6; }
th.sortable::after {
    content: "↕";
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 12px;
    opacity: 0.6;
}
th.sortable.sort-asc::after { content: "↑"; color: #3b82f6; opacity: 1; }
th.sortable.sort-desc::after { content: "↓"; color: #3b82f6; opacity: 1; }

/* === Канбан: «показать ещё» === */
.kanban-column__more {
    text-align: center;
    padding: 8px;
    margin: 4px 0;
}
.kanban-column__more-btn {
    display: inline-block;
    padding: 6px 16px;
    background: #f3f4f6;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}
.kanban-column__more-btn:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #3b82f6;
}

/* === Bulk actions panel === */
.bulk-panel {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1f2937;
    color: #fff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    flex-wrap: wrap;
}
.bulk-panel__info {
    font-weight: 600;
    font-size: 14px;
}
.bulk-panel__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.bulk-select {
    padding: 6px 10px;
    border: 1px solid #4b5563;
    background: #374151;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
}
.bulk-panel .btn-small {
    padding: 6px 14px;
    font-size: 13px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.bulk-panel .btn-small:hover { background: #2563eb; }
.bulk-panel .btn-secondary {
    background: #4b5563;
    color: #fff;
}
.th-checkbox { width: 40px; text-align: center; }

/* === Регион в реестре и канбане === */
.region-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #f0f9ff;
    color: #0369a1;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}
.kanban-card__region {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
[data-theme="dark"] .region-badge { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .kanban-card__region { color: #9ca3af; }
