/* ========================================================================= */
/* UBERAPP MARKET - DIABLO II: RESURRECTED HIGH-FIDELITY THEME               */
/* ========================================================================= */

:root {
  --bg-dark: #090a09;
  --bg-body: #090b0a;
  --bg-panel: #111310;
  --bg-panel-dark: #0b0d0c;
  --bg-card: #141812;
  --bg-sidebar: #0d100e;
  --bg-input: #121511;
  --border-main: #34382f;
  --border-subtle: #242820;
  --border-gold: #514732;
  --border-gold-bright: #c6a366;
  --gold-main: #c6a366;
  --gold-bright: #ffd27d;
  --gold-dark: #77603a;
  --red-accent: #a81a30;
  --red-hover: #c4263f;
  --red-dark: #68111e;
  --text-main: #dedbd1;
  --text-muted: #999b90;
  --text-dim: #6e7266;
  --d2-unique: #bca262;
  --d2-runeword: #e6a13b;
  --d2-set: #57d65a;
  --d2-rare: #e8e838;
  --d2-magic: #a6ef8d;
  --d2-craft: #ea8523;
  --d2-normal: #dedbd1;
  --d2-blue-affix: #a6ef8d;
  --status-green: #38b000;
  --font-body: 'Exo 2', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Cinzel', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: radial-gradient(ellipse at 70% 0, #24241955, transparent 55%), repeating-linear-gradient(115deg, #ffffff02 0 1px, transparent 1px 5px), #090b0a;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--gold-main);
  letter-spacing: 0.5px;
}

a { color: var(--gold-main); text-decoration: none; transition: 0.2s; }
a:hover { color: var(--gold-bright); }

/* ========================================================================= */
/* 1. TOP HEADER                                                             */
/* ========================================================================= */
.market-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(22, 25, 21, 0.92) 0%, rgba(11, 13, 11, 0.97) 100%),
              url('/static/images/header.jpg') center 20% / cover no-repeat;
  border-bottom: 2px solid var(--border-gold);
  box-shadow: 0 4px 25px rgba(0,0,0,0.9), inset 0 -1px 0 rgba(220, 100, 30, 0.25);
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  gap: 16px;
  overflow: visible;
}

.header-backdrop-fade {
  position: relative;
  z-index: 5;
  width: 100%;
  height: 140px;
  background: url('/static/images/header.jpg') center top / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
  margin-bottom: -140px;
}

.nav-svg {
  vertical-align: middle;
  display: inline-block;
  stroke: var(--text-muted);
}

.header-ember-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.header-left, .header-nav, .header-right {
  position: relative;
  z-index: 2;
}

.header-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255, 210, 125, 0.4));
}
.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-title {
  display: flex;
  gap: 6px;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 1.5px;
}
.brand-title-d2 {
  color: var(--gold-main);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  font-family: var(--font-heading);
  letter-spacing: 2px;
}
.brand-title-uber {
  color: #ef4444;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}
.brand-title-market {
  color: var(--gold-bright);
  text-shadow: 0 0 10px rgba(255, 210, 125, 0.3);
}
.brand-sub {
  font-size: 0.58rem;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Nav tabs */
.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-tab {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 4px;
  transition: 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nav-tab:hover {
  color: #fff;
  background: rgba(255,255,255,0.04);
}
.nav-tab.active {
  color: #fff;
  background: linear-gradient(180deg, #8b1526 0%, #520d17 100%);
  border: 1px solid #b91c1c;
  box-shadow: 0 0 10px rgba(185, 28, 28, 0.35);
}
.nav-tab-user {
  color: var(--gold-main);
}
.nav-tab-sm {
  color: var(--text-dim);
  font-size: 0.8rem;
  padding: 4px 8px;
}
.nav-tab-sm:hover { color: var(--gold-bright); }

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-search form {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-main);
  border-radius: 20px;
  padding: 5px 12px;
  gap: 6px;
  transition: border-color 0.2s;
}
.header-search form:focus-within {
  border-color: var(--gold-main);
  box-shadow: 0 0 8px rgba(199, 167, 78, 0.25);
}
.search-glass {
  font-size: 0.8rem;
  opacity: 0.6;
}
.header-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.82rem;
  width: 190px;
}
.header-search-input::placeholder {
  color: var(--text-dim);
}

.header-bell {
  position: relative;
  cursor: pointer;
  padding: 6px;
  font-size: 1rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.header-bell:hover { opacity: 1; }
.bell-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 6px; height: 6px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 5px #22c55e;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-main);
  padding: 4px 10px 4px 5px;
  border-radius: 20px;
}
.user-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark) 0%, #291e0e 100%);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--gold-bright);
  font-weight: 700;
}
.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.btn-sell-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #a81a30 0%, #6d0f1e 100%);
  border: 1px solid #c41e3a;
  color: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 2px 8px rgba(168, 26, 48, 0.4);
}
.btn-sell-top:hover {
  background: linear-gradient(180deg, #c41e3a 0%, #851325 100%);
  border-color: #e02646;
  color: #fff;
  box-shadow: 0 0 12px rgba(224, 38, 70, 0.5);
}

/* ========================================================================= */
/* 2. CLASS TABS BAR (REAL DIABLO CHARACTER PORTRAITS)                       */
/* ========================================================================= */
.class-tabs-container {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-main);
  padding: 8px 24px;
}
.class-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.class-tab-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #181d15 0%, #0d100d 100%);
  border: 1px solid var(--border-gold);
  padding: 8px 16px;
  border-radius: 4px;
  transition: 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.class-tab-box:hover, .class-tab-box.active {
  border-color: var(--gold-bright);
  background: linear-gradient(135deg, #2a2818 0%, #171b12 100%);
  box-shadow: 0 0 12px rgba(255, 210, 125, 0.35);
}
.tab-all-icon { font-size: 1.2rem; color: var(--gold-main); }
.tab-all-text { display: flex; flex-direction: column; line-height: 1.15; }
.all-title { font-size: 0.8rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.5px; }
.all-sub { font-size: 0.65rem; color: var(--gold-bright); opacity: 0.7; }

.class-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  opacity: 1;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
  color: var(--text-main);
  text-decoration: none;
}
.class-tab:hover, .class-tab.active {
  color: var(--gold-bright);
  border-bottom-color: var(--gold-bright);
}

/* Round Portrait Medallion */
.class-avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #6b5530;
  background: radial-gradient(circle, #252e1f, #070a08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.8), inset 0 0 4px rgba(0,0,0,0.6);
}
.class-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.15) brightness(1.05);
  transition: all 0.25s ease;
}
.class-tab:hover .class-avatar-wrap,
.class-tab.active .class-avatar-wrap {
  border-color: #ffd27d;
  box-shadow: 0 0 16px rgba(255, 210, 125, 0.65), 0 2px 8px #000;
  transform: scale(1.1);
}
.class-tab:hover .class-avatar-img,
.class-tab.active .class-avatar-img {
  filter: contrast(1.2) brightness(1.15);
}
.class-tab span {
  font-size: 0.76rem;
  font-weight: 700;
  color: #cbbd9a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px #000;
}
.class-tab.active span {
  color: #ffd27d;
  text-shadow: 0 0 8px rgba(255, 210, 125, 0.5);
}

