/* ===== base.css ===== */
/* ===== СБРОС И БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

input, textarea, .message-bubble, .selectable {
    user-select: text;
}

:root {
    --bg-dark: #0a0e17;
    --bg-card: #131b2e;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(19, 27, 46, 0.75);
    --glass-border: rgba(139, 92, 246, 0.2);
    --neon-purple: #8b5cf6;
    --neon-purple-dark: #6d28d9;
    --neon-green: #10b981;
    --shadow-glow: 0 4px 20px rgba(139, 92, 246, 0.15);

    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --bottom-bar-height: calc(65px + var(--safe-area-bottom));
    --header-height: calc(56px + var(--safe-area-top));
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: #e4edf5;
}

::-webkit-scrollbar {
    display: none;
}
* {
    scrollbar-width: none;
}

/* ===== ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ ===== */
.hidden { display: none !important; }
.text-neonGreen { color: var(--neon-green) !important; }
.text-neonPurple { color: var(--neon-purple) !important; }
.text-yellow-400 { color: #fbbf24 !important; }
.text-slate-300 { color: #94a3b8 !important; }
.font-mono { font-family: monospace; }
.text-xl { font-size: 20px; }

#app-screen {
    position: fixed;
    inset: 0;
    display: none; /* изначально скрыт, показывается после загрузки */
}
/* ===== layout.css ===== */
/* ===== ХЕДЕР (ОСНОВНОЙ) ===== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    padding-top: var(--safe-area-top);
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 16px;
    padding-right: 16px;
    z-index: 100;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--neon-purple), #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    color: #fff;
}

.header-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.header-user {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.search-toggle-header {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    display: none;
}
.search-toggle-header .material-icons {
    font-size: 24px;
}

/* ===== ХЕДЕР ЧАТА ===== */
.chat-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    padding-top: var(--safe-area-top);
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: none; /* по умолчанию скрыт, показывается через JS */
    align-items: center;
    justify-content: space-between;
    padding-left: 8px;
    padding-right: 16px;
    z-index: 200;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.chat-back-btn {
    background: transparent;
    border: none;
    color: #fff;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 24px;
}
.chat-back-btn:active {
    opacity: 0.6;
}

.chat-header-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

/* ===== НИЖНЯЯ НАВИГАЦИЯ ===== */
.app-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-bar-height);
    padding-bottom: var(--safe-area-bottom);
    background: rgba(19, 27, 46, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
}

.nav-btn {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    position: relative;
    transition: color 0.15s ease, transform 0.1s ease;
}
.nav-btn:active {
    transform: scale(0.92);
}
.nav-btn.active {
    color: var(--neon-purple);
}
.nav-btn .nav-icon {
    font-size: 24px !important;
}
.nav-btn .nav-text {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.badge-count {
    position: absolute;
    top: 8px;
    right: 50%;
    transform: translateX(12px);
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    border: 2px solid var(--bg-card);
}
.badge-count.hidden {
    display: none;
}

/* ===== СКРЫТИЕ ЭЛЕМЕНТОВ ПРИ ОТКРЫТОМ ЧАТЕ ===== */
.app-header.hidden,
.app-navigation.hidden {
    display: none !important;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.main-content {
    position: absolute;
    top: var(--header-height);
    bottom: var(--bottom-bar-height);
    left: 0;
    right: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
}

/* Режим чата: контент занимает всю высоту без учёта нижней навигации */
.main-content.chat-mode {
    top: var(--header-height);
    bottom: 0;
}

.tab-content {
    display: none;
    animation: appTabSwitch 0.2s cubic-bezier(0, 0, 0.2, 1);
}
.tab-content.active {
    display: block;
}
@keyframes appTabSwitch {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* ===== ЗАГОЛОВКИ СТРАНИЦ ===== */
.page-header {
    padding: 16px 20px 12px;
    margin-bottom: 4px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), rgba(236, 72, 153, 0.04));
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.page-title {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--neon-purple), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.page-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 28px;
    background: var(--neon-purple);
    border-radius: 3px;
    flex-shrink: 0;
}

.page-subtitle {
    font-size: 14px;
    color: #8899b0;
    font-weight: 400;
    margin-top: 2px;
    padding-left: 14px;
    letter-spacing: 0.2px;
}
/* ===== profile.css ===== */
/* ===== ПРОФИЛЬ ===== */
.profile-container {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-purple), #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.3);
    margin-bottom: 12px;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.profile-status-text {
    font-size: 14px;
    color: var(--neon-green);
    margin-top: 4px;
}

.profile-blocks {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    width: 100%;
    margin-bottom: 20px;
}

.profile-block {
    flex: 1 1 0;
    min-width: 0;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 14px 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s;
    overflow: hidden;
}
.profile-block:active {
    transform: scale(0.96);
}

.profile-block-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.profile-block-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
}

