/* ===== PROJECT PROFILE PAGE ===== */
.profile-page {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0 100px 0;
    background: #f5f5f5;
}

.profile-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    background: #fdf2f5;
    border-radius: 12px;
    margin: 0 20px 20px 20px;
}

.profile-disclaimer svg {
    stroke: #dd1847;
    flex-shrink: 0;
    margin-top: 1px;
}

.profile-disclaimer p {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.profile-card {
    background: transparent;
    border-radius: 0;
    padding: 0 20px;
    box-shadow: none;
    margin-bottom: 0;
}

/* Верхний блок */
.profile-top-block {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    margin-bottom: 12px;
}

/* ===== ФОТО ПРОФИЛЯ ===== */
.profile-photo-wrapper {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    width: 200px;
}

.profile-photo {
    width: 200px;
    height: 210px;
    border-radius: 16px;
    background: #f8f8f8;
    border: 2px dashed #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
    transition: all .2s;
}

.profile-photo:hover {
    border-color: #dd1847;
    background: #fdf2f5;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo svg {
    stroke: #999;
    transition: stroke .2s;
}

.profile-photo:hover svg {
    stroke: #dd1847;
}

.profile-photo-text {
    font-size: 14px;
    color: #999;
    text-align: center;
    line-height: 1.4;
}

.profile-photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.5);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
}

.profile-photo-wrapper:hover .profile-photo-overlay {
    opacity: 1;
}

.profile-photo-delete {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f44336;
    border: 2px solid #fff;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    transition: all .2s;
    z-index: 5;
    padding: 0;
}

.profile-photo-delete:hover {
    background: #d32f2f;
    transform: scale(1.05);
}

.profile-photo-delete svg {
    stroke: #fff;
    stroke-width: 2;
}

.profile-photo-delete:hover svg {
    stroke: #fff;
}

/* Блок с именем */
.profile-name-block {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
}

/* Поля */
.profile-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    background: #f8f8f8;
    transition: all .2s;
    font-family: inherit;
    box-sizing: border-box;
}

.profile-input:focus {
    outline: 0;
    border-color: #dd1847;
    background: #fff;
}

.profile-name-input {
    font-size: 22px;
    font-weight: 600;
}

.profile-description-textarea {
    resize: vertical;
    min-height: 130px;
}

/* Секции */
.profile-section {
    margin-top: 12px;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.profile-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.profile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

/* Фото интерьера */
.profile-photos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-photo-item {
    position: relative;
    width: 130px;
    height: 130px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.profile-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-item-delete {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,.6);
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.profile-photo-item-delete:hover {
    background: rgba(244,67,54,.8);
}

.profile-photo-item-delete svg {
    width: 12px;
    height: 12px;
    stroke: #fff;
}

.profile-photo-add {
    width: 130px;
    height: 130px;
    border: 2px dashed #e0e0e0;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all .2s;
    background: #f8f8f8;
    flex-shrink: 0;
}

.profile-photo-add:hover {
    border-color: #dd1847;
    background: #fdf2f5;
}

.profile-photo-add svg {
    width: 28px;
    height: 28px;
    stroke: #999;
}

.profile-photo-add span {
    font-size: 13px;
    color: #666;
}

.profile-photos-hint {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* Поля-строки */
.profile-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f8f8f8;
    border-radius: 12px;
    cursor: pointer;
    transition: background .2s;
}

.profile-field-row:hover {
    background: #f0f0f0;
}

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

.profile-field-value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #888;
}

.profile-field-value svg {
    stroke: #ccc;
}

/* Адрес */
.profile-address-wrapper {
    position: relative;
}

.profile-address-input {
    width: 100%;
}

/* Телефоны */
.profile-phones-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-phone-wrapper {
    display: flex;
    align-items: stretch;
    gap: 8px;
    position: relative;
}
.profile-phone-wrapper > .phone-input {
    flex: 1;
    min-width: 0;
}


.profile-phone-remove {
    background: none;
    border: 0;
    cursor: pointer;
    color: #999;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 11;
    flex-shrink: 0;
}

.profile-phone-remove:hover {
    color: #dd1847;
}

.profile-add-phone-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
}