/* ========================================================================= */
/* 3. HERO TAGLINE BANNER STRIP                                              */
/* ========================================================================= */
.hero-banner-strip {
  background: linear-gradient(90deg, #10170e 0%, #192415 50%, #0c100a 100%);
  border-bottom: 1px solid var(--border-main);
  padding: 10px 24px;
}
.hero-tagline-content {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  max-width: 1600px;
  margin: 0 auto;
}
.hero-tagline-text {
  text-align: right;
  font-family: var(--font-heading);
  line-height: 1.1;
}
.tagline-row-1 {
  font-size: 0.88rem;
  font-weight: 900;
  color: var(--gold-main);
  letter-spacing: 2px;
}
.tagline-row-2 {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 3px;
  font-style: italic;
}
.tagline-row-3 {
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--gold-bright);
  letter-spacing: 2.5px;
}
.hero-tagline-art {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-sell-hero {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #a81a30 0%, #6d0f1e 100%);
  border: 1px solid #c41e3a;
  color: #fff;
  padding: 8px 18px;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 4px 15px rgba(168, 26, 48, 0.4);
}
.btn-sell-hero:hover {
  background: linear-gradient(180deg, #c41e3a 0%, #851325 100%);
  border-color: #e02646;
  color: #fff;
  box-shadow: 0 0 15px rgba(224, 38, 70, 0.55);
}

/* ========================================================================= */
/* 4. MAIN CONTAINER & 3-COLUMN LAYOUT                                       */
/* ========================================================================= */
.container {
  flex: 1;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
}

.marketplace-layout {
  display: grid;
  grid-template-columns: 240px 1fr 340px;
  gap: 0;
  min-height: calc(100vh - 150px);
}

/* ========================================================================= */
/* 5. LEFT SIDEBAR: FILTERS                                                  */
/* ========================================================================= */
.filters-sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-main);
  padding: 18px 16px;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}
.filters-sidebar::-webkit-scrollbar { width: 4px; }
.filters-sidebar::-webkit-scrollbar-thumb { background: var(--border-main); border-radius: 2px; }

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-main);
}
.filters-header h3 {
  font-size: 0.85rem;
  color: var(--gold-main);
  letter-spacing: 1.5px;
}
.filters-reset {
  font-size: 0.72rem;
  color: var(--text-dim);
}
.filters-reset:hover { color: var(--gold-bright); }

.filter-group {
  margin-bottom: 16px;
}
.filter-group h4 {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-family: var(--font-body);
  font-weight: 700;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 10px;
  font-size: 0.75rem;
  opacity: 0.5;
}
.filter-search {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-main);
  color: var(--text-main);
  padding: 7px 10px 7px 30px;
  border-radius: 4px;
  font-size: 0.82rem;
  outline: none;
}
.filter-search:focus { border-color: var(--gold-main); }
.filter-search::placeholder { color: var(--text-dim); }

.filter-radio-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}
.filter-radio-list::-webkit-scrollbar { width: 3px; }
.filter-radio-list::-webkit-scrollbar-thumb { background: #273622; border-radius: 2px; }

.filter-radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: 0.15s;
}
.filter-radio-item:hover {
  background: rgba(255,255,255,0.03);
  color: #fff;
}
.filter-radio-item.selected {
  background: rgba(199, 167, 78, 0.08);
  color: var(--gold-bright);
}
.filter-radio-item input[type="radio"] {
  display: none;
}
.radio-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid var(--border-main);
  transition: 0.15s;
  flex-shrink: 0;
}
.filter-radio-item.selected .radio-dot {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  box-shadow: 0 0 6px rgba(255, 210, 125, 0.5);
}

.filter-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-main);
  color: var(--text-main);
  padding: 7px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
}
.filter-select:focus { border-color: var(--gold-main); }
.filter-select option { background: #0c100b; color: var(--text-main); }

.btn-apply-filters {
  width: 100%;
  background: linear-gradient(180deg, #a81a30 0%, #6d0f1e 100%);
  border: 1px solid #c41e3a;
  color: #fff;
  padding: 9px;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 6px;
}
.btn-apply-filters:hover {
  background: linear-gradient(180deg, #c41e3a 0%, #851325 100%);
  border-color: #e02646;
  box-shadow: 0 0 10px rgba(224, 38, 70, 0.4);
}

/* ========================================================================= */
/* 6. CENTER COLUMN: ITEMS TABLE                                             */
/* ========================================================================= */
.items-main {
  background: var(--bg-body);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.items-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}
.items-count {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.items-count strong { color: #fff; }

.items-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.items-toolbar-right label {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.toolbar-select {
  background: var(--bg-input);
  border: 1px solid var(--border-main);
  color: var(--text-main);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-left: 6px;
  cursor: pointer;
}

.view-toggles {
  display: flex;
  gap: 2px;
}
.view-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-main);
  color: var(--text-dim);
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.85rem;
}
.view-btn.active {
  background: #1f2a1b;
  border-color: var(--gold-main);
  color: var(--gold-bright);
}

/* Table */
.items-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
}

.items-table thead th {
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 12px;
  text-align: left;
  border: none;
}

.item-row {
  background: var(--bg-panel);
  border: 1px solid var(--border-main);
  cursor: pointer;
  transition: all 0.15s ease;
}
.item-row:hover {
  background: #192216;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.item-row.selected {
  background: #1f2b1b;
  box-shadow: 0 0 12px rgba(199, 167, 78, 0.15);
}

.items-table td {
  padding: 10px 12px;
  vertical-align: middle;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.items-table td:first-child {
  border-left: 3px solid transparent;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}
.item-row.selected td:first-child {
  border-left-color: var(--gold-bright);
}
.items-table td:last-child {
  border-right: 1px solid var(--border-subtle);
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

/* Cell styles */
.item-cell-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.item-row-icon {
  width: 38px; height: 38px;
  background: #090d08;
  border: 1px solid var(--border-main);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 2px;
}
.item-row-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}
.item-title-col {
  min-width: 0;
}
.item-row-title {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-row-base {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.base-dot { color: var(--gold-dark); margin: 0 3px; }

.item-cell-details {
  font-size: 0.78rem;
  line-height: 1.4;
}
.detail-stat-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
  color: var(--d2-blue-affix);
}
.stat-white {
  color: var(--text-muted);
}
.more-stats {
  color: var(--text-dim);
  font-size: 0.72rem;
  font-style: italic;
  margin-top: 2px;
}

.item-cell-seller {
  white-space: nowrap;
}
.seller-name {
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.status-dot-green {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--status-green);
  box-shadow: 0 0 6px var(--status-green);
  display: inline-block;
  flex-shrink: 0;
}
.seller-time {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
  padding-left: 13px;
}

.item-cell-price {
  white-space: nowrap;
}
.price-value {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold-bright);
}

.item-cell-action {
  text-align: right;
  white-space: nowrap;
}
.btn-table-buy {
  display: inline-block;
  background: #23301e;
  border: 1px solid #354a2e;
  color: #fff;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: 0.2s;
}
.btn-table-buy:hover {
  background: var(--red-accent);
  border-color: var(--red-hover);
  color: #fff;
  box-shadow: 0 0 8px rgba(185, 28, 28, 0.4);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 24px;
  padding: 16px 0;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px; height: 32px;
  background: var(--bg-panel);
  border: 1px solid var(--border-main);
  color: var(--text-muted);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: 0.15s;
}
.page-btn:hover {
  background: #202d1c;
  color: #fff;
  border-color: var(--border-gold);
}
.page-btn.active {
  background: var(--red-accent);
  border-color: var(--red-hover);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(185, 28, 28, 0.4);
}
.page-dots {
  color: var(--text-dim);
  padding: 0 4px;
}

/* ========================================================================= */
/* 7. RIGHT COLUMN: ITEM DETAIL PANEL (DIABLO TOOLTIP STYLE)                 */
/* ========================================================================= */
.item-detail-panel {
  background: var(--bg-panel);
  border-left: 1px solid var(--border-main);
  padding: 16px;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}
.item-detail-panel::-webkit-scrollbar { width: 4px; }
.item-detail-panel::-webkit-scrollbar-thumb { background: var(--border-main); border-radius: 2px; }

.d2-tooltip-box {
  background: #070a06;
  border: 2px solid var(--border-gold);
  border-radius: 4px;
  padding: 18px 16px;
  position: relative;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.85), 0 4px 20px rgba(0,0,0,0.7);
  margin-bottom: 16px;
}

.tooltip-copy-btn {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-main);
  color: var(--text-dim);
  width: 28px; height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: 0.2s;
}
.tooltip-copy-btn:hover {
  color: var(--gold-bright);
  border-color: var(--gold-main);
  background: rgba(199, 167, 78, 0.1);
}

.detail-img-box {
  width: 120px; height: 130px;
  margin: 0 auto 12px;
  background: radial-gradient(circle, rgba(30, 50, 35,0.6) 0%, rgba(6, 10, 7,0.98) 100%);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.8);
}
.detail-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.9));
}

