:root {
  --bd-bg: #f7f2ea;
  --bd-panel: #fffdf8;
  --bd-text: #27211c;
  --bd-muted: #6f655c;
  --bd-line: #e6d9c9;
  --bd-accent: #b27657;
  --bd-accent-dark: #7f4931;
  --bd-good: #2f7658;
  --bd-danger: #a64242;
  --bd-shadow: 0 14px 34px rgba(39, 33, 28, 0.1);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bd-bg);
  color: var(--bd-text);
  line-height: 1.5;
}

a {
  color: inherit;
}

.bd-shell {
  min-height: 100vh;
}

.bd-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem clamp(1rem, 3vw, 2rem);
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid var(--bd-line);
  backdrop-filter: blur(12px);
}

.bd-brand {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
  text-decoration: none;
}

.bd-brand strong {
  font-size: 0.96rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bd-brand span {
  color: var(--bd-muted);
  font-size: 0.82rem;
}

.bd-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bd-nav a,
.bd-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--bd-line);
  border-radius: 8px;
  background: var(--bd-panel);
  color: var(--bd-text);
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  cursor: pointer;
}

.bd-nav a[aria-current="page"],
.bd-button.primary {
  border-color: var(--bd-accent);
  background: var(--bd-accent);
  color: #fff;
}

.bd-button.danger {
  border-color: rgba(166, 66, 66, 0.28);
  color: var(--bd-danger);
}

.bd-main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.3rem, 3vw, 2.4rem) 0 3rem;
}

.bd-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.bd-page-head h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.02;
}

.bd-page-head p {
  max-width: 62ch;
  margin: 0.4rem 0 0;
  color: var(--bd-muted);
}

.bd-auth {
  min-width: min(100%, 330px);
  padding: 0.75rem;
  border: 1px solid var(--bd-line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.76);
}

.bd-auth strong {
  display: block;
}

.bd-auth span {
  display: block;
  color: var(--bd-muted);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.bd-panel {
  border: 1px solid var(--bd-line);
  border-radius: 8px;
  background: var(--bd-panel);
  box-shadow: var(--bd-shadow);
}

.bd-toolbar {
  display: grid;
  grid-template-columns: 1.8fr repeat(4, minmax(120px, 1fr)) auto;
  gap: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.bd-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.bd-field label {
  color: var(--bd-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bd-field input,
.bd-field select,
.bd-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--bd-line);
  border-radius: 8px;
  background: #fff;
  color: var(--bd-text);
  font: inherit;
}

.bd-field textarea {
  min-height: 110px;
  resize: vertical;
}

.bd-field input:focus,
.bd-field select:focus,
.bd-field textarea:focus {
  outline: 3px solid rgba(178, 118, 87, 0.18);
  border-color: var(--bd-accent);
}

.bd-stack {
  display: grid;
  gap: 1rem;
}

.bd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.bd-card {
  overflow: hidden;
  border: 1px solid var(--bd-line);
  border-radius: 8px;
  background: var(--bd-panel);
  box-shadow: 0 8px 22px rgba(39, 33, 28, 0.08);
}

.bd-card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #e7d6c2, #9ea98d);
}

.bd-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bd-card-body {
  padding: 0.9rem;
}

.bd-card h2,
.bd-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.bd-price {
  margin: 0.1rem 0 0.45rem;
  font-size: 1.25rem;
  font-weight: 850;
}

.bd-muted {
  color: var(--bd-muted);
}

.bd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.65rem 0;
}

.bd-pill {
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  background: #f1e7d8;
  color: #5d4d3d;
  font-size: 0.8rem;
  font-weight: 750;
}

.bd-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.bd-status {
  min-height: 1.4rem;
  color: var(--bd-muted);
}

.bd-status[data-tone="good"] {
  color: var(--bd-good);
}

.bd-status[data-tone="bad"] {
  color: var(--bd-danger);
}

.bd-empty {
  padding: 1.4rem;
  color: var(--bd-muted);
}

.bd-form {
  max-width: 560px;
  padding: 1rem;
}

.bd-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin-top: 1rem;
}

.bd-footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--bd-line);
  color: var(--bd-muted);
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .bd-topbar,
  .bd-page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .bd-nav {
    justify-content: flex-start;
  }

  .bd-toolbar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .bd-main,
  .bd-footer {
    width: min(100% - 1rem, 1180px);
  }

  .bd-toolbar,
  .bd-grid {
    grid-template-columns: 1fr;
  }

  .bd-nav a,
  .bd-button {
    flex: 1 1 auto;
  }
}
