/* ============================================
   PROFILE.CSS — ПОЛНЫЙ ФАЙЛ (ФИНАЛ, КОЛОНКИ СТАТИСТИКИ)
   ============================================ */

:root {
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.02);
    --shadow-focus: 0 0 0 4px rgba(0, 102, 255, 0.12);
    --radius-xl: 32px;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --primary-color: #0066ff;
    --primary-light: #e6f0ff;
    --primary-dark: #0052cc;
    --text-color: #1a1a2e;
    --text-light: #5e6e82;
    --gray-light: #f0f4f9;
    --gray-medium: #d9e2ec;
    --gray-ultralight: #f8faff;
    --gray-dark: #9fb3c8;
    --radius-large: 24px;
    --radius-medium: 16px;
    --radius-small: 8px;
    --shadow-sm: 0 4px 12px rgba(0, 102, 255, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 102, 255, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Предотвращаем горизонтальный скролл */
.chat-tabs-slide,
.chat-tab-content,
#profileTabsWrapper,
.profile-container {
    overflow-x: hidden;
}

/* Основной контейнер */
.profile-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 20px;
    overflow-x: hidden;
}

/* Табы — без иконок, единый стиль */
.api-tabs-container {
    margin-bottom: 24px;
    border-bottom: 2px solid var(--gray-light);
    background: transparent;
}

.api-tabs-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
}

.api-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.api-tabs {
    display: inline-flex;
    min-width: 100%;
    justify-content: center;
    gap: 0;
}

.api-tab {
    padding: 1rem 2rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.api-tab:hover {
    color: var(--primary-dark);
}

.api-tab.active {
    color: var(--primary-color);
}

.api-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

/* Слайдер */
#profileTabsWrapper {
    pointer-events: auto !important;
    min-height: 600px;
    overflow: hidden;
    position: relative;
}

.chat-tabs-slider {
    display: flex;
    transition: transform 0.3s ease-out;
    will-change: transform;
    pointer-events: auto !important;
}

.chat-tabs-slide {
    flex: 0 0 100%;
    width: 100%;
    padding-bottom: 20px;
}

.chat-tab-content {
    display: none;
}

.chat-tab-content.active {
    display: block;
}

/* ============================================
   ШАПКА ПРОФИЛЯ (ФИНАЛЬНАЯ, КОЛОНКИ ВЫРОВНЕНЫ)
   ============================================ */
.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    background: white;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-sm);
    padding: 24px 32px;
    margin-bottom: 32px;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

/* Левая колонка: аватар + ФИО */
.profile-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary-light), #e0e7ff);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 102, 255, 0.1);
    border: 3px solid white;
    overflow: hidden;
}

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

.profile-avatar span {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
}

.profile-fullname {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
    max-width: 140px;
}

/* Правая колонка: юзернейм + таблица статистики */
.profile-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-username {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-color);
    line-height: 1.2;
}

/* Статистика: две колонки (каждая пара "заголовок – значение" строго под своим заголовком) */
.profile-stats-table {
    display: flex;
    gap: 40px;
}

.stats-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;     /* текст выровнен влево внутри колонки */
}

.stats-header-item {
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--text-color);   /* черный, как юзернейм */
    text-transform: lowercase;
}

.stats-value-item {
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--text-color);
    line-height: 1;
}

.stats-link {
    text-decoration: none;
    transition: opacity 0.2s;
    color: var(--primary-color)

}

.stats-link:hover {
    opacity: 0.7;
}

/* Скрываем старые элементы (если остались) */
.profile-rating,
.profile-details,
.reviews-actions,
.profile-name-row,
.profile-edit-form,
.profile-name,
.profile-stats-line {
    display: none;
}

/* ===== КАРТОЧКИ ТОВАРОВ ===== */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 32px 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.profile-container .products_list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0;
    margin: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.product_card {
    position: relative;
}

.product_image_container {
    position: relative;
}