.detail-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  text-align: center;
  margin-bottom: 2px;
  line-height: 1.2;
}

.detail-base {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 12px;
}

.detail-meta {
  background: #0a0f08;
  border: 1px solid #1e2b1a;
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 0.78rem;
}
.meta-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}
.meta-row span { color: var(--text-dim); }
.meta-row strong { color: var(--text-main); }

.detail-stats {
  background: rgba(0,0,0,0.5);
  border: 1px solid #212e1c;
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 14px;
  text-align: center;
  max-height: 180px;
  overflow-y: auto;
}
.tooltip-affix {
  color: var(--d2-blue-affix);
  font-size: 0.8rem;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.btn-buy-full {
  background: linear-gradient(180deg, #a81a30 0%, #6d0f1e 100%);
  border: 1px solid #c41e3a;
  color: #fff;
  padding: 10px;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 1px;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 4px 12px rgba(168, 26, 48, 0.4);
}
.btn-buy-full:hover {
  background: linear-gradient(180deg, #c41e3a 0%, #851325 100%);
  border-color: #e02646;
  color: #fff;
  box-shadow: 0 0 14px rgba(224, 38, 70, 0.55);
}

.btn-offer-full {
  background: transparent;
  border: 1px solid #394c32;
  color: var(--text-muted);
  padding: 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
}
.btn-offer-full:hover {
  border-color: var(--gold-main);
  color: var(--gold-bright);
  background: rgba(199, 167, 78, 0.08);
}

/* Seller card in tooltip */
.detail-seller-card {
  background: #0b1009;
  border: 1px solid #1e2b1a;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 0.78rem;
  margin-bottom: 10px;
}
.seller-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}
.seller-card-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text-muted);
}
.seller-time-sub {
  color: var(--text-dim);
  font-size: 0.7rem;
  margin-top: 3px;
}

.detail-extra-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.extra-action-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.72rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 3px;
  transition: 0.2s;
}
.extra-action-btn:hover {
  color: var(--gold-bright);
  background: rgba(255,255,255,0.03);
}

/* Similar Items Card */
.similar-items-card {
  background: var(--bg-card);
  border: 1px solid var(--border-main);
  border-radius: 4px;
  padding: 12px;
}
.similar-header {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--gold-main);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #23301e;
}
.similar-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.similar-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  background: #0b0f09;
  border: 1px solid #1e2b1a;
  border-radius: 3px;
  cursor: pointer;
  transition: 0.15s;
}
.similar-item-row:hover {
  background: #182414;
  border-color: var(--gold-dark);
}
.similar-thumb {
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.similar-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.similar-name {
  font-size: 0.75rem;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.similar-price {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-bright);
  white-space: nowrap;
}

/* ========================================================================= */
/* 8. COMPACT LISTING DETAIL PAGE STYLES (.compact-detail-container)          */
/* ========================================================================= */
.compact-detail-container {
  max-width: 980px;
  margin: 24px auto 60px;
  padding: 0 16px;
}

.detail-nav-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-main);
}
.nav-back-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: 0.2s;
}
.nav-back-link:hover { color: var(--gold-bright); }

.btn-share-compact {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-gold);
  color: var(--gold-bright);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: 0.2s;
  font-weight: 600;
}
.btn-share-compact:hover {
  background: rgba(199, 167, 78, 0.12);
  border-color: #ffd27d;
}

.compact-detail-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px) {
  .compact-detail-grid { grid-template-columns: 1fr; }
}

.detail-card-left {
  margin-bottom: 0;
}
.tooltip-badges {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
}
.detail-title-en {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: -2px;
  margin-bottom: 4px;
}

.rolls-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 12px;
}

/* Right Column Panels */
.detail-card-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compact-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-main);
  border-radius: 6px;
  padding: 16px 18px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