.profile-block-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-block-value {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-block-credits {
    border-left: 3px solid var(--neon-green);
}
.profile-block-referrals {
    border-left: 3px solid var(--neon-purple);
}
.profile-block-code {
    border-left: 3px solid #fbbf24;
}

.contacts-btn-wrapper {
    width: 100%;
    padding: 12px 0 8px 0;
    display: flex;
    justify-content: center;
}

.contacts-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #7C3AED, #4F46E5);
    color: #fff;
    border: none;
    border-radius: 60px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
    cursor: pointer;
    transition: all 0.25s ease;
    width: auto;
    min-width: 180px;
    justify-content: center;
}
.contacts-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.5);
    background: linear-gradient(135deg, #8B5CF6, #6366F1);
}
.contacts-btn:active {
    transform: scale(0.96);
}
.contacts-btn .material-icons {
    font-size: 24px;
}

.profile-details {
    width: 100%;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 4px 16px;
}

.profile-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}
.profile-detail-item:last-child {
    border-bottom: none;
}
.profile-detail-label {
    color: #8899b0;
    font-size: 14px;
}
.profile-detail-value {
    font-weight: 600;
    font-size: 15px;
}

/* ===== БЛОК ПРОДУКТОВ В ПРОФИЛЕ ===== */
.profile-products {
    margin-top: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-glow);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.profile-products-title {
    font-size: 16px;
    font-weight: 700;
    color: #E8EDF5;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
}

.profile-products-list {
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--neon-purple) transparent;
}
.profile-products-list::-webkit-scrollbar {
    width: 4px;
}
.profile-products-list::-webkit-scrollbar-track {
    background: transparent;
}
.profile-products-list::-webkit-scrollbar-thumb {
    background: var(--neon-purple);
    border-radius: 4px;
}

.profile-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(7, 11, 20, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.25s ease;
    gap: 8px;
}

.profile-product-item:hover {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(7, 11, 20, 0.6);
}

.profile-product-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.profile-product-name {
    font-size: 14px;
    font-weight: 600;
    color: #E8EDF5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-product-category {
    font-size: 11px;
    color: #8896AB;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-product-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.profile-product-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--neon-green);
    white-space: nowrap;
}

.profile-product-badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.profile-products-empty {
    text-align: center;
    color: #64748B;
    font-size: 14px;
    padding: 30px 0;
}
/* ===== chat.css ===== */
/* ===== ЧАТ (КОНТЕЙНЕР) ===== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: transparent;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
}

.chat-input-area {
    flex-shrink: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

/* В режиме чата убираем безопасную зону снизу */
.main-content.chat-mode .chat-input-area {
    padding-bottom: 10px;
}

/* ===== ПОИСК В ЧАТЕ ===== */
.search-container {
    padding: 8px 16px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.search-row {
    display: flex;
    gap: 8px;
}
.search-input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    color: #fff;
    outline: none;
}
.search-input::placeholder {
    color: #64748b;
}
.search-close {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
}

