/* ============================================
   Б-Запись SPA — Стили попапов
   ============================================ */

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ===== ВСЕ OVERLAYS ===== */
.consents-overlay,
.discounts-overlay,
.rate-overlay,
.reviews-overlay,
.city-modal-overlay,
.social-modal-overlay,
.birthday-picker-overlay,
.quick-setup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0,0,0,0.5) !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: flex-end;
    justify-content: center;
}

@media (min-width: 768px) {
    .consents-overlay,
    .discounts-overlay,
    .rate-overlay,
    .reviews-overlay,
    .city-modal-overlay,
    .social-modal-overlay,
    .birthday-picker-overlay,
    .quick-setup-overlay {
        align-items: center;
    }
}

/* ===== CHAT OVERLAY ===== */
.chat-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0,0,0,0.5) !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ===== CHAT POPUP ===== */
.chat-popup {
    width: 90vw;
    max-width: 900px;
    height: 80vh;
    max-height: 700px;
    background: white;
    border-radius: 20px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    position: relative;
}

@media (max-width: 767px) {
    .chat-overlay {
        align-items: stretch !important;
    }
    
    .chat-popup {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
        flex-direction: column;
    }
    
    .chat-popup.show-chat .chat-sidebar {
        display: none;
    }
    
    .chat-popup.show-chat .chat-main {
        display: flex;
    }
    
    .chat-main {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 5;
    }
}

@media (min-width: 768px) {
    .chat-popup.show-chat .chat-sidebar {
        display: flex !important;
    }
    
    .chat-main {
        display: flex !important;
    }
}

/* ===== CHAT SIDEBAR ===== */
.chat-sidebar {
    width: 340px;
    background: white;
    border-right: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .chat-sidebar {
        width: 100%;
        height: 100%;
    }
}

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

@media (max-width: 767px) {
    .chat-sidebar-header {
        padding-top: max(16px, env(safe-area-inset-top));
    }
}

.chat-title-text {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #666;
}

.chat-icon-btn:hover {
    background: #f5f5f5;
}

/* ===== CHAT TABS ===== */
.chat-tabs-vertical {
    display: flex;
    padding: 8px;
    gap: 4px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.chat-tab-vertical {
    flex: 1;
    padding: 10px 4px;
    border-radius: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    font-family: inherit;
    color: #666;
    position: relative;
}

.chat-tab-vertical:hover {
    background: #f5f5f5;
}

.chat-tab-vertical.active {
    background: #fdf2f5;
    color: #dd1847;
}

.chat-tab-vertical.active .chat-tab-icon svg {
    stroke: #dd1847;
}

.chat-tab-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f8f8f8;
}

.chat-tab-vertical.active .chat-tab-icon {
    background: #fdf2f5;
}

.chat-tab-label {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
}

.chat-tab-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: #dd1847;
    color: white;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    line-height: 16px;
    padding: 0 4px;
}

/* ===== CHAT LIST ===== */
.chat-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f8f8f8;
    transition: background 0.15s;
}

.chat-item:hover {
    background: #fdf2f5;
}

.chat-item.active {
    background: #fdf2f5;
}

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

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

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.chat-preview {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.chat-meta {
    text-align: right;
    flex-shrink: 0;
}

.chat-time {
    font-size: 11px;
    color: #aaa;
}

.chat-unread {
    font-size: 11px;
    background: #dd1847;
    color: white;
    border-radius: 10px;
    padding: 2px 7px;
    margin-top: 4px;
    display: inline-block;
    font-weight: 600;
}

/* ===== CHAT MAIN ===== */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.chat-empty-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #999;
}

.chat-empty-icon {
    font-size: 48px;
}

.chat-empty-text {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
}

/* ===== CHAT ACTIVE HEADER ===== */
.chat-active-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .chat-active-header {
        padding-top: max(16px, env(safe-area-inset-top));
    }
}

.chat-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: background 0.2s;
    flex-shrink: 0;
}

.chat-back-btn:hover {
    background: #f5f5f5;
}

@media (min-width: 768px) {
    .chat-back-btn {
        display: none;
    }
}

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

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