.profile-add-phone-icon-btn:hover {
    background: #dd1847;
}

.profile-add-phone-icon-btn:hover svg {
    stroke: #fff;
}

.profile-add-phone-icon-btn.disabled {
    opacity: .4;
    pointer-events: none;
}

/* Соцсети */
.profile-social-icons {
    display: flex;
    gap: 6px;
}

.social-icon-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #e8e8e8;
}

/* Кнопки */
.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
    padding: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.profile-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;
    transition: all .2s;
    font-family: inherit;
}

.profile-delete-btn:hover {
    background: #f44336;
    color: #fff;
}

/* Плавающая панель */
.profile-save-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 12px 20px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0,0,0,.08);
    z-index: 100;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.profile-save-bar.visible {
    transform: translateY(0);
}

.profile-save-bar-btn {
    width: 100%;
    padding: 14px 24px;
    background: #dd1847;
    color: #fff;
    border: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.profile-save-bar-btn:hover {
    background: #c4153e;
}

.profile-save-bar-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Скелетоны */
.skeleton-photo {
    background: #f0f0f0 !important;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-input {
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    pointer-events: none;
    color: transparent !important;
}

.skeleton-input::placeholder {
    color: transparent !important;
}

@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Подсказки адреса */
.address-suggestions-fixed {
    display: none;
    position: fixed;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 99999;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.address-suggestions-fixed .suggestion-item {
    padding: 14px 18px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
}

.address-suggestions-fixed .suggestion-item:hover {
    background: #fdf2f5;
}

.address-suggestions-fixed .main-text {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
}

.address-suggestions-fixed .secondary-text {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

/* ===== АДАПТИВНОСТЬ ===== */

/* Планшеты 900-1024px */
@media (max-width: 1024px) and (min-width: 769px) {
    .profile-photo-wrapper {
        width: 180px;
    }
    
    .profile-photo {
        width: 180px;
        height: 190px;
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .profile-page {
        padding: 0 0 120px 0;
    }
    
    .profile-disclaimer {
        margin: 12px 12px 0 12px;
        border-radius: 12px;
    }
    
    .profile-card {
        padding: 0 12px;
    }
    
    .profile-top-block {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        border-radius: 16px;
    }
    
    .profile-photo-wrapper {
        width: 100%;
    }
    
    .profile-photo {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        border-radius: 16px;
    }
    
    .profile-photo-overlay {
        border-radius: 16px;
    }
    
    .profile-photo-delete {
        bottom: -7px;
        right: 8px;
    }
    
    .profile-name-block {
        width: 100%;
        padding: 0;
    }
    
    .profile-name-input {
        font-size: 18px;
    }
    
    .profile-section {
        padding: 16px;
        border-radius: 16px;
    }
    
    .profile-photo-item,
    .profile-photo-add {
        width: 150px;
        height: 150px;
    }
    
    .profile-save-bar {
        padding: 12px 16px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
}

/* Очень маленькие экраны */
@media (max-width: 414px) {
    .profile-photo {
        aspect-ratio: 4/3;
    }
    
    .profile-photo-item,
    .profile-photo-add {
        width: 120px;
        height: 120px;
    }
}
/* ============================================================
 * Быстрый вход: иконка со статусом (серая / зелёная)
 * Используется в ClientDashboard.js (ЛК клиента)
 * ============================================================ */
.quick-login-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #9ca3af;
    transition: background .2s ease, box-shadow .2s ease;
}

.quick-login-icon-wrap.connected {
    background: #22c55e;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35);
}

.quick-login-icon-wrap img {
    display: block;
}

/* ============================================
   Из ProjectProfilePage.js — было в динамическом <style>
   (CSP: inline <style> без nonce блокируется; вынесено сюда)
   ============================================ */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}
.save-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    flex-shrink: 0;
}
/* @keyframes spin — уже определён в app.css (глобально) */