/* ===== БАННЕР В ЧАТЕ ===== */
.chat-info-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 12px;
    padding: 12px 16px;
    margin: 8px 16px 4px;
    color: #c8d0dc;
    font-size: 14px;
    line-height: 1.4;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.chat-info-banner .material-icons {
    color: var(--neon-purple);
    font-size: 24px;
    flex-shrink: 0;
}

/* ===== СООБЩЕНИЯ ===== */
.empty-message {
    text-align: center;
    color: #64748b;
    font-size: 13px;
    margin: auto;
}

.message-item {
    max-width: 82%;
    display: flex;
    flex-direction: column;
}
.message-item.admin {
    align-self: flex-start;
}
.message-item.user {
    align-self: flex-end;
}

.message-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}
.message-item.admin .message-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: #e4edf5;
    border-bottom-left-radius: 4px;
}
.message-item.user .message-bubble {
    background: var(--neon-purple);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message-quote {
    border-left: 3px solid var(--neon-purple);
    padding-left: 10px;
    margin-bottom: 6px;
    color: #8899b0;
    font-size: 13px;
    word-break: break-word;
    cursor: pointer;
    transition: background 0.2s;
}
.message-quote:hover {
    background: rgba(139, 92, 246, 0.05);
}
.message-quote .quote-author {
    font-weight: 600;
    color: var(--neon-purple);
    font-size: 12px;
    display: block;
    margin-bottom: 2px;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
    gap: 8px;
}
.message-actions {
    display: flex;
    gap: 6px;
}
.action-btn {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
}
.action-btn:hover {
    color: #e4edf5;
}

/* ===== ВВОД ===== */
.chat-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.chat-input {
    flex: 1;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
}
.chat-input:focus {
    border-color: var(--neon-purple);
}
.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--neon-purple);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.send-btn:active {
    transform: scale(0.9);
}

.reply-indicator, #edit-indicator {
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.reply-text, .edit-text {
    color: var(--neon-purple);
}
.reply-cancel {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
}

/* ===== ВЛОЖЕНИЯ ===== */
.attach-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    cursor: pointer;
    color: var(--neon-purple, #8B5CF6);
    transition: color 0.2s;
    font-size: 24px;
}
.attach-btn:hover {
    color: #a78bfa;
}
.attach-btn:active {
    transform: scale(0.92);
}

.message-attachment {
    margin-bottom: 6px;
}
.message-attachment img {
    max-width: 100%;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    display: block;
}
.download-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    color: #60A5FA;
    text-decoration: none;
}
.download-link:hover {
    text-decoration: underline;
}

