@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
    --main-bg: #100e1b;
    --secondary-bg: #171A28;
    --third-bg: #23263C;
    --card-hover: #2a2e48;
    --input-bg: #12101f;
    --border: #394263;
    --border-light: #4a4f6d;
    --primary-orange: #e8540f;
    --primary-orange-500: #f04006;
    --primary-gradient: linear-gradient(89.85deg, #FF9F10 14.66%, #FF8310 46.29%, #FF1E10 88.53%);
    --green: #24e508;
    --green-dim: #179303;
    --green-bg: rgba(36, 229, 8, 0.08);
    --red: #e00909;
    --red-bg: rgba(224, 9, 9, 0.08);
    --blue: #4150d3;
    --blue-bg: rgba(65, 80, 211, 0.1);
    --special: #c5a114;
    --special-bg: rgba(197, 161, 20, 0.1);
    --text: #e5e5e5;
    --text-dim: #818398;
    --text-muted: #5a5d78;
    --radius: 12px;
    --radius-sm: 8px;
    --rarity-otmychka: #c8c8c8;
    --rarity-novichok: #24e508;
    --rarity-stalker: #4190e0;
    --rarity-veteran: #a855f7;
    --rarity-master: #e00909;
    --rarity-legenda: #f5b800;
    --quality-common: #c8c8c8;
    --quality-uncommon: #24e508;
    --quality-special: #4190e0;
    --quality-rare: #a855f7;
    --quality-exceptional: #e00909;
    --quality-legendary: #f5b800;
}

