:root {
    --bg: var(--tg-theme-bg-color, #ffffff);
    --text: var(--tg-theme-text-color, #2c3e2d);
    --hint: var(--tg-theme-hint-color, #8a9a8b);
    --link: var(--tg-theme-link-color, #3a7d44);
    --btn: var(--tg-theme-button-color, #3a7d44);
    --btn-text: var(--tg-theme-button-text-color, #ffffff);
    --secondary-bg: var(--tg-theme-secondary-bg-color, #f4f7f4);
    --accent: #3a7d44;
    --accent-light: var(--tg-theme-secondary-bg-color, #e8f0e9);
    --accent-dark: #2d6235;
    --danger: #d9534f;
    --warning-bg: var(--tg-theme-secondary-bg-color, #fef9e7);
    --warning-border: #f0c929;
    --warning-text: var(--tg-theme-hint-color, #7d6608);
    --ban-bg: var(--tg-theme-secondary-bg-color, #fde8e8);
    --ban-border: #d9534f;
    --ban-text: var(--tg-theme-hint-color, #6d1a1a);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-bottom: 80px;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

/* ====== Навигация ====== */
#nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--secondary-bg);
    border-top: 1px solid rgba(58,125,68,0.1);
    z-index: 100;
    padding: 4px 0 env(safe-area-inset-bottom, 4px);
}

.nav-btn {
    flex: 1;
    padding: 6px 4px 8px;
    border: none;
    background: transparent;
    color: var(--hint);
    font-size: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: color var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.nav-icon {
    font-size: 20px;
    line-height: 1;
}

.nav-btn.active {
    color: var(--accent);
    font-weight: 600;
}

.nav-btn.hidden {
    display: none;
}

.nav-btn {
    position: relative;
}

.nav-badge {
    position: absolute;
    top: 2px;
    right: 50%;
    transform: translateX(16px);
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

.nav-badge.hidden {
    display: none;
}

/* ====== Страницы ====== */
.page {
    display: none;
    padding: 16px;
    animation: fadeIn 0.25s ease;
}

.page.active {
    display: block;
}

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

h2 {
    margin-bottom: 16px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

/* ====== Табы ====== */
.tabs {
    display: flex;
    gap: 8px;
}

.tabs.tabs-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
}
.tabs.tabs-scroll::-webkit-scrollbar { display: none; }

.tabs.tabs-grid {
    flex-wrap: wrap;
}
.tabs.tabs-grid .tab {
    flex: 0 0 auto;
    padding: 8px 14px;
    font-size: 13px;
}

.tab {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--accent);
    background: transparent;
    color: var(--accent);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.tabs-scroll .tab {
    flex: 0 0 auto;
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
}

.tab.active {
    background: var(--accent);
    color: #fff;
}

/* ====== Карточки ====== */
.card {
    position: relative;
    background: var(--secondary-bg);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 12px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    border-left: 4px solid var(--accent);
}

.card:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-lg);
}

/* Фото в карточках */
.card-photo {
    width: calc(100% + 32px);
    margin: -14px -16px 12px -16px;
    border-radius: var(--radius) var(--radius) 0 0;
    max-height: 180px;
    object-fit: cover;
    display: block;
    border-left: 4px solid var(--accent);
    box-sizing: border-box;
}

/* Галерея на детальной странице */
.photo-gallery {
    position: relative;
    margin-bottom: 16px;
    border-radius: var(--radius);
    overflow: hidden;
    touch-action: pan-y;
}

.gallery-track {
    display: flex;
    will-change: transform;
}

.gallery-track.animating {
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-img {
    width: 100%;
    min-width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--radius);
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.gallery-dots {
    text-align: center;
    padding: 8px 0 0;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hint);
    margin: 0 3px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.dot.active {
    background: var(--accent);
    transform: scale(1.25);
}

.lot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
}
.lot-number {
    font-weight: 700;
    color: var(--accent);
}
.lot-host {
    color: var(--hint);
    display: flex;
    align-items: center;
    gap: 4px;
}
.host-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}
.host-link {
    color: var(--accent);
    text-decoration: none;
}
.host-msg-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 8px;
    font-size: 11px;
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    margin-left: 4px;
}

.card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.card .meta {
    font-size: 13px;
    color: var(--hint);
}

.card .price {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
    margin-top: 8px;
}

.card .timer {
    font-size: 13px;
    color: var(--danger);
    margin-top: 6px;
    font-weight: 600;
}

/* ====== Детальная страница ====== */
.detail-photo {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.detail-info {
    margin-bottom: 16px;
}

.detail-info p {
    margin: 6px 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

.bid-form {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.bid-form input {
    flex: 1;
    padding: 12px;
    border: 2px solid #d0ddd1;
    border-radius: var(--radius-sm);
    font-size: 16px;
    background: var(--bg);
    color: var(--text);
    transition: border-color var(--transition);
    outline: none;
}

.bid-form input:focus {
    border-color: var(--accent);
}

.bids-list {
    margin-top: 16px;
}

.bids-list h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.bid-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 4px;
    background: var(--secondary-bg);
    border-radius: var(--radius-sm);
    font-size: 14px;
    position: relative;
}

.bid-item:nth-child(odd) {
    background: var(--bg);
}

/* ====== Кнопки ====== */
.btn {
    display: inline-block;
    padding: 12px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-bottom: 8px;
    transition: transform var(--transition), opacity var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn-primary {
    background: var(--accent);
}

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

.edit-profile-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
}

.back-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 14px;
    padding: 6px 0;
    -webkit-tap-highlight-color: transparent;
}

/* ====== Формы ====== */
form label {
    display: block;
    font-size: 13px;
    color: var(--hint);
    margin: 14px 0 6px;
    font-weight: 500;
}

form input, form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #d0ddd1;
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    transition: border-color var(--transition);
    outline: none;
}

form input:focus, form textarea:focus {
    border-color: var(--accent);
}

form textarea {
    min-height: 80px;
    resize: vertical;
}

form .btn {
    margin-top: 16px;
}

/* ====== Профиль ====== */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 16px 0;
}

.stat-item {
    background: var(--secondary-bg);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--accent);
}

.stat-item .value {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
}

.stat-item .label {
    font-size: 12px;
    color: var(--hint);
    margin-top: 4px;
    font-weight: 500;
}

.stat-item.clickable {
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.stat-item.clickable .label {
    color: #4A90D9;
    text-decoration: underline;
    font-weight: 600;
}

.stat-item.clickable:active {
    transform: scale(0.96);
    box-shadow: var(--shadow-lg);
}

.card-warning {
    background: var(--warning-bg);
    border-left: 4px solid var(--warning-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 10px;
    color: var(--warning-text);
    font-size: 14px;
}

.card-ban {
    background: var(--ban-bg);
    border-left: 4px solid var(--ban-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 10px;
    color: var(--ban-text);
    font-size: 14px;
}

/* ====== Фото в предложениях ====== */
.proposal-photos {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.proposal-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* ====== Загрузка файлов ====== */
.upload-area {
    margin-bottom: 12px;
}

.upload-area .upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    border: 2px dashed var(--accent);
    background: var(--secondary-bg);
    color: var(--accent);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.upload-area .upload-btn:active {
    background: var(--accent);
    color: #fff;
}

.photo-previews {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.photo-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

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

.photo-preview-item .remove-photo {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ====== Чат предложений ====== */
.proposal-detail-header {
    background: var(--secondary-bg);
    border: 1px solid rgba(128,128,128,0.15);
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.proposal-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.proposal-status.pending { background: var(--secondary-bg); color: var(--hint); border: 1px solid rgba(128,128,128,0.2); }
.proposal-status.approved { background: var(--secondary-bg); color: var(--accent); border: 1px solid rgba(128,128,128,0.2); }
.proposal-status.rejected { background: var(--secondary-bg); color: var(--danger); border: 1px solid rgba(128,128,128,0.2); }

.chat-container {
    background: var(--bg);
    border: 1px solid rgba(128,128,128,0.15);
    border-radius: var(--radius);
    margin-top: 12px;
    overflow: hidden;
}

.chat-label {
    padding: 10px 12px 0;
    font-weight: 600;
    font-size: 14px;
    color: var(--hint);
}

.chat-messages {
    max-height: 350px;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-msg {
    max-width: 82%;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-msg.sent {
    align-self: flex-end;
    background: var(--accent);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-msg.received {
    align-self: flex-start;
    background: var(--secondary-bg);
    color: var(--text);
    border: 1px solid rgba(128,128,128,0.2);
    border-bottom-left-radius: 4px;
}

.chat-msg .msg-sender {
    font-size: 11px;
    font-weight: 600;
    color: var(--link);
    margin-bottom: 2px;
}

.chat-msg.sent .msg-sender {
    color: rgba(255,255,255,0.85);
}

.chat-msg .msg-time {
    font-size: 10px;
    color: var(--hint);
    margin-top: 2px;
    text-align: right;
}

.chat-msg.sent .msg-time {
    color: rgba(255,255,255,0.6);
}

.chat-empty {
    text-align: center;
    color: var(--hint);
    padding: 20px;
    font-size: 13px;
}

.tg-link {
    color: var(--link);
    text-decoration: none;
    font-weight: inherit;
}

.tg-link:active {
    opacity: 0.7;
}

/* MMR Display */
.mmr-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 12px 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--bg) 100%);
    border-radius: 12px;
    border: 1px solid var(--hint);
}

.mmr-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
}

.mmr-rank {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.role-badge {
    margin: 8px 0 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
}

.role-ceo {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffd700;
    font-size: 16px;
}

.role-admin {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #333;
}

.role-observer {
    background: var(--secondary-bg);
    color: var(--text);
    border: 1px solid var(--hint);
}

.role-desc {
    font-weight: 400;
    font-size: 13px;
    color: var(--hint);
    margin-top: 6px;
    line-height: 1.4;
}

.threads-list .thread-item {
    padding: 10px 12px;
    border-bottom: 1px solid var(--secondary-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid rgba(128,128,128,0.15);
}

.chat-input-area textarea {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--hint);
    border-radius: 20px;
    font-size: 14px;
    resize: none;
    max-height: 80px;
    font-family: inherit;
    background: var(--secondary-bg);
    color: var(--text);
}

.chat-input-area .chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.proposal-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.unread-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    z-index: 2;
}

.file-preview {
    margin-bottom: 8px;
}

.file-preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--secondary-bg);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.file-preview-item .remove-file {
    margin-left: auto;
    cursor: pointer;
    color: var(--hint);
}

/* ====== Биржа ====== */
.exchange-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exchange-card {
    background: var(--secondary-bg);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.exchange-card:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-lg);
}

.exchange-icon {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 4px;
}

.exchange-label {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

.exchange-desc {
    font-size: 13px;
    color: var(--hint);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e53935;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    padding: 0 6px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ====== Заметки ====== */
.note-item {
    background: var(--secondary-bg);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
    border-left: 3px solid var(--accent);
}

.note-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 12px;
}

.note-author {
    font-weight: 700;
    color: var(--text);
}

.note-date {
    color: var(--hint);
}

.note-delete {
    margin-left: auto;
    cursor: pointer;
    color: var(--hint);
    font-size: 14px;
    padding: 2px 4px;
}

.note-text {
    font-size: 14px;
    color: var(--text);
    white-space: pre-wrap;
}

/* ====== Админ ====== */
.admin-menu {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.admin-menu .btn {
    flex: 1;
    min-width: 100px;
}

/* ====== Feedback Wizard ====== */
.wizard-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}
.wizard-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--secondary-bg);
    border: 2px solid var(--hint);
    transition: all var(--transition);
}
.wizard-dot.active {
    background: var(--accent);
    border-color: var(--accent);
}
.wizard-dot.done {
    background: var(--accent);
    border-color: var(--accent);
    opacity: 0.5;
}
.wizard-step {
    display: none;
}
.wizard-step.active {
    display: block;
    animation: fadeSlide 0.25s ease;
}
@keyframes fadeSlide {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: translateX(0); }
}
.wizard-hint {
    color: var(--hint);
    font-size: 14px;
    margin-bottom: 16px;
}
.wizard-nav {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}
.wizard-nav .btn {
    flex: 1;
}
.feedback-types {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.feedback-type-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--secondary-bg);
    border-radius: var(--radius);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    flex-wrap: wrap;
}
.feedback-type-card:active {
    transform: scale(0.98);
}
.feedback-type-card.selected {
    border-color: var(--accent);
    background: var(--accent-light);
}
.feedback-type-icon {
    font-size: 28px;
    line-height: 1;
}
.feedback-type-label {
    font-weight: 600;
    font-size: 15px;
    flex-basis: calc(100% - 52px);
}
.feedback-type-desc {
    font-size: 12px;
    color: var(--hint);
    flex-basis: calc(100% - 52px);
    margin-top: -4px;
}
#feedback-wizard input[type="text"],
#feedback-wizard textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #d0ddd1;
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    transition: border-color var(--transition);
    outline: none;
}
#feedback-wizard input[type="text"]:focus,
#feedback-wizard textarea:focus {
    border-color: var(--accent);
}
#feedback-wizard textarea {
    min-height: 200px;
    resize: none;
    overflow: hidden;
}
.field-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 4px;
}
.fb-summary {
    background: var(--secondary-bg);
    border-radius: var(--radius);
    padding: 16px;
    font-size: 14px;
    line-height: 1.6;
}
.fb-summary .fb-type-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}
.fb-summary h4 {
    margin: 8px 0 4px;
    font-size: 15px;
}
.fb-summary p {
    white-space: pre-wrap;
    color: var(--hint);
}
.fb-link-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--secondary-bg);
    border-radius: var(--radius);
    cursor: pointer;
    margin-top: 16px;
    transition: background var(--transition);
}
.fb-link-card:active {
    background: var(--accent-light);
}
.fb-link-icon {
    font-size: 22px;
}
.fb-link-text {
    font-size: 14px;
    color: var(--text);
}
.fb-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    background: var(--secondary-bg);
}
.fb-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.lot-participants {
    margin: 10px 0;
    background: var(--secondary-bg);
    border-radius: var(--radius);
    padding: 0;
}
.lot-participants summary {
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}
.lot-participants[open] summary {
    border-bottom: 1px solid var(--border);
}
.participants-list {
    padding: 8px 14px;
}
.participant-row {
    padding: 4px 0;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.participant-row:last-child {
    border-bottom: none;
}
.status-new { background: #e3f2fd; color: #1565c0; }
.status-review { background: #fff3e0; color: #e65100; }
.status-progress { background: #e8f5e9; color: #2e7d32; }
.status-rejected { background: #fbe9e7; color: #c62828; }
.status-done { background: #e0f2f1; color: #00695c; }
.fb-admin-item { cursor: pointer; }
.fb-detail-card {
    background: var(--secondary-bg);
    border-radius: var(--radius);
    padding: 16px;
}

.hidden {
    display: none !important;
}

/* ====== Список ====== */
.list-item {
    background: var(--secondary-bg);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    line-height: 1.6;
    border-left: 3px solid var(--accent);
}

.empty {
    text-align: center;
    color: var(--hint);
    padding: 50px 20px;
    font-size: 15px;
}

/* Модал */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden { display: none; }

.modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    position: relative;
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    width: 90%;
    max-width: 360px;
    box-shadow: var(--shadow-lg);
}

.modal-content h3 {
    margin-bottom: 12px;
    font-size: 18px;
}

.modal-content label {
    display: block;
    font-size: 13px;
    color: var(--hint);
    margin: 10px 0 4px;
}

.modal-content select,
.modal-content input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--hint);
    border-radius: 8px;
    font-size: 14px;
    background: var(--secondary-bg);
    color: var(--text);
}

.btn-secondary {
    background: var(--secondary-bg);
    color: var(--text);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* Подписчик в админке */
.sub-item {
    padding: 12px 14px;
}

.sub-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.sub-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background var(--transition);
}

.btn-icon:active {
    background: var(--secondary-bg);
}

.btn-icon.btn-danger {
    background: var(--danger, #e53935);
    color: #fff;
    min-width: 32px;
    min-height: 32px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
}

/* Заметка подписчика */
.sub-note {
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    background: #fff8e1;
    color: #6d5c00;
    border-left: 3px solid #f9a825;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s;
}
.sub-note.expanded {
    white-space: normal;
    overflow: visible;
}
.note-delete {
    float: right;
    cursor: pointer;
    font-weight: bold;
    padding: 0 4px;
    border-radius: 4px;
    opacity: 0.6;
}
.note-delete:hover { opacity: 1; }

/* Карточки у подписчика */
.sub-card {
    position: relative;
    margin-top: 6px;
    padding: 6px 30px 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sub-card-yellow {
    background: var(--warning-bg);
    color: var(--warning-text);
    border-left: 3px solid var(--warning-border);
}

.sub-card-red {
    background: var(--ban-bg);
    color: var(--ban-text);
    border-left: 3px solid var(--ban-border);
}

.card-remove {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
    font-weight: bold;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    color: #fff;
    background: var(--danger, #e53935);
    line-height: 1;
}

.card-remove:active {
    background: #c62828;
}

/* Admin action buttons under card */
.card-admin-actions {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    border-top: 1px solid var(--border);
}

.card-admin-btn {
    flex: 1;
    padding: 6px 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--secondary-bg);
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}

.card-admin-btn:active {
    opacity: 0.7;
}

.card-admin-btn.btn-danger-text {
    color: var(--danger, #e53935);
    border-color: var(--danger, #e53935);
}

.btn-kick {
    background: var(--danger, #e53935);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 6px;
    flex-shrink: 0;
}

.btn-kick:active {
    opacity: 0.7;
}

/* Edit modals */
#edit-auction-modal label,
#edit-tender-modal label {
    display: block;
    font-size: 12px;
    color: var(--hint);
    margin-top: 8px;
    margin-bottom: 2px;
}

#edit-auction-modal input,
#edit-auction-modal textarea,
#edit-tender-modal input,
#edit-tender-modal textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--secondary-bg);
    color: var(--text);
    font-size: 14px;
    box-sizing: border-box;
}

/* ====== Live Status Popup ====== */
.tabs-wrap {
    margin-bottom: 16px;
}

.live-badges-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.live-badges-row:not(:has(.live-badge:not(.hidden))) {
    display: none;
}

#auction-live-popup { grid-column: 1; }
#tender-live-popup { grid-column: 2; }

.live-badge {
    display: flex;
    flex-direction: column;
    gap: 5px;
    animation: popupSlideIn 0.35s ease;
}

.live-badge.hidden {
    display: none !important;
}

.live-badge-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    border: 1.5px solid;
    background: transparent;
    cursor: pointer;
}

.live-badge-row.auction {
    border-color: var(--danger);
    color: var(--danger);
}

.live-badge-row.tender {
    border-color: var(--accent);
    color: var(--accent);
}

.live-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: livePulse 1.5s ease-in-out infinite;
}

.live-badge-row.auction .live-badge-dot {
    background: var(--danger);
}

.live-badge-row.tender .live-badge-dot {
    background: var(--accent);
}

.live-badge-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-badge-timer {
    font-size: 10px;
    flex-shrink: 0;
}

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

@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
    50% { box-shadow: 0 0 0 5px transparent; opacity: 0.6; }
    100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}

/* Podium — Топ-3 */
.podium {
    background: var(--secondary-bg);
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin: 16px 0;
    box-shadow: var(--shadow);
}

.podium h4 {
    margin: 0 0 10px;
    font-size: 15px;
    color: var(--text);
}

.podium-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.podium-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.podium-row:first-of-type {
    padding-top: 0;
}

.podium-medal {
    font-size: 22px;
    flex-shrink: 0;
    width: 30px;
    text-align: center;
}

.podium-name {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
}

.podium-price {
    font-weight: 700;
    font-size: 14px;
    color: var(--accent);
}

/* === MMR Rules === */
.mmr-rules {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mmr-rules-section {
    background: var(--secondary-bg);
    border-radius: var(--radius);
    padding: 16px;
}

.mmr-rules-section.ranks-section {
    background: transparent;
    padding: 0;
}

.mmr-rules-section h3 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: var(--text);
}

.mmr-rules-section p,
.mmr-rules-section li {
    color: var(--hint);
    font-size: 14px;
    margin: 4px 0;
}

.mmr-rules-section ul {
    margin: 8px 0;
    padding-left: 20px;
}

.card-terms {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--hint);
}

.card-terms b {
    color: var(--text);
    font-size: 13px;
}

.card-terms ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.card-terms li {
    font-size: 13px;
    color: var(--hint);
    margin: 2px 0;
}

.mmr-plus {
    color: #4CAF50;
    font-weight: 600;
}

.mmr-minus {
    color: #f44336;
    font-weight: 600;
}

.mmr-formula {
    background: var(--bg);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 13px;
    text-align: center;
    margin: 8px 0;
}

.mmr-example {
    background: var(--bg);
    border-left: 3px solid var(--accent);
    padding: 10px 12px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: var(--hint);
}

/* === Ranks (Simple Design) === */
.mmr-ranks-container {
    background: var(--secondary-bg);
    border-radius: var(--radius);
    padding: 12px;
    margin-top: 8px;
}

.mmr-ranks {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mmr-rank {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--bg);
    border-left: 4px solid;
}

.rank-stars {
    font-size: 14px;
    letter-spacing: 2px;
    min-width: 85px;
}

.rank-name {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    flex: 1;
}

.mmr-rank small {
    font-size: 11px;
    color: var(--hint);
}

/* Цвета рангов */
.mmr-rank.supernova { border-left-color: #ff0000; }
.mmr-rank.supernova .rank-stars { color: #ff0000; text-shadow: 0 0 8px #ff0000; }
.mmr-rank.supernova .rank-name { color: #ff4444; }

.mmr-rank.platinum { border-left-color: #e5e4e2; }
.mmr-rank.platinum .rank-stars { color: #e5e4e2; text-shadow: 0 0 6px #e5e4e2; }
.mmr-rank.platinum .rank-name { color: #e5e4e2; }

.mmr-rank.gold { border-left-color: #ffd700; }
.mmr-rank.gold .rank-stars { color: #ffd700; text-shadow: 0 0 6px #ffd700; }
.mmr-rank.gold .rank-name { color: #ffd700; }

.mmr-rank.silver { border-left-color: #c0c0c0; }
.mmr-rank.silver .rank-stars { color: #c0c0c0; }
.mmr-rank.silver .rank-name { color: #c0c0c0; }

.mmr-rank.bronze { border-left-color: #cd7f32; }
.mmr-rank.bronze .rank-stars { color: #cd7f32; }
.mmr-rank.bronze .rank-name { color: #cd7f32; }

/* === Profile MMR Card (Combined) === */
.profile-mmr-card {
    display: flex;
    flex-direction: column;
    background: var(--secondary-bg);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 12px 0;
    border-left: 4px solid;
}

.profile-mmr-card .mmr-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.profile-mmr-card .mmr-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.profile-mmr-card .mmr-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.profile-mmr-card .mmr-label {
    font-size: 12px;
    color: var(--hint);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-mmr-card .rank-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.profile-mmr-card .rank-stars {
    font-size: 18px;
    letter-spacing: 2px;
}

.profile-mmr-card .rank-name {
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
}

/* Цвета по рангам */
.profile-mmr-card.supernova { border-left-color: #ff0000; }
.profile-mmr-card.supernova .rank-stars { color: #ff0000; text-shadow: 0 0 8px #ff0000; }
.profile-mmr-card.supernova .rank-name { color: #ff4444; }
.profile-mmr-card.supernova .mmr-value { color: #ff4444; }

.profile-mmr-card.platinum { border-left-color: #e5e4e2; }
.profile-mmr-card.platinum .rank-stars { color: #e5e4e2; text-shadow: 0 0 6px #e5e4e2; }
.profile-mmr-card.platinum .rank-name { color: #e5e4e2; }

.profile-mmr-card.gold { border-left-color: #ffd700; }
.profile-mmr-card.gold .rank-stars { color: #ffd700; text-shadow: 0 0 6px #ffd700; }
.profile-mmr-card.gold .rank-name { color: #ffd700; }

.profile-mmr-card.silver { border-left-color: #c0c0c0; }
.profile-mmr-card.silver .rank-stars { color: #c0c0c0; }
.profile-mmr-card.silver .rank-name { color: #c0c0c0; }

.profile-mmr-card.bronze { border-left-color: #cd7f32; }
.profile-mmr-card.bronze .rank-stars { color: #cd7f32; }
.profile-mmr-card.bronze .rank-name { color: #cd7f32; }

/* === MMR Progress Bar === */
.mmr-progress-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.mmr-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.mmr-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Цвет прогресс-бара по текущему рангу */
.profile-mmr-card.bronze .mmr-progress-fill { background: linear-gradient(90deg, #cd7f32, #e8a850); }
.profile-mmr-card.silver .mmr-progress-fill { background: linear-gradient(90deg, #c0c0c0, #e0e0e0); }
.profile-mmr-card.gold .mmr-progress-fill { background: linear-gradient(90deg, #ffd700, #ffed4a); }
.profile-mmr-card.platinum .mmr-progress-fill { background: linear-gradient(90deg, #e5e4e2, #f5f5f5); }
.profile-mmr-card.supernova .mmr-progress-fill { background: linear-gradient(90deg, #ff0000, #ff4444); }

.mmr-progress-text {
    font-size: 11px;
    color: var(--hint);
    white-space: nowrap;
}

.mmr-max-rank {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: #ff4444;
    text-align: center;
}

/* === Rank Badge in Bids === */
.bid-rank {
    font-size: 11px;
    margin-right: 6px;
    opacity: 0.9;
}

.bid-rank.supernova { color: #ff0000; text-shadow: 0 0 4px #ff0000; }
.bid-rank.platinum { color: #e5e4e2; }
.bid-rank.gold { color: #ffd700; }
.bid-rank.silver { color: #c0c0c0; }
.bid-rank.bronze { color: #cd7f32; }

.bid-user {
    display: flex;
    align-items: center;
}

/* === История участия === */
.history-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--secondary-bg);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 8px;
    border-left: 4px solid var(--hint);
}

.history-card.won {
    border-left-color: #4CAF50;
}

.history-card.lost {
    border-left-color: #f44336;
}

.history-result {
    font-size: 24px;
    min-width: 36px;
    text-align: center;
}

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

.history-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-date {
    font-size: 12px;
    color: var(--hint);
    margin-top: 2px;
}

.history-prices {
    text-align: right;
    font-size: 12px;
}

.history-my-price {
    color: var(--text);
    font-weight: 600;
}

.history-winner-price {
    color: var(--hint);
    margin-top: 2px;
}

/* === Ranks Popup === */
#ranks-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ranks-popup {
    background: var(--bg);
    border-radius: 16px;
    width: 90%;
    max-width: 340px;
    overflow: hidden;
    animation: slideUp 0.25s ease;
}

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

.ranks-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--secondary-bg);
    font-weight: 600;
    font-size: 16px;
}

.ranks-popup-close {
    font-size: 18px;
    color: var(--hint);
    cursor: pointer;
    padding: 4px;
}

.ranks-popup-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ranks-popup-row {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: var(--secondary-bg);
    border-radius: 12px;
    border-left: 4px solid;
    transition: transform 0.2s ease;
}

.ranks-popup-row.current {
    background: rgba(255,255,255,0.08);
    transform: scale(1.02);
}

.ranks-popup-stars {
    font-size: 14px;
    letter-spacing: 1px;
    min-width: 80px;
}

.ranks-popup-name {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
}

.ranks-popup-range {
    font-size: 12px;
    color: var(--hint);
    background: rgba(0,0,0,0.3);
    padding: 4px 10px;
    border-radius: 10px;
}

/* Цвета рангов в popup */
.ranks-popup-row.supernova { border-left-color: #ff0000; }
.ranks-popup-row.supernova .ranks-popup-stars { color: #ff0000; text-shadow: 0 0 8px #ff0000; }
.ranks-popup-row.supernova .ranks-popup-name { color: #ff4444; }

.ranks-popup-row.platinum { border-left-color: #e5e4e2; }
.ranks-popup-row.platinum .ranks-popup-stars { color: #e5e4e2; text-shadow: 0 0 6px #e5e4e2; }
.ranks-popup-row.platinum .ranks-popup-name { color: #e5e4e2; }

.ranks-popup-row.gold { border-left-color: #ffd700; }
.ranks-popup-row.gold .ranks-popup-stars { color: #ffd700; text-shadow: 0 0 6px #ffd700; }
.ranks-popup-row.gold .ranks-popup-name { color: #ffd700; }

.ranks-popup-row.silver { border-left-color: #c0c0c0; }
.ranks-popup-row.silver .ranks-popup-stars { color: #c0c0c0; }
.ranks-popup-row.silver .ranks-popup-name { color: #c0c0c0; }

.ranks-popup-row.bronze { border-left-color: #cd7f32; }
.ranks-popup-row.bronze .ranks-popup-stars { color: #cd7f32; }
.ranks-popup-row.bronze .ranks-popup-name { color: #cd7f32; }

/* Светлая тема: более контрастные цвета */
@media (prefers-color-scheme: light) {
    .ranks-popup-row {
        background: #f5f5f5;
        border-left-width: 5px;
    }
    .ranks-popup-row.current {
        background: #e8e8e8;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    .ranks-popup-range {
        background: rgba(0,0,0,0.08);
        color: #666;
    }
    /* Более насыщенные цвета для светлой темы */
    .ranks-popup-row.supernova .ranks-popup-stars { color: #cc0000; text-shadow: none; }
    .ranks-popup-row.supernova .ranks-popup-name { color: #cc0000; }

    .ranks-popup-row.platinum .ranks-popup-stars { color: #8b7bb8; text-shadow: none; }
    .ranks-popup-row.platinum .ranks-popup-name { color: #6b5b9a; }
    .ranks-popup-row.platinum { border-left-color: #8b7bb8; }

    .ranks-popup-row.gold .ranks-popup-stars { color: #d4a800; text-shadow: none; }
    .ranks-popup-row.gold .ranks-popup-name { color: #b8920a; }
    .ranks-popup-row.gold { border-left-color: #d4a800; }

    .ranks-popup-row.silver .ranks-popup-stars { color: #808080; }
    .ranks-popup-row.silver .ranks-popup-name { color: #666666; }
    .ranks-popup-row.silver { border-left-color: #909090; }

    .ranks-popup-row.bronze .ranks-popup-stars { color: #a86528; }
    .ranks-popup-row.bronze .ranks-popup-name { color: #8b5220; }
    .ranks-popup-row.bronze { border-left-color: #a86528; }
}

/* Курсор для кликабельной MMR карточки */
.profile-mmr-card {
    cursor: pointer;
}

/* Admin Subscriber Profile */
.profile-header-card {
    background: var(--secondary-bg);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 12px;
}
.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
}
.profile-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
}
.profile-header-card h2 {
    margin: 0 0 4px 0;
    font-size: 18px;
}
.profile-header-card p {
    margin: 0 0 6px 0;
    color: var(--hint);
    font-size: 14px;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.profile-info-item {
    background: var(--secondary-bg);
    border-radius: var(--radius-sm, 8px);
    padding: 10px 14px;
}
.info-label {
    display: block;
    font-size: 11px;
    color: var(--hint);
    text-transform: uppercase;
    margin-bottom: 2px;
}
.info-value {
    font-size: 14px;
    font-weight: 600;
}

.profile-section {
    margin-top: 16px;
}
.profile-section h3 {
    font-size: 15px;
    margin: 0 0 8px 0;
    color: var(--text);
}

.card-history-item {
    background: var(--secondary-bg);
    border-radius: var(--radius-sm, 8px);
    padding: 10px 14px;
    margin-bottom: 6px;
    font-size: 13px;
}
.card-history-item.inactive {
    opacity: 0.5;
}
.card-history-meta {
    font-size: 11px;
    color: var(--hint);
    margin-top: 4px;
}

.trade-history-item {
    background: var(--secondary-bg);
    border-radius: var(--radius-sm, 8px);
    padding: 10px 14px;
    margin-bottom: 6px;
    font-size: 13px;
}
.trade-history-item.won {
    border-left: 3px solid var(--accent, #4caf50);
}
.trade-history-meta {
    font-size: 11px;
    color: var(--hint);
    margin-top: 4px;
}
