/* frontend/css/planning.css - Современный дизайн для модуля планирования */

:root {
    --primary-color: #2e8bd5;
    --primary-dark: #2577b8;
    --primary-light: #e8f4f8;
    --secondary-color: #f39c12;
    --danger-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --text-dark: #2c3e50;
    --text-gray: #7f8c8d;
    --text-light: #95a5a6;
    --border-color: #ecf0f1;
    --bg-gray: #f5f7fb;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --transition: all 0.3s ease;
}

/* ============================================
   КОНТЕЙНЕР
   ============================================ */
.planning-container {
    padding: 0;
    max-width: 100%;
    animation: fadeIn 0.3s ease;
}

/* ============================================
   ЗАГОЛОВОК СТРАНИЦЫ
   ============================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header-left h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.page-header-left h1 i {
    color: var(--primary-color);
    margin-right: 12px;
    background: var(--primary-light);
    padding: 10px;
    border-radius: 14px;
    font-size: 22px;
}

.page-description {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.5;
}

.page-header-right {
    display: flex;
    gap: 12px;
}

/* ============================================
   КНОПКИ
   ============================================ */
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #c0392b;
}

/* ============================================
   СПИСОК ПЛАНОВ (GRID)
   ============================================ */
.plans-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

/* ============================================
   КАРТОЧКА ПЛАНА
   ============================================ */
.plan-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
}

.plan-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
}

.plan-card-header {
    padding: 20px 24px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.plan-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
}

/* Статусы */
.plan-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-draft {
    background: #fff3e0;
    color: #e65100;
}

.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-archived {
    background: #f5f5f5;
    color: var(--text-gray);
}

.plan-card-body {
    padding: 20px 24px;
}

.plan-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-gray);
}

.plan-info:last-child {
    margin-bottom: 0;
}

.plan-info i {
    width: 20px;
    color: var(--primary-color);
    font-size: 14px;
}

.plan-info strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Прогресс-бар */
.plan-progress {
    margin: 16px 0 8px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 6px;
}

.progress-bar-container {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--primary-color));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Кнопки действий */
.plan-card-actions {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    background: var(--bg-light);
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--white);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-gray);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.btn-icon:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-icon.delete-plan:hover {
    background: #fee2e2;
    color: var(--danger-color);
}

/* ============================================
   ФИЛЬТРЫ
   ============================================ */
.filters-bar {
    background: var(--white);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-gray);
    margin-bottom: 6px;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    background: var(--white);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 139, 213, 0.1);
}

/* ============================================
   МОДАЛЬНЫЕ ОКНА
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--white);
    border-radius: 24px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-sm {
    width: 450px;
}

.modal-md {
    width: 600px;
}

.modal-lg {
    width: 950px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
}

.modal-header h2 i {
    color: var(--primary-color);
    margin-right: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 28px;
}

/* ============================================
   ФОРМА
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group label .required {
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 139, 213, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-hint {
    display: block;
    font-size: 11px;
    color: var(--text-light);
    margin-top: 6px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   НАЗНАЧЕНИЯ (ПЛАН ITEMS)
   ============================================ */
.plan-items-section {
    margin-top: 28px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.plan-items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.plan-items-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.plan-items-header h3 i {
    color: var(--primary-color);
    margin-right: 8px;
}

.plan-items-container {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Карточка назначения */
.plan-item-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.plan-item-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

/* Выбор чек-листов */
.checklist-selector {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

.select-all-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-color);
}

.checklist-search {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    width: 220px;
}

.checklist-search:focus {
    outline: none;
    border-color: var(--primary-color);
}

.checklist-options-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
}

.checklist-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.checklist-option:hover {
    background: var(--primary-light);
}

.checklist-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checklist-option span {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
}

.checklist-option small {
    font-size: 11px;
    color: var(--text-light);
}

.selected-checklists {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    min-height: 56px;
}

.selected-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.selected-tag i {
    cursor: pointer;
    font-size: 10px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.selected-tag i:hover {
    opacity: 1;
    color: var(--danger-color);
}

.placeholder {
    color: var(--text-light);
    font-size: 12px;
    font-style: italic;
}

/* Даты */
.dates-row {
    display: flex;
    gap: 16px;
    margin: 16px 0;
}

.dates-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--white);
    cursor: pointer;
}

input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 139, 213, 0.1);
}

select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--white);
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 139, 213, 0.1);
}

/* Секция назначения */
.assignment-section {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 16px;
    margin: 16px 0;
}

.assignment-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.assignment-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 16px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 16px;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.radio-label:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.radio-label input[type="radio"] {
    margin: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.radio-label span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
}

.radio-label small {
    font-size: 11px;
    color: var(--text-light);
    margin-left: 6px;
}

.responsible-selector {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.responsible-selector label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.info-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--primary-light);
    border-radius: 8px;
    font-size: 13px;
    color: var(--primary-color);
}

.info-box i {
    font-size: 18px;
}