/* Price Panel */
.price-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.price-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.price-amount {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-bright);
}
.status-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.status-active { background: #132a15; color: #6ee7b7; border: 1px solid #10b981; }
.status-reserved { background: #2e2008; color: #fde047; border: 1px solid #eab308; }
.status-sold { background: #331010; color: #fca5a5; border: 1px solid #ef4444; }

/* Seller Panel */
.seller-panel .seller-card-title {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--gold-main);
  letter-spacing: 1px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #23301e;
}
.seller-compact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 0.82rem;
  border-bottom: 1px solid #192216;
}
.seller-compact-row:last-of-type { border-bottom: none; }
.seller-label { color: var(--text-dim); }
.seller-val { display: flex; align-items: center; gap: 6px; }
.seller-username-link { color: #fff; }
.seller-username-link:hover { color: var(--gold-bright); }
.val-battletag { color: #a1eb87; font-weight: 600; }
.val-discord { color: #a0b599; font-weight: 600; }
.btn-copy-mini {
  background: transparent;
  border: 1px solid #30402a;
  color: var(--text-dim);
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 3px;
  cursor: pointer;
}
.btn-copy-mini:hover { color: #fff; border-color: var(--gold-main); }
.btn-kramik-link, .btn-seller-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  background: #0b0f09;
  border: 1px solid #273622;
  color: var(--gold-main);
  padding: 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: 0.2s;
}
.btn-kramik-link:hover, .btn-seller-link:hover {
  background: #172014;
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}

/* Notes Panel */
.notes-header {
  font-size: 0.72rem;
  color: var(--gold-main);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.notes-text {
  font-size: 0.85rem;
  color: #ddd;
  line-height: 1.45;
}

/* Action / Offer Panel */
.action-header {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  color: var(--gold-bright);
  margin-bottom: 10px;
}
.compact-offer-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-row-compact { width: 100%; }
.input-market-compact {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-main);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.input-market-compact:focus {
  border-color: var(--gold-main);
}
.status-alert {
  text-align: center;
  padding: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Owner actions */
.owner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-owner {
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: 0.2s;
}
.btn-sold { background: #1a441e; border-color: #22c55e; color: #fff; }
.btn-sold:hover { background: #22c55e; }
.btn-reserve { background: #42300c; border-color: #eab308; color: #fff; }
.btn-reserve:hover { background: #eab308; color: #000; }
.btn-reactivate { background: #132a15; border-color: #10b981; color: #6ee7b7; }
.btn-delete { background: #381414; border-color: #ef4444; color: #fca5a5; }
.btn-delete:hover { background: #ef4444; color: #fff; }

/* Guest box */
.guest-box {
  text-align: center;
  padding: 8px 0;
}
.guest-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--gold-bright);
  margin-bottom: 4px;
}
.guest-sub {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 12px;
}
.guest-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* Share Panel */
.share-title {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.share-row {
  display: flex;
  gap: 8px;
}
.input-share-compact {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-main);
  color: var(--gold-bright);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  outline: none;
}
.btn-copy-link {
  background: var(--bg-panel);
  border: 1px solid var(--border-gold);
  color: var(--gold-bright);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s;
}
.btn-copy-link:hover {
  background: rgba(199, 167, 78, 0.15);
}

/* ========================================================================= */
/* 9. QUALITY COLORS & BADGES                                                */
/* ========================================================================= */
.q-unikalny, .q-unique { color: var(--d2-unique); }
.q-runiczne, .q-runeword { color: var(--d2-runeword); }
.q-zestaw, .q-set { color: var(--d2-set); }
.q-rzadki, .q-rare { color: var(--d2-rare); }
.q-magiczny, .q-magic { color: var(--d2-magic); }
.q-craft, .q-crafted { color: var(--d2-craft); }
.q-superior, .q-wyborny { color: var(--d2-normal); font-weight: 600; }
.q-normalny, .q-normal { color: var(--d2-normal); }

.badge-realm {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.5px;
}
.badge-sc { background: rgba(70, 180, 130,0.2); color: #a1eb87; border: 1px solid #74b45e; }
.badge-hc { background: rgba(220,20,60,0.25); color: #ff7575; border: 1px solid #dc143c; }
.badge-ladder { background: rgba(212,175,55,0.2); color: #ffd700; border: 1px solid #b8860b; }
.badge-non_ladder { background: rgba(128,128,128,0.2); color: #ccc; border: 1px solid #666; }
.badge-lod { background: rgba(50,150,100,0.2); color: #66e0a3; border: 1px solid #2e8b57; }
.badge-classic { background: rgba(160,82,45,0.25); color: #e6c8a0; border: 1px solid #8b4513; }
.badge-warlock {
  background: linear-gradient(135deg, rgba(106, 173, 13,0.35) 0%, rgba(48, 56, 20,0.6) 100%);
  color: #bfffa8;
  border: 1px solid #a4ff85;
  box-shadow: 0 0 6px rgba(179, 255, 102,0.25);
}

.roll-pill {
  font-size: 0.72rem;
  background: #0c100a;
  border: 1px solid #332a1e;
  color: #ffd27d;
  padding: 2px 8px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.roll-perf {
  border-color: #ffd27d;
  color: #fff;
  background: rgba(255,210,125,0.12);
  box-shadow: 0 0 5px rgba(255,210,125,0.25);
}

/* ========================================================================= */
/* 10. BUTTONS & TOASTS                                                      */
/* ========================================================================= */
.btn-red {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--red-accent);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  transition: 0.2s;
  text-transform: uppercase;
}
.btn-red:hover { background: var(--red-hover); color: #fff; }
.btn-red.btn-sm { padding: 4px 10px; font-size: 0.8rem; }

.nav-btn {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-main);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s;
}
.nav-btn:hover {
  border-color: var(--gold-main);
  background: rgba(199,167,78,0.08);
  color: #fff;
}
.nav-btn.btn-sm { padding: 4px 10px; font-size: 0.8rem; }

.btn-gold {
  background: linear-gradient(180deg, #4d3a1b 0%, #291e0e 100%);
  border: 1px solid var(--border-gold-bright);
  color: var(--gold-bright);
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.btn-gold:hover {
  border-color: #ffd27d;
  box-shadow: 0 0 12px rgba(255,210,125,0.3);
  color: #fff;
}

.market-toast {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: #141c11;
  border: 1px solid var(--gold-bright);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(0,0,0,0.8), 0 0 15px rgba(255,210,125,0.3);
  transition: bottom 0.3s cubic-bezier(0.16,1,0.3,1);
  z-index: 10000;
  pointer-events: none;
}
.market-toast.show { bottom: 30px; }

.flash-messages { margin: 16px 24px 0; }
.alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 0.88rem;
}
.alert-success { background: rgba(46,125,50,0.2); border: 1px solid #388e3c; color: #a5d6a7; }
.alert-danger { background: rgba(198,40,40,0.2); border: 1px solid #d32f2f; color: #ef9a9a; }
.alert-warning { background: rgba(239,108,0,0.2); border: 1px solid #f57c00; color: #ffe082; }
.alert-info { background: rgba(2, 189, 119,0.2); border: 1px solid #87d16d; color: #a1fa82; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border-main);
  border-radius: 6px;
}
.empty-state img { width: 52px; opacity: 0.35; margin-bottom: 14px; }
.empty-state h3 { color: var(--gold-bright); margin-bottom: 8px; font-size: 1.1rem; }
.empty-state p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 18px; }

/* ========================================================================= */
/* 11. FOOTER                                                                */
/* ========================================================================= */
.market-footer {
  background: #070a06;
  border-top: 1px solid var(--border-main);
  padding: 24px 24px;
  margin-top: auto;
}
.footer-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-left p {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-left small {
  font-size: 0.72rem;
  color: var(--text-dim);
}
.footer-links {
  display: flex;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--gold-bright); }
.footer-slogan {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 900;
  color: #b91c1c;
  letter-spacing: 3px;
  text-shadow: 0 0 10px rgba(185, 28, 28, 0.4);
}

/* ========================================================================= */
/* 12. RESPONSIVE                                                            */
/* ========================================================================= */
@media (max-width: 1260px) {
  .marketplace-layout {
    grid-template-columns: 220px 1fr;
  }
  .item-detail-panel { display: none; }
}

@media (max-width: 900px) {
  .marketplace-layout {
    grid-template-columns: 1fr;
  }
  .filters-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-main);
  }
  .market-header {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 14px;
  }
  .header-nav { display: none; }
  .header-search-input { width: 140px; }
  .class-tabs-bar { gap: 8px; overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; }
  .hero-tagline-content { justify-content: center; }
  .items-table thead { display: none; }
  .item-row { display: block; padding: 10px; margin-bottom: 8px; }
  .items-table td { display: block; padding: 4px 6px; border: none; }
  .item-cell-action { text-align: left; margin-top: 6px; }
}

/* ========================================================================= */
/* 13. CATALOG AUTOCOMPLETE & SEARCH (CREATE LISTING)                        */
/* ========================================================================= */
.catalog-search-container {
  background: linear-gradient(135deg, rgba(24, 28, 22, 0.95), rgba(13, 16, 13, 0.98));
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 24px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(184, 147, 71, 0.05);
}

.catalog-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.catalog-search-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-search-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.catalog-search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.catalog-search-icon {
  position: absolute;
  left: 14px;
  color: var(--gold-main);
  font-size: 1rem;
  pointer-events: none;
}

.catalog-search-input {
  width: 100%;
  padding: 12px 42px 12px 40px;
  background: #090d08;
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.catalog-search-input:focus {
  outline: none;
  border-color: var(--gold-bright);
  box-shadow: 0 0 10px rgba(255, 210, 125, 0.3);
  background: #0c120a;
}

.catalog-search-clear {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  display: none;
  transition: color 0.2s;
}

.catalog-search-clear:hover {
  color: var(--gold-bright);
}

.catalog-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: #0e140c;
  border: 1px solid var(--border-gold-bright);
  border-radius: 6px;
  max-height: 380px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9);
  display: none;
}

.catalog-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.15s ease;
}

.catalog-result-row:last-child {
  border-bottom: none;
}

.catalog-result-row:hover,
.catalog-result-row.selected {
  background: rgba(184, 147, 71, 0.15);
}

.catalog-result-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.catalog-result-thumb {
  width: 38px;
  height: 38px;
  background: #172014;
  border: 1px solid #30402a;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 3px;
}

.catalog-result-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.catalog-result-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.catalog-result-title {
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-result-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.catalog-result-shorthand {
  font-size: 0.72rem;
  color: var(--gold-main);
  background: rgba(199, 167, 78, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
  margin-top: 2px;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-result-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.catalog-result-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 600;
}

.catalog-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  align-items: center;
}

.catalog-chips-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-right: 4px;
}

.chip-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #30402a;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 3px 9px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.chip-btn:hover {
  background: rgba(184, 147, 71, 0.2);
  border-color: var(--gold-main);
  color: var(--gold-bright);
}

/* PREVIEW KARTY WYBRANEGO PRZEDMIOTU */
.catalog-selected-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(184, 147, 71, 0.08);
  border: 1px solid var(--gold-main);
  border-radius: 6px;
  padding: 12px 16px;
  margin-top: 12px;
}

.catalog-selected-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.catalog-selected-thumb {
  width: 48px;
  height: 48px;
  background: #11180f;
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.catalog-selected-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.catalog-selected-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
}

.catalog-selected-base {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.catalog-selected-btn-clear {
  background: transparent;
  border: 1px solid #4a2020;
  color: #ff7777;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.catalog-selected-btn-clear:hover {
  background: #5a2020;
  color: #fff;
}

/* ========================================================================= */
/* FORM STYLES (CREATE LISTING & FILTERS)                                   */
/* ========================================================================= */
.listing-create-container {
  max-width: 860px;
  margin: 30px auto;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 210, 125, 0.1);
  position: relative;
  z-index: 10;
}

.listing-create-header {
  border-bottom: 1px solid var(--border-main);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.listing-create-header h2 {
  font-family: var(--font-heading);
  color: var(--gold-bright);
  font-size: 1.6rem;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.listing-create-header p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.8fr;
  gap: 18px;
  margin-bottom: 20px;
}

.form-group-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-group-field label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.input-market, .select-market {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-main);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.input-market:focus, .select-market:focus {
  outline: none;
  border-color: var(--gold-main);
  box-shadow: 0 0 10px rgba(199, 167, 78, 0.3);
  background: #11180f;
}

.realm-selector-card {
  background: rgba(184, 134, 11, 0.06);
  border: 1px solid var(--border-gold);
  padding: 18px;
  border-radius: 6px;
  margin-bottom: 24px;
}

.realm-selector-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-bright);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.realm-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.form-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-main);
  padding-top: 20px;
  margin-top: 10px;
}

.btn-publish-listing {
  background: linear-gradient(180deg, #991b1b, #7f1d1d);
  border: 1px solid #b91c1c;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 12px 28px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.4);
}

.btn-publish-listing:hover {
  background: linear-gradient(180deg, #b91c1c, #991b1b);
  border-color: #ef4444;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}

/* ========================================================================= */
/* SELLER PROFILE BANNER & EXCEL TABLE (IDENTICAL TO WEB APP VIEW)           */
/* ========================================================================= */
.seller-profile-banner {
  background: linear-gradient(180deg, rgba(22, 34, 24, 0.9) 0%, rgba(13, 18, 14, 0.95) 100%);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 210, 125, 0.1);
}

.seller-profile-main {
  display: flex;
  align-items: center;
  gap: 20px;
}

.seller-profile-avatar {
  width: 68px;
  height: 68px;
  background: #0a0e08;
  border: 2px solid var(--border-gold-bright);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(255, 210, 125, 0.25);
  overflow: hidden;
  flex-shrink: 0;
}

.seller-avatar-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.seller-kicker {
  font-size: 0.75rem;
  color: var(--gold-main);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  font-family: var(--font-heading);
}

.seller-title {
  font-size: 1.8rem;
  color: var(--gold-bright);
  margin: 2px 0 6px;
  font-family: var(--font-heading);
}

.seller-tags {
  display: flex;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.seller-tag {
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.seller-profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* EXCEL TABLE WRAP & TABLE */
.excel-table-wrap {
  background: #121610;
  border: 1px solid #2e332c;
  border-radius: 6px;
  overflow-x: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  margin-bottom: 24px;
}

.excel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.excel-table th {
  background: #192016;
  color: var(--gold-main);
  font-family: var(--font-heading);
  padding: 12px 14px;
  border-bottom: 2px solid var(--border-gold);
  letter-spacing: 0.5px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.excel-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #202a1d;
  color: #dedede;
  vertical-align: middle;
}

.excel-table tr:hover td {
  background: #192216;
}

.excel-item-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.8));
}

.item-table-title {
  font-weight: 700;
  font-size: 0.95rem;
  display: block;
}

.excel-price-val {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--gold-bright);
  font-size: 0.95rem;
}

.excel-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border-main);
  border-radius: 8px;
}

/* BUTTONS D2 (IDENTICAL TO WEB APP) */
.btn-d2 {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.btn-d2.btn-gold, .btn-gold {
  background: linear-gradient(180deg, #3d2f16 0%, #241a0b 100%);
  border: 1px solid var(--border-gold, #6e5c32);
  color: var(--gold-bright);
}

.btn-d2.btn-gold:hover, .btn-gold:hover {
  border-color: var(--gold-main);
  box-shadow: 0 0 10px rgba(199, 179, 119, 0.3);
  color: #fff;
}

.btn-d2.btn-red, .btn-red {
  background: linear-gradient(180deg, #5c1818 0%, #300a0a 100%);
  border: 1px solid #8a2424;
  color: #ff9999;
}

.btn-d2.btn-red:hover, .btn-red:hover {
  border-color: #c43232;
  box-shadow: 0 0 10px rgba(200, 50, 50, 0.4);
  color: #fff;
}

.btn-icon-action {
  background: #131811;
  border: 1px solid var(--border-main);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon-action:hover {
  background: #212b1d;
  border-color: var(--border-gold);
  color: var(--gold-bright);
}

.badge-rating {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
  text-transform: uppercase;
  margin-left: 4px;
}
.rating-perf { background: #b8860b; color: #fff; }
.rating-super { background: #2e7d32; color: #fff; }
.rating-mid { background: #7cc064; color: #fff; }
.rating-low { background: #424242; color: #aaa; }

/* ========================================================================= */
/* 25. ITEMS TABLE & HOVER STATS TOOLTIP                                     */
/* ========================================================================= */
.items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.items-table th {
  background: #10130f;
  color: var(--gold-main);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border-gold);
  text-align: left;
}
.item-row {
  background: #0d100d;
  border-bottom: 1px solid var(--border-main);
  transition: all 0.2s ease;
  cursor: pointer;
}
.item-row:hover {
  background: #141812;
  box-shadow: inset 3px 0 0 var(--gold-bright), 0 2px 10px rgba(0,0,0,0.5);
}
.item-cell-name {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}
.item-row-icon {
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, #252e1f, #080a08);
  border: 1px solid #4a402d;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.item-row-icon img {
  max-width: 34px;
  max-height: 34px;
  object-fit: contain;
}
.item-title-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.item-row-title {
  font-family: Georgia, serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}
.item-row-base {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.item-cell-details {
  position: relative;
  padding: 10px 14px;
  font-size: 0.8rem;
  color: var(--d2-blue);
  line-height: 1.4;
}
.detail-stat-line.stat-white {
  color: #fff;
  font-weight: 600;
}
.more-stats {
  color: var(--gold-main);
  font-size: 0.72rem;
  margin-top: 3px;
}
.item-cell-seller {
  padding: 10px 14px;
  font-size: 0.82rem;
}
.item-cell-seller a {
  color: #eed69b;
  font-weight: 600;
}
.seller-time {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.item-cell-price {
  padding: 10px 14px;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold-bright);
}
.item-cell-action {
  padding: 10px 14px;
  text-align: right;
}
.btn-table-buy {
  display: inline-block;
  background: linear-gradient(180deg, #8b1526 0%, #520d17 100%);
  border: 1px solid #b91c1c;
  color: #fff;
  padding: 5px 12px;
  border-radius: 3px;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: 0.2s;
}
.btn-table-buy:hover {
  background: linear-gradient(180deg, #b91c1c 0%, #6d0f1e 100%);
  box-shadow: 0 0 10px rgba(185, 28, 28, 0.5);
  color: #fff;
}

/* FLOATING HOVER TOOLTIP SHOWING ALL STATS */
.stats-hover-tooltip {
  display: none;
  position: absolute;
  left: 20px;
  top: 90%;
  z-index: 999;
  min-width: 320px;
  max-width: 420px;
  background: #090c0a;
  border: 2px solid #786236;
  box-shadow: 0 12px 36px rgba(0,0,0,0.95), inset 0 0 20px rgba(0,0,0,0.8);
  padding: 12px 14px;
  border-radius: 3px;
  pointer-events: none;
  text-align: center;
}
.item-row:hover .stats-hover-tooltip {
  display: block;
  animation: fadeInTooltip 0.15s ease-out;
}
@keyframes fadeInTooltip {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.tooltip-header {
  border-bottom: 1px solid #3d3522;
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.tooltip-title {
  font-family: Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.tooltip-base {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.tooltip-stats {
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
}
.tooltip-stats .stat-white {
  color: #ffffff;
  font-weight: 600;
}
.tooltip-stats .stat-magic {
  color: #a6ef8d;
}
.tooltip-hint {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #2d2618;
  font-size: 0.7rem;
  color: var(--gold-main);
  letter-spacing: 0.5px;
}

/* ========================================================================= */
/* 26. NOTIFICATIONS & HEADER BELL DROPDOWN                                   */
/* ========================================================================= */
.header-bell-wrap {
  position: relative;
}
.header-bell-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: color 0.2s;
}
.header-bell-btn:hover {
  color: var(--gold-bright);
}
.bell-badge-count {
  position: absolute;
  top: 0px;
  right: -2px;
  background: #a81a30;
  border: 1px solid #ff5555;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 8px;
  min-width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(255, 85, 85, 0.6);
}
.notif-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #0f130f;
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.05);
  z-index: 1100;
}
.notif-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-main);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--gold-main);
}
.btn-clear-notif {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.72rem;
  cursor: pointer;
}
.btn-clear-notif:hover {
  color: var(--gold-bright);
}
.notif-dropdown-list {
  max-height: 300px;
  overflow-y: auto;
}
.notif-loading, .notif-empty-item {
  padding: 16px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.notif-item {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.15s;
}
.notif-item:hover {
  background: rgba(255,255,255,0.04);
}
.notif-item.unread {
  background: rgba(199, 167, 78, 0.08);
  border-left: 3px solid var(--gold-bright);
}
.notif-item-title {
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
  margin-bottom: 2px;
}
.notif-item-msg {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.3;
}
.notif-item-time {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 4px;
}
.notif-dropdown-footer {
  padding: 8px 14px;
  border-top: 1px solid var(--border-main);
  text-align: center;
  font-size: 0.78rem;
}
.notif-dropdown-footer a {
  color: var(--gold-main);
}

/* ========================================================================= */
/* 27. CHAT & DIRECT MESSAGING SYSTEM                                        */
/* ========================================================================= */
.nav-tab-chat {
  position: relative;
}
.nav-chat-badge {
  background: #a81a30;
  border: 1px solid #ff5555;
  color: #fff;
  font-size: 0.62rem;
  padding: 0 4px;
  border-radius: 8px;
  margin-left: 4px;
  vertical-align: middle;
}
.chat-container {
  display: grid;
  grid-template-columns: 290px 1fr;
  height: calc(100vh - 160px);
  min-height: 520px;
  background: #0c100d;
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.8);
  overflow: hidden;
  margin: 16px 0;
}
.chat-sidebar {
  background: #090c0a;
  border-right: 1px solid var(--border-main);
  display: flex;
  flex-direction: column;
}
.chat-sidebar-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-sidebar-header h2 {
  font-size: 1rem;
  margin: 0;
}
.chat-conv-count {
  background: #181d15;
  border: 1px solid #3f4736;
  color: var(--gold-main);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 10px;
}
.chat-conversations-list {
  flex: 1;
  overflow-y: auto;
}
.chat-conv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  text-decoration: none;
  transition: background 0.15s;
}
.chat-conv-item:hover {
  background: #121711;
}
.chat-conv-item.active {
  background: #192117;
  border-left: 3px solid var(--gold-bright);
}
.conv-avatar, .partner-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #44351a 0%, #1a150b 100%);
  border: 1px solid #786236;
  color: var(--gold-bright);
  font-family: var(--font-heading);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.conv-info {
  flex: 1;
  min-width: 0;
}
.conv-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}
.conv-username {
  font-weight: 700;
  color: #fff;
  font-size: 0.85rem;
}
.conv-time {
  font-size: 0.68rem;
  color: var(--text-dim);
}
.conv-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.conv-last-msg {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.you-prefix {
  color: var(--gold-dark);
}
.conv-badge {
  background: #a81a30;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
}
.chat-main {
  display: flex;
  flex-direction: column;
  background: #0f130f;
  position: relative;
}
.chat-header {
  padding: 12px 18px;
  background: #090c0a;
  border-bottom: 1px solid var(--border-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-partner-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.partner-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.partner-name-row h3 {
  font-size: 1.1rem;
  margin: 0;
}
.partner-shop-link {
  font-size: 0.75rem;
  color: var(--gold-main);
}
.partner-tags {
  display: flex;
  gap: 8px;
  margin-top: 3px;
}
.tag-pill {
  font-size: 0.68rem;
  background: #141a12;
  border: 1px solid #333d2b;
  padding: 1px 6px;
  border-radius: 3px;
  color: #b0b5a6;
}
.chat-item-context-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: linear-gradient(90deg, #182015 0%, #0d120d 100%);
  border-bottom: 1px solid var(--border-gold);
}
.context-thumb img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.context-details {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
}
.context-label {
  color: var(--text-dim);
}
.context-title {
  font-weight: 700;
}
.context-price {
  color: var(--gold-bright);
  font-weight: 700;
}
.chat-messages-area {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-bubble-wrap {
  display: flex;
  width: 100%;
}
.bubble-mine {
  justify-content: flex-end;
}
.bubble-theirs {
  justify-content: flex-start;
}
.chat-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.86rem;
  line-height: 1.45;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.bubble-mine .chat-bubble {
  background: linear-gradient(135deg, #2a2517 0%, #1a180e 100%);
  border: 1px solid #6b5530;
  color: #fff;
  border-bottom-right-radius: 1px;
}
.bubble-theirs .chat-bubble {
  background: #141a13;
  border: 1px solid #2f3a2b;
  color: #e0ded2;
  border-bottom-left-radius: 1px;
}
.bubble-listing-ref {
  font-size: 0.72rem;
  color: var(--gold-main);
  border-bottom: 1px dashed rgba(255,255,255,0.1);
  padding-bottom: 4px;
  margin-bottom: 6px;
}
.bubble-meta {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.65rem;
  color: var(--text-dim);
}
.chat-input-bar {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: #090c0a;
  border-top: 1px solid var(--border-main);
}
.chat-input-bar textarea {
  flex: 1;
  background: #121611;
  border: 1px solid #353f2e;
  border-radius: 4px;
  color: #fff;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.85rem;
  resize: none;
  outline: none;
}
.chat-input-bar textarea:focus {
  border-color: var(--gold-main);
}
.btn-chat-send {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #69512c 0%, #392d1b 100%);
  border: 1px solid #987442;
  color: #f1dbb0;
  padding: 0 16px;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-chat-send:hover {
  background: linear-gradient(180deg, #7b6036 0%, #4a3820 100%);
  color: #fff;
  box-shadow: 0 0 12px rgba(185, 145, 53, 0.4);
}
.btn-chat-direct {
  display: block;
  width: 100%;
  text-align: center;
  background: linear-gradient(180deg, #2a2517 0%, #18160e 100%);
  border: 1px solid #786236;
  color: #f0d59b;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 8px;
  text-decoration: none;
  transition: 0.2s;
}
.btn-chat-direct:hover {
  border-color: var(--gold-bright);
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 210, 125, 0.3);
}
.chat-empty-state, .chat-no-messages {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.chat-empty-state .empty-icon {
  margin-bottom: 12px;
  color: var(--text-dim);
}

/* ========================================================================= */
/* 28. NOTIFICATIONS PAGE                                                    */
/* ========================================================================= */
.notifications-page-container {
  max-width: 800px;
  margin: 24px auto;
  background: #0d110d;
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  padding: 24px;
}
.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-main);
  margin-bottom: 20px;
}
.notif-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.notif-badge {
  background: #a81a30;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}
.btn-mark-all-read {
  background: #141a12;
  border: 1px solid #3f4a35;
  color: var(--gold-main);
  padding: 6px 12px;
  border-radius: 3px;
  font-size: 0.78rem;
  cursor: pointer;
}
.btn-mark-all-read:hover {
  border-color: var(--gold-bright);
  color: #fff;
}
.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.notification-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: #10140f;
  border: 1px solid var(--border-main);
  border-radius: 4px;
}
.notification-card.unread {
  background: #161c14;
  border-color: #5d5032;
  box-shadow: inset 3px 0 0 var(--gold-bright);
}
.notif-icon {
  color: var(--gold-main);
  flex-shrink: 0;
  padding-top: 2px;
}
.notif-content {
  flex: 1;
}
.notif-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.notif-top h4 {
  font-size: 0.92rem;
  color: #fff;
  margin: 0;
}
.notif-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 6px;
}
.btn-notif-link {
  font-size: 0.75rem;
  color: var(--gold-bright);
}
.notifications-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-dim);
}

/* ========================================================================= */
/* 22. LANGUAGE SWITCHER, BADGES & NOTIFICATIONS                             */
/* ========================================================================= */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(18, 21, 17, 0.85);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  padding: 3px 8px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.lang-btn {
  color: var(--text-muted);
  padding: 2px 5px;
  border-radius: 3px;
  transition: all 0.2s ease;
  text-decoration: none;
}
.lang-btn:hover {
  color: var(--gold-bright);
}
.lang-btn.active {
  color: var(--gold-bright);
  background: rgba(198, 163, 102, 0.2);
  box-shadow: 0 0 6px rgba(198, 163, 102, 0.35);
}
.lang-sep {
  color: var(--border-gold);
  font-size: 0.72rem;
  user-select: none;
}

.nav-tab-offers, .nav-tab-chat {
  position: relative;
}
.nav-offers-badge, .nav-chat-badge, .bell-badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  margin-left: 6px;
  background: linear-gradient(180deg, #c41e3a 0%, #851325 100%);
  color: #fff;
  border: 1px solid #ff4d6d;
  box-shadow: 0 0 8px rgba(196, 30, 58, 0.6);
  vertical-align: middle;
}
.bell-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  margin-left: 0;
  font-size: 0.65rem;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
}

.header-bell-wrap {
  position: relative;
}
.header-bell-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-main);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
  position: relative;
}
.header-bell-btn:hover {
  color: var(--gold-bright);
  border-color: var(--border-gold);
  background: rgba(198, 163, 102, 0.1);
}

.notif-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: var(--bg-panel);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.85);
  z-index: 2000;
  overflow: hidden;
}
.notif-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-panel-dark);
  border-bottom: 1px solid var(--border-main);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--gold-bright);
}
.btn-clear-notif {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: color 0.2s;
}
.btn-clear-notif:hover {
  color: var(--gold-main);
}
.notif-dropdown-list {
  max-height: 280px;
  overflow-y: auto;
}
.notif-loading {
  padding: 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.notif-dropdown-footer {
  padding: 8px 14px;
  background: var(--bg-panel-dark);
  border-top: 1px solid var(--border-main);
  text-align: center;
  font-size: 0.8rem;
}
.notif-dropdown-footer a {
  color: var(--gold-main);
}
.notif-dropdown-footer a:hover {
  color: var(--gold-bright);
}

/* ========================================================================= */
/* 23. TRADES SUBNAV & OFFER PANELS                                          */
/* ========================================================================= */
.trades-subnav-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--border-gold);
  padding-bottom: 12px;
  flex-wrap: wrap;
}
.trades-subnav-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border-main);
  border-radius: 4px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.2s;
  text-decoration: none;
}
.trades-subnav-btn:hover {
  color: var(--gold-bright);
  border-color: var(--border-gold);
  background: rgba(198, 163, 102, 0.08);
}
.trades-subnav-btn.active {
  color: #fff;
  background: linear-gradient(180deg, #8b1526 0%, #520d17 100%);
  border-color: #b91c1c;
  box-shadow: 0 0 10px rgba(185, 28, 28, 0.35);
}
.trades-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}
.trades-count-pill.count-alert {
  background: #c41e3a;
  color: #fff;
  border-color: #ff4d6d;
  box-shadow: 0 0 6px rgba(196, 30, 58, 0.6);
}

/* Chat direct buttons & Seller links */
.seller-chat-actions {
  margin: 12px 0;
}
.btn-chat-direct {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 9px 14px;
  background: linear-gradient(180deg, #28241b 0%, #15140d 100%);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  color: var(--gold-bright);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.btn-chat-direct:hover {
  background: linear-gradient(180deg, #3d3422 0%, #242014 100%);
  border-color: var(--gold-main);
  color: #fff;
  box-shadow: 0 0 10px rgba(198, 163, 102, 0.3);
}
.btn-chat-direct.btn-sm {
  width: auto;
  padding: 4px 10px;
  font-size: 0.75rem;
}
.link-chat-alt {
  display: inline-flex;
  align-items: center;
  color: var(--gold-main);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 0.2s;
}
.link-chat-alt:hover {
  color: var(--gold-bright);
  text-decoration: underline;
}
.btn-seller-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.btn-seller-link:hover {
  color: var(--gold-bright);
}

/* Offers Panel inside Listing Detail */
.offers-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}
.listing-offers-grid {
  display: grid;
  gap: 10px;
}
.listing-offer-card {
  background: var(--bg-panel-dark);
  border: 1px solid var(--border-main);
  border-radius: 6px;
  padding: 12px 14px;
  transition: border-color 0.2s;
}
.listing-offer-card:hover {
  border-color: var(--border-gold);
}
.offer-top-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.offer-buyer-name {
  font-weight: 700;
  color: var(--gold-bright);
  font-size: 0.9rem;
}
.badge-status {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-pending {
  background: rgba(198, 163, 102, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--gold-bright);
}
.badge-accepted {
  background: rgba(46, 125, 50, 0.2);
  border: 1px solid #2e7d32;
  color: #81c784;
}
.badge-rejected {
  background: rgba(198, 40, 40, 0.2);
  border: 1px solid #c62828;
  color: #e57373;
}
.offer-val-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.label-dim {
  color: var(--text-dim);
  font-size: 0.8rem;
}
.offer-gold-price {
  color: var(--gold-bright);
  font-size: 0.95rem;
}
.offer-msg-quote {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 10px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.25);
  border-left: 2px solid var(--border-gold);
  border-radius: 2px;
}
.offer-foot-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.empty-offers-hint {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
  padding: 16px;
  font-style: italic;
}
.recovery-panel { max-width: 460px; margin: 40px auto; padding: 30px; background: var(--bg-panel); border: 1px solid var(--border-main); border-radius: 8px; }
.recovery-panel p { margin: 16px 0; color: var(--text-muted); }
.recovery-panel label { display: block; margin: 16px 0 6px; }
.recovery-panel button { width: 100%; justify-content: center; margin: 22px 0; }
.live-status { font-size: 12px; color: var(--text-muted); padding: 4px 12px; }

/* Clear, responsive account and trading surfaces. */
.ui-card { background:linear-gradient(145deg,#161d14,#0e140f); border:1px solid #34422f; border-radius:14px; padding:26px; min-width:0; }
.ui-card h2 { font-size:1.25rem; margin-bottom:12px; }
.ui-muted { color:#a0ac99; font-size:.9rem; margin:10px 0; }
.ui-eyebrow { display:block; color:#9caf8a; font-size:.7rem; font-weight:700; letter-spacing:.15em; margin-bottom:8px; }
.ui-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.ui-actions .input-market { flex:1; min-width:140px; width:auto; }
.ui-form { display:grid; gap:10px; margin-top:18px; }
.ui-form label { color:#d2dacb; font-weight:600; margin-top:5px; }
.ui-form input[type=file] { max-width:100%; padding:12px; border:1px dashed #556649; border-radius:8px; }
.ui-form small { display:block; }
.ui-form textarea { resize:vertical; }
.ui-form-columns { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.ui-form-columns label { display:block; margin-bottom:8px; }
.ui-form .nav-btn { justify-content:center; min-height:42px; }
.ui-check { display:flex; gap:8px; }
.profile-layout { max-width:1100px; margin:32px auto; display:grid; grid-template-columns:300px minmax(0,1fr); gap:24px; align-items:start; }
.profile-summary { text-align:center; display:grid; justify-items:center; gap:14px; }
.profile-summary h1 { font-size:1.6rem; overflow-wrap:anywhere; }
.profile-summary .nav-btn { width:100%; justify-content:center; }
.profile-sections { display:grid; gap:24px; min-width:0; }
.profile-avatar { width:112px; height:112px; border-radius:24px; background:#24361e; border:2px solid #72885b; display:flex; align-items:center; justify-content:center; font-size:40px; color:#dcdfb6; overflow:hidden; flex-shrink:0; }
.profile-avatar img,.user-avatar img { width:100%; height:100%; object-fit:cover; }
.user-avatar { overflow:hidden; }
.profile-avatar.small { width:54px; height:54px; border-radius:14px; font-size:24px; }
.profile-bio { white-space:pre-wrap; overflow-wrap:anywhere; margin:16px 0; line-height:1.7; }
.profile-score { color:#cedf91; display:block; margin:12px 0; }
.profile-score small { font-size:.8rem; color:#9caa91; }
.review-card { padding:22px 0; border-top:1px solid #34422f; margin-top:16px; }
.review-card time { color:#a0ac99; font-size:.8rem; margin-left:auto; }
.ui-empty { padding:32px 12px; color:#9cac91; text-align:center; }
.trade-progress { display:flex; gap:20px; margin:18px 0; color:#a0ac99; }
.confirmed { color:#b0d38e; }
.review-form summary,.listing-manage summary { cursor:pointer; color:#d1dba1; margin-top:20px; padding:12px 0; }
.market-dialog { margin:auto; padding:30px; max-width:min(480px,calc(100vw - 32px)); border:1px solid #72885b; border-radius:16px; background:#141d13; color:#e1e7da; }
.market-dialog::backdrop { background:#030803bb; backdrop-filter:blur(4px); }
.market-dialog p { margin:16px 0 24px; }
.market-header { flex-wrap:wrap; }
.header-nav { order:3; flex-basis:100%; display:flex!important; flex-wrap:wrap; justify-content:center; gap:4px; border-top:1px solid #34422f; padding-top:8px; }
.header-nav .nav-tab { white-space:nowrap; }
.header-right { flex-wrap:wrap; }
button.nav-tab-sm { background:transparent; cursor:pointer; border:1px solid #46573a; border-radius:6px; padding:7px; font:inherit; color:#b6c4aa; }
.listing-page { max-width:1160px; margin:24px auto; }
.listing-breadcrumb { font-size:.85rem; color:#89967f; }
.listing-breadcrumb button { margin-left:auto; }
.listing-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:28px 0; }
.listing-heading h1 { font-size:clamp(1.5rem,3vw,2.25rem); }
.listing-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(300px,1fr); gap:24px; align-items:start; }
.listing-side { display:grid; gap:20px; }
.listing-price { font-size:2rem; font-weight:700; color:#dfd29e; margin:10px 0 18px; overflow-wrap:anywhere; }
.listing-purchase { border-color:#6b784d; }
.seller-identity { display:flex; gap:14px; align-items:center; }
.seller-identity strong { display:block; font-size:1.15rem; }
.listing-item .preview-sprite { width:160px; height:170px; }
.listing-item .item-preview-content h3 { font-size:1.5rem; }
.listing-item .preview-price { display:none; }
.item-preview-content { text-align:center; overflow-wrap:anywhere; }
.preview-sprite { width:84px; height:90px; object-fit:contain; margin:18px auto; filter:drop-shadow(0 5px 12px #000); }
.item-facts { display:flex; justify-content:center; gap:12px; margin:20px 0; flex-wrap:wrap; }
.item-facts div { background:#1d281a; padding:10px 20px; border-radius:8px; }
.item-facts dt { color:#a0ac99; font-size:.75rem; }
.item-facts dd { font-weight:700; color:#e1e7da; }
.listing-notes { border-top:1px solid #34422f; margin-top:24px; padding-top:24px; }
.listing-offers { margin-top:24px; }
.item-hover-wrap { display:inline-block; }
.item-hover-trigger { font-weight:700; border-bottom:1px dashed #718653; }
.item-hover-card { display:none; position:fixed; z-index:1500; width:min(360px,calc(100vw - 16px)); max-height:calc(100vh - 16px); overflow:auto; padding:22px; border:1px solid #718653; border-radius:12px; background:#0e170e; box-shadow:0 15px 50px #000c; }
.item-hover-wrap:hover .item-hover-card,.item-hover-wrap:focus-within .item-hover-card { display:block; }
.preview-price { border-top:1px solid #34422f; margin-top:16px; padding-top:12px; color:#ded19a; font-weight:700; }
:focus-visible { outline:2px solid #a9c87d; outline-offset:4px; }
@media(max-width:760px) {
  .profile-layout,.listing-layout,.ui-form-columns { grid-template-columns:1fr; }
  .profile-layout { margin:16px auto; }
  .ui-card { padding:20px; }
  .listing-heading { align-items:flex-start; }
  .market-header { padding:10px 12px; position:relative; }
  .header-left,.header-right { width:100%; justify-content:center; }
  .header-nav { justify-content:flex-start; }
  .header-nav .nav-tab { flex:1 0 auto; text-align:center; font-size:.8rem; }
  .listing-side { grid-row:1; }
}
@media(prefers-reduced-motion:reduce) { * { scroll-behavior:auto!important; } }
