/* ===== EMPLOYEE MODAL ===== */
.employee-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 2000;
    display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 768px) { .employee-modal-overlay { align-items: center; } }

.employee-modal {
    background: #fff; border-radius: 20px 20px 0 0;
    width: 100%; max-width: 500px; max-height: 90vh;
    display: flex; flex-direction: column; overflow: hidden;
    animation: slideUp 0.3s ease;
}
@media (min-width: 768px) { .employee-modal { border-radius: 20px; max-height: 80vh; } }

.employee-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
}
.employee-modal-back, .employee-modal-close {
    background: none; border: none; padding: 8px; cursor: pointer;
    border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #666;
}
.employee-modal-back:hover, .employee-modal-close:hover { background: #f5f5f5; }
.employee-modal-back svg, .employee-modal-close svg { width: 24px; height: 24px; stroke: #666; }
.employee-modal-title { font-size: 18px; font-weight: 600; color: #1a1a1a; margin: 0; }

.employee-modal-body {
    flex: 1; overflow-y: auto; padding: 20px;
    -webkit-overflow-scrolling: touch;
}
.employee-modal-footer {
    padding: 20px; border-top: 1px solid #f0f0f0; flex-shrink: 0;
}

/* Профиль */
.employee-profile-header {
    display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px;
}
.employee-avatar-wrapper {
    position: relative; width: 80px; height: 80px; flex-shrink: 0; cursor: pointer;
}
.employee-avatar-large {
    width: 80px; height: 80px; border-radius: 50%; background: #f0f0f0;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.employee-avatar-large img {
    width: 100%; height: 100%; object-fit: cover;
}
.employee-avatar-large .avatar-placeholder-icon {
    display: flex; align-items: center; justify-content: center;
}
.employee-avatar-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 50%; background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s;
}
.employee-avatar-wrapper:hover .employee-avatar-overlay { opacity: 1; }
.employee-avatar-delete {
    position: absolute; bottom: -2px; right: -2px;
    width: 24px; height: 24px; border-radius: 50%;
    background: #f44336; border: 2px solid #fff; color: #fff;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    padding: 0; z-index: 5;
}
.employee-avatar-loading {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 50%; background: rgba(255,255,255,0.7);
    display: flex; align-items: center; justify-content: center;
}
.avatar-spinner {
    width: 24px; height: 24px; border: 3px solid #f0f0f0;
    border-top-color: #dd1847; border-radius: 50%; animation: spin 0.8s linear infinite;
}
.employee-name-fields { flex: 1; display: flex; flex-direction: column; gap: 8px; }

/* Поля */
.employee-input {
    width: 100%; padding: 14px 16px; border: 1px solid #e0e0e0;
    border-radius: 12px; font-size: 15px; background: #f8f8f8;
    transition: all 0.2s; box-sizing: border-box; font-family: inherit;
}
.employee-input:focus { outline: none; border-color: #dd1847; background: #fff; }

/* Секции */
.employee-section { margin-bottom: 16px; }
.employee-section-label { font-size: 14px; font-weight: 600; color: #1a1a1a; margin-bottom: 8px; display: block; }
.employee-section-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; cursor: pointer;
}
.employee-section-value { font-size: 14px; color: #888; display: flex; align-items: center; gap: 4px; }
.employee-section-danger { margin-top: 20px; }

.employee-textarea {
    width: 100%; padding: 14px; border: 1px solid #e0e0e0;
    border-radius: 12px; font-size: 15px; background: #f8f8f8;
    resize: vertical; min-height: 80px; font-family: inherit; box-sizing: border-box;
}
.employee-textarea:focus { outline: none; border-color: #dd1847; background: #fff; }

/* Фото */
.employee-photos { display: flex; flex-wrap: wrap; gap: 10px; }
.employee-photo-item {
    position: relative; width: 90px; height: 90px;
    border-radius: 12px; overflow: hidden; border: 1px solid #e0e0e0;
}
.employee-photo-item img { width: 100%; height: 100%; object-fit: cover; }
.employee-photo-delete {
    position: absolute; top: 4px; right: 4px;
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(0,0,0,0.6); border: none; color: #fff;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 14px; line-height: 1;
}
.employee-photo-add {
    width: 90px; height: 90px; border: 2px dashed #e0e0e0;
    border-radius: 12px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 4px;
    cursor: pointer; transition: all 0.2s; background: #f8f8f8;
    color: #999; font-size: 12px;
}
.employee-photo-add:hover { border-color: #dd1847; color: #dd1847; }
.employee-photo-add.disabled { opacity: 0.4; pointer-events: none; }
.employee-photo-loading {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.7); display: flex; align-items: center; justify-content: center;
}
.photo-loading-spinner {
    width: 20px; height: 20px; border: 2px solid #f0f0f0;
    border-top-color: #dd1847; border-radius: 50%; animation: spin 0.8s linear infinite;
}
.employee-photos-hint { font-size: 12px; color: #999; margin-top: 8px; }

/* Тоггл */
.employee-toggle { position: relative; display: inline-block; width: 48px; height: 26px; }
.employee-toggle input { opacity: 0; width: 0; height: 0; }
.employee-toggle-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc; transition: .3s; border-radius: 26px;
}
.employee-toggle-slider:before {
    position: absolute; content: ""; height: 22px; width: 22px;
    left: 2px; bottom: 2px; background: #fff; transition: .3s; border-radius: 50%;
}
.employee-toggle input:checked + .employee-toggle-slider { background: #dd1847; }
.employee-toggle input:checked + .employee-toggle-slider:before { transform: translateX(22px); }

/* Цвета */
.emp-colors { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.emp-color-squircle {
    width: 32px; height: 32px; border-radius: 10px;
    cursor: pointer; position: relative; transition: all 0.3s;
}
.emp-color-squircle.active { transform: scale(1.15); }
.emp-color-glare {
    position: absolute; top: 0; left: 2px; right: 2px; height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 100%);
    border-radius: 10px 10px 40% 40%; pointer-events: none;
}
.emp-color-check {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 2; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}

/* Кнопки */
.employee-save-btn {
    width: 100%; padding: 16px; background: #dd1847; color: #fff;
    border: none; border-radius: 12px; font-size: 16px; font-weight: 600;
    cursor: pointer; font-family: inherit;
}
.employee-save-btn:hover { background: #c4153e; }
.employee-save-btn:disabled { background: #ccc; cursor: not-allowed; }

.employee-delete-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px; background: #fff;
    border: 1px solid #f44336; border-radius: 12px;
    color: #f44336; font-size: 14px; font-weight: 500;
    cursor: pointer; font-family: inherit;
}
.employee-delete-btn:hover { background: #fff5f5; }

.employee-phone-wrapper { position: relative; }

/* Скелетоны */
@keyframes spin { to { transform: rotate(360deg); } }