.chat-active-info {
    flex: 1;
    min-width: 0;
}

.chat-active-title {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-active-status {
    font-size: 11px;
    color: #4caf50;
}

.chat-active-status.offline {
    color: #999;
}

.chat-active-subtitle {
    font-size: 11px;
    color: #888;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== CHAT MESSAGES ===== */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f9fafb;
    -webkit-overflow-scrolling: touch;
}

.message-date-divider {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin: 8px 0;
}

.message-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.message-wrapper.mine {
    justify-content: flex-end;
}

.message-wrapper.other {
    justify-content: flex-start;
}

.message {
    max-width: 65%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.mine {
    background: linear-gradient(135deg, #dd1847, #c1163d);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.other {
    background: white;
    color: #1a1a1a;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.message-sender {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #dd1847;
}

.message-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
}

.mine .message-time {
    text-align: right;
}

.other .message-time {
    text-align: left;
}

/* ===== CHAT INPUT ===== */
.chat-input-area {
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 8px;
    background: white;
    align-items: flex-end;
    flex-shrink: 0;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.chat-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    max-height: 100px;
    min-height: 20px;
    line-height: 1.4;
}

.chat-input:focus {
    border-color: #dd1847;
}

/* Предотвращаем зум на iOS */
@media (max-width: 767px) {
    .chat-input {
        font-size: 16px;
    }
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dd1847, #c1163d);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.chat-send-btn:hover {
    transform: scale(1.05);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== CITY MODAL ===== */
.city-modal {
    background: #fff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}
@media (min-width: 768px) { .city-modal { border-radius: 20px; max-height: 70vh; } }
.city-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
}
.city-modal-header h2 { margin: 0; font-size: 20px; font-weight: 700; }
.city-modal-close {
    background: none; border: none; width: 36px; height: 36px;
    border-radius: 50%; cursor: pointer; color: #666;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.city-modal-close:hover { background: #f5f5f5; }
.city-modal-body { flex: 1; overflow-y: auto; padding: 20px; }
.city-search-wrapper { position: relative; margin-bottom: 16px; }
.city-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
.city-search-input {
    width: 100%; padding: 14px 40px 14px 44px;
    border: 1px solid #e0e0e0; border-radius: 12px;
    font-size: 15px; background: #f8f8f8; outline: none; font-family: inherit;
}
.city-search-input:focus { border-color: #dd1847; background: #fff; }
.city-search-clear {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; width: 28px; height: 28px;
    border-radius: 50%; cursor: pointer; color: #999;
}
.city-results { margin-bottom: 16px; }
.city-result-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 14px 16px; border: none;
    background: #f8f8f8; border-radius: 12px; margin-bottom: 6px;
    font-size: 14px; font-weight: 500; cursor: pointer; text-align: left; font-family: inherit;
}
.city-result-item:hover { background: #f0f0f0; }
.city-result-empty { text-align: center; padding: 20px; color: #999; font-size: 14px; }
.city-popular { margin-bottom: 16px; }
.city-popular-title {
    font-size: 13px; font-weight: 600; color: #999;
    margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px;
}
.city-popular-list { display: flex; flex-wrap: wrap; gap: 8px; }
.city-popular-item {
    padding: 10px 18px; border: 1px solid #e0e0e0; border-radius: 20px;
    background: #fff; font-size: 14px; font-weight: 500; color: #1a1a1a;
    cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.city-popular-item:hover { border-color: #dd1847; background: #fdf2f5; color: #dd1847; }
.city-popular-item.active { background: #dd1847; color: #fff; border-color: #dd1847; }
.city-current-location { margin-top: 16px; padding-top: 16px; border-top: 1px solid #f0f0f0; }
.city-location-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px; border: 1px dashed #e0e0e0; border-radius: 12px;
    background: #fafafa; color: #666; font-size: 14px; font-weight: 500;
    cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.city-location-btn:hover { border-color: #dd1847; background: #fdf2f5; color: #dd1847; }

/* ===== CONSENTS MODAL ===== */
.consents-modal {
    background: #fff; border-radius: 20px 20px 0 0;
    width: 100%; max-width: 560px; max-height: 85vh;
    display: flex; flex-direction: column; animation: slideUp 0.3s ease;
}
@media (min-width: 768px) { .consents-modal { border-radius: 20px; max-height: 75vh; } }
.consents-modal-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 20px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
}
.consents-modal-header h3 { font-size: 18px; font-weight: 600; margin: 0; }
.consents-modal-body { flex: 1; overflow-y: auto; padding: 20px; }
.consents-section-title {
    font-size: 13px; font-weight: 600; color: #64748b;
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px;
}
.consents-card {
    background: #fff; border-radius: 16px; padding: 0;
    margin-bottom: 16px; border: 1px solid #e2e8f0; overflow: hidden;
}
.consents-card-header {
    font-size: 15px; font-weight: 600; color: #0f172a;
    padding: 16px; border-bottom: 1px solid #f1f5f9; background: #f8fafc;
}
.consents-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid #f1f5f9;
}
.consents-item:last-child { border-bottom: none; }
.consents-item-label { font-size: 14px; color: #334155; font-weight: 500; flex: 1; }
.consent-toggle-wrapper { display: flex; align-items: center; gap: 10px; }
.consent-toggle {
    position: relative; width: 44px; height: 26px; border-radius: 13px;
    background: #e2e8f0; cursor: pointer; transition: background 0.25s;
    border: none; padding: 0; outline: none;
}
.consent-toggle::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 22px; height: 22px; border-radius: 50%;
    background: white; transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.consent-toggle.active { background: #16a34a; }
.consent-toggle.active::after { transform: translateX(18px); }
.consent-toggle.locked { background: #16a34a; opacity: 0.7; cursor: not-allowed; }
.consent-toggle-label {
    font-size: 13px; font-weight: 600; min-width: 60px;
    text-align: right; color: #16a34a;
}
.consent-toggle-label.off { color: #94a3b8; }
.consent-lock-hint { font-size: 11px; color: #94a3b8; display: block; margin-top: 3px; }
.consents-date { font-size: 12px; color: #94a3b8; padding: 12px 16px; border-top: 1px solid #f1f5f9; background: #f8fafc; }
.consents-empty { text-align: center; padding: 40px 20px; color: #94a3b8; font-size: 14px; }
.consents-revoke-btn {
    display: inline-flex; align-items: center; gap: 8px;
    margin: 12px 16px; padding: 10px 16px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    color: #ef4444; font-size: 13px; font-weight: 600; cursor: pointer;
}

/* ===== DISCOUNTS MODAL ===== */
.discounts-modal {
    background: #fff; border-radius: 20px 20px 0 0;
    width: 100%; max-width: 500px; max-height: 85vh;
    display: flex; flex-direction: column; animation: slideUp 0.3s ease;
}
@media (min-width: 768px) { .discounts-modal { border-radius: 20px; max-height: 75vh; } }
.discounts-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
}
.discounts-header h2 { margin: 0; font-size: 20px; font-weight: 700; }
.discounts-tabs {
    display: flex; background: #f5f5f5; border-radius: 14px;
    padding: 4px; margin: 16px 20px; flex-shrink: 0;
}
.discounts-tab {
    flex: 1; padding: 12px; border: none; background: transparent;
    border-radius: 12px; font-size: 14px; font-weight: 500; color: #666;
    cursor: pointer; transition: all .2s; font-family: inherit;
}
.discounts-tab.active { background: #fff; color: #1a1a1a; font-weight: 600; }
.discounts-body { flex: 1; overflow-y: auto; padding: 0 20px 20px; }
.discounts-tab-content { display: none; }
.discounts-tab-content.active { display: block; }
.discount-card {
    background: #fff; border: 1px solid #f0f0f0; border-radius: 16px;
    padding: 16px; margin-bottom: 12px; display: flex;
    align-items: center; gap: 14px; cursor: pointer;
}
.discount-card-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: #f8f8f8; overflow: hidden; flex-shrink: 0;
}
.discount-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.discount-card-info { flex: 1; min-width: 0; }
.discount-card-name { font-size: 15px; font-weight: 600; }
.discount-card-address { font-size: 12px; color: #999; margin-top: 2px; }
.discount-card-value { flex-shrink: 0; text-align: right; }
.discount-percent { font-size: 28px; font-weight: 800; color: #dd1847; }
.discount-card-desc { font-size: 11px; color: #888; }
.discounts-empty { text-align: center; padding: 60px 20px; color: #999; }
.discounts-empty-title { font-size: 16px; font-weight: 600; color: #666; margin-bottom: 4px; }
.discounts-empty-desc { font-size: 13px; color: #999; }

/* ===== RATE MODAL ===== */
.rate-modal {
    background: #fff; border-radius: 20px 20px 0 0;
    width: 100%; max-width: 500px; max-height: 85vh;
    display: flex; flex-direction: column; overflow: hidden; animation: slideUp 0.3s ease;
}
@media (min-width: 768px) { .rate-modal { border-radius: 20px; max-height: 80vh; } }
.rate-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
}
.rate-header h3 { margin: 0; font-size: 18px; font-weight: 600; }
.rate-body { flex: 1; overflow-y: auto; padding: 20px; }
.rate-master-hero { text-align: center; margin-bottom: 16px; }
.rate-master-hero-avatar {
    width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 12px;
    overflow: hidden; background: #f3f4f6; border: 3px solid #fdf2f5;
}
.rate-master-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rate-master-hero-name { font-size: 20px; font-weight: 700; color: #111827; }
.rate-master-hero-role { font-size: 14px; color: #6b7280; }
.rate-card {
    background: #f9fafb; border: 1px solid #f3f4f6;
    border-radius: 16px; margin-bottom: 16px;
}
.rate-rating-block { text-align: center; padding: 24px 20px; }
.rate-rating-label {
    font-size: 13px; color: #6b7280; margin-bottom: 12px;
    font-weight: 500; text-transform: uppercase;
}
.rate-stars { display: flex; gap: 8px; justify-content: center; margin-bottom: 8px; }
.rate-star { font-size: 44px; cursor: pointer; color: #e5e7eb; user-select: none; }
.rate-star.active { color: #f59e0b; }
.rate-rating-text { font-size: 15px; font-weight: 600; color: #374151; }
.rate-input-wrapper { position: relative; padding: 18px 16px 8px; }
.rate-input-label {
    position: absolute; top: 50%; left: 16px; transform: translateY(-50%);
    font-size: 14px; color: #9ca3af; pointer-events: none;
}
.rate-input-wrapper.has-text .rate-input-label { top: 10px; transform: translateY(0); font-size: 11px; }
.rate-textarea {
    width: 100%; min-height: 80px; padding-top: 12px;
    border: none; background: transparent; font-size: 15px;
    line-height: 1.6; resize: vertical; font-family: inherit; outline: none;
}
.rate-counter { text-align: right; font-size: 12px; color: #999; margin-top: 6px; }
.rate-org-footer { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.rate-org-footer-avatar {
    width: 36px; height: 36px; border-radius: 10px;
    overflow: hidden; background: #f3f4f6; flex-shrink: 0;
}
.rate-org-footer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rate-org-footer-info { flex: 1; min-width: 0; }
.rate-org-footer-name { font-size: 13px; font-weight: 600; color: #374151; }
.rate-org-footer-time { font-size: 11px; color: #9ca3af; }
.rate-submit {
    width: 100%; padding: 16px; background: #dd1847; color: #fff;
    border: none; border-radius: 14px; font-size: 16px; font-weight: 600; cursor: pointer;
}
.rate-submit:disabled { background: #d1d5db; cursor: not-allowed; }
.rate-success { text-align: center; padding: 40px 20px; }
.rate-success-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: #e8f5e9; margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
}
.rate-success-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.rate-success-subtitle { font-size: 14px; color: #888; }

/* ===== REVIEWS MODAL ===== */
.reviews-modal {
    background: #fff; border-radius: 20px 20px 0 0;
    width: 100%; max-width: 500px; max-height: 85vh;
    display: flex; flex-direction: column; animation: slideUp 0.3s ease;
}
@media (min-width: 768px) { .reviews-modal { border-radius: 20px; max-height: 75vh; } }
.reviews-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
}
.reviews-header h2 { margin: 0; font-size: 20px; font-weight: 700; }
.reviews-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.rev-org-card {
    display: flex; align-items: center; gap: 14px;
    background: #fff; border: 1px solid #f0f0f0; border-radius: 16px;
    padding: 16px; margin-bottom: 10px; cursor: pointer;
}
.rev-org-photo {
    width: 52px; height: 52px; border-radius: 14px;
    background: #f8f8f8; overflow: hidden; flex-shrink: 0;
}
.rev-org-photo img { width: 100%; height: 100%; object-fit: cover; }
.rev-org-info { flex: 1; min-width: 0; }
.rev-org-name { font-size: 15px; font-weight: 600; }
.rev-org-address { font-size: 12px; color: #999; margin-top: 2px; }
.rev-org-count { flex-shrink: 0; text-align: center; }
.rev-org-count-num { font-size: 24px; font-weight: 700; }
.rev-org-count-label { font-size: 11px; color: #999; }
.rev-back-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 0; font-size: 14px; font-weight: 500;
    color: #dd1847; cursor: pointer; margin-bottom: 16px;
    background: none; border: none; font-family: inherit;
}
.rev-card {
    background: #fff; border: 1px solid #f0f0f0;
    border-radius: 16px; padding: 16px; margin-bottom: 12px;
}
.rev-card-stars { display: flex; gap: 2px; margin-bottom: 8px; }
.rev-card-star { width: 16px; height: 16px; color: #e5e7eb; }
.rev-card-star.filled { color: #f5a623; }
.rev-card-text { font-size: 14px; line-height: 1.5; color: #333; margin-bottom: 8px; }
.rev-card-date { font-size: 12px; color: #999; }
.rev-empty { text-align: center; padding: 60px 20px; color: #999; }
.rev-empty-title { font-size: 15px; font-weight: 600; color: #666; margin-bottom: 4px; }
.rev-empty-desc { font-size: 13px; color: #999; }

/* ===== SOCIAL MODAL ===== */
.social-modal {
    background: #fff; border-radius: 20px 20px 0 0;
    width: 100%; max-width: 500px; max-height: 80vh;
    display: flex; flex-direction: column; animation: slideUp 0.25s ease;
}
@media (min-width: 768px) { .social-modal { border-radius: 20px; } }
.social-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
}
.social-modal-header h3 { margin: 0; font-size: 18px; font-weight: 600; }
.social-modal-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.social-modal-footer { padding: 20px; border-top: 1px solid #f0f0f0; flex-shrink: 0; }
.social-save-btn {
    width: 100%; padding: 16px; background: #dd1847; color: #fff;
    border: none; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer;
}
.social-field {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid #f0f0f0;
}
.social-field:last-child { border-bottom: none; }
.social-field-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: #f8f8f8; display: flex; align-items: center;
    justify-content: center; flex-shrink: 0;
}
.social-field-icon img { width: 28px; height: 28px; object-fit: contain; }
.social-input {
    flex: 1; min-width: 0; padding: 12px 14px;
    border: 1px solid #e0e0e0; border-radius: 10px;
    font-size: 14px; background: #f8f8f8; outline: none; font-family: inherit;
}
.social-input:focus { border-color: #dd1847; background: #fff; }

/* ===== BIRTHDAY PICKER ===== */
.birthday-picker {
    background: white; border-radius: 20px 20px 0 0;
    width: 100%; max-width: 400px; max-height: 70vh;
    display: flex; flex-direction: column; animation: slideUp 0.25s ease;
}
@media (min-width: 768px) { .birthday-picker { border-radius: 20px; max-height: 60vh; } }
.birthday-picker-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
}
.birthday-picker-header h3 { margin: 0; font-size: 18px; font-weight: 600; }
.birthday-picker-body { display: flex; height: 240px; overflow: hidden; position: relative; }
.birthday-col { flex: 1; display: flex; flex-direction: column; position: relative; z-index: 1; }
.birthday-col-title {
    text-align: center; font-size: 13px; font-weight: 600; color: #888;
    padding: 12px 0 8px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
}
.birthday-scroll {
    flex: 1; overflow-y: auto; scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.birthday-scroll::-webkit-scrollbar { display: none; }
.birthday-scroll-inner { display: flex; flex-direction: column; align-items: center; padding: 100px 0; }
.birthday-item {
    height: 44px; display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: #bbb; cursor: pointer; scroll-snap-align: center;
    user-select: none; width: 100%;
}
.birthday-item.selected { color: #dd1847; font-weight: 700; font-size: 18px; }
.birthday-picker-footer { padding: 16px 20px; border-top: 1px solid #f0f0f0; flex-shrink: 0; }
.birthday-apply-btn {
    width: 100%; padding: 14px; background: #dd1847; color: white;
    border: none; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer;
}

/* ===== QUICK SETUP ===== */
.quick-setup-popup {
    background: #fff; border-radius: 20px; width: 90%; max-width: 400px;
    padding: 32px 24px; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: slideUp 0.35s ease;
}
.qs-icon-wrapper {
    margin-bottom: 16px; display: inline-flex; align-items: center;
    justify-content: center; width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, #fdf2f5, #fce4e9);
}
.qs-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: #1a1a1a; }
.qs-desc { font-size: 14px; color: #666; margin-bottom: 24px; line-height: 1.5; }
.qs-actions { display: flex; flex-direction: column; gap: 10px; }
.qs-btn {
    width: 100%; padding: 16px; border-radius: 12px;
    font-size: 16px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.qs-btn-primary { background: linear-gradient(135deg, #dd1847, #c1163d); color: #fff; border: none; }
.qs-btn-secondary { background: #fff; color: #dd1847; border: 2px solid #dd1847; }
.qs-btn-content { display: flex; align-items: center; justify-content: center; gap: 8px; }
.qs-skip-btn {
    margin-top: 16px; padding: 12px; background: none;
    border: none; color: #999; font-size: 14px; cursor: pointer; width: 100%;
    font-family: inherit; border-radius: 10px;
}
/* ============================================================
 * QuickSetupPopup: PIN-setup + статус (клиентский ЛК)
 * ============================================================ */

/* Зелёный кружок вокруг галочки (PIN подключён) */
.qs-icon-wrapper.qs-icon-ok {
    background: #22c55e;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

/* Уменьшенная иконка для PIN-экрана */
.qs-icon-wrapper.qs-icon-small {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
}

/* Красная кнопка "Отключить PIN-код" */
.qs-btn.qs-btn-danger {
    background: #fff1f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    transition: background .15s ease, border-color .15s ease;
}

.qs-btn.qs-btn-danger:hover:not(:disabled) {
    background: #fee2e2;
    border-color: #fca5a5;
}

.qs-btn.qs-btn-danger:disabled {
    opacity: 0.6;
    cursor: default;
}

/* PIN-поля в QuickSetupPopup */
.qs-pin-dots {
    margin: 20px auto 8px;
    justify-content: center;
    display: flex;
    gap: 12px;
}

.qs-pin-error {
    min-height: 18px;
    text-align: center;
    color: #dc2626;
    font-size: 13px;
    margin: 4px 0 12px;
}

.qs-pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 280px;
    margin: 0 auto 16px;
    padding: 0 12px;
}

.qs-pin-keypad .pin-key {
    height: 56px;
    font-size: 22px;
    font-weight: 500;
    border: none;
    background: transparent;
    color: #1f2937;
    border-radius: 50%;
    cursor: pointer;
    transition: background .12s ease;
}

.qs-pin-keypad .pin-key:hover {
    background: #f3f4f6;
}

.qs-pin-keypad .pin-key:active {
    background: #e5e7eb;
}

.qs-pin-keypad .pin-key.placeholder {
    visibility: hidden;
}

.qs-pin-keypad .pin-key.backspace {
    font-size: 20px;
    color: #6b7280;
}
