:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-muted: #eef3ee;
  --ink: #1f2a24;
  --muted: #647067;
  --line: #d8ded7;
  --accent: #256f63;
  --accent-strong: #164d45;
  --warning: #9b5c17;
  --danger: #a13b34;
  --info: #315f9c;
}

* {
  box-sizing: border-box;
}

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

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
}

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

.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner,
.page {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
}

.topbar-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand strong {
  font-size: 17px;
}

.brand span,
.eyebrow,
.muted,
.meta {
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a,
.button,
button,
input[type="submit"] {
  min-height: 38px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

.nav a.active,
.button.primary,
button.primary,
input[type="submit"].primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button.danger,
button.danger {
  border-color: var(--danger);
  color: var(--danger);
}

.inline-form {
  display: inline;
}

.page {
  padding: 28px 0 56px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  align-items: start;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-header h2,
.panel h2,
.panel h3 {
  margin: 0;
  font-size: 18px;
}

.stack {
  display: grid;
  gap: 14px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.status.requested {
  background: #fff2d7;
  color: var(--warning);
}

.status.approved {
  background: #def2e9;
  color: var(--accent-strong);
}

.status.declined,
.status.cancelled,
.status.paused {
  background: #f9e0dd;
  color: var(--danger);
}

.status.sent,
.status.confirmed {
  background: #dce8fb;
  color: var(--info);
}

.flash {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.flash.success {
  border-color: #95cdb8;
  background: #e6f5ef;
}

.flash.error {
  border-color: #e0a39e;
  background: #fff0ef;
}

.flash.info {
  border-color: #9fb7dc;
  background: #eef5ff;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

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

textarea {
  min-height: 92px;
  resize: vertical;
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

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

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
  gap: 1px;
}

.weekday,
.day-cell {
  background: #fff;
  min-width: 0;
}

.weekday {
  padding: 8px;
  font-weight: 800;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.day-cell {
  min-height: 112px;
  padding: 8px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.day-cell.outside {
  background: #f4f6f2;
  color: #8a948d;
}

.day-cell.today {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.day-number {
  font-weight: 800;
  font-size: 13px;
}

.calendar-booking {
  display: block;
  border-radius: 5px;
  padding: 5px 6px;
  background: #e1f0eb;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.calendar-booking.requested {
  background: #fff2d7;
  color: var(--warning);
}

.feed-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.check-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.check-row:last-child {
  border-bottom: 0;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--muted);
  background: #fbfcfa;
}

@media (max-width: 860px) {
  .topbar-inner,
  .page {
    width: min(100vw - 20px, 1180px);
  }

  .topbar-inner,
  .page-header,
  .row {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .grid.two,
  .grid.three,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .weekday {
    display: none;
  }

  .day-cell {
    min-height: 84px;
  }
}
