.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(26,32,44,0.5); backdrop-filter: blur(2px); display: flex; justify-content: center; align-items: center; z-index: 1000; padding: 20px; }
.modal { background: #f7fafc; width: 900px; max-width: 100%; max-height: 90vh; border-radius: 16px; display: flex; flex-direction: column; box-shadow: 0 25px 60px -12px rgba(26,32,44,0.35); overflow: hidden; }
.modal-header { padding: 18px 24px; background: #fff; border-bottom: 1px solid #edf2f7; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 18px; color: #2d3748; font-weight: 900; }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 20px; }
.modal-footer { padding: 16px 24px; background: #fff; border-top: 1px solid #edf2f7; display: flex; justify-content: flex-end; gap: 12px; }
.btn-close { width: 34px; height: 34px; border-radius: 8px; background: #f7fafc; border: none; font-size: 20px; color: #a0aec0; cursor: pointer; outline: none; display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s; }
.btn-close:hover { background: #fff5f5; color: #e53e3e; }
.form-group { display: flex; flex-direction: column; gap: 6px; position: relative; }
.form-group.full { grid-column: span 2; }
.form-group label { font-size: 13px; font-weight: 700; color: #4a5568; }
.form-group input, .custom-textarea, select { padding: 10px 12px; border: 1px solid #cbd5e0; border-radius: 8px; font-family: inherit; font-size: 14px; outline: none; background: #fff; transition: all 0.2s; color: #2d3748; }
.form-group input:focus, .custom-textarea:focus, select:focus { border-color: #4299e1; box-shadow: 0 0 0 3px rgba(66,153,225,0.15); }
.custom-textarea { width: 100%; resize: vertical; min-height: 90px; line-height: 1.5; }
.custom-select { position: relative; user-select: none; cursor: pointer; width: 100%; }
.select-display { padding: 10px 12px; border: 1px solid #cbd5e0; border-radius: 8px; background: #fff; font-size: 14px; display: flex; justify-content: space-between; align-items: center; color: #2d3748; }
.custom-select:hover .select-display { border-color: #a0aec0; }
.select-display i { color: #a0aec0; font-size: 12px; }
.dropdown-options { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #cbd5e0; border-radius: 8px; margin-top: 4px; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); z-index: 50; max-height: 200px; overflow-y: auto; }
.dropdown-item { padding: 10px 12px; font-size: 14px; cursor: pointer; color: #4a5568; transition: background 0.2s; }
.dropdown-item:hover { background: #ebf8ff; color: #2b6cb0; }
.input-with-btn { display: flex; gap: 8px; align-items: stretch; }
.input-with-btn input { flex: 1; }
.btn-icon { padding: 8px 12px; }
.type-selector { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 0; }
.type-btn { padding: 8px 16px; border-radius: 20px; border: 1px solid #e2e8f0; background: #f7fafc; color: #4a5568; font-size: 14px; font-weight: bold; cursor: pointer; display: flex; align-items: center; gap: 8px; user-select: none; transition: all 0.2s; }
.type-btn:hover { background: #edf2f7; border-color: #cbd5e0; }
.custom-checkbox-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 12px; border: 1px solid #cbd5e0; border-radius: 8px; background: #fff; max-height: 200px; overflow-y: auto; }
.custom-checkbox { display: flex; align-items: center; cursor: pointer; font-size: 14px; color: #4a5568; font-weight: 600; user-select: none; }
.custom-checkbox input { display: none; }
.custom-checkbox .checkmark { width: 18px; height: 18px; border-radius: 4px; border: 2px solid #cbd5e0; margin-right: 8px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.custom-checkbox input:checked + .checkmark { background-color: #4299e1; border-color: #4299e1; }
.custom-checkbox input:checked + .checkmark::after { content: ''; width: 5px; height: 9px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-bottom: 2px; }
.selection-modal { background: #fff; width: 500px; max-width: 100%; max-height: 80vh; border-radius: 12px; display: flex; flex-direction: column; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); overflow: hidden; }
.selection-search { padding: 15px 20px; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; gap: 10px; background: #f8fafc; }
.selection-search i { color: #a0aec0; }
.selection-search input { flex: 1; padding: 10px 12px; border: 1px solid #cbd5e0; border-radius: 8px; font-size: 14px; outline: none; transition: all 0.2s; }
.selection-search input:focus { border-color: #4299e1; box-shadow: 0 0 0 3px rgba(66,153,225,0.15); }
.selection-list { flex: 1; overflow-y: auto; padding: 10px; min-height: 250px; }
.selection-item { padding: 12px 15px; border-bottom: 1px solid #f7fafc; cursor: pointer; border-radius: 6px; margin-bottom: 4px; transition: background 0.2s; }
.selection-item:hover { background: #ebf8ff; }
.item-name { font-weight: 700; color: #2d3748; font-size: 14px; margin-bottom: 4px; }
.item-desc { font-size: 12px; color: #a0aec0; }
.empty-state { text-align: center; color: #a0aec0; padding: 30px 0; font-size: 14px; }
.selection-pagination { padding: 15px 20px; border-top: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; background: #f8fafc; font-size: 13px; color: #4a5568; font-weight: 600; }