.uploading-indicator {
    font-size: 12px;
    color: var(--neon-purple);
    margin-left: 8px;
}
/* ===== referral.css ===== */
/* ===== РЕФЕРАЛЫ ===== */
.referral-card {
    background: var(--bg-card);
    padding: 16px;
    margin: 8px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.input-label {
    display: block;
    color: #8899b0;
    font-size: 13px;
    margin-bottom: 6px;
}
.input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.input-field {
    flex: 1;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
    color: #fff;
    font-size: 13px;
    outline: none;
}
.btn-primary, .btn-success {
    padding: 8px 12px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.btn-primary {
    background: var(--neon-purple);
    color: #fff;
}
.btn-success {
    background: var(--neon-green);
    color: #fff;
}
.bonus-info {
    background: rgba(16, 185, 129, 0.1);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.bonus-text {
    color: #e4edf5;
    font-size: 14px;
}
.bonus-amount {
    color: var(--neon-green);
    font-weight: 700;
}

.referrals-list-card {
    background: var(--bg-card);
    margin: 8px 16px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.referrals-list {
    display: flex;
    flex-direction: column;
}
.referral-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.referral-item:last-child {
    border-bottom: none;
}
.referral-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.referral-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--neon-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}
.referral-name {
    color: #e4edf5;
    font-size: 14px;
}
.referral-date {
    color: #64748b;
    font-size: 12px;
}
.empty-referrals {
    text-align: center;
    color: #64748b;
    padding: 20px 0;
}
/* ===== products.css ===== */
/* ===== ПРОДУКТЫ / УСЛУГИ ===== */
.products-search-container,
.services-search-container {
    padding: 8px 16px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.products-grid, .services-grid {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    gap: 16px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:active {
    transform: scale(0.98);
}
.card-body {
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}
.card-subtitle {
    font-size: 13px;
    color: var(--neon-purple);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 0;
}
.card-text {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
    margin: 4px 0 0 0;
    white-space: normal;
    word-break: break-word;
}
.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0;
}
.badge-hit, .badge-popular {
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}
.badge-hit {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}
.badge-popular {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}
.card-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}
.card-price .price-label {
    color: #64748b;
    font-size: 13px;
}
.card-price .price-value {
    color: var(--neon-green);
    font-size: 20px;
    font-weight: 700;
}
.card-btn {
    background: var(--neon-purple);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    align-self: flex-start;
}
.card-btn:active {
    background: var(--neon-purple-dark);
}
.card-btn:hover {
    background: var(--neon-purple-dark);
}

.loading-grid {
    text-align: center;
    color: #64748b;
    padding: 40px 0;
}
/* ===== notifications.css ===== */
/* ===== УВЕДОМЛЕНИЯ ===== */
.notifications-list {
    padding: 8px 0;
}
.notification-item {
    padding: 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}
.notification-item.unread {
    background: rgba(139, 92, 246, 0.05);
}
.notification-icon {
    font-size: 24px;
}
.notification-content {
    flex: 1;
}
.notification-text {
    color: #e4edf5;
    font-size: 14px;
}
.notification-time {
    color: #64748b;
    font-size: 12px;
}
.unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-purple);
}
.empty-notifications {
    text-align: center;
    color: #64748b;
    padding: 40px 0;
}
/* ===== modals.css ===== */
/* ===== МОДАЛЬНОЕ ОКНО (ОБЩЕЕ) ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    animation: modalFadeIn 0.25s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    border-radius: 20px 20px 0 0;
    z-index: 2;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

.modal-close {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}
.modal-close:hover {
    color: #fff;
}
.modal-close .material-icons {
    font-size: 28px;
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-description {
    font-size: 15px;
    line-height: 1.7;
    color: #c8d0dc;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

.modal-price {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.15);
}
.modal-price .price-label {
    color: #64748b;
    font-size: 14px;
}
.modal-price .price-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--neon-green);
}

.modal-category {
    font-size: 13px;
    color: #8899b0;
    padding-top: 4px;
    border-top: 1px solid var(--border-color);
}

.modal-footer {
    padding: 12px 20px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.modal-btn {
    background: var(--neon-purple);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.modal-btn:active {
    background: var(--neon-purple-dark);
}

/* ===== МОДАЛЬНОЕ ОКНО КОНТАКТОВ ===== */
.modal-overlay-contacts {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
    animation: modalFadeIn 0.25s ease;
}
.modal-overlay-contacts.active {
    display: flex;
}

.modal-contacts {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    max-width: 420px;
    width: 100%;
    padding: 32px 28px 28px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.6);
    position: relative;
    animation: modalSlideUp 0.3s ease;
}

.modal-contacts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.modal-contacts-title {
    font-size: 22px;
    font-weight: 700;
    color: #F1F5F9;
    letter-spacing: -0.3px;
}

