.page-head { padding: 38px 0 20px; }
.title-row h1, .inbox-title { font-size: clamp(42px, 6.5vw, 82px); line-height: .98; margin: 0; }
.inbox-page main { padding-block: 24px 54px; min-height: 55vh; }
.inbox-title { margin-block: 22px 20px; }
.inbox-entry { padding: 20px; }
.inbox-entry h2 { font-size: clamp(19px, 4.6vw, 24px); line-height: 1.2; }

.manage-page *, .manage-page *::before, .manage-page *::after { box-sizing: border-box; }
.manage-page main :is(h1, h2, h3, p) { margin: 0; }
.manage-page .title-row {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
  gap: 16px; margin: 12px 0 10px;
}
.admin-layout {
  display: grid; grid-template-columns: minmax(258px, 300px) minmax(0, 1fr);
  gap: clamp(18px, 2.5vw, 32px); align-items: start;
  padding-bottom: clamp(44px, 6vw, 80px);
}
.admin-layout :is(.editor, .list-column, .field, fieldset, .photo-card) { min-width: 0; }
.list-column {
  position: sticky; top: 16px; display: grid; gap: 10px; padding: 14px;
}
.list-head {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: center; gap: 8px; padding-inline: 6px;
}
.list-head h2 { font-size: 21px; line-height: 1.2; }
.list-head .button { padding-inline: 12px; border-color: #e2e2e2; }
.filters { display: flex; flex-wrap: wrap; gap: 3px; }
.filter {
  display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 10px;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font: 500 14px/1.25 var(--sans); cursor: pointer;
}
.filter span { font-variant-numeric: tabular-nums; }
.filter:hover { background: #f6f6f6; }
.filter[aria-pressed="true"] { background: #eee; color: var(--ink); }
.listing-list { display: grid; gap: 3px; }
.listing-row {
  display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 11px;
  width: 100%; min-height: 62px; padding: 7px 8px; border: 0; border-radius: 12px;
  text-align: left; background: transparent; color: var(--ink); cursor: pointer;
}
.listing-row:hover { background: #f7f7f7; }
.listing-row[aria-current="true"] { background: #efefef; }
.listing-row img, .thumb-fallback {
  width: 58px; height: 48px; object-fit: cover; border-radius: 8px; background: #e7e9e7;
}
.row-name {
  display: block; overflow-wrap: anywhere;
  font: 500 17px/1.2 var(--sans); letter-spacing: -.025em;
}
.row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; margin-top: 5px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--muted); font: 400 12px/1.3 var(--sans);
}
.chip.available, .status-choice.available { --status-color: #236447; }
.chip.pending, .status-choice.pending { --status-color: #875412; }
.chip.leased, .status-choice.leased { --status-color: #584578; }
.chip:is(.available, .pending, .leased) { color: var(--status-color); font-weight: 600; }
.chip:is(.available, .pending, .leased)::before,
.visibility::before {
  content: ""; width: 6px; height: 6px; flex: none;
  border-radius: 50%; background: var(--status-color, #567568);
}
.chip.pending::before { border-radius: 1px; transform: rotate(45deg); }
.chip.leased::before { width: 8px; height: 3px; border-radius: 2px; }
.visibility.is-hidden::before { background: #6b706d; }
.chip:is(.archived, .unsaved) { font-weight: 600; }
.chip + .chip::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: #aaa; }
.empty-filter, .editor-empty { color: var(--muted); font-size: 15px; }

.editor, .editor-empty { padding: clamp(20px, 3vw, 36px); }
.editor { display: grid; gap: clamp(25px, 3.5vw, 41px); }
.editor h2 { font-size: clamp(31px, 4vw, 46px); line-height: 1.05; }
.editor h3, .status-field legend {
  font: 500 clamp(21px, 2.4vw, 27px)/1.15 var(--sans); letter-spacing: -.035em;
}
.editor .section { display: grid; gap: 15px; }
.editor .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 16px; }
.editor .wide { grid-column: 1 / -1; }
.editor .field, .editor .photo-card label {
  display: grid; align-content: start; gap: 7px;
  color: var(--ink); font: 600 14px/1.35 var(--sans);
}
.editor .hint, .photo-index {
  color: var(--muted); font: 400 14px/1.45 var(--sans);
}
.editor :is(input[type="text"], textarea, .select-trigger) {
  width: 100%; min-width: 0; min-height: 46px; border: 1px solid #d6d6d6;
  border-radius: 10px; background: #fff; padding: 10px 13px;
  font: 400 16px/1.42 var(--sans); color: var(--ink); overflow-wrap: anywhere;
}
.editor :is(input[type="text"], textarea, .select-trigger):focus-visible {
  outline: 2px solid #595959; outline-offset: -2px;
}
.editor textarea { resize: vertical; }
.photo-tools, .photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.photo-actions { flex-wrap: nowrap; align-items: end; }
.photo-list {
  list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 12px;
}
.photo-card {
  display: grid; gap: 8px; padding: 11px; border-radius: 14px;
  background: #f6f6f6; cursor: grab; overflow-wrap: anywhere;
}
.photo-card.dragging { opacity: .45; }
.photo-card img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 9px; background: #e7e9e7;
}
.photo-order { display: grid; gap: 5px; flex: 1; min-width: 0; }
.photo-card .photo-order .select-trigger { min-height: 44px; }
.photo-remove {
  display: grid; flex: none; place-items: center; width: 44px; height: 44px; padding: 0;
  margin-inline-start: auto; border: 0; border-radius: 12px; background: #fff;
  color: #9b3039; cursor: pointer;
  transition: color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}
.photo-remove:hover { background: #f8e8e9; color: #84242d; }
.photo-remove:active { background: #f2d6d9; }
.photo-remove:focus-visible { outline-color: #9b3039; outline-offset: 2px; }

.status-field { margin: 0; padding: 0; border: 0; }
.status-field legend { padding: 0; margin-bottom: 5px; }
.status-options { display: flex; flex-wrap: wrap; gap: 2px clamp(9px, 2vw, 20px); }
.status-options label {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px;
  color: var(--status-color); font: 500 15px/1.3 var(--sans); cursor: pointer;
}
.status-options label:has(input:checked) { font-weight: 600; }
.status-options input { width: 16px; height: 16px; margin: 0; accent-color: var(--status-color); }
.status-options input:focus-visible { outline-color: #595959; outline-offset: 2px; }
.visibility {
  display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: 14px;
}
.visibility::before { align-self: center; }
.save-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 8px;
}
#save-listing { margin-left: auto; }
.save-status { flex-basis: 100%; font-size: 14px; }
.save-status:empty { display: none; }
.save-status.error, .load-error { color: #7a2e24; }
.save-status a { text-underline-offset: 3px; }

@media (max-width: 900px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .list-column { position: static; }
}
@media (max-width: 760px) {
  .page-head { padding-top: 24px; }
  .admin-layout { gap: 16px; }
  .photo-actions button { min-height: 44px; }
}
@media (max-width: 600px) {
  .editor .fields { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 360px) {
  .status-options, .status-options label { gap: 5px; }
}