/* Кнопки на карточке товара */
.product_card .delete-product-btn,
.product_card .edit-product-btn {
    position: absolute;
    top: 12px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-medium);
    border: none;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.product_card .delete-product-btn {
    right: 12px;
    background: linear-gradient(135deg, var(--error-color) 0%, #e81f00 100%);
    box-shadow: 0 4px 12px rgba(255, 34, 0, 0.3);
}

.product_card .edit-product-btn {
    left: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.product_card .delete-product-btn svg,
.product_card .edit-product-btn svg {
    width: 18px;
    height: 18px;
    stroke: white;
    stroke-width: 2;
}

.product_card .delete-product-btn:hover,
.product_card .edit-product-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Пустое состояние */
.empty-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
}

.empty-products i {
    font-size: 4rem;
    color: var(--gray-medium);
    margin-bottom: 16px;
}

/* ===== ОСТАЛЬНЫЕ ТАБЫ (кошелёк, безопасность, настройки) ===== */
.security-section,
.transactions-section,
.settings-section {
    background: white;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.security-section:hover,
.transactions-section:hover,
.settings-section:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ===== КОШЕЛЁК ===== */
.wallet-balance-card {
    background: linear-gradient(145deg, #0b1e2e 0%, #132a3f 100%);
    border-radius: 28px;
    padding: 28px;
    color: white;
    margin-bottom: 28px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.wallet-balance-card:hover {
    transform: scale(1.01);
}

.wallet-balance-card::after {
    content: "₽";
    position: absolute;
    bottom: -20px;
    right: -10px;
    font-size: 180px;
    opacity: 0.04;
    font-weight: 800;
    pointer-events: none;
}

.wallet-balance-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.wallet-balance-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.wallet-balance-amount {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wallet-balance-amount small {
    font-size: 1.4rem;
    font-weight: 500;
    opacity: 0.7;
}

.wallet-frozen {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 0.95rem;
    margin-bottom: 24px;
    backdrop-filter: blur(4px);
}

.wallet-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-light {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-light:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.transactions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.transactions-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.transactions-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}

.transactions-table th {
    text-align: left;
    padding: 8px 12px;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.transactions-table td {
    padding: 16px 12px;
    background: var(--gray-ultralight);
    border-radius: 16px !important;
    font-weight: 500;
}

.transactions-table tbody tr {
    transition: background 0.15s ease, transform 0.15s ease;
    border-radius: 16px;
}

.transactions-table tbody tr:hover {
    background: var(--primary-light);
    transform: scale(1.01);
    cursor: default;
}

.transaction-amount {
    font-weight: 800;
    font-size: 1.1rem;
}

.transaction-amount.positive {
    color: var(--success-color);
}

.transaction-amount.negative {
    color: var(--error-color);
}

.transaction-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-completed {
    background: rgba(16, 185, 129, 0.12);
    color: #0b7b51;
}

.status-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #b85e00;
}

.status-failed {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

/* ===== БЕЗОПАСНОСТЬ ===== */
.device-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px;
    margin: 0 -8px;
    border-bottom: none;
    border-radius: 20px;
    transition: background 0.15s ease, padding-left 0.2s ease;
    flex-wrap: wrap;
    gap: 16px;
}

.device-card:hover {
    background: var(--gray-ultralight);
    padding-left: 24px;
}

.device-info {
    display: flex;
    gap: 18px;
    flex: 1;
    flex-wrap: wrap;
}

.device-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(145deg, var(--primary-light), #dbe7ff);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.6rem;
    flex-shrink: 0;
    box-shadow: 0 6px 12px rgba(0, 102, 255, 0.08);
    transition: transform 0.2s;
}

.device-card:hover .device-icon {
    transform: scale(1.05);
}

.device-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.device-name::after {
    content: "●";
    font-size: 8px;
    color: var(--success-color);
    margin-left: 6px;
    opacity: 0.7;
}

.device-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.device-meta span:not(:last-child)::after {
    content: "•";
    margin-left: 12px;
    color: var(--gray-dark);
}

.device-useragent {
    font-size: 0.8rem;
    color: var(--gray-dark);
    margin-top: 6px;
    max-width: 100%;
    word-break: break-word;
    background: var(--gray-light);
    padding: 6px 12px;
    border-radius: 40px;
    display: inline-block;
    font-family: monospace;
}

.device-revoke-form .btn-outline-danger {
    border-radius: 40px;
    padding: 8px 18px;
    font-weight: 600;
    transition: all 0.2s;
}

.device-revoke-form .btn-outline-danger:hover {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

/* Telegram привязки */
.bindings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.bindings-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.binding-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    margin: 0 -8px;
    border-bottom: none;
    border-radius: 20px;
    transition: background 0.15s ease, padding-left 0.2s ease;
    flex-wrap: wrap;
    gap: 12px;
}

.binding-card:hover {
    background: var(--gray-ultralight);
    padding-left: 24px;
}

.binding-info {
    display: flex;
    gap: 16px;
}

.binding-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(145deg, #e0f2fe, #b6e0ff);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0369a1;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 6px 12px rgba(2, 136, 209, 0.08);
    transition: transform 0.2s;
}

.binding-card:hover .binding-avatar {
    transform: scale(1.05);
}

.binding-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.binding-id {
    font-size: 0.85rem;
    color: var(--text-light);
}

.binding-date {
    font-size: 0.8rem;
    color: var(--gray-dark);
}

.unbind-btn {
    border-radius: 40px;
    padding: 8px 18px;
    font-weight: 600;
    transition: all 0.2s;
    border: 1.5px solid rgba(239, 68, 68, 0.3);
    background: transparent;
    color: var(--error-color);
}

.unbind-btn:hover {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

#generate-bind-code {
    border-radius: 40px;
    padding: 10px 24px;
    font-weight: 700;
    background: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.2);
    transition: all 0.2s;
}

#generate-bind-code:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 102, 255, 0.3);
}

#code-section {
    margin-top: 24px;
    background: linear-gradient(145deg, #f9fbff, #ffffff);
    border: 1px solid var(--gray-light);
    border-radius: 28px;
    padding: 28px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.code-display h3 {
    font-family: monospace;
    font-weight: 800;
    background: var(--gray-ultralight);
    padding: 12px 20px;
    border-radius: 60px;
    display: inline-block;
    border: 2px dashed var(--primary-color);
    letter-spacing: 6px;
    color: var(--primary-dark);
}

#countdown {
    font-weight: 700;
    color: var(--error-color);
}

.code-instructions ol {
    padding-left: 20px;
}

.code-instructions code {
    background: var(--primary-light);
    padding: 4px 10px;
    border-radius: 30px;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.warning-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 16px;
    background: rgba(239, 68, 68, 0.06);
    padding: 14px 18px;
    border-radius: 20px;
    border-left: 4px solid var(--error-color);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

/* ===== НАСТРОЙКИ ===== */
.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px;
    margin: 0 -8px;
    border-bottom: none;
    border-radius: 20px;
    transition: background 0.15s ease, padding-left 0.2s ease;
    flex-wrap: wrap;
    gap: 16px;
}

.settings-item:hover {
    background: var(--gray-ultralight);
    padding-left: 24px;
}

.settings-item-info {
    display: flex;
    align-items: center;
    gap: 18px;
}

.settings-item-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(145deg, var(--primary-light), #e2e9ff);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 6px 12px rgba(0, 102, 255, 0.06);
    transition: transform 0.2s;
}

.settings-item:hover .settings-item-icon {
    transform: scale(1.05);
}

.settings-item-content h4 {
    margin: 0 0 4px;
    font-weight: 700;
    font-size: 1.1rem;
}

.settings-item-content p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.settings-item-action .btn {
    border-radius: 40px;
    padding: 10px 22px;
    font-weight: 600;
}

.btn-outline:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.danger-zone {
    background: rgba(239, 68, 68, 0.02);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 28px;
}

.danger-zone:hover {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.03);
}

.danger-zone .settings-item-icon {
    background: rgba(239, 68, 68, 0.08);
    color: var(--error-color);
}

.danger-zone .btn-outline-danger {
    border-radius: 40px;
    font-weight: 600;
    transition: all 0.2s;
    border: 1.5px solid rgba(239, 68, 68, 0.4);
}

.danger-zone .btn-outline-danger:hover {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(239, 68, 68, 0.25);
}

/* Switch (приватный профиль) */
.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-medium);
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Форма редактирования профиля (в настройках) */
.settings-edit-profile {
    margin-top: 16px;
}

.settings-edit-profile .avatar-edit-section {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.settings-edit-profile .avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 3px solid white;
}

.settings-edit-profile .avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.settings-edit-profile .form-group {
    margin-bottom: 20px;
}

.settings-edit-profile .edit-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--gray-medium);
    border-radius: 16px;
    font-size: 1rem;
    transition: border 0.2s, box-shadow 0.2s;
}