.modal-contacts-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94A3B8;
    transition: 0.2s;
}
.modal-contacts-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.modal-contacts-close .material-icons {
    font-size: 22px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #E2E8F0;
    font-size: 15px;
}
.contact-item:last-child {
    border-bottom: none;
}
.contact-item .material-icons {
    font-size: 24px;
    color: var(--neon-purple);
}
.contact-item a {
    color: #60A5FA;
    text-decoration: none;
    font-weight: 500;
}
.contact-item a:hover {
    text-decoration: underline;
}
.contact-item .contact-label {
    color: #94A3B8;
    min-width: 70px;
    font-size: 13px;
}
/* ===== components.css ===== */
/* ===== ЗАГРУЗКА ===== */
#loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    flex-direction: column;
    gap: 16px;
}
.logo {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--neon-purple), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top: 3px solid var(--neon-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.subtitle {
    color: #64748b;
    font-size: 14px;
}

/* ===== БЛОКИРОВКА ===== */
#blocked-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 11, 20, 0.97);
    backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
#blocked-overlay.show {
    display: flex;
}
.blocked-content {
    text-align: center;
    max-width: 320px;
    padding: 24px;
}
.blocked-icon {
    font-size: 56px !important;
    color: #ef4444;
    margin-bottom: 12px;
}
.blocked-btn {
    padding: 12px 24px;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
}

