:root {
  --black: #111111;
  --cream: #f5efe6;
  --orange: #c56a2d;
  --card: #fffdf9;
  --line: #e6ddd1;
  --muted: #6e675f;
}

* { box-sizing: border-box; }
html, body {
  padding: 0;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #fffdf9 0%, var(--cream) 100%);
  color: var(--black);
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}
.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(255,253,249,0.8);
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px; background: var(--black); color: var(--orange);
  display: grid; place-items: center; font-size: 18px; font-weight: 700;
}
.brand-title { font-weight: 800; letter-spacing: 0.08em; }
.brand-subtitle { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.sidebar-nav { display: grid; gap: 8px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px;
  color: var(--muted);
}
.sidebar-link:hover { background: rgba(197,106,45,0.08); color: var(--black); }
.content-area { padding: 28px; }
.page-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.page-header h1 { margin: 0 0 8px; font-size: 34px; }
.page-header p { margin: 0; color: var(--muted); max-width: 760px; }
.header-actions { display: flex; gap: 12px; }
.primary-button, .ghost-button, .chip {
  border-radius: 14px; padding: 12px 16px; border: 1px solid transparent;
}
.primary-button { background: var(--orange); color: white; }
.ghost-button, .chip { background: white; border-color: var(--line); }
.block { width: 100%; }
.panel {
  background: rgba(255,253,249,0.96);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 14px 34px rgba(17,17,17,0.06);
}
.panel h2 { margin: 0 0 14px; font-size: 22px; }
.panel-title-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 16px;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: rgba(255,253,249,0.96); border: 1px solid var(--line); border-radius: 22px; padding: 18px;
}
.stat-card span { display: block; color: var(--muted); margin-bottom: 8px; }
.stat-card strong { font-size: 32px; }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-bottom: 24px; }
.stack-col, .stack-gap { display: grid; gap: 18px; }
.simple-list { display: grid; gap: 14px; }
.list-row {
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: 0; padding-bottom: 0; }
.list-row p, .list-row small { margin: 4px 0 0; color: var(--muted); }
.row-meta { display: grid; gap: 6px; text-align: right; color: var(--muted); }
.row-meta b { color: var(--orange); }
.listing-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px;
}
.listing-grid-page { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.listing-card {
  background: white; border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
}
.listing-image-wrap { position: relative; aspect-ratio: 1 / 1; }
.listing-image { object-fit: cover; }
.heart-button {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 999px; border: 0;
  background: rgba(255,255,255,0.94); display: grid; place-items: center;
}
.listing-meta { padding: 14px; }
.listing-price { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.listing-title { font-weight: 700; margin-bottom: 4px; }
.listing-sub { color: var(--muted); font-size: 14px; }
.filters-panel { display: grid; gap: 14px; margin-bottom: 18px; }
.text-input, .text-area {
  width: 100%; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
}
.text-area { min-height: 120px; resize: vertical; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-row.left { justify-content: flex-start; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.two-col-form { display: grid; grid-template-columns: 1.3fr .9fr; gap: 18px; }
.check-list { margin: 0; padding-left: 18px; display: grid; gap: 10px; color: var(--muted); }
.chat-layout { display: grid; grid-template-columns: 340px 1fr; gap: 18px; }
.chat-thread-row { align-items: center; }
.chat-window { display: grid; gap: 14px; align-content: start; }
.chat-bubble {
  max-width: 72%; padding: 12px 14px; border-radius: 16px; background: white; border: 1px solid var(--line);
}
.chat-bubble.buyer { margin-left: auto; background: rgba(197,106,45,0.12); }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px; }
.auth-card {
  width: min(520px, 100%); background: rgba(255,253,249,0.98); border: 1px solid var(--line); border-radius: 28px;
  padding: 28px; display: grid; gap: 14px; box-shadow: 0 14px 34px rgba(17,17,17,0.06);
}
.auth-card.wider { width: min(700px, 100%); }
.auth-brand { color: var(--black); font-weight: 800; letter-spacing: 0.1em; }
.auth-card h1 { margin: 0; }
.auth-card p { margin: 0; color: var(--muted); }
.auth-link a { color: var(--orange); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.item-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; }
.item-image-panel {
  position: relative; min-height: 520px; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: white;
}
.price-xl { font-size: 40px; font-weight: 900; }
.meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.meta-grid div { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.meta-grid span { display: block; color: var(--muted); margin-bottom: 6px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 1100px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .stats-grid, .three-col, .two-col, .two-col-form, .item-layout, .chat-layout, .listing-grid-page { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .content-area { padding: 18px; }
  .page-header { flex-direction: column; }
  .listing-grid, .form-grid { grid-template-columns: 1fr; }
}
