.inventory-banner {
  padding-block: clamp(3rem, 8vw, 6rem);
  background: radial-gradient(ellipse at 90% 0, #2b4055 0, var(--navy) 60%);
  border-block-end: 3px solid var(--gold);
  color: var(--white);
}

.inventory-banner .kicker { color: var(--gold-light); }
.inventory-banner h1 {
  font: 400 clamp(3rem, 8vw, 6.5rem)/.95 Georgia, serif;
  letter-spacing: -.065em;
}
.inventory-banner p:last-child { max-width: 34rem; margin-top: 1.2rem; color: #e4e9ec; }
.masthead nav [aria-current="page"] { color: var(--gold-light); }
.inventory-content { padding-block: clamp(2.25rem, 6vw, 5rem); min-height: 45vh; }
.inventory-filters { display: grid; gap: 1rem; grid-template-columns: 2fr 1fr; margin-bottom: 1.5rem; }
.inventory-filters label, .form-grid label, .photos-input label { font-size: .95rem; font-weight: 700; }
.inventory-filters input, .inventory-filters select, .unit-form input, .unit-form select, .unit-form textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: .65rem .8rem;
  margin-top: .3rem;
  border-radius: 3px;
  border: 1px solid #a9b4bc;
  background: var(--white);
  color: var(--navy);
  font: 400 1rem/1.4 system-ui, sans-serif;
}
.inventory-filters select, .unit-form select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 48%, var(--navy) 50%, var(--navy) 60%, transparent 62%), linear-gradient(135deg, transparent 38%, var(--navy) 40%, var(--navy) 50%, transparent 52%);
  background-position: right 1.17rem center, right .8rem center;
  background-size: .42rem .42rem;
  background-repeat: no-repeat;
}
.inventory-feedback { margin-bottom: 1rem; color: var(--muted); }
.inventory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.35rem; }
.unit-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--white);
}
.unit-card-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: var(--navy);
  color: #e4e9ec;
  overflow: hidden;
}
.unit-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.unit-card-media span { padding: .75rem 1rem; text-align: center; }
.unit-photo-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .35rem;
  min-height: 44px;
  background: var(--navy);
  color: var(--white);
}
.unit-photo-controls button {
  min-height: 44px;
  min-width: 56px;
  padding-inline: .45rem;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font-size: .875rem;
}
.unit-photo-controls button:hover { color: var(--gold-light); }
.unit-photo-controls button:focus-visible { outline-color: var(--gold-light); outline-offset: -4px; }
.unit-photo-controls span { font-size: .875rem; }
.unit-card-body { flex: 1; display: flex; flex-direction: column; gap: .75rem; padding: 1.25rem; overflow-wrap: anywhere; }
.unit-card-body h2, .dashboard-layout h2 {
  font: 400 clamp(1.7rem, 3vw, 2.3rem)/1.1 Georgia, serif;
  letter-spacing: -.04em;
}
.unit-context { color: var(--gold-ink); font-weight: 700; font-size: .875rem; }
.unit-location, .unit-notes { color: var(--muted); }
.unit-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0; border-block: 1px solid var(--line); padding-block: .75rem; }
.unit-facts dt { color: var(--muted); font-size: .875rem; }
.unit-facts dd { margin: 0; font-weight: 700; }
.unit-notes { white-space: pre-line; }
.unit-card-body .button { align-self: flex-start; margin-top: auto; }
.dashboard-notice { margin-bottom: 1rem; color: var(--muted); }
.dashboard-notice .button { margin: .8rem .4rem 0 0; }
.dashboard-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 1.5rem; align-items: start; }
.dashboard-list-panel, .unit-form { padding: clamp(1.15rem, 3vw, 2rem); border: 1px solid var(--line); background: var(--white); }
.dashboard-heading { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; }
.dashboard-count, .dashboard-help { margin-top: .3rem; color: var(--muted); font-size: .875rem; font-weight: 400; }
.dashboard-units { margin: .9rem 0 0; padding: 0; list-style: none; }
.dashboard-units li { padding-block: .85rem; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.dashboard-unit-top { display: flex; justify-content: space-between; align-items: start; gap: .6rem; }
.dashboard-unit-top h3 { font-size: 1rem; }
.dashboard-unit-status { flex: 0 0 auto; padding: .15rem .45rem; background: #edf0f3; color: #324b60; font-size: .8rem; font-weight: 700; }
.dashboard-unit-status[data-status="available"] { background: #f8e8c8; color: #66440f; }
.dashboard-unit-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.dashboard-unit-actions button {
  border: 0;
  padding: .45rem .2rem;
  min-height: 40px;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.dashboard-unit-actions button:last-child { color: #872b28; }
.dashboard-unit-actions button:disabled { color: var(--muted); cursor: wait; }
.unit-form fieldset { min-width: 0; padding: 0; border: 0; margin: 1rem 0 0; }
.unit-form textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
.field-wide { grid-column: 1 / -1; }
.dashboard-help[id] { display: block; }
.photos-input { padding: 1rem; border: 1px solid var(--line); background: #f7f8f9; }
.unit-form input[type="file"] { padding: .5rem; }
.unit-form input[type="file"]::file-selector-button {
  margin: 0 .5rem 0 0;
  padding: .45rem .75rem;
  border: 0;
  border-radius: 3px;
  background: var(--navy);
  color: var(--white);
  font: inherit;
  cursor: pointer;
}
.photo-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: .65rem; }
.photo-previews:empty { display: none; }
.photo-preview { margin-top: .65rem; border: 1px solid var(--line); background: var(--white); min-width: 0; }
.photo-preview img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e6ebef; }
.photo-preview button { display: block; width: 100%; min-height: 36px; padding: .25rem; border: 0; background: var(--white); color: #872b28; cursor: pointer; font-size: .85rem; }
.photo-preview button:hover { background: #f9eceb; }
.form-actions { margin-top: 1.2rem; }
.unit-form button:disabled { opacity: .65; cursor: wait; }
.form-status, .form-error { margin-top: .75rem; }
.form-error, .form-status[data-error="true"] { color: #872b28; }

@media (max-width: 950px) {
  .inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .dashboard-layout { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .inventory-grid, .inventory-filters, .form-grid { grid-template-columns: 1fr; }
  .inventory-filters { gap: .75rem; }
}
