/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #121317;
    --bg-secondary: #1a1b20;
    --bg-card: #1e1f25;
    --bg-hover: #25262d;
    --bg-modal: #16171c;
    --border: #2a2b31;
    --text-primary: #FEFEFE;
    --text-secondary: #CBCBCC;
    --text-muted: #9D9D9F;
    --accent: #F8B02A;
    --accent-hover: #CD8F25;
    --accent-glow: rgba(248, 176, 42, 0.15);
    --green: #E0BC8E;
    --green-bg: rgba(224, 188, 142, 0.12);
    --orange: #E0BC8E;
    --orange-bg: rgba(224, 188, 142, 0.12);
    --red: #f85149;
    --red-bg: rgba(248, 81, 73, 0.12);
    --gray: #9D9D9F;
    --gray-bg: rgba(157, 157, 159, 0.12);
    --gold: #F8B02A;
    --gold-dark: #A17431;
    --gold-light: #E0BC8E;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== TOP NAV ========== */
.top-nav {
    display: flex;
    gap: 4px;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
    align-items: center;
}

/* NeonTag — glowing pulsing text */
.neon {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ff8a00;
    border: 1px solid #ff8a00;
    border-radius: 999px;
    padding: 3px 14px;
    white-space: nowrap;
    user-select: none;
    background: rgba(255, 138, 0, 0.05);
    text-shadow:
        0 0 6px rgba(255, 138, 0, 0.8),
        0 0 14px rgba(255, 138, 0, 0.5);
    box-shadow:
        0 0 6px rgba(255, 138, 0, 0.5),
        0 0 14px rgba(255, 138, 0, 0.3),
        inset 0 0 4px rgba(255, 138, 0, 0.15);
    animation: neon-pulse 2s ease-in-out infinite;
}

@keyframes neon-pulse {
    0%, 100% {
        opacity: 0.35;
        text-shadow: 0 0 4px rgba(255, 138, 0, 0.5);
        box-shadow: 0 0 4px rgba(255, 138, 0, 0.25), inset 0 0 3px rgba(255, 138, 0, 0.1);
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 8px rgba(255, 138, 0, 1), 0 0 18px rgba(255, 138, 0, 0.7);
        box-shadow: 0 0 10px rgba(255, 138, 0, 0.7), 0 0 24px rgba(255, 138, 0, 0.4), inset 0 0 8px rgba(255, 138, 0, 0.3);
    }
}

.lang-switcher {
    margin-left: auto;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s;
}
.lang-switcher:hover {
    background: var(--bg-hover);
}

/* Web session widget */
#webUserWidget {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
}
.nav-user-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
}
.nav-logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 0 0 4px;
}
.nav-logout-btn:hover { color: var(--red); }

.nav-user-name-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}
.nav-user-name-btn:hover { color: var(--text-primary); }

/* Sub info popup */
.sip-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 52px 12px 0;
}
.sip-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    min-width: 230px;
    max-width: 280px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sip-plan {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}
.sip-expires {
    font-size: 13px;
    color: var(--text-secondary);
}
.sip-upgrade-btn {
    width: 100%;
    padding: 8px 12px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: #FEFEFE;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.sip-upgrade-btn:hover { opacity: 0.85; }
.sip-divider {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 2px;
}
.sip-ref-hint {
    font-size: 12px;
    color: var(--text-secondary);
}
.sip-ref-btn {
    width: 100%;
    padding: 8px 12px;
    background: rgba(224,188,142,0.15);
    border: 1px solid #E0BC8E;
    border-radius: 8px;
    color: #E0BC8E;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.sip-ref-btn:hover { background: rgba(224,188,142,0.25); }
.sip-ref-btn:disabled { opacity: 0.6; cursor: default; }
.sip-ref-stats {
    font-size: 12px;
    color: var(--text-secondary);
    min-height: 16px;
}
.sip-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}
.sip-close:hover { color: var(--text-primary); }

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-hover);
    border: 1px solid var(--border);
}

/* ========== STATUS TABS ========== */
.tabs-row {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding-left: 12px;
}

.status-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 8px 12px 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
}

/* Tab Info Button */
.tab-info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: rgba(248, 176, 42, 0.3);
    touch-action: manipulation;
}

.tab-info-btn:hover {
    background: var(--bg-hover);
    color: var(--accent);
    border-color: var(--accent);
}

.tab-info-btn.active {
    background: var(--accent-glow);
    color: var(--accent);
    border-color: var(--accent);
}

.tab-info-btn svg {
    flex-shrink: 0;
}

/* Tab Info Banner */
.tab-info-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(248, 176, 42, 0.06);
    border-bottom: 1px solid rgba(248, 176, 42, 0.15);
    animation: slideDown 0.25s ease-out;
}

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

.tab-info-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
}

.tab-info-icon {
    color: #F8B02A;
    flex-shrink: 0;
    margin-top: 1px;
}

.tab-info-text {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.tab-info-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.tab-info-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.status-tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

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

.tab-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
}

