/* ===== CLIENT PROFILE MODAL ===== */
.client-profile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

@media (min-width: 768px) {
    .client-profile-overlay {
        align-items: center;
    }
}

.client-profile-modal {
    background: white;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@media (min-width: 768px) {
    .client-profile-modal {
        border-radius: 20px;
        max-height: 80vh;
    }
}

.client-profile-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.client-profile-modal-header button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
    color: #666;
}

.client-profile-modal-header button:hover {
    background: #f5f5f5;
}

.client-profile-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.client-profile-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

/* Шапка профиля */
.cp-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.cp-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    color: #dd1847;
    overflow: hidden;
    flex-shrink: 0;
}

.cp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-name {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.cp-phone {
    font-size: 14px;
    color: #888;
}

.cp-edit-btn {
    padding: 10px 20px;
    background: #f5f5f5;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
    font-family: inherit;
}

.cp-edit-btn:hover {
    background: #e8e8e8;
}

/* Кнопки действий */
.cp-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.cp-action-btn {
    flex: 1;
    padding: 12px 8px;
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    font-family: inherit;
    position: relative;
}

.cp-action-btn:hover {
    background: #f0f0f0;
}

.cp-action-btn.primary {
    background: #dd1847;
    color: white;
    border-color: #dd1847;
}

.cp-action-btn.primary:hover {
    background: #c4153e;
}

.cp-contact-wrapper {
    flex: 1;
    position: relative;
}

.cp-contact-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 10;
    margin-top: 6px;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Статистика */
.cp-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.cp-stat-card {
    flex: 1;
    padding: 16px 12px;
    background: #f8f8f8;
    border-radius: 14px;
    text-align: center;
}

.cp-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: 4px;
}

.cp-stat-label {
    font-size: 12px;
    color: #888;
}

/* Заметки */
.cp-notes {
    padding: 14px 16px;
    background: #f8f8f8;
    border-radius: 14px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Секции */
.cp-section {
    margin-bottom: 8px;
}

.cp-section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f8f8f8;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.cp-section-row:hover {
    background: #f0f0f0;
}

.cp-section-label {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.cp-section-value {
    font-size: 14px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Попап уведомлений */
.subselector-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) {
    .subselector-overlay {
        align-items: center;
    }
}

.subselector-content {
    background: white;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 420px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@media (min-width: 768px) {
    .subselector-content {
        border-radius: 20px;
    }
}

.subselector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.subselector-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

.subselector-header button {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subselector-header button:hover {
    background: #f5f5f5;
}

.subselector-list {
    padding: 8px;
    overflow-y: auto;
}

.subselector-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

/* Тогглы уведомлений */
.notif-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.notif-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.notif-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 26px;
}

.notif-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.notif-toggle input:checked + .notif-toggle-slider {
    background-color: #dd1847;
}

.notif-toggle input:checked + .notif-toggle-slider:before {
    transform: translateX(22px);
}

/* Скелетон анимация */
@keyframes skeletonShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Доступность */
@media (prefers-reduced-motion: reduce) {
    .client-profile-modal { animation: none; }
    .subselector-content { animation: none; }
}
/* Попап записей */
.cb-list-overlay {
    z-index: 2100 !important;
}