:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #23241f;
  --muted: #6b6f66;
  --accent: #2f6b46;
  --accent-dark: #245237;
  --danger: #a33227;
  --line: #e2ded4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a { color: var(--accent); }

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--accent-dark);
  color: #fff;
}

.site-header .brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.site-header nav a {
  color: #e9efe9;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a.active { text-decoration: underline; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; margin-bottom: 0.35rem; }
h3 { margin: 0 0 0.25rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

label {
  display: block;
  margin-bottom: 0.9rem;
  font-weight: 600;
}

label.checkbox { font-weight: 400; }

input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date],
input[type=number], input[type=search], input[type=datetime-local], input[type=file],
select, textarea {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.55rem 0.6rem;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 400;
}

textarea { resize: vertical; }

button, .button {
  display: inline-block;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}

button:hover, .button:hover { background: var(--accent-dark); }
button.danger { background: var(--danger); }

.link-button {
  background: none;
  color: #e9efe9;
  padding: 0;
  font-weight: 400;
  text-decoration: underline;
}

.link-button:hover { background: none; }

form.inline { display: inline-flex; gap: 0.35rem; align-items: center; margin: 0; }

.filters {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.filters input, .filters select { width: auto; margin-top: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.item-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem;
}

.item-card a { text-decoration: none; color: inherit; }
.item-card h2 { margin: 0.5rem 0 0.25rem; font-size: 1.05rem; }

.item-card img, .item-detail-media img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  background: #eceae2;
}

.item-detail { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.item-detail-media { flex: 1 1 280px; }
.item-detail-body { flex: 2 1 380px; }
.item-detail-media img { height: 240px; }

.item-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 1.25rem;
  align-items: start;
}

.item-sidebar { min-width: 0; }

@media (max-width: 760px) {
  .item-layout { grid-template-columns: 1fr; }
}

.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  border-radius: 8px;
  background: #eceae2;
  color: var(--muted);
  font-size: 0.9rem;
}

.photo-placeholder.large { height: 240px; }
.thumb { max-width: 220px; border-radius: 8px; }

.muted { color: var(--muted); }
.price { font-weight: 700; color: var(--accent-dark); }
.item-card .price { margin: 0.35rem 0 0; }
.prewrap { white-space: pre-wrap; }
.quote { border-left: 3px solid var(--line); padding-left: 0.75rem; }
.wide { width: 100%; }

.tag {
  display: inline-block;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge, .status {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #e7eee9;
  color: var(--accent-dark);
}

.badge-paused { background: #f4e6df; color: var(--danger); }
.status-pending { background: #fbf0d5; color: #7a5b12; }
.status-approved { background: #dff0e2; color: #245237; }
.status-declined, .status-cancelled { background: #f2e3e1; color: var(--danger); }
.status-returned { background: #e5e7ea; color: #444; }

.flash {
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.flash-error { background: #f8e4e1; color: #7d241b; }
.flash-success { background: #e0f0e3; color: #1f4a33; }
.notice { background: #eef2f7; padding: 0.65rem 0.9rem; border-radius: 8px; }

.list { margin: 0; padding-left: 1.1rem; }
.list li { margin-bottom: 0.35rem; }

.request {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0;
}

.request:first-of-type { border-top: 0; }
.decision { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }
.decision input { margin-top: 0; }

.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row label { flex: 1 1 200px; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--line); }
.table select { width: auto; margin-top: 0; display: inline-block; }

.cal-nav { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.inline-label { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; }
.inline-label select { margin-top: 0; }

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.cal-weekday {
  background: var(--accent-dark);
  color: #fff;
  padding: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

.cal-day {
  background: var(--card);
  min-height: 96px;
  padding: 0.3rem;
}

.cal-outside { background: #f1efe9; }
.cal-outside .cal-date { color: #b3b0a7; }
.cal-today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-date { font-size: 0.8rem; color: var(--muted); }

.cal-booking {
  display: block;
  margin-top: 0.2rem;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  background: #e7eee9;
  color: var(--accent-dark);
  font-size: 0.75rem;
  line-height: 1.3;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.cal-booking:hover { background: #d7e5db; }
.cal-mine { background: #fbf0d5; color: #6b4f0f; }
.cal-mine:hover { background: #f5e5bd; }
.cal-who { display: block; opacity: 0.75; }

@media (max-width: 640px) {
  .cal-day { min-height: 64px; }
  .cal-booking { font-size: 0.68rem; }
}