.settings-edit-profile .edit-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.settings-edit-profile .edit-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* ===== КНОПКИ И ОБЩИЕ ЭЛЕМЕНТЫ ===== */
.btn {
    padding: 10px 20px;
    border-radius: 40px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 102, 255, 0.25);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--gray-medium);
    color: var(--text-color);
}

.btn-outline-danger {
    background: transparent;
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--error-color);
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

/* Пустые состояния */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    border-radius: 32px;
    background: var(--gray-ultralight);
    border: 2px dashed var(--gray-medium);
    transition: all 0.2s;
}

.empty-state i {
    font-size: 3.5rem;
    color: var(--gray-dark);
    margin-bottom: 16px;
    opacity: 0.7;
}

/* Отзывы */
.recent-reviews {
    margin-top: 32px;
}

.review-item {
    background: white;
    border-radius: var(--radius-medium);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.reviewer {
    font-weight: 600;
    color: var(--text-color);
}

.review-rating {
    display: flex;
    gap: 2px;
    color: #fbbf24;
}

.review-date {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--text-light);
}

.review-comment {
    color: var(--text-light);
    line-height: 1.5;
}

/* Модальное окно удаления (если нужно) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-confirm {
    background: white;
    border-radius: 28px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .profile-container {
        padding: 16px 12px;
    }

    .profile-header {
        padding: 18px 20px;
        gap: 20px;
    }

    .profile-avatar {
        width: 110px;
        height: 110px;
    }

    .profile-avatar span {
        font-size: 2.2rem;
    }

    .profile-fullname {
        font-size: 0.95rem;
        max-width: 110px;
    }

    .profile-username {
        font-size: 1.6rem;
    }

    .profile-container .products_list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .device-useragent {
        white-space: normal;
        background: transparent;
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    .profile-header {
        padding: 14px 14px;
        gap: 14px;
        flex-wrap: wrap;
    }

    .profile-avatar {
        width: 90px;
        height: 90px;
    }

    .profile-avatar span {
        font-size: 1.8rem;
    }

    .profile-fullname {
        font-size: 0.85rem;
        max-width: 90px;
    }

    .profile-username {
        font-size: 1.3rem;
    }

    .profile-stats-table {
        gap: 20px;
    }

    .stats-header-item {
        font-size: 1.1rem;
    }

    .stats-value-item {
        font-size: 1.2rem;
    }

    .wallet-actions {
        flex-direction: column;
    }

    .btn-light {
        width: 100%;
        justify-content: center;
    }

    .code-display h3 {
        font-size: 1.8rem;
        letter-spacing: 4px;
    }
}

@media (max-width: 360px) {
    .profile-stats-table {
        gap: 12px;
    }

    .profile-container .products_list {
        gap: 0.4rem;
    }
}

/* ============================================
   УЛУЧШЕННЫЕ СТИЛИ ДЛЯ РАЗДЕЛА БЕЗОПАСНОСТИ
   ============================================ */