/* ===== TOAST ===== */
#toast-container {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    left: 16px;
    right: 16px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    background: var(--bg-card);
    color: #e4edf5;
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-glow);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.toast-info { border-color: var(--neon-purple); }
.toast-success { border-color: var(--neon-green); }
.toast-error { border-color: #ef4444; }
.toast-close {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
}

/* ===== КОНТЕКСТНОЕ МЕНЮ ===== */
.context-menu {
    position: fixed;
    background: rgba(30, 35, 50, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 6px 0;
    min-width: 180px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    animation: contextMenuFade 0.15s ease;
}

@keyframes contextMenuFade {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.context-menu-item {
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e4edf5;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.1s;
    user-select: none;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.context-menu-item:hover {
    background: rgba(139, 92, 246, 0.2);
}

.context-menu-item .material-icons {
    font-size: 20px;
    color: #8899b0;
}

.context-menu-item.danger .material-icons {
    color: #ef4444;
}

.context-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 4px 12px;
}
/* ===== responsive.css ===== */
/* ===== ДИНАМИЧЕСКИЕ СТИЛИ ДЛЯ КЛАВИАТУРЫ ===== */
/* Когда поле ввода в фокусе — убираем отступ под навигацию и скрываем её */
.main-content.chat-focused {
    bottom: 0 !important;
}

.app-navigation.hidden {
    display: none !important;
}

/* Убираем лишний отступ снизу у поля ввода (безопасная зона не нужна, когда клавиатура открыта) */
.main-content.chat-focused .chat-input-area {
    padding-bottom: 10px;
}

/* ===== ФИКС ЧАТА: поле ввода НЕ прокручивается ===== */
#tab-chat {
    height: 100%;
    overflow: hidden;
}

#tab-chat .chat-container {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#tab-chat .chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

#tab-chat .chat-input-area {
    flex: 0 0 auto;
    position: relative;
    z-index: 10;
}

/* ДОПОЛНИТЕЛЬНЫЙ ФИКС: когда активен чат, основной контейнер не скроллится */
.main-content.chat-active {
    overflow: hidden !important;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .profile-products {
        padding: 16px 14px;
        border-radius: 16px;
        margin-top: 16px;
    }
    .profile-products-title {
        font-size: 15px;
        margin-bottom: 12px;
    }
    .profile-products-list {
        max-height: 240px;
        gap: 10px;
    }
    .profile-product-item {
        padding: 10px 14px;
    }
    .page-title {
        font-size: 20px;
    }
    .page-subtitle {
        font-size: 13px;
    }
    .modal-contacts {
        padding: 24px 20px 20px;
        border-radius: 24px;
    }
    .modal-contacts-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .profile-products {
        padding: 14px 12px;
        border-radius: 14px;
        margin-top: 14px;
    }
    .profile-products-title {
        font-size: 14px;
        margin-bottom: 10px;
    }
    .profile-products-list {
        max-height: 200px;
        gap: 8px;
    }
    .profile-product-item {
        padding: 8px 12px;
        border-radius: 10px;
        flex-wrap: wrap;
    }
    .profile-product-name {
        font-size: 13px;
    }
    .profile-product-category {
        font-size: 10px;
    }
    .profile-product-meta {
        gap: 6px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .profile-product-price {
        font-size: 13px;
    }
    .profile-product-badges .badge-hit,
    .profile-product-badges .badge-popular {
        font-size: 9px;
        padding: 1px 8px;
    }
    .profile-product-info {
        max-width: calc(100% - 80px);
    }
    .page-header {
        padding: 12px 16px 10px;
    }
    .page-title {
        font-size: 18px;
        gap: 6px;
    }
    .page-title::before {
        height: 22px;
    }
    .page-subtitle {
        font-size: 12px;
        padding-left: 10px;
    }
    .profile-block {
        padding: 10px 6px;
    }
    .profile-block-value {
        font-size: 18px;
    }
    .profile-block-icon {
        font-size: 22px;
    }
    .profile-avatar {
        width: 64px;
        height: 64px;
        font-size: 26px;
    }
    .profile-name {
        font-size: 18px;
    }
    .profile-details {
        padding: 0 12px;
    }
    .profile-detail-item {
        padding: 10px 0;
        font-size: 13px;
    }
    .contacts-btn {
        padding: 12px 24px;
        font-size: 14px;
        min-width: 150px;
    }
    .contacts-btn .material-icons {
        font-size: 20px;
    }
    .modal-contacts {
        padding: 20px 16px 16px;
        border-radius: 20px;
    }
    .modal-contacts-title {
        font-size: 18px;
    }
    .contact-item {
        padding: 12px 0;
        font-size: 14px;
        gap: 12px;
    }
    .contact-item .contact-label {
        min-width: 60px;
        font-size: 12px;
    }
    .chat-info-banner {
        margin: 6px 12px 2px;
        padding: 10px 14px;
        font-size: 13px;
        gap: 10px;
    }
    .chat-info-banner .material-icons {
        font-size: 20px;
    }
}

@media (max-width: 380px) {
    .profile-product-item {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .profile-product-info {
        max-width: 100%;
    }
    .profile-product-meta {
        justify-content: flex-start;
    }
    .profile-products-list {
        max-height: 180px;
    }
    .page-title {
        font-size: 16px;
    }
    .page-subtitle {
        font-size: 11px;
    }
    .profile-blocks {
        gap: 6px;
    }
    .profile-block {
        padding: 8px 4px;
    }
    .profile-block-label {
        font-size: 8px;
    }
    .profile-block-value {
        font-size: 15px;
    }
    .profile-block-icon {
        font-size: 18px;
        margin-bottom: 4px;
    }
    .contacts-btn {
        padding: 10px 18px;
        font-size: 13px;
        min-width: 120px;
    }
    .contacts-btn .material-icons {
        font-size: 18px;
    }
}

/* ===== UX: разделители дней, чипы категорий, кнопка «вниз», плашка сети ===== */
.day-sep { align-self: center; font-size: 11px; color: #8899b0; background: rgba(255, 255, 255, 0.06); padding: 3px 12px; border-radius: 999px; margin: 4px 0; }
.message-text { white-space: pre-wrap; word-break: break-word; }
.msg-link { color: #c4b5fd; text-decoration: underline; word-break: break-all; }
.message-item .message-bubble { user-select: none; -webkit-user-select: none; }   /* долгое нажатие открывает меню (там есть «Копировать») */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; background: var(--bg-card); border: 1px solid var(--border-color); color: #8899b0; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-family: inherit; cursor: pointer; transition: all .15s; }
.chip.active { background: rgba(139, 92, 246, 0.2); border-color: var(--neon-purple); color: #c4b5fd; }
.scroll-down-btn { position: fixed; right: 14px; bottom: calc(var(--safe-area-bottom) + 92px); width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--glass-border); background: var(--bg-card); color: #e4edf5; display: none; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .45); z-index: 40; cursor: pointer; }
.scroll-down-btn.show { display: flex; }
.scroll-down-count { position: absolute; top: -6px; right: -4px; min-width: 18px; padding: 0 5px; height: 18px; border-radius: 9px; background: var(--neon-purple); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.scroll-down-count:empty { display: none; }
.net-banner { position: fixed; top: var(--safe-area-top); left: 0; right: 0; z-index: 100000; background: #b45309; color: #fff; text-align: center; font-size: 13px; padding: 6px 12px; transform: translateY(-120%); transition: transform .25s; }
.net-banner.show { transform: translateY(0); }
.share-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px; padding: 12px; }

/* ===== ЧАТ КАК В TELEGRAM: макет по видимой области, клавиатура, поле ввода ===== */
#app-screen { inset: auto; left: 0; right: 0; top: var(--app-top, 0px); height: var(--app-h, 100%); overflow: hidden; }
.app-header, .chat-header, .app-navigation { position: absolute; }   /* привязаны к видимой области, а не к окну */
.main-content.chat-mode { overflow: hidden; bottom: 0; }
#tab-chat { padding: 0; animation: none; height: 100%; }
#tab-chat.active { display: flex; flex-direction: column; }
#tab-chat .chat-container { flex: 1 1 auto; height: auto; min-height: 0; position: relative; }
.chat-messages { padding: 10px 10px 6px; gap: 6px; overscroll-behavior: contain; }
.chat-info-banner { flex-shrink: 0; margin: 6px 10px 0; padding: 8px 12px; font-size: 12.5px; gap: 10px; border-radius: 12px; }
.chat-info-banner .material-icons { font-size: 20px; }

.chat-input-area, .main-content.chat-mode .chat-input-area {
    flex: 0 0 auto;
    padding: 8px 8px calc(8px + max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px)));
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}
body.kbd-open .chat-input-area, body.kbd-open .main-content.chat-mode .chat-input-area { padding-bottom: 8px; }
body.kbd-open .chat-info-banner { display: none; }
body.kbd-open .app-navigation { display: none; }
body.kbd-open .main-content:not(.chat-mode) { bottom: 0; }

.chat-input-row { display: flex; align-items: flex-end; gap: 6px; }
.chat-input {
    flex: 1; min-width: 0; display: block;
    font-family: inherit; font-size: 16px;   /* 16px — иначе iOS приближает страницу при фокусе и всё «уезжает» */
    line-height: 20px; min-height: 40px; max-height: 120px;
    padding: 10px 14px; border-radius: 20px; resize: none; overflow-y: auto;
    -webkit-appearance: none; appearance: none;
}
.attach-btn { width: 40px; height: 40px; padding: 0; flex-shrink: 0; color: #8899b0; border-radius: 50%; }
.attach-btn:active { background: rgba(255, 255, 255, .06); }
.send-btn { width: 40px; height: 40px; flex-shrink: 0; opacity: .4; transform: scale(.92); transition: opacity .15s, transform .15s; }
.send-btn.ready { opacity: 1; transform: scale(1); }
.send-btn.ready:active { transform: scale(.9); }

.scroll-down-btn { position: absolute; right: 12px; bottom: calc(var(--input-h, 60px) + 10px); z-index: 20; }
.message-item { max-width: 86%; }
.ticks { font-size: 12px; line-height: 1; color: #64748b; letter-spacing: -3px; margin-left: 4px; transition: color .2s; }
.ticks.read { color: #38bdf8; }

/* ===== Иконки, вложения-файлы, аватарки ===== */
.mi { font-size: 1.25em; vertical-align: -0.2em; margin-right: 6px; line-height: 1; }
.material-icons-round { font-family: 'Material Icons Round'; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; user-select: none; }
.ticks { display: inline-flex; align-items: center; margin-left: 4px; letter-spacing: 0; }
.ticks .material-icons-round { font-size: 16px; }
.file-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 6px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; color: inherit; text-decoration: none; min-width: 190px; max-width: 280px; }
.file-chip:hover { background: rgba(255, 255, 255, .1); }
.file-chip .file-icon { font-size: 28px; color: #A78BFA; flex-shrink: 0; }
.file-chip .file-name { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .file-dl { font-size: 20px; opacity: .6; flex-shrink: 0; }
[data-avatar-uid].has-photo { background-size: cover !important; background-position: center !important; font-size: 0 !important; color: transparent !important; }
.ux-menu { position: fixed; z-index: 99990; min-width: 200px; display: none; padding: 6px; background: rgba(21, 29, 48, .98); border: 1px solid #222F4C; border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .55); backdrop-filter: blur(14px); }
.ux-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; background: none; border: none; border-radius: 9px; color: #E8EDF5; font-size: 14px; font-family: inherit; cursor: pointer; text-align: left; }
.ux-menu button:hover { background: rgba(139, 92, 246, .18); }
.ux-menu button.danger { color: #F87171; }
.ux-menu button.danger:hover { background: rgba(239, 68, 68, .15); }
.ux-menu .material-icons-round { font-size: 20px; color: #8896AB; }
.ux-menu button.danger .material-icons-round { color: #F87171; }
.ux-menu hr { border: none; border-top: 1px solid #222F4C; margin: 4px 6px; }
.message-item.selected .max-w-md, .message-item.selected .message-bubble { box-shadow: 0 0 0 2px rgba(139, 92, 246, .7); }

/* ===== Сообщения как в Telegram: миниатюра поддержки, меню по долгому нажатию ===== */
.message-item.admin { flex-direction: row; align-items: flex-end; gap: 8px; max-width: 94%; }
.msg-col { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.msg-avatar { position: relative; width: 32px; height: 32px; flex-shrink: 0; margin-bottom: 20px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #8b5cf6, #ec4899); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.msg-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--bg-card); }
.msg-avatar .material-icons-round { font-size: 19px; }
.message-item.admin.continued .msg-avatar { visibility: hidden; }
.message-actions { display: none !important; }
.message-item.selected .message-bubble { box-shadow: 0 0 0 2px rgba(139, 92, 246, .7); transition: box-shadow .15s; }
.profile-avatar.has-photo { background-size: cover; background-position: center; color: transparent; font-size: 0; }
.profile-block-icon.material-icons-round { font-size: 28px; }
.profile-status-text .mi, .profile-products-title .mi { font-size: 1.15em; vertical-align: -0.22em; }
.badge-hit .material-icons-round, .badge-popular .material-icons-round { font-size: 13px; vertical-align: -2px; margin-right: 1px; }
.price-label .mi { font-size: 1.2em; }
.notification-icon.material-icons-round, .notification-icon .material-icons-round { font-size: 24px; color: var(--neon-purple); }
.download-link .material-icons-round { font-size: 15px; vertical-align: -3px; }
.context-menu-item .material-icons { font-size: 20px; }

/* ===== Фото товара/услуги ===== */
.card-media { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px 16px 0 0; background: var(--bg-dark); }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.modal-media { position: relative; border-radius: 14px; overflow: hidden; background: var(--bg-dark); }
.modal-media img { display: block; width: 100%; max-height: 240px; object-fit: cover; cursor: zoom-in; }
.modal-media-zoom { position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.modal-media-zoom .material-icons-round { font-size: 20px; }
.chat-input-row .emoji-btn { width: 40px; height: 40px; }

/* Фото в каталоге — компактная миниатюра справа в карточке; подробно — в окне «Подробнее» */
.card { position: relative; }
.card-media { position: absolute; top: 14px; right: 14px; width: 72px; height: 72px; aspect-ratio: auto; border-radius: 14px; border: 1px solid var(--border-color); }
.card:has(.card-media) .card-title, .card:has(.card-media) .card-subtitle, .card:has(.card-media) .card-text { padding-right: 84px; }
.card:has(.card-media) .card-body { min-height: 100px; }
.modal-media img { max-height: 340px; object-fit: contain; background: #0a0e17; }