/* ===== THEMES ===== */
[data-theme="midnight"] {
    --main-bg: #0a0f1e; --secondary-bg: #111827; --third-bg: #1f2937;
    --card-hover: #283548; --input-bg: #0d1117; --border: #2d3a4f; --border-light: #3b4a63;
    --primary-orange: #3b82f6; --primary-orange-500: #2563eb;
    --primary-gradient: linear-gradient(89.85deg, #60a5fa 14.66%, #3b82f6 46.29%, #1d4ed8 88.53%);
    --text: #e2e8f0; --text-dim: #94a3b8; --text-muted: #64748b;
}
[data-theme="emerald"] {
    --main-bg: #0a1510; --secondary-bg: #11201a; --third-bg: #1a3028;
    --card-hover: #243d33; --input-bg: #081210; --border: #2d5a46; --border-light: #3d7a5e;
    --primary-orange: #10b981; --primary-orange-500: #059669;
    --primary-gradient: linear-gradient(89.85deg, #34d399 14.66%, #10b981 46.29%, #059669 88.53%);
    --text: #d1fae5; --text-dim: #6ee7b7; --text-muted: #4a7c68;
}
[data-theme="crimson"] {
    --main-bg: #1a0a0a; --secondary-bg: #251212; --third-bg: #3b1c1c;
    --card-hover: #4a2525; --input-bg: #150808; --border: #5a2d2d; --border-light: #7a3d3d;
    --primary-orange: #ef4444; --primary-orange-500: #dc2626;
    --primary-gradient: linear-gradient(89.85deg, #fca5a5 14.66%, #ef4444 46.29%, #b91c1c 88.53%);
    --text: #fef2f2; --text-dim: #fca5a5; --text-muted: #7f5555;
}
[data-theme="royal"] {
    --main-bg: #110a1e; --secondary-bg: #1a1230; --third-bg: #271d42;
    --card-hover: #332854; --input-bg: #0d0818; --border: #3d2d6b; --border-light: #5540a0;
    --primary-orange: #a855f7; --primary-orange-500: #9333ea;
    --primary-gradient: linear-gradient(89.85deg, #c084fc 14.66%, #a855f7 46.29%, #7e22ce 88.53%);
    --text: #f3e8ff; --text-dim: #c084fc; --text-muted: #6d5a8a;
}
[data-theme="sunset"] {
    --main-bg: #1a120a; --secondary-bg: #251a10; --third-bg: #3b2818;
    --card-hover: #4a3420; --input-bg: #150e08; --border: #5a3d20; --border-light: #7a5430;
    --primary-orange: #f59e0b; --primary-orange-500: #d97706;
    --primary-gradient: linear-gradient(89.85deg, #fcd34d 14.66%, #f59e0b 46.29%, #b45309 88.53%);
    --text: #fefce8; --text-dim: #fbbf24; --text-muted: #8a7a55;
}
[data-theme="military"] {
    --main-bg: #12140e; --secondary-bg: #1a1d14; --third-bg: #272b1f;
    --card-hover: #333828; --input-bg: #0e100a; --border: #3d4230; --border-light: #555c44;
    --primary-orange: #84cc16; --primary-orange-500: #65a30d;
    --primary-gradient: linear-gradient(89.85deg, #bef264 14.66%, #84cc16 46.29%, #4d7c0f 88.53%);
    --text: #ecfccb; --text-dim: #a3e635; --text-muted: #6b7a4a;
}
[data-theme="cyberpunk"] {
    --main-bg: #0d0015; --secondary-bg: #150022; --third-bg: #220035;
    --card-hover: #2e0048; --input-bg: #0a0010; --border: #4a0070; --border-light: #6b00a8;
    --primary-orange: #f0abfc; --primary-orange-500: #e879f9;
    --primary-gradient: linear-gradient(89.85deg, #f0abfc 14.66%, #e879f9 46.29%, #c026d3 88.53%);
    --text: #fae8ff; --text-dim: #d946ef; --text-muted: #7a4a8a;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--main-bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--main-bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== HEADER ===== */
.header {
    background: linear-gradient(180deg, #1a1730 0%, var(--main-bg) 100%);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
}
.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo { display: flex; align-items: center; gap: 14px; }
.logo-icon {
    width: 42px; height: 42px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 900; color: #fff;
    letter-spacing: -1px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.logo-text h1 { font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: 1px; }
.logo-text h1 span {
    background: var(--primary-gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo-text .sub { font-size: 11px; color: var(--text-dim); font-weight: 500; }

/* Nav */
.nav-tabs { display: flex; gap: 4px; height: 100%; align-items: stretch; }
.nav-tab {
    padding: 0 18px; background: none; border: none;
    color: var(--text-dim); font-size: 13px; font-family: inherit;
    font-weight: 600; cursor: pointer; position: relative;
    transition: color 0.15s; display: flex; align-items: center; gap: 6px;
}
.nav-tab:hover { color: var(--text); }
.nav-tab.active { color: var(--primary-orange); }
.nav-tab.active::after {
    content: ''; position: absolute; bottom: 0; left: 12px; right: 12px;
    height: 2px; background: var(--primary-gradient); border-radius: 2px 2px 0 0;
}

.header-stats { display: flex; gap: 16px; align-items: center; }
.stat-pill {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 14px; background: var(--secondary-bg);
    border: 1px solid var(--border); border-radius: 20px;
}
.stat-pill .s-value { font-size: 14px; font-weight: 700; }
.stat-pill .s-label { font-size: 10px; color: var(--text-dim); }
.stat-green .s-value { color: var(--green); }
.stat-orange .s-value { color: var(--primary-orange); }

/* ===== LAYOUT ===== */
.app { max-width: 1440px; margin: 0 auto; padding: 20px 24px; }
.tab-page { display: none; }
.tab-page.active { display: block; }

.trade-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
}

/* Cards */
.card {
    background: var(--secondary-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.card-header {
    padding: 12px 16px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--text-dim);
}
.card-body { padding: 10px; }

/* Search */
.search-box { position: relative; margin-bottom: 10px; }
.search-box input {
    width: 100%; padding: 10px 12px 10px 34px;
    background: var(--input-bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    font-size: 13px; font-family: inherit; font-weight: 500; outline: none;
    transition: all 0.2s;
}
.search-box input:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(232, 84, 15, 0.15);
}
.search-box input::placeholder { color: var(--text-muted); }
.search-icon {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 14px;
}

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 14px; }
.categories { display: flex; flex-direction: column; gap: 2px; }
.cat-btn {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 8px 12px; background: transparent;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    color: var(--text-dim); font-size: 12px; font-family: inherit;
    font-weight: 600; cursor: pointer; transition: color 0.1s, border-color 0.1s, background 0.1s; text-align: left;
}
.cat-btn:hover { background: var(--third-bg); color: var(--text); }
.cat-btn.active {
    background: rgba(232, 84, 15, 0.1);
    border-color: rgba(232, 84, 15, 0.25);
    color: var(--primary-orange);
}
.cat-icon { font-size: 14px; width: 22px; text-align: center; flex-shrink: 0; font-weight: 700; }
.cat-count {
    margin-left: auto; background: var(--third-bg);
    padding: 1px 8px; border-radius: 10px;
    font-size: 11px; font-weight: 600; color: var(--text-muted);
}
.cat-btn.active .cat-count { background: rgba(232, 84, 15, 0.15); color: var(--primary-orange); }

/* Rarity chips */
.rarity-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.rarity-chip {
    padding: 5px 10px; background: var(--input-bg);
    border: 1px solid var(--border); border-radius: 16px;
    font-size: 11px; font-family: inherit; font-weight: 600;
    cursor: pointer; transition: border-color 0.1s, color 0.1s;
}
.rarity-chip:hover { border-color: var(--border-light); }
.rarity-chip.active { border-width: 2px; }
.rarity-chip[data-r="all"] { color: var(--text-dim); }
.rarity-chip[data-r="all"].active { border-color: var(--text-dim); color: var(--text); }
.rarity-chip[data-r="otmychka"] { color: var(--rarity-otmychka); }
.rarity-chip[data-r="otmychka"].active { border-color: var(--rarity-otmychka); }
.rarity-chip[data-r="novichok"] { color: var(--rarity-novichok); }
.rarity-chip[data-r="novichok"].active { border-color: var(--rarity-novichok); }
.rarity-chip[data-r="stalker"] { color: var(--rarity-stalker); }
.rarity-chip[data-r="stalker"].active { border-color: var(--rarity-stalker); }
.rarity-chip[data-r="veteran"] { color: var(--rarity-veteran); }
.rarity-chip[data-r="veteran"].active { border-color: var(--rarity-veteran); }
.rarity-chip[data-r="master"] { color: var(--rarity-master); }
.rarity-chip[data-r="master"].active { border-color: var(--rarity-master); }
.rarity-chip[data-r="legenda"] { color: var(--rarity-legenda); }
.rarity-chip[data-r="legenda"].active { border-color: var(--rarity-legenda); }

/* Weapon class chips */
.wc-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.wc-chip {
    padding: 5px 10px; background: var(--input-bg);
    border: 1px solid var(--border); border-radius: 16px;
    font-size: 11px; font-family: inherit; font-weight: 600;
    cursor: pointer; transition: border-color 0.1s, color 0.1s; color: var(--text-dim);
}
.wc-chip:hover { border-color: var(--border-light); color: var(--text); }
.wc-chip.active {
    background: rgba(232, 84, 15, 0.1);
    border-color: rgba(232, 84, 15, 0.4);
    color: var(--primary-orange);
    border-width: 2px;
}

/* ===== ITEMS ===== */
.content { min-width: 0; }
.content-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px; gap: 12px;
}
.content-toolbar h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; white-space: nowrap; }
.sort-btns { display: flex; gap: 5px; flex-shrink: 0; }
.sort-btn {
    padding: 5px 12px; background: var(--secondary-bg);
    border: 1px solid var(--border); border-radius: 16px;
    color: var(--text-dim); font-size: 11px; font-family: inherit;
    font-weight: 600; cursor: pointer; transition: border-color 0.1s, color 0.1s;
}
.sort-btn:hover { border-color: var(--border-light); color: var(--text); }
.sort-btn.active {
    background: rgba(232, 84, 15, 0.1);
    border-color: rgba(232, 84, 15, 0.3);
    color: var(--primary-orange);
}

.items-list { display: flex; flex-direction: column; gap: 6px; contain: layout style; }
.item-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: var(--secondary-bg);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: border-color 0.1s;
}
.item-row:hover {
    background: var(--card-hover);
    border-color: rgba(232, 84, 15, 0.2);
}
.item-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.item-thumb {
    width: 36px; height: 36px; border-radius: 6px;
    object-fit: cover; flex-shrink: 0;
}
.item-rarity-dot { width: 4px; height: 28px; border-radius: 2px; flex-shrink: 0; }
.item-text { min-width: 0; }
.item-name {
    font-size: 13px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.item-sub {
    font-size: 11px; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.price-col { text-align: right; }
.price-col .p-label {
    font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted); font-weight: 600;
}
.price-col .p-value { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.price-buy .p-value { color: var(--red); }
.price-sell .p-value { color: var(--green); }

.profit-col {
    text-align: center; padding: 5px 8px; border-radius: 6px;
}
.profit-col.positive { background: var(--green-bg); }
.profit-col.negative { background: var(--red-bg); }
.profit-col .p-label {
    font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted); font-weight: 600;
}
.profit-col .p-value { font-size: 13px; font-weight: 800; }
.profit-col.positive .p-value { color: var(--green); }
.profit-col.negative .p-value { color: var(--red); }
.profit-col .p-pct { font-size: 10px; font-weight: 600; }
.profit-col.positive .p-pct { color: var(--green-dim); }
.profit-col.negative .p-pct { color: var(--red); }

.row-action {
    width: 34px; height: 34px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--third-bg);
    color: var(--text-dim); font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.1s, color 0.1s; flex-shrink: 0; font-family: inherit;
}
.row-action:hover { background: var(--primary-orange); border-color: var(--primary-orange); color: #fff; }
.best-item { border-left: 3px solid var(--green); }
.no-items { text-align: center; padding: 40px; color: var(--text-muted); font-size: 13px; }

/* Content filters bar */
.content-filters {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    margin-bottom: 14px; padding: 12px 14px;
    background: var(--secondary-bg); border: 1px solid var(--border);
    border-radius: var(--radius);
}
.content-filters .search-box { flex: 1; min-width: 180px; margin-bottom: 0; }

/* Trade log overlay */
.tradelog-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(16,14,27,0.7);
    backdrop-filter: blur(4px); z-index: 200;
    justify-content: flex-end;
}
.tradelog-overlay.show { display: flex; }
.tradelog-panel {
    width: 400px; max-width: 95vw; height: 100vh;
    background: var(--secondary-bg); border-left: 1px solid var(--border);
    display: flex; flex-direction: column; padding: 20px;
    box-shadow: -8px 0 40px rgba(0,0,0,0.4);
}
.tradelog-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.tradelog-header h3 { font-size: 14px; font-weight: 700; }
.tradelog-close {
    width: 30px; height: 30px; border-radius: 6px;
    border: 1px solid var(--border); background: var(--third-bg);
    color: var(--text-dim); font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-family: inherit;
}
.tradelog-close:hover { background: var(--red-bg); color: var(--red); border-color: var(--red); }
.tradelog-panel .trade-list { flex: 1; max-height: none; overflow-y: auto; }

/* ===== PANEL ===== */
.panel { display: flex; flex-direction: column; gap: 14px; }
.calc-row { display: flex; gap: 8px; margin-bottom: 8px; }
.calc-field { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.calc-field label {
    font-size: 10px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
}
.calc-field input {
    width: 100%; padding: 8px 10px;
    background: var(--input-bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    font-size: 14px; font-family: inherit; font-weight: 700; outline: none;
    transition: all 0.2s;
}
.calc-field input:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(232, 84, 15, 0.15);
}
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }
.calc-box { padding: 10px; border-radius: var(--radius-sm); text-align: center; }
.calc-box.c-profit { background: var(--green-bg); }
.calc-box.c-loss { background: var(--red-bg); }
.calc-box.c-info { background: var(--blue-bg); }
.calc-box .c-label {
    font-size: 9px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; margin-bottom: 3px;
}
.calc-box .c-value { font-size: 15px; font-weight: 800; }
.calc-box.c-profit .c-value { color: var(--green); }
.calc-box.c-loss .c-value { color: var(--red); }
.calc-box.c-info .c-value { color: var(--blue); }

/* Trade log */
.trade-list { display: flex; flex-direction: column; gap: 4px; max-height: 400px; overflow-y: auto; }
.trade-entry {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px; background: var(--input-bg);
    border-radius: 6px; border: 1px solid transparent; transition: border-color 0.1s;
}
.trade-entry:hover { border-color: var(--border); }
.trade-info { flex: 1; min-width: 0; }
.trade-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trade-detail { font-size: 10px; color: var(--text-muted); }
.trade-time { color: var(--text-dim); font-weight: 500; }
.trade-profit { font-size: 12px; font-weight: 700; flex-shrink: 0; }
.trade-profit.pos { color: var(--green); }
.trade-profit.neg { color: var(--red); }
.trade-del {
    width: 22px; height: 22px; border-radius: 4px;
    border: none; background: transparent; color: var(--text-muted);
    cursor: pointer; font-size: 11px; display: flex;
    align-items: center; justify-content: center; transition: all 0.15s; font-family: inherit;
}
.trade-del:hover { background: var(--red-bg); color: var(--red); }

/* Purchased sell button */
.btn-sell-item {
    padding: 4px 10px; border-radius: 6px;
    border: 1px solid var(--green); background: var(--green-bg);
    color: var(--green); font-size: 11px; font-family: inherit;
    font-weight: 700; cursor: pointer; transition: all 0.15s;
    flex-shrink: 0; white-space: nowrap;
}
.btn-sell-item:hover { background: var(--green); color: #fff; }

.empty-state { text-align: center; padding: 28px 16px; color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.btn-clear-all {
    padding: 4px 10px; background: transparent;
    border: 1px solid var(--border); border-radius: 6px;
    color: var(--text-muted); font-size: 10px; font-family: inherit;
    font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.btn-clear-all:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }

/* Export bar */
.export-bar {
    display: flex; gap: 8px; align-items: center;
    margin-top: 12px; padding-top: 12px;
    border-top: 1px solid var(--border);
}
.export-days-input {
    width: 70px; padding: 6px 8px;
    background: var(--input-bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    font-size: 12px; font-family: inherit; font-weight: 600;
    outline: none; text-align: center;
}
.export-days-input:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 2px rgba(232, 84, 15, 0.15);
}
.export-btn { padding: 6px 12px !important; font-size: 11px !important; flex: 1; }

/* Language toggle */
.lang-toggle {
    padding: 5px 12px; border-radius: 16px;
    border: 1px solid var(--border); background: var(--third-bg);
    color: var(--text-dim); font-size: 12px; font-family: inherit;
    font-weight: 700; cursor: pointer; transition: all 0.15s;
    letter-spacing: 0.5px;
}
.lang-toggle:hover { border-color: var(--primary-orange); color: var(--primary-orange); }

/* ===== ADD FORM ===== */
.add-layout { max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 5px; font-weight: 600; }
.form-group input, .form-group select {
    width: 100%; padding: 10px 14px;
    background: var(--input-bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    font-size: 14px; font-family: inherit; font-weight: 500; outline: none;
}
.form-group input:focus, .form-group select:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(232, 84, 15, 0.15);
}
.form-group select option { background: var(--secondary-bg); }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* Buttons */
.btn {
    padding: 10px 20px; border-radius: var(--radius-sm);
    font-size: 13px; font-family: inherit; font-weight: 700;
    cursor: pointer; transition: all 0.15s; border: 1px solid;
    text-align: center; display: inline-flex; align-items: center;
    justify-content: center; gap: 6px;
}
.btn-primary { background: var(--primary-gradient); border-color: transparent; color: #fff; }
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-secondary { background: var(--third-bg); border-color: var(--border); color: var(--text-dim); }
.btn-secondary:hover { border-color: var(--border-light); color: var(--text); }
.btn-full { width: 100%; }

/* ===== MODAL ===== */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(16,14,27,0.75);
    backdrop-filter: blur(6px); z-index: 200;
    align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--secondary-bg); border: 1px solid var(--border);
    border-radius: 16px; padding: 24px; width: 440px; max-width: 95vw;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.modal h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.modal-btns { display: flex; gap: 8px; margin-top: 16px; }
.modal-btns .btn { flex: 1; }
.form-actions { display: flex; gap: 20px; margin-top: 20px; justify-content: center; flex-wrap: wrap; }
.form-actions .btn { min-width: 110px; padding: 10px 20px; }

/* ===== WATCHLIST ===== */
.watchlist-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.watchlist-header h2 { font-size: 18px; font-weight: 800; }
.watchlist-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px;
}
.watch-card {
    background: var(--secondary-bg); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px; transition: border-color 0.1s;
}
.watch-card:hover { border-color: rgba(232, 84, 15, 0.3); }
.watch-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.watch-card-name { font-size: 14px; font-weight: 700; }
.watch-rarity-badge {
    padding: 2px 8px; border-radius: 4px; font-size: 10px;
    font-weight: 700; text-transform: uppercase;
}
.watch-prices { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.watch-prices .wp-label { font-size: 9px; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.watch-prices .wp-value { font-size: 14px; font-weight: 700; }
.watch-actions { display: flex; gap: 6px; margin-top: 12px; }
.watch-actions .btn { flex: 1; padding: 7px 10px; font-size: 11px; }

/* ===== THEME PANEL ===== */
.theme-panel {
    position: fixed; top: 64px; right: 0;
    background: var(--secondary-bg); border: 1px solid var(--border);
    border-radius: 0 0 0 var(--radius); padding: 12px;
    z-index: 200; transform: translateX(100%);
    transition: transform 0.25s ease; box-shadow: -4px 4px 20px rgba(0,0,0,0.4);
}
.theme-panel.show { transform: translateX(0); }
.theme-grid { display: flex; flex-direction: column; gap: 6px; }
.theme-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 16px; background: var(--third-bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); font-family: inherit;
    font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s;
    white-space: nowrap;
}
.theme-btn:hover { border-color: var(--primary-orange); }
.theme-btn.active { border-color: var(--primary-orange); background: var(--card-hover); }
.theme-dot {
    width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .trade-layout { grid-template-columns: 1fr; }
    .sidebar { order: -1; }
    .header-stats { display: none; }
}