/* Кнопка удаления */
.btn-remove-item {
    padding: 8px 16px;
    background: var(--white);
    border: 1px solid var(--danger-color);
    border-radius: 6px;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-remove-item:hover {
    background: var(--danger-color);
    color: var(--white);
}

.item-actions {
    text-align: right;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* Пустое состояние */
.empty-items {
    text-align: center;
    padding: 48px 20px;
    background: var(--bg-light);
    border-radius: var(--border-radius-sm);
    border: 1px dashed var(--border-color);
}

.empty-items i {
    font-size: 48px;
    color: var(--text-light);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-items p {
    color: var(--text-gray);
    margin: 0 0 16px 0;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.empty-state i {
    font-size: 64px;
    color: var(--text-light);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-gray);
    margin-bottom: 20px;
}

/* Просмотр плана */
.view-plan-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.view-plan-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.view-plan-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.view-plan-meta span {
    font-size: 13px;
    color: var(--text-gray);
}

.view-plan-items-list {
    max-height: 400px;
    overflow-y: auto;
}

.view-plan-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.view-plan-item:hover {
    background: var(--bg-light);
}

.view-plan-item:last-child {
    border-bottom: none;
}

.view-plan-item .item-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.view-plan-item .item-title strong {
    font-size: 14px;
    color: var(--text-dark);
}

.item-department-badge {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.view-plan-item .item-details {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: var(--text-gray);
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.item-details i {
    width: 14px;
    margin-right: 4px;
}

.item-assignment-info {
    font-size: 12px;
    color: var(--text-gray);
    margin-top: 8px;
}

.generated-badge,
.pending-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 4px;
}

.generated-badge {
    background: #e8f5e9;
    color: #2e7d32;
}

.pending-badge {
    background: #fff3e0;
    color: #e65100;
}

/* Loading и Error состояния */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: var(--white);
    border-radius: var(--border-radius);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.error-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--border-radius);
}

.error-state i {
    font-size: 64px;
    color: var(--danger-color);
    margin-bottom: 20px;
}

.btn-retry {
    padding: 10px 24px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 16px;
    transition: var(--transition);
}

.btn-retry:hover {
    background: var(--primary-dark);
}

.access-denied {
    text-align: center;
    padding: 80px 20px;
    background: var(--white);
    border-radius: var(--border-radius);
}

.access-denied i {
    font-size: 64px;
    color: var(--danger-color);
    margin-bottom: 20px;
}

.access-denied h2 {
    color: var(--text-dark);
    margin-bottom: 10px;
}

/* Toast уведомления */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--white);
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 3000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-success i {
    color: var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--danger-color);
}

.toast-error i {
    color: var(--danger-color);
}

.toast-info {
    border-left: 4px solid var(--info-color);
}

.toast-info i {
    color: var(--info-color);
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 1024px) {
    .plans-list {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
    }

    .page-header-right {
        width: 100%;
    }

    .page-header-right .btn {
        flex: 1;
        justify-content: center;
    }

    .plans-list {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .modal-lg,
    .modal-md {
        width: 95%;
    }

    .modal-body {
        padding: 20px;
    }

    .filters-bar {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .dates-row {
        flex-direction: column;
        gap: 12px;
    }

    .assignment-options {
        flex-direction: column;
        gap: 10px;
    }

    .radio-label {
        width: 100%;
    }

    .selector-header {
        flex-direction: column;
        align-items: stretch;
    }

    .checklist-search {
        width: 100%;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .view-plan-item .item-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .item-details {
        flex-direction: column;
        gap: 6px;
    }
}

/* Увеличенная ширина для больших модальных окон */
.modal-lg {
    width: 1200px !important;
    max-width: 95% !important;
}

/* Компактный верхний ряд для параметров плана */
.form-row-compact {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.form-row-compact .flex-3 {
    flex: 3;
}

.form-row-compact .flex-1 {
    flex: 1;
}

/* Контейнер назначений с улучшенным скроллом */
.plan-items-container {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 8px;
}

.plan-items-container::-webkit-scrollbar {
    width: 6px;
}

.plan-items-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.plan-items-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* Двухколоночная сетка внутри карточки назначения */
.plan-item-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    margin-top: 12px;
}

/* Селектор чек-листов */
.checklist-selector {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: white;
}

.selector-header {
    background: #f1f5f9;
    padding: 8px 12px;
    border-bottom: 1px solid #cbd5e1;
}

.checklist-options-list {
    max-height: 180px;
    overflow-y: auto;
    padding: 6px;
    background: #fafafa;
}

.checklist-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.checklist-option:hover {
    background: #e0f2fe;
}

.selected-checklists {
    padding: 10px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    min-height: 48px;
}

/* Стилизация кнопки удаления назначения */
.btn-remove-item {
    background: #fff5f5 !important;
    border: 1px solid #fecaca !important;
    color: #e53e3e !important;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove-item:hover {
    background: #e53e3e !important;
    color: white !important;
    border-color: #e53e3e !important;
}

/* Сетка полей правой колонки */
.plan-item-right-col .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

@media (max-width: 992px) {
    .plan-item-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-row-compact {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .plan-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .plan-card-actions {
        flex-wrap: wrap;
    }

    .plan-card-actions .btn-icon {
        flex: 1;
        justify-content: center;
    }
}