/* Общая обёртка */
.security-section {
    background: white;
    border-radius: var(--radius-large, 24px);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.security-section:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Заголовок секции */
.security-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Список устройств – flex-колонка с отступами */
.devices-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Карточка устройства */
.device-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-radius: 20px;
    background: #f8faff;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    flex-wrap: wrap;
    gap: 16px;
    border: 1px solid transparent;
}
.device-card:hover {
    background: #eef3ff;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.08);
}

/* Подсветка текущего устройства */
.device-card.current-device {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.15);
    position: relative;
}
.device-card.current-device::before {
    content: "Текущее устройство";
    position: absolute;
    top: -8px;
    right: 16px;
    background: var(--primary-color);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Левая часть: иконка + информация */
.device-info {
    display: flex;
    gap: 16px;
    flex: 1;
    min-width: 250px;
}

.device-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(145deg, var(--primary-light), #dbe7ff);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.6rem;
    flex-shrink: 0;
    box-shadow: 0 6px 12px rgba(0, 102, 255, 0.08);
    transition: transform 0.2s;
}
.device-card:hover .device-icon {
    transform: scale(1.05);
}

.device-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.device-name {
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.device-name::after {
    content: "●";
    font-size: 8px;
    color: var(--success-color);
    margin-left: 6px;
    opacity: 0.7;
}

.device-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-light);
}
.device-meta span:not(:last-child)::after {
    content: "•";
    margin-left: 8px;
    color: var(--gray-dark);
    opacity: 0.5;
}

.device-useragent {
    font-size: 0.8rem;
    color: var(--gray-dark);
    background: #ffffff;
    padding: 4px 12px;
    border-radius: 40px;
    display: inline-block;
    font-family: monospace;
    max-width: 100%;
    word-break: break-word;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-top: 4px;
}

/* Кнопка отзыва */
.device-revoke-form .btn-outline-danger {
    border-radius: 40px;
    padding: 8px 18px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: 1.5px solid rgba(239, 68, 68, 0.4);
    background: transparent;
    color: var(--error-color);
    cursor: pointer;
    white-space: nowrap;
}
.device-revoke-form .btn-outline-danger:hover {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

/* Кнопки в Telegram‑секции */
.bindings-container .btn-outline-danger,
.unbind-all-section .btn-outline-danger {
    border-radius: 40px;
    padding: 8px 18px;
    font-weight: 600;
    transition: all 0.2s;
    border: 1.5px solid rgba(239, 68, 68, 0.4);
    background: transparent;
    color: var(--error-color);
}
.bindings-container .btn-outline-danger:hover,
.unbind-all-section .btn-outline-danger:hover {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

/* Адаптивность */
@media (max-width: 768px) {
    .device-card {
        padding: 14px 16px;
        gap: 12px;
    }
    .device-info {
        gap: 12px;
        min-width: 200px;
    }
    .device-name {
        font-size: 1rem;
    }
    .device-useragent {
        white-space: normal;
        background: transparent;
        padding-left: 0;
    }
}
@media (max-width: 480px) {
    .device-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .device-revoke-form {
        align-self: flex-end;
    }
}