:root {
  --bg: #f5eee8;
  --paper: #fffaf6;
  --text: #2f2420;
  --muted: #78675f;
  --accent: #814c40;
  --line: #dfd0c6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.login-card {
  width: min(100%, 420px);
  padding: 32px 26px;
  background: var(--paper);
  border-radius: 28px;
  box-shadow: 0 22px 60px rgba(50,30,20,.1);
}

.brand {
  font-family: Georgia, serif;
  letter-spacing: .16em;
  font-size: 1.35rem;
}

.eyebrow {
  margin-top: 5px;
  color: var(--accent);
  font-size: .72rem;
  letter-spacing: .17em;
  font-weight: 700;
}

h1,
h2 {
  font-family: Georgia, serif;
  font-weight: 400;
}

h1 {
  font-size: 2.5rem;
  margin: 22px 0 8px;
}

.login-card p {
  color: var(--muted);
}

label {
  display: block;
  margin-top: 18px;
  font-weight: 650;
}

input {
  width: 100%;
  min-height: 52px;
  margin-top: 7px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  font-size: 16px;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.login-card form > button {
  width: 100%;
  margin-top: 24px;
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.error {
  margin-top: 18px;
  padding: 12px;
  background: #fbe8e4;
  border-radius: 12px;
}

.topbar {
  min-height: 70px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(245,238,232,.95);
  border-bottom: 1px solid var(--line);
}

.topbar strong {
  display: block;
  font-family: Georgia, serif;
  letter-spacing: .12em;
}

.topbar span {
  color: var(--accent);
  font-size: .65rem;
  letter-spacing: .15em;
}

.logout {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--line);
}

.dashboard {
  max-width: 720px;
  margin: auto;
  padding: 30px 16px 70px;
}

.dashboard h1 {
  font-size: 2.7rem;
}

.new-item {
  width: 100%;
  min-height: 58px;
  margin: 12px 0 24px;
  background: var(--accent);
  color: white;
  font-size: 1.05rem;
  font-weight: 750;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.stats div {
  padding: 18px 10px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.stats strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 1.7rem;
}

.stats span {
  color: var(--muted);
  font-size: .8rem;
}

.empty {
  margin-top: 22px;
  padding: 28px 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.empty p {
  color: var(--muted);
}

.new-item-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-form textarea {
  width: 100%;
  min-height: 110px;
  margin-top: 7px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  font: inherit;
  resize: vertical;
}

.price-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-field span {
  font-size: 1.2rem;
}

.price-field input {
  flex: 1;
}

.items {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.item-card {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
}

.item-image-wrap {
  position: relative;
  background: #eadfd8;
}

.item-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.sold-banner,
.hidden-banner {
  position: absolute;
  top: 18px;
  left: -38px;
  width: 170px;
  padding: 8px 0;
  transform: rotate(-35deg);
  text-align: center;
  font-weight: 800;
  letter-spacing: .08em;
  color: white;
}

.sold-banner {
  background: #814c40;
}

.hidden-banner {
  background: #555;
}

.item-body {
  padding: 18px;
}

.item-body h2 {
  margin: 0 0 8px;
  font-size: 1.7rem;
}

.item-body p {
  color: var(--muted);
}

.price {
  margin: 14px 0;
  font-size: 1.25rem;
}

.old-price {
  margin-right: 10px;
  color: var(--muted);
  text-decoration: line-through;
}

.item-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.item-actions form {
  margin: 0;
}

.action {
  width: 100%;
  min-height: 46px;
  background: white;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
}

.action.sold {
  background: var(--accent);
  color: white;
}

.action.delete {
  color: #9b302b;
  border-color: #e4b7b4;
}

@media (max-width: 520px) {
  .item-actions {
    grid-template-columns: 1fr;
  }
}

/* ===== Showroom image presentation v2 ===== */

.item-image-wrap {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eee4dc;
  overflow: hidden;
}

.item-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.edit-preview {
  margin-bottom: 18px;
  padding: 12px;
  background: #eee4dc;
  border-radius: 18px;
}

.edit-preview img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 12px;
}

.edit-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}
