:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #626a73;
  --line: #d9dee3;
  --paper: #ffffff;
  --wash: #f5f7f8;
  --green: #0f766e;
  --amber: #9a5b00;
  --red: #a13030;
  --blue: #244c7f;
  --shadow: 0 16px 40px rgba(22, 30, 38, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: clamp(1rem, 2vw, 1.3rem);
}

.brand small {
  color: var(--muted);
  font-size: 0.86rem;
}

.logo-mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border: 2px solid var(--ink);
  background: #f2c94c;
  color: #1b1b1b;
  font-weight: 900;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-trigger,
.icon-button,
.status-form button,
.delete-form button,
.comment-form button,
.primary-button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
}

.admin-trigger {
  background: #fff;
  color: var(--ink);
  opacity: 0;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 32px;
  padding: clamp(34px, 7vw, 72px) 0 28px;
  align-items: end;
}

.eyebrow {
  color: var(--blue);
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

.intro-band h1 {
  font-size: clamp(2.1rem, 6vw, 4.8rem);
  line-height: 1;
  max-width: 820px;
  margin-bottom: 0;
}

.intro-band > p {
  color: var(--muted);
  margin-bottom: 8px;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  padding: 12px 0 64px;
}

.admin-panel,
.edit-panel {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  margin: 8px 0 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.admin-panel h2,
.edit-panel h2 {
  margin-bottom: 0;
}

.item-card,
.reservation-form-wrap,
.reservations-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.item-card {
  position: relative;
  overflow: hidden;
}

.item-card-link {
  display: block;
}

.item-image,
.detail-image {
  display: grid;
  place-items: center;
  min-height: 190px;
  background:
    linear-gradient(135deg, rgba(36, 76, 127, 0.12), rgba(15, 118, 110, 0.12)),
    repeating-linear-gradient(45deg, #fff, #fff 14px, #eef2f4 14px, #eef2f4 28px);
  color: rgba(32, 33, 36, 0.74);
  font-size: 3rem;
  font-weight: 900;
  overflow: hidden;
}

.item-image img,
.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-card-body {
  position: relative;
  padding: 18px;
}

.item-card.has-stamp .item-card-body {
  min-height: 178px;
  padding-right: clamp(112px, 34%, 150px);
}

.status-stamp {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: clamp(96px, 32%, 132px);
  height: auto;
  pointer-events: none;
  transform: rotate(-8deg);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.16));
}

.card-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.price {
  font-size: 2.0rem;
  font-weight: 900;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  font-size: 0.86rem;
}

.status-badge.available {
  background: var(--green);
}

.status-badge.reserved {
  background: var(--amber);
}

.status-badge.sold {
  background: var(--red);
}

.item-card h2 {
  margin-bottom: 8px;
  font-size: 1.32rem;
}

.item-card p,
.detail-copy .lead {
  color: var(--muted);
}

dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

dd {
  margin: 0;
  font-weight: 650;
}

.status-form {
  display: flex;
  gap: 8px;
  align-items: end;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line);
}

.status-form label,
.item-form label,
.reservation-form label,
.comment-form label,
.admin-login label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.status-form label {
  flex: 1;
}

.item-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.item-form label,
.item-form .primary-button {
  align-self: end;
}

.item-form textarea,
.item-form label[for="new-summary"],
.item-form label[for="new-specs"],
.item-form label[for="new-image"],
.item-form label[for^="edit-summary"],
.item-form label[for^="edit-specs"],
.item-form label[for^="edit-image"],
.item-form #new-summary,
.item-form #new-specs,
.item-form #new-image,
.item-form textarea[id^="edit-summary"],
.item-form textarea[id^="edit-specs"],
.item-form input[id^="edit-image"],
.form-note,
.check-row {
  grid-column: 1 / -1;
}

.form-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.check-row input {
  width: auto;
}

.delete-form {
  padding: 0 18px 18px;
}

.delete-form button {
  width: 100%;
  border-color: var(--red);
  background: #fff;
  color: var(--red);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #b9c1c8;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
}

.detail {
  padding: 28px 0 10px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--blue);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(300px, 1.1fr);
  gap: 28px;
  align-items: stretch;
}

.detail-image {
  min-height: 440px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.detail-copy {
  align-self: center;
}

.detail-copy h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  margin-bottom: 14px;
}

.spec-list {
  margin: 24px 0;
  border-top: 1px solid var(--line);
}

.spec-list div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.detail-status {
  padding: 0;
  border: 0;
}

.detail-admin-actions {
  display: grid;
  gap: 10px;
}

.inline-delete {
  padding: 0;
}

.conversation {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(300px, 1.22fr);
  gap: 18px;
  padding: 28px 0 72px;
  align-items: start;
}

.reservation-form-wrap,
.reservations-list {
  padding: 20px;
}

.reservation-form,
.comment-form,
.admin-login {
  display: grid;
  gap: 14px;
}

.reservation {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.reservation:first-of-type {
  border-top: 0;
}

.reservation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.reservation-meta strong {
  color: var(--ink);
}

.admin-comment {
  margin: 12px 0;
  padding: 12px;
  border-left: 4px solid var(--green);
  background: #edf8f5;
}

.admin-comment strong {
  display: block;
  margin-bottom: 4px;
}

.empty,
.message-page {
  color: var(--muted);
}

.message-page {
  padding: 80px 0;
}

.admin-dialog {
  width: min(420px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.admin-dialog::backdrop {
  background: rgba(0, 0, 0, 0.38);
}

.admin-login {
  position: relative;
  padding: 24px;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  background: #eef2f4;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.3rem;
}

.form-error {
  color: var(--red);
  margin: 0;
  font-weight: 800;
}

@media (max-width: 780px) {
  .site-header,
  .intro-band,
  .admin-panel,
  .edit-panel,
  .detail-layout,
  .conversation {
    grid-template-columns: 1fr;
  }

  .item-form {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
  }

  .brand small {
    max-width: 210px;
  }

  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-image {
    min-height: 300px;
  }

  .spec-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