.tab-count {
    background: rgba(255,255,255,0.06);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* ========== FILTERS BAR ========== */
.filters-bar {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: var(--accent);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.filter-select {
    padding: 10px 30px 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.filter-select:focus {
    border-color: var(--accent);
}

.filter-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.price-filter {
    display: flex;
    gap: 4px;
}

.price-input {
    width: 100px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

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

.price-input::placeholder {
    color: var(--text-muted);
}

/* Hide number input spinners */
.price-input::-webkit-outer-spin-button,
.price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.price-input[type=number] {
    -moz-appearance: textfield;
}

.sort-select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    cursor: pointer;
    min-width: 120px;
}

.sort-select:focus {
    border-color: var(--accent);
}

/* Category filter with subcategory popup */
.cat-filter-wrap {
    position: relative;
}
.cat-btn {
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    min-width: 140px;
}
.cat-btn.has-value {
    border-color: var(--accent, #E0BC8E);
    color: var(--accent, #E0BC8E);
}
.subcat-popup {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 260px;
    max-height: 400px;
    background: var(--card-bg, #1e1f25);
    border: 1px solid var(--border, #25262d);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 1000;
    overflow: hidden;
}
.subcat-popup.active { display: block; }
.subcat-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border, #25262d);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, #CBCBCC);
}
.subcat-popup-close {
    background: none;
    border: none;
    color: var(--text-secondary, #CBCBCC);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.subcat-popup-close:hover { color: #FEFEFE; }
.subcat-popup-list {
    overflow-y: auto;
    max-height: 310px;
    padding: 4px 0;
}
.subcat-popup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary, #FEFEFE);
    transition: background 0.15s;
}
.subcat-popup-item:hover { background: rgba(255,255,255,0.06); }
.subcat-popup-item.active { background: rgba(46,160,67,0.15); color: #E0BC8E; }
.subcat-popup-item .subcat-count {
    font-size: 11px;
    color: var(--text-secondary, #CBCBCC);
    margin-left: 8px;
}
#catPopup {
    min-width: 280px;
}
#subcatPopup {
    left: 286px;
    top: calc(100% + 6px);
    min-width: 240px;
}

.btn-filter {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* ========== ITEMS GRID ========== */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    padding: 20px;
}

/* ========== ITEM CARD ========== */
.item-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.item-card:hover {
    border-color: rgba(248, 176, 42, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.item-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    background: var(--bg-hover);
    overflow: hidden;
}

.item-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.item-card:hover .item-photo img {
    transform: scale(1.04);
}

.item-photo .no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.3px;
}

.status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.status-badge.active { background: rgba(224,188,142,0.2); color: #E0BC8E; border: 1px solid rgba(224,188,142,0.35); }
.status-badge.reserved { background: rgba(210,153,34,0.2); color: #E0BC8E; border: 1px solid rgba(210,153,34,0.35); }
.status-badge.deleted { background: rgba(248,81,73,0.2); color: #f85149; border: 1px solid rgba(248,81,73,0.35); }
.status-badge.removed_by_system, .status-badge.deleted_by_system { background: rgba(163,113,247,0.2); color: #A17431; border: 1px solid rgba(163,113,247,0.35); }

.photo-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.photo-count svg {
    opacity: 0.7;
}

.status-time {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* ========== LEVEL BADGE ========== */
.level-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.level-badge + .level-badge {
    left: 56px;
}
.level-badge.level-1 { background: rgba(224,188,142,0.85); color: #FEFEFE; }
.level-badge.level-2 { background: rgba(248,176,42,0.85); color: #FEFEFE; }
.level-badge.level-3 { background: rgba(210,153,34,0.85); color: #FEFEFE; }
.level-badge.level-4 { background: rgba(248,81,73,0.85); color: #FEFEFE; }
.level-badge.level-5 { background: rgba(163,113,247,0.85); color: #FEFEFE; }

/* ========== ITEM INFO ========== */
.item-info {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.item-title-row {
    margin-bottom: 2px;
}

.item-name {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
    letter-spacing: -0.1px;
}

.item-category {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.item-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.item-stats-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(48, 54, 61, 0.6);
}

.item-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1;
}

.item-stat svg {
    width: 13px;
    height: 13px;
    opacity: 0.55;
    flex-shrink: 0;
}

.item-stat--star {
    color: #CD8F25;
}

.item-stat--star svg {
    opacity: 0.85;
}

.item-stat--date {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 11px;
}

.item-shipping {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    background: rgba(248, 176, 42, 0.08);
    color: var(--accent);
    border: 1px solid rgba(248, 176, 42, 0.2);
}

/* ========== LOADING ========== */
.loading {
    display: none;
    text-align: center;
    padding: 40px 0;
    min-height: 60px;
}

.loading.visible {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.bounce-dots {
    display: inline-flex;
    gap: 6px;
    align-items: flex-end;
    height: 22px;
    line-height: 0;
}
.bounce-dots span {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent, #F8B02A);
    flex-shrink: 0;
    animation: bounce-dot 1.1s ease-in-out infinite;
}
.bounce-dots span:nth-child(1) { animation-delay: 0s; }
.bounce-dots span:nth-child(2) { animation-delay: 0.12s; }
.bounce-dots span:nth-child(3) { animation-delay: 0.24s; }
.bounce-dots span:nth-child(4) { animation-delay: 0.36s; }
.bounce-dots span:nth-child(5) { animation-delay: 0.48s; }

@keyframes bounce-dot {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(-14px);
        opacity: 0.3;
    }
}

/* ========== MODAL ========== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

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

.modal {
    background: var(--bg-modal);
    border-radius: 16px;
    border: 1px solid var(--border);
    max-width: 1060px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
    animation: modalIn 0.25s ease-out;
}

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

.modal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(30,35,45,0.95), rgba(22,27,34,0.98));
}

.modal-nav-arrows {
    display: flex;
    gap: 4px;
}

.nav-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nav-btn:hover {
    border-color: var(--accent);
    background: rgba(248,176,42,0.08);
}

.modal-nav-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover {
    border-color: var(--accent);
    background: rgba(248,176,42,0.06);
}

.btn-action--primary {
    background: linear-gradient(135deg, #F8B02A 0%, #F8B02A 100%);
    color: #FEFEFE;
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(56,139,253,0.3);
}
.btn-action--primary:hover {
    background: linear-gradient(135deg, #CD8F25 0%, #F8B02A 100%);
    box-shadow: 0 4px 16px rgba(56,139,253,0.4);
}

/* More menu dropdown */
.modal-more-wrap {
    position: relative;
}
.modal-more-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
    padding: 6px;
    z-index: 50;
}
.modal-more-menu.open {
    display: block;
    animation: fadeSlide 0.15s ease-out;
}
@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.more-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
    width: 100%;
    text-decoration: none;
    transition: background 0.15s;
}
.more-menu-item:hover {
    background: rgba(248,176,42,0.08);
}
.more-menu-item svg {
    opacity: 0.6;
    flex-shrink: 0;
}
.btn-more {
    border-color: transparent;
    background: transparent;
    padding: 7px 8px;
}
.btn-more:hover {
    background: rgba(255,255,255,0.06);
}

.btn-download {
    background: var(--green-bg);
    color: var(--green);
    border-color: rgba(224, 188, 142, 0.3);
}

.btn-download:hover {
    border-color: var(--green);
    background: rgba(224, 188, 142, 0.2);
}

.btn-download-photos {
    background: rgba(248, 176, 42, 0.1);
    color: #F8B02A;
    border-color: rgba(248, 176, 42, 0.3);
    cursor: pointer;
}

.btn-download-photos:hover {
    border-color: #F8B02A;
    background: rgba(248, 176, 42, 0.2);
}

.btn-download-photos:disabled {
    cursor: wait;
}

.btn-close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-close:hover {
    border-color: var(--red);
    color: var(--red);
    background: rgba(231,76,60,0.08);
}

.modal-body {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 0;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.modal-left {
    border-right: 1px solid var(--border);
    overflow-y: auto;
}

.modal-photo {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--bg-hover);
    overflow: hidden;
}

.modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.modal-photo:hover img {
    transform: scale(1.02);
}

.modal-photo-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #FEFEFE;
}

/* Seller compact under photo */
.modal-seller-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.modal-seller-v2 {
    background: linear-gradient(135deg, rgba(248,176,42,0.06) 0%, rgba(56,139,253,0.03) 100%);
    border-bottom: 1px solid rgba(248,176,42,0.12);
    transition: background 0.2s;
    cursor: pointer;
}
.modal-seller-v2:hover {
    background: linear-gradient(135deg, rgba(248,176,42,0.1) 0%, rgba(56,139,253,0.06) 100%);
}
.seller-arrow {
    color: var(--text-muted);
    font-size: 16px;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
}
.modal-seller-v2:hover .seller-arrow {
    opacity: 1;
    transform: translateX(2px);
}
.seller-compact-info {
    flex: 1;
    min-width: 0;
}
.seller-compact-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-secondary);
}
.seller-compact-sep {
    color: var(--text-muted);
}
.seller-compact-detail {
    white-space: nowrap;
}

/* ========== GALLERY ARROWS ========== */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    color: #FEFEFE;
    font-size: 22px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.2s;
    line-height: 1;
}

.gallery-arrow:hover {
    background: rgba(248, 176, 42, 0.8);
    transform: translateY(-50%) scale(1.05);
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

/* ========== SPARKLINE ========== */
.sparkline-section {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.sparkline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.sparkline-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

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

.sparkline-section svg {
    display: block;
    width: 100%;
    height: auto;
}

.sparkline-empty {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    padding: 8px 0;
}

/* ========== MODAL CONTENT (right side) ========== */
.modal-content {
    padding: 24px 28px;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

.mc-header {
    margin-bottom: 16px;
}

.modal-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.modal-status-badge.active { background: var(--green-bg); color: var(--green); border: 1px solid rgba(46,204,113,0.3); }
.modal-status-badge.reserved { background: var(--orange-bg); color: var(--orange); border: 1px solid rgba(243,156,18,0.3); }
.modal-status-badge.deleted { background: var(--red-bg); color: var(--red); border: 1px solid rgba(231,76,60,0.3); }
.modal-status-badge.removed_by_system, .modal-status-badge.deleted_by_system { background: rgba(163,113,247,0.12); color: #A17431; border: 1px solid rgba(163,113,247,0.3); }

.modal-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
}

.modal-category {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Price block */
.mc-price-block {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}
.mc-price-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}
.modal-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.5px;
}

/* Similar items inline with price */
.similar-items-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}
.similar-chip {
    color: var(--text-secondary);
    font-weight: 500;
}
.similar-chip-sep {
    color: var(--text-muted);
}
.similar-diff {
    font-weight: 700;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.similar-diff.cheaper {
    color: #E0BC8E;
    background: rgba(34,197,94,0.12);
}
.similar-diff.expensive {
    color: #f85149;
    background: rgba(239,68,68,0.12);
}
.similar-diff.same {
    color: var(--text-secondary);
    background: rgba(128,128,128,0.1);
}

/* Info cards grid */
.mc-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.mc-info-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.15s;
}
.mc-info-card:hover {
    border-color: rgba(248,176,42,0.25);
}
.mc-info-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(248,176,42,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mc-info-card-icon svg {
    opacity: 0.7;
}
.mc-info-card-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.mc-info-card-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    text-transform: uppercase;
}
.mc-info-card-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mc-info-views .mc-info-card-icon {
    background: rgba(248,176,42,0.12);
}
.mc-info-views .mc-info-card-value {
    color: var(--accent);
    font-weight: 700;
}
.mc-info-watchlist .mc-info-card-icon {
    background: rgba(245,166,35,0.1);
}
/* Tooltip for info cards */
.mc-info-card[data-tooltip] {
    position: relative;
    cursor: default;
}
.mc-info-card[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e1f25;
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 11.5px;
    font-weight: 400;
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 7px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    pointer-events: none;
    z-index: 100;
}
.mc-info-card[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--border);
    pointer-events: none;
    z-index: 100;
}

/* Tools row */
.mc-tools-row {
    display: flex;
    gap: 8px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.mc-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.mc-tool-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(248, 176, 42, 0.06);
    transform: translateY(-1px);
}
.mc-tool-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.mc-tool-market {
    background: linear-gradient(135deg, rgba(248,176,42,0.1), rgba(56,139,253,0.05));
    color: var(--accent);
    border-color: rgba(248, 176, 42, 0.3);
}
.mc-tool-market:hover {
    background: linear-gradient(135deg, rgba(248,176,42,0.18), rgba(56,139,253,0.1));
    box-shadow: 0 2px 8px rgba(248,176,42,0.15);
}
.mc-tool-translate {
    color: var(--text-secondary);
}
.mc-tool-translate.translated {
    border-color: var(--green);
    color: var(--green);
    background: rgba(46,204,113,0.06);
}
.mc-tool-wh {
    color: var(--text-secondary);
}

/* Sections */
.mc-section {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.mc-section:last-child {
    border-bottom: none;
}

/* Description */
.mc-desc-v2 {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px !important;
    margin-top: 4px;
}
.mc-desc-header {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 10px;
}
.mc-description-section .modal-description {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
    max-height: 200px;
    overflow-y: auto;
}
.modal-description::-webkit-scrollbar {
    width: 4px;
}
.modal-description::-webkit-scrollbar-track {
    background: transparent;
}
.modal-description::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.seller-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.seller-name-link {
    text-decoration: none;
    color: inherit;
}
.seller-name-link.has-link:hover .seller-name {
    color: var(--accent);
    text-decoration: underline;
}

.seller-name {
    font-size: 14px;
    font-weight: 600;
    transition: color 0.15s;
}

.seller-rating {
    margin-top: 2px;
}

.star {
    font-size: 18px;
    cursor: default;
}
.star-empty {
    color: #9D9D9F;
}
.star-half {
    background: linear-gradient(90deg, #E0BC8E 50%, #9D9D9F 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.star-full {
    color: #E0BC8E;
}

.seller-details {
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.seller-detail-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.seller-detail-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.seller-detail-label {
    color: var(--text-muted);
    white-space: nowrap;
}

.seller-detail-value {
    color: var(--text-primary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.seller-listings-clickable {
    cursor: default;
}

/* ========== SELLER ITEMS CAROUSEL ========== */
.seller-items-section {
    margin-top: 0;
    padding: 14px 16px;
    border-top: 1px solid var(--border);
}

.seller-items-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.seller-items-header h3 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.seller-items-header h3::before {
    content: '';
    width: 3px;
    height: 12px;
    border-radius: 2px;
    background: var(--accent);
}

.seller-items-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.si-arrow {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.15s, border-color 0.15s;
    padding: 0;
}

.si-arrow:hover {
    background: var(--border);
    border-color: var(--text-muted);
}

.si-counter {
    font-size: 11px;
    color: var(--text-muted);
    min-width: 36px;
    text-align: center;
}

.seller-items-viewport {
    overflow: hidden;
}

.seller-items-track {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.seller-items-loading {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 16px 0;
}

.si-card {
    display: flex;
    gap: 10px;
    padding: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, background 0.15s;
    overflow: hidden;
}

.si-card:hover {
    border-color: var(--accent);
    background: rgba(248, 176, 42, 0.05);
}

.si-card-img {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-primary);
}

.si-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.si-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: var(--text-muted);
}

.si-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.si-card-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.si-card-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
}

.si-card-loc {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.si-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: var(--text-muted);
}

.si-card-time {
    white-space: nowrap;
}

.si-card-visits {
    white-space: nowrap;
}

/* Status badges for seller items */
.si-badge {
    display: inline-block;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 5px;
    vertical-align: middle;
    line-height: 1.4;
}
.si-badge-new {
    background: var(--green);
    color: #000;
}
.si-badge-reserved {
    background: var(--orange);
    color: #000;
}
.si-badge-deleted {
    background: var(--red);
    color: #FEFEFE;
}
.si-card-deleted {
    opacity: 0.5;
}
.si-card-reserved {
    opacity: 0.7;
}

/* ========== STATUS TIMELINE ========== */
.timeline-section {
    padding: 16px;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(30,35,45,0.3) 0%, transparent 100%);
}

/* Views/Watchlist history chart */
.views-history-section {
    padding: 16px;
    border-top: 1px solid var(--border);
}
.views-history-section h3 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--text-muted, #9D9D9F);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.views-history-section h3::before {
    content: '';
    width: 3px;
    height: 12px;
    border-radius: 2px;
    background: var(--accent, #F8B02A);
}
.views-history-chart {
    background: var(--bg-secondary, #181920);
    border-radius: 10px;
    padding: 8px;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.views-history-chart svg { display: block; }
.views-history-legend {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted, #9D9D9F);
    flex-wrap: wrap;
    align-items: center;
}
.vh-legend { display: inline-flex; align-items: center; gap: 6px; }
.vh-dot { width: 10px; height: 2px; border-radius: 1px; display: inline-block; }
.vh-legend-views .vh-dot { background: var(--accent, #F8B02A); }
.vh-legend-wl .vh-dot { background: #6bcf7f; }
.vh-legend-status { color: var(--text-secondary); margin-left: auto; }
.views-history-empty {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted, #9D9D9F);
    font-style: italic;
    text-align: center;
    padding: 8px;
}

.timeline-section h3 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.timeline-section h3::before {
    content: '';
    width: 3px;
    height: 12px;
    border-radius: 2px;
    background: var(--accent);
}

.timeline-track {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.timeline-point {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 4px;
}

.timeline-dot-pulse {
    animation: timelinePulse 2s ease-in-out infinite;
}

@keyframes timelinePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

.timeline-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.timeline-status {
    font-size: 12px;
    font-weight: 600;
}

.timeline-time {
    font-size: 11px;
    color: var(--text-muted);
}

.timeline-visits {
    font-size: 11px;
    color: var(--text-secondary);
}

.timeline-delta {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0 2px 9px;
}

.timeline-delta-line {
    flex: 1;
    height: 1px;
    background: var(--border);
    min-width: 8px;
}

.timeline-delta-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    padding: 2px 8px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.timeline-loading {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 8px;
}

/* ========== HISTORY TABLE ========== */
.history-section {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.history-section h3 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.history-table th {
    text-align: left;
    padding: 6px 8px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.history-table td {
    padding: 8px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--text-secondary);
}

.history-table tr:last-child td {
    border-bottom: none;
}

.history-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.history-status.active { background: var(--green-bg); color: var(--green); }
.history-status.reserved { background: var(--orange-bg); color: var(--orange); }
.history-status.deleted { background: var(--red-bg); color: var(--red); }
.history-status.removed_by_system, .history-status.deleted_by_system { background: rgba(163,113,247,0.12); color: #A17431; }

.views-delta {
    color: var(--green);
    font-weight: 600;
    font-size: 11px;
}

.views-delta.negative {
    color: var(--red);
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 14px;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========== RESPONSIVE ========== */

/* ---- Tablets & small screens ---- */
@media (max-width: 768px) {
    /* Top nav offset for sticky tabs */
    .top-nav {
        padding: 8px 12px;
    }
    
    .tabs-row {
        top: 45px;
        padding-left: 8px;
    }

    .status-tabs {
        padding: 8px 6px 8px 4px;
        gap: 3px;
    }
    
    .tab {
        padding: 7px 10px;
        font-size: 12px;
    }

    .tab-info-btn {
        width: 30px;
        height: 30px;
        min-width: 30px;
    }
    .tab-info-btn svg {
        width: 14px;
        height: 14px;
    }
    .tab-info-banner {
        padding: 10px 12px;
    }
    .tab-info-text {
        font-size: 12px;
    }

    /* Filters */
    .filters-bar {
        flex-direction: column;
        padding: 10px 12px;
        gap: 6px;
    }
    
    .search-box {
        width: 100%;
        min-width: 0;
    }
    
    .price-filter {
        width: 100%;
    }
    
    .price-input {
        flex: 1;
        min-width: 0;
    }
    
    .filter-select {
        width: 100%;
    }

    .sort-select {
        width: 100%;
    }

    .btn-filter {
        width: 100%;
        padding: 12px 20px;
    }

    /* Items grid */
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
        gap: 10px;
        padding: 10px;
    }
    
    .item-name {
        font-size: 13px;
    }
    
    .item-price {
        font-size: 18px;
    }

    .item-info {
        padding: 10px 12px 12px;
    }

    /* Fav button always visible on touch */
    .fav-btn {
        opacity: 1;
        transform: scale(1);
    }

    /* Gallery arrows always visible */
    .gallery-arrow {
        display: flex;
    }

    /* Modal fullscreen on mobile */
    .modal-overlay {
        padding: 0;
    }

    .modal {
        border-radius: 0;
        max-width: 100%;
        min-height: 100vh;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        max-height: none;
        overflow-y: visible;
    }
    
    .modal-left {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .modal-content {
        padding: 16px 12px;
        max-height: none;
    }

    /* Modal nav: single compact toolbar */
    .modal-nav {
        padding: 6px 8px;
        flex-wrap: nowrap;
        gap: 4px;
    }

    .modal-nav-arrows {
        flex-shrink: 0;
        gap: 4px;
    }

    .modal-nav-arrows .nav-btn {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .modal-nav-actions {
        flex: 1;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 4px;
    }

    /* All action buttons: uniform square icon-only */
    .btn-action {
        width: 38px;
        height: 38px;
        min-width: 38px;
        padding: 0;
        font-size: 0;
        gap: 0;
        flex-shrink: 0;
        justify-content: center;
    }

    .btn-action span,
    .btn-action .fav-btn-text,
    .btn-action .dl-photos-text {
        display: none;
    }

    .btn-action svg {
        width: 18px;
        height: 18px;
    }

    .btn-close {
        width: 38px;
        height: 38px;
        flex-shrink: 0;
    }

    /* Modal content */
    .modal-title {
        font-size: 18px;
    }
    
    .modal-price {
        font-size: 28px;
    }

    .more-menu-item span {
        display: inline;
    }
    
    .mc-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    .mc-info-card {
        padding: 8px 10px;
    }
    
    .mc-tools-row {
        flex-wrap: wrap;
    }

    .modal-description {
        max-height: 200px;
    }

    /* Timeline */
    .timeline-section {
        padding: 12px;
    }

    /* Seller items */
    .seller-items-section {
        margin-top: 10px;
    }

    /* Grabber modal */
    .grabber-modal {
        border-radius: 0;
        width: 100%;
        max-width: 100%;
        min-height: 100vh;
    }

    .grabber-header {
        padding: 16px;
    }

    .grabber-body {
        padding: 16px;
    }
}

/* ---- Phones ---- */
@media (max-width: 480px) {
    .top-nav {
        padding: 6px 10px;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .tabs-row {
        top: 39px;
        padding-left: 6px;
    }

    .status-tabs {
        padding: 6px 4px 6px 2px;
        gap: 2px;
    }
    
    .tab {
        padding: 6px 8px;
        font-size: 11px;
        gap: 4px;
    }

    .tab-count {
        padding: 1px 6px;
        font-size: 10px;
    }

    .tab-info-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }
    .tab-info-btn svg {
        width: 13px;
        height: 13px;
    }
    .tab-info-banner {
        padding: 8px 10px;
    }
    .tab-info-text {
        font-size: 11px;
    }

    .payment-sub-filters {
        padding: 8px 10px;
        gap: 6px;
    }
    .payment-filter-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    .origin-filters {
        padding: 6px 10px;
        gap: 6px;
    }
    .origin-filter-btn {
        padding: 4px 10px;
        font-size: 11px;
    }

    .tab-icon {
        width: 12px;
        height: 12px;
    }

    /* Grabber button compact */
    .tab-grabber {
        padding: 6px 8px;
        font-size: 11px;
    }

    .tab-grabber svg {
        width: 12px;
        height: 12px;
    }

    /* Grid: 2 columns */
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 6px;
    }
    
    .item-info {
        padding: 8px 10px 10px;
    }

    .item-name {
        font-size: 12px;
        -webkit-line-clamp: 1;
    }

    .item-price {
        font-size: 17px;
    }

    .item-stat {
        font-size: 10px;
    }

    .item-stat--date {
        font-size: 9.5px;
    }

    .item-category {
        font-size: 10px;
        margin-bottom: 6px;
    }

    .item-stats-row {
        gap: 8px;
        padding-top: 6px;
    }

    .status-badge {
        font-size: 8px;
        padding: 3px 6px;
    }

    .photo-count {
        font-size: 10px;
        padding: 2px 6px;
    }

    .level-badge {
        font-size: 8px;
        padding: 2px 6px;
    }

    /* Modal */
    .modal-nav-arrows .nav-btn {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .btn-action {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }

    .btn-close {
        width: 34px;
        height: 34px;
    }



    .modal-title {
        font-size: 15px;
    }

    .modal-price {
        font-size: 22px;
    }

    /* Seller card */
    .seller-card {
        padding: 10px;
    }

    .seller-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .seller-name {
        font-size: 13px;
    }

    /* Filters */
    .search-box input {
        padding: 8px 10px 8px 34px;
        font-size: 14px; /* prevent iOS zoom */
    }

    .price-input {
        padding: 8px 10px;
        font-size: 14px; /* prevent iOS zoom */
    }

    .grabber-input {
        font-size: 14px; /* prevent iOS zoom */
    }
}

/* ---- Touch device overrides ---- */
@media (hover: none) and (pointer: coarse) {
    /* Always show fav button (no hover on touch) */
    .fav-btn {
        opacity: 1;
        transform: scale(1);
    }
    
    /* Always show gallery arrows */
    .gallery-arrow {
        display: flex;
    }

    /* Larger touch targets */
    .tab {
        min-height: 36px;
    }

    .nav-btn {
        min-width: 40px;
        min-height: 40px;
    }

    .btn-action {
        min-height: 40px;
    }

    .btn-close {
        min-width: 40px;
        min-height: 40px;
    }

    /* Disable hover transforms on cards */
    .item-card:hover {
        transform: none;
    }

    .item-card:hover .item-photo img {
        transform: none;
    }
}

/* ========== FAVORITES ========== */

/* Star button on card */
.fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    opacity: 0;
    transform: scale(0.85);
}

.fav-btn svg {
    fill: transparent;
    stroke: #a8a6a0;
    stroke-width: 1.5;
    transition: fill 0.3s, stroke 0.3s;
}

.item-card:hover .fav-btn {
    opacity: 1;
    transform: scale(1);
}

.fav-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}

.fav-btn:hover svg {
    stroke: #ff8a00;
}

.fav-btn.active {
    opacity: 1;
    transform: scale(1);
}

.fav-btn.active svg {
    fill: #ff8a00;
    stroke: #ff8a00;
    animation: drop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes drop {
    0%   { transform: translateY(-9px) scale(0.9); }
    55%  { transform: translateY(3px)  scale(1.14); }
    100% { transform: translateY(0)    scale(1); }
}

/* Favorites tab star icon */
.tab-star-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex-shrink: 0;
}

.tab-favorites {
    gap: 5px;
}

.tab-favorites.active .tab-star-icon {
    fill: var(--text-primary);
    color: var(--text-primary);
}

/* Payment tab */
.tab-payment {
    gap: 5px;
}

.tab-payment.active {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.tab-payment.active svg {
    stroke: var(--text-primary);
}

/* Payment sub-filters */
.payment-sub-filters {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    flex-wrap: wrap;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.payment-filter-btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    -webkit-tap-highlight-color: rgba(248, 176, 42, 0.3);
    touch-action: manipulation;
}

.payment-filter-btn:hover {
    border-color: #F8B02A;
    color: #F8B02A;
}

.payment-filter-btn.active {
    background: rgba(248, 176, 42, 0.15);
    border-color: #F8B02A;
    color: #F8B02A;
}

/* Origin filter (платформа публикации) */
.origin-filters {
    display: flex;
    gap: 8px;
    padding: 8px 16px;
    flex-wrap: wrap;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.origin-filter-btn {
    padding: 5px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    -webkit-tap-highlight-color: rgba(224, 188, 142, 0.3);
    touch-action: manipulation;
}

.origin-filter-btn:hover {
    border-color: #E0BC8E;
    color: #E0BC8E;
}

.origin-filter-btn.active {
    background: rgba(224, 188, 142, 0.15);
    border-color: #E0BC8E;
    color: #E0BC8E;
}

/* Trial banner */
.trial-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 16px;
    background: rgba(224, 188, 142, 0.12);
    border-bottom: 1px solid rgba(224, 188, 142, 0.3);
    font-size: 13px;
    color: var(--text-primary);
    text-align: center;
}
.trial-banner-link {
    color: #E0BC8E;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
}
.trial-banner-link:hover { text-decoration: underline; }

/* Paywall referral section */
.pw-referral-section {
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(224, 188, 142, 0.07);
    border: 1px solid rgba(224, 188, 142, 0.25);
    border-radius: 10px;
    text-align: center;
}
.pw-referral-title {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.pw-referral-btn {
    width: 100%;
    padding: 9px 14px;
    background: rgba(224, 188, 142, 0.15);
    border: 1px solid #E0BC8E;
    border-radius: 8px;
    color: #E0BC8E;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.pw-referral-btn:hover {
    background: rgba(224, 188, 142, 0.25);
}
.pw-referral-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Modal favorite button */
.btn-fav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-fav svg {
    fill: transparent;
    stroke: #a8a6a0;
    stroke-width: 1.5;
    flex-shrink: 0;
    transition: fill 0.3s, stroke 0.3s;
}

.btn-fav:hover {
    border-color: #ff8a00;
}

.btn-fav:hover svg {
    stroke: #ff8a00;
}

.btn-fav.active {
    border-color: #ff8a00;
    color: #ff8a00;
    background: rgba(255, 138, 0, 0.08);
}

.btn-fav.active svg {
    fill: #ff8a00;
    stroke: #ff8a00;
    animation: drop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Share button */
.btn-share {
    color: var(--accent);
    border-color: var(--accent);
}
.btn-share:hover {
    background: rgba(248, 176, 42, 0.1);
}

/* Share toast */
.share-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--green);
    color: #000;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 10000;
}
.share-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== GRABBER TAB BUTTON ========== */
.tab-grabber {
    margin-left: auto;
    background: rgba(248, 176, 42, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 5px;
}
.tab-grabber:hover {
    background: rgba(248, 176, 42, 0.2);
}
.tab-grabber svg {
    flex-shrink: 0;
}

/* Grabber button in modal */
.btn-grabber-modal {
    color: var(--accent);
    border-color: var(--accent);
}
.btn-grabber-modal:hover {
    background: rgba(248, 176, 42, 0.12);
}

/* ========== GRABBER MODAL ========== */
.grabber-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}
.grabber-overlay.active {
    display: flex;
}
.grabber-modal {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 480px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}
.grabber-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.grabber-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.grabber-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.grabber-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}
.grabber-site-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.grabber-site-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.grabber-site-btn:hover {
    border-color: var(--accent);
}
.grabber-site-btn.active {
    border-color: var(--accent);
    background: rgba(248, 176, 42, 0.12);
    color: var(--accent);
}
.grabber-input-area {
    display: flex;
    flex-direction: column;
}
.grabber-input {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.grabber-input:focus {
    border-color: var(--accent);
}
.grabber-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}
.grabber-submit {
    padding: 12px 20px;
    background: var(--accent);
    color: #FEFEFE;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.15s;
}
.grabber-submit:hover {
    opacity: 0.85;
}
.grabber-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.grabber-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(248, 176, 42, 0.08);
    border-radius: 8px;
    font-size: 13px;
    color: var(--accent);
}
.grabber-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(248, 176, 42, 0.3);
    border-top: 2px solid var(--accent);
    border-radius: 50%;
    animation: grabberSpin 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes grabberSpin {
    to { transform: rotate(360deg); }
}
.grabber-success {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(224, 188, 142, 0.08);
    border: 1px solid rgba(224, 188, 142, 0.3);
    border-radius: 10px;
}
.grabber-success-icon {
    font-size: 24px;
    flex-shrink: 0;
}
.grabber-success-info {
    flex: 1;
    min-width: 0;
}
.grabber-success-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.grabber-success-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.grabber-download-btn {
    padding: 8px 16px;
    background: var(--green);
    color: #000;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.grabber-download-btn:hover {
    opacity: 0.85;
}
.grabber-error {
    padding: 14px 16px;
    background: rgba(248, 81, 73, 0.08);
    border: 1px solid rgba(248, 81, 73, 0.3);
    border-radius: 10px;
    color: var(--red);
    font-size: 13px;
}

/* ========== WILLHABEN PHOTO SEARCH ========== */
.wh-search-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.wh-query-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-style: italic;
}
.wh-query-label:empty {
    display: none;
}
.wh-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wh-result-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.wh-result-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}
.wh-result-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
    background: rgba(248, 176, 42, 0.06);
}
.wh-result-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--background);
}
.wh-result-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wh-result-preview .wh-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text-muted);
}
.wh-result-info {
    flex: 1;
    min-width: 0;
}
.wh-result-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}
.wh-result-meta {
    font-size: 11px;
    color: var(--text-muted);
}
.wh-result-meta .wh-photo-count {
    font-weight: 600;
    color: var(--accent);
}
.wh-result-price {
    margin-left: 8px;
    font-weight: 600;
    color: var(--green);
}
.wh-result-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}
.wh-dl-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 7px;
    border: none;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    background: var(--accent);
    color: #FEFEFE;
    white-space: nowrap;
}
.wh-dl-btn:hover {
    opacity: 0.85;
}
.wh-dl-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.wh-more-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.wh-more-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.wh-loading {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 12px;
}
.wh-loading .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

/* ========== MARKET ANALYSIS ========== */
.market-analysis-result {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    margin-top: 0;
}

.ma-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.ma-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.ma-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ma-refresh-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 15px;
    cursor: pointer;
    padding: 2px 7px;
    transition: all 0.2s;
    line-height: 1;
}
.ma-refresh-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.ma-query {
    font-size: 10px;
    color: var(--text-muted);
}

.ma-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.ma-stat {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
}
.ma-stat-label {
    display: block;
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 3px;
}
.ma-stat-value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.ma-cheaper {
    color: #E0BC8E !important;
}
.ma-expensive {
    color: #f85149 !important;
}
.ma-same {
    color: var(--accent) !important;
}

.ma-items-toggle {
    margin-top: 10px;
}
.ma-items-toggle-btn {
    width: 100%;
    padding: 5px;
    border: 1px dashed var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.ma-items-toggle-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.ma-items-list {
    margin-top: 8px;
    max-height: 220px;
    overflow-y: auto;
}
.ma-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}
.ma-item-row:last-child {
    border-bottom: none;
}
.ma-item-title {
    flex: 1;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ma-item-price {
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
}
.ma-item-views {
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
}
.ma-item-watchlist {
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
    min-width: 28px;
    text-align: right;
}

/* ========== PAYWALL ========== */
.paywall-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s;
}
.paywall-modal {
    background: var(--bg-card, #1e1f25);
    border: 1px solid var(--border, #25262d);
    border-radius: 16px;
    padding: 28px 24px;
    max-width: 340px;
    width: 90%;
    text-align: center;
}
.paywall-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.paywall-modal h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary, #FEFEFE);
}
.paywall-modal p {
    color: var(--text-muted, #9D9D9F);
    font-size: 14px;
    margin-bottom: 4px;
}
.paywall-features {
    text-align: left;
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    margin-top: 12px;
    font-size: 13px;
}
.paywall-features div {
    padding: 3px 0;
    color: var(--text-secondary, #CBCBCC);
}
.paywall-close {
    margin-top: 16px;
    background: var(--accent, #F8B02A);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 32px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.paywall-close:hover {
    opacity: 0.9;
}
.paywall-login-btn {
    display: block;
    margin-top: 14px;
    background: #CD8F25;
    color: #FEFEFE;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    padding: 11px 24px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    width: 100%;
}
.paywall-login-btn:hover { background: #CD8F25; }
.paywall-login-btn:disabled { background: #1d4a65; cursor: default; }
.pw-btn-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
    width: 100%;
}
.pw-btn-row .paywall-login-btn,
.pw-btn-row .paywall-close {
    margin-top: 0;
    width: 100%;
    box-sizing: border-box;
    padding-left: 16px;
    padding-right: 16px;
}
.paywall-bot-btn {
    display: block;
    margin-top: 12px;
    background: #CD8F25;
    color: #FEFEFE !important;
    text-decoration: none !important;
    border-radius: 10px;
    padding: 11px 24px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    width: 100%;
}
.paywall-bot-btn:hover { background: #CD8F25; }
.pw-code-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #121317;
    border: 1px dashed #2a2b31;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 14px;
}
.pw-code-text {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #F8B02A;
}
.pw-copy-btn {
    background: none;
    border: 1px solid #2a2b31;
    border-radius: 6px;
    color: #CBCBCC;
    cursor: pointer;
    padding: 3px 7px;
    font-size: 13px;
}
.pw-copy-btn:hover { color: #FEFEFE; }
.pw-spinner {
    display: inline-block;
    width: 12px; height: 12px;
    border: 2px solid #2a2b31;
    border-top-color: #F8B02A;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== SPOILER (BLUR) FOR FREE USERS ========== */
.item-card.spoiler .item-photo img,
.item-card.spoiler .item-photo .no-photo {
    filter: blur(20px);
    -webkit-filter: blur(20px);
    transform: scale(1.1);
    pointer-events: none;
}
.item-card.spoiler .item-info {
    filter: blur(8px);
    -webkit-filter: blur(8px);
    pointer-events: none;
    user-select: none;
}
.item-card.spoiler:hover {
    transform: none;
    box-shadow: none;
}
.item-card.spoiler:hover .item-photo img {
    transform: scale(1.1);
}
.item-card.spoiler .spoiler-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    background: rgba(0,0,0,0.35);
    border-radius: var(--radius);
    pointer-events: none;
}
.spoiler-overlay .spoiler-icon {
    font-size: 36px;
    margin-bottom: 6px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.spoiler-overlay .spoiler-text {
    font-size: 13px;
    font-weight: 600;
    color: #FEFEFE;
    text-shadow: 0 1px 8px rgba(0,0,0,0.6);
    padding: 4px 14px;
    background: rgba(91,110,245,0.6);
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

/* ========== KLEINANZEIGEN VISUAL UPGRADE ========== */

@media (max-width: 1100px) {
    .v-main-layout { grid-template-columns: 1fr; }
    .v-sidebar { display: none; }
}

@media (max-width: 768px) {
    
    
    
    .v-main-layout .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    
    
    
    .v-main-layout .items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 6px;
    }
    .card-overlay-price { font-size: 18px; }
}

/* ========== BLACKLIST MODAL ========== */
.btn-blacklist {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(231,76,60,0.08) !important;
    border: 1px solid rgba(231,76,60,0.25) !important;
    color: #f85149 !important;
    cursor: pointer;
}
.btn-blacklist:hover {
    background: rgba(231,76,60,0.15) !important;
    border-color: rgba(231,76,60,0.4) !important;
}
.bl-count-badge {
    background: #f85149;
    color: #FEFEFE;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}
.bl-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 1100;
    align-items: center;
    justify-content: center;
}
.bl-overlay.active {
    display: flex;
}
.bl-modal {
    background: var(--bg-modal);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 480px;
    max-width: 95vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
    animation: modalIn 0.2s ease-out;
}
.bl-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.bl-header h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}
.bl-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}
.bl-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 3px;
}
.bl-tab {
    flex: 1;
    padding: 8px;
    text-align: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.bl-tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.bl-add-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.bl-input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.bl-input:focus {
    border-color: var(--accent);
}
.bl-add-btn {
    padding: 9px 18px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #f85149, #c0392b);
    color: #FEFEFE;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.bl-add-btn:hover {
    opacity: 0.9;
}
.bl-info {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 14px;
    padding: 8px 12px;
    background: rgba(248,176,42,0.06);
    border-radius: 8px;
    border: 1px solid rgba(248,176,42,0.1);
    line-height: 1.5;
}
.bl-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bl-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
}
.bl-item-value {
    color: var(--text-primary);
    font-weight: 500;
}
.bl-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.bl-item-type {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(231,76,60,0.1);
    color: #f85149;
}
.bl-item-remove {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s;
}
.bl-item-remove:hover {
    background: rgba(231,76,60,0.12);
    color: #f85149;
}
.bl-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 24px 0;
}
/* Quick blacklist button in item card context menu */
.card-bl-btn {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    color: #FEFEFE;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3;
    font-size: 14px;
    transition: background 0.15s;
    opacity: 0;
}
.item-card:hover .card-bl-btn {
    display: flex;
    opacity: 0.7;
}
.card-bl-btn:hover {
    background: rgba(231,76,60,0.8);
    opacity: 1 !important;
}

/* Delta badges for today changes */
.delta-badge {
    font-size: 0.55em;
    font-weight: 500;
    color: #E0BC8E;
    opacity: 0.85;
    vertical-align: middle;
    margin-left: 4px;
}

/* Product Intelligence */
.product-analysis-section {
    background: var(--card-bg, #1e1f25);
    border: 1px solid var(--border, #25262d);
    border-radius: 10px;
    padding: 14px;
    margin: 12px 0;
}
.pa-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.pa-title { font-size: 16px; }
.pa-product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent, #4f9eff);
    flex: 1;
}
.pa-refresh-btn {
    background: none;
    border: 1px solid var(--border, #25262d);
    border-radius: 6px;
    color: var(--text-secondary, #CBCBCC);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 14px;
}
.pa-refresh-btn:hover { border-color: var(--accent); color: var(--accent); }
.pa-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
.pa-stat {
    background: var(--bg-primary, #121317);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}
.pa-stat-label {
    font-size: 9px;
    text-transform: uppercase;
    color: var(--text-secondary, #CBCBCC);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.pa-stat-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary, #FEFEFE);
}
.pa-demand {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    padding: 6px;
    border-radius: 6px;
    margin-bottom: 8px;
}
.pa-demand-hot { background: rgba(239,68,68,0.15); color: #f85149; }
.pa-demand-high { background: rgba(249,115,22,0.15); color: #E0BC8E; }
.pa-demand-medium { background: rgba(59,130,246,0.15); color: #3b82f6; }
.pa-demand-low { background: rgba(107,114,128,0.15); color: #6b7280; }
.pa-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}
.pa-price-hint { color: var(--text-secondary); }
.pa-cheaper { color: #E0BC8E; font-weight: 600; }
.pa-expensive { color: #f85149; font-weight: 600; }
.pa-same { color: var(--accent); font-weight: 600; }
.pa-items-toggle-btn {
    width: 100%;
    background: none;
    border: 1px dashed var(--border, #25262d);
    border-radius: 6px;
    color: var(--text-secondary);
    padding: 8px;
    cursor: pointer;
    font-size: 12px;
}
.pa-items-toggle-btn:hover { border-color: var(--accent); color: var(--accent); }
.pa-items-list { max-height: 250px; overflow-y: auto; margin-top: 8px; }
.pa-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border, #25262d);
    font-size: 12px;
}
.pa-item-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); }
.pa-item-price { color: var(--accent); font-weight: 600; white-space: nowrap; }
.pa-item-views, .pa-item-wl { color: var(--text-secondary); font-size: 11px; white-space: nowrap; }
.pa-badge-sold { background: rgba(239,68,68,0.2); color: #f85149; padding: 1px 5px; border-radius: 3px; font-size: 9px; margin-right: 4px; }
.pa-badge-reserved { background: rgba(249,115,22,0.2); color: #E0BC8E; padding: 1px 5px; border-radius: 3px; font-size: 9px; margin-right: 4px; }

/* Product Analysis Fraud */
.pa-fraud-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin: 6px 0;
    padding: 8px;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 8px;
}
.pa-stat-fraud {
    background: transparent !important;
    border: none !important;
    padding: 4px !important;
}
.pa-stat-fraud .pa-stat-value {
    color: #f85149 !important;
    font-size: 16px !important;
}
.pa-stat-fraud .pa-stat-label {
    color: #f85149 !important;
    font-size: 10px !important;
}
.pa-badge-fraud {
    background: #f85149;
    color: #FEFEFE;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    margin-right: 4px;
}

/* Promoted ad badges */
.promo-badges {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    z-index: 3;
}
.promo-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    padding: 0;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.promo-top { background: transparent; }
.promo-highlight { background: transparent; }
.promo-bump { background: transparent; }
.promo-gallery { background: transparent; }
.promo-label {
    display: inline-block;
    background: rgba(90, 51, 174, 0.15);
    color: #a78bfa;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    margin-top: 6px;
    border: 1px solid rgba(90, 51, 174, 0.3);
}

/* ===== HERO HEADER ===== */
.hero-header {
    padding: 14px 20px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

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

.hero-period-selector {
    display: inline-flex;
    gap: 1px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
}
.hero-period-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 5px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s;
}
.hero-period-btn:hover { color: var(--text-primary); }
.hero-period-btn.active {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.hero-timestamp {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.hero-pulse-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--green);
    animation: hero-pulse 2.5s ease-in-out infinite;
}
@keyframes hero-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Health bar — inline, no background card */








/* KPI cards — compact, flat, muted */

.hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: border-color 0.15s;
    position: relative;
    overflow: hidden;
}













/* Funnel + Live — compact inline, no cards */













@media (max-width: 900px) {
    
    
}
@media (max-width: 500px) {
    
    
    .hero-header { padding: 10px 12px 12px; }
}

/* ===== Sparkline Bar Charts in KPI Cards ===== */









/* ===== HERO KPI INLINE ===== */










/* Funnel + Live rows */





/* ===== HERO BLOCKS ===== */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.hero-block {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
}
.hero-block-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}
.hero-block-body {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* KPI inline items */
.kpi-inline { display: inline-flex; align-items: baseline; gap: 3px; }
.kpi-inline b {
    color: var(--text-primary);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
}
.kpi-label { font-size: 10px; color: var(--text-muted); }
.kpi-sep { color: var(--text-muted); margin: 0 5px; font-size: 10px; }
.kpi-muted { color: var(--text-muted); font-size: 10px; }
.kpi-delta-inline { font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi-delta-inline.up { color: #E0BC8E; }
.kpi-delta-inline.down { color: #f85149; }

/* Health items */
.hero-health-item { display: inline-flex; align-items: center; gap: 4px; }
.hero-health-item b { color: var(--text-primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.hero-health-dot {
    width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.hero-health-dot.ok { background: #E0BC8E; }
.hero-health-dot.warn { background: #CD8F25; }
.hero-health-dot.err { background: #f85149; }

@media (max-width: 768px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-block-body { font-size: 11px; }
    .kpi-inline b { font-size: 12px; }
}

/* System block — info chips row */
.sys-chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.sys-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    line-height: 1.5;
    min-width: 0;
}
.sys-chip b {
    color: var(--text-primary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
@media (max-width: 768px) {
    .sys-chips { gap: 3px 10px; font-size: 10px; }
}



/* Analytics nav — full blinking highlight */
.analytics-nav-pulse {
    animation: analytics-blink 1.5s ease-in-out infinite !important;
    border-radius: 6px;
}
@keyframes analytics-blink {
    0%, 100% {
        background: rgba(248, 176, 42, 0.25);
        color: #F8B02A !important;
        box-shadow: 0 0 8px rgba(248, 176, 42, 0.4), inset 0 0 4px rgba(248, 176, 42, 0.15);
    }
    50% {
        background: rgba(248, 176, 42, 0.05);
        color: var(--text-secondary) !important;
        box-shadow: none;
    }
}

/* System shell — gauges on top, chips below */
.sys-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sys-gauges {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
    margin: 0;
    padding: 0 0 4px;
    border: none;
}

.sys-gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}
.sys-gauge-ring {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: conic-gradient(var(--color, #E0BC8E) var(--pct, 0%), var(--bg-hover, #25262d) 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 0 1px var(--border) inset;
}
.sys-gauge-ring::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: var(--bg-card, #1e1f25);
}
.sys-gauge-val {
    position: relative;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary, #FEFEFE);
    font-variant-numeric: tabular-nums;
    z-index: 1;
    line-height: 1;
}
.sys-gauge-val small {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted, #9D9D9F);
}
.sys-gauge-label {
    font-size: 11px;
    color: var(--text-muted, #9D9D9F);
    text-align: center;
    line-height: 1.25;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .sys-gauges { gap: 6px; }
    .sys-gauge-ring { width: 64px; height: 64px; }
    .sys-gauge-val { font-size: 15px; }
    .sys-gauge-label { font-size: 10px; }
}

/* ========== SELFREG 2026 ========== */
.tab-selfreg { gap: 5px; }
.tab-selfreg.active { color: #6bcf7f; }
.tab-selfreg.active svg { stroke: #6bcf7f; }

.tab-hotratio { gap: 5px; }
.tab-hotratio.active { color: var(--accent, #F8B02A); }
.tab-hotratio.active svg { stroke: var(--accent, #F8B02A); }

.ratio-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(248,176,42,0.92);
    color: #1a1a1a;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    z-index: 3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
    white-space: nowrap;
}

.selfreg-view {
    padding: 16px;
    max-width: 1400px;
    margin: 0 auto;
}
.selfreg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.selfreg-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.selfreg-badge {
    background: rgba(107,207,127,0.15);
    color: #6bcf7f;
    padding: 6px 12px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid rgba(107,207,127,0.3);
}
.selfreg-count { color: var(--text-muted, #9D9D9F); font-size: 13px; }
.selfreg-toolbar { display: flex; gap: 8px; align-items: center; }
.selfreg-info {
    color: var(--text-muted, #9D9D9F);
    font-size: 12px;
    margin-bottom: 16px;
    line-height: 1.5;
}
.sellers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.seller-card {
    background: var(--bg-card, #1e1f25);
    border: 1px solid var(--border, #2a2b33);
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.seller-card:hover {
    border-color: rgba(107,207,127,0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.sr-head { display: flex; align-items: center; gap: 10px; }
.sr-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6bcf7f, #3a9b5a);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px;
    flex-shrink: 0;
}
.sr-headinfo { flex: 1; min-width: 0; }
.sr-name {
    font-weight: 600; font-size: 14px; color: var(--text-primary, #FEFEFE);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sr-since { font-size: 12px; color: var(--text-muted, #9D9D9F); }
.sr-score {
    background: rgba(248,176,42,0.15);
    color: var(--accent, #F8B02A);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.sr-meta {
    display: flex; flex-wrap: wrap; gap: 10px;
    font-size: 11px; color: var(--text-muted, #9D9D9F);
}
.sr-pay { color: #6bcf7f; font-weight: 600; }
.sr-bl { color: #f85149; font-weight: 600; }
.sr-fresh { color: #6bcf7f; font-weight: 700; }
.bl-status { background: rgba(248,81,73,0.25); color: #f85149; border: 1px solid rgba(248,81,73,0.4); }
.bl-card { opacity: 0.55; border-style: dashed; border-color: rgba(248,81,73,0.4); }
.bl-card:hover { opacity: 0.85; }
.sd-bl-badge { margin-top: 6px; font-size: 12px; color: #f85149; font-weight: 600; }

.sr-top {
    display: flex; gap: 10px;
    background: var(--bg-secondary, #181920);
    border-radius: 10px;
    padding: 8px;
}
.sr-top-empty {
    color: var(--text-muted, #9D9D9F);
    font-size: 12px;
    text-align: center;
    padding: 14px 8px;
    font-style: italic;
}
.sr-top-photo {
    width: 64px; height: 64px;
    border-radius: 8px; overflow: hidden; flex-shrink: 0;
    background: var(--bg-hover, #26272e);
}
.sr-top-photo img { width: 100%; height: 100%; object-fit: cover; }
.sr-top-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.sr-top-title {
    font-size: 12px; font-weight: 600; color: var(--text-primary, #FEFEFE);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.sr-top-price { font-size: 13px; font-weight: 700; color: var(--accent, #F8B02A); }
.sr-top-stats { display: flex; gap: 10px; }
.sr-top-stats .item-stat { font-size: 11px; }

/* Seller drawer (drill-down) */
.seller-drawer-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1200;
    display: none;
    align-items: flex-end;
    justify-content: flex-end;
}
.seller-drawer-overlay.open { display: flex; }
.seller-drawer {
    width: 100%; max-width: 760px; height: 100%;
    background: var(--bg-primary, #14151a);
    border-left: 1px solid var(--border, #2a2b33);
    display: flex; flex-direction: column;
    overflow: hidden;
    animation: sdSlideIn 0.25s ease;
}
@keyframes sdSlideIn { from { transform: translateX(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.seller-drawer-header {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 16px;
    border-bottom: 1px solid var(--border, #2a2b33);
}
.seller-drawer-header .btn-close {
    margin-left: auto;
    background: var(--bg-hover, #26272e);
    border: none; color: var(--text-primary, #FEFEFE);
    width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 16px;
}
.seller-drawer-profile { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.sd-name { font-size: 18px; font-weight: 700; color: var(--text-primary, #FEFEFE); }
.sd-link { font-size: 12px; color: var(--accent, #F8B02A); text-decoration: none; }
.sd-link:hover { text-decoration: underline; }
.seller-drawer-stats { padding: 10px 16px; border-bottom: 1px solid var(--border, #2a2b33); }
.sd-meta { font-size: 12px; color: var(--text-muted, #9D9D9F); line-height: 1.6; }
.sd-new { margin-top: 6px; font-size: 12px; color: #6bcf7f; font-weight: 600; }
.seller-drawer-loading { padding: 30px; text-align: center; }
#sellerDrawerGrid { padding: 14px; overflow-y: auto; flex: 1; align-content: start; }

@media (max-width: 768px) {
    .sellers-grid { grid-template-columns: 1fr; }
    .seller-drawer { max-width: 100%; }
}

