:root {
  --ink: #17202a;
  --muted: #657381;
  --line: #d9e0e7;
  --paper: #f7f8f7;
  --panel: #ffffff;
  --brand: #0b5a55;
  --brand-dark: #084844;
  --gold: #b28a3a;
  --danger: #9f2f2f;
  --button-font-weight: 650;
}

* { box-sizing: border-box; }

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  display: flex;
  flex-direction: column;
}

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

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

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

.brand img {
  display: block;
  width: 92px;
  height: auto;
}

.brand span {
  font-size: 30px;
  font-weight: 850;
  color: var(--brand);
}

.brand small {
  color: var(--muted);
  font-weight: 650;
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

nav a {
  padding: 9px 11px;
  color: #26323d;
  font-weight: 650;
  border-radius: 6px;
}

.language-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  border: 1px solid transparent;
}

.language-switcher:hover,
.language-switcher:focus-visible {
  border-color: var(--line);
  background: #fff;
}

.flag {
  width: 24px;
  height: 16px;
  display: block;
  border: 1px solid rgba(23, 32, 42, 0.22);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(23, 32, 42, 0.08);
  object-fit: cover;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 0;
}

.language-switcher-mobile {
  display: none;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

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

.hero {
  min-height: 520px;
  display: grid;
  align-items: end;
  padding: 72px clamp(22px, 5vw, 64px);
  margin: 24px 0 28px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(12, 30, 36, 0.82), rgba(12, 30, 36, 0.28)),
    url("/assets/img/site/home-hero-portugal.jpg") center/cover;
  border-radius: 8px;
}

.hero > div { max-width: 820px; }

.error-page {
  min-height: 560px;
  display: grid;
  align-items: center;
  padding: 70px clamp(22px, 5vw, 64px);
  margin: 28px 0;
  background:
    linear-gradient(90deg, rgba(12, 30, 36, 0.86), rgba(12, 30, 36, 0.48)),
    url("/assets/img/site/access-denied-portugal.jpg") center/cover;
  border-radius: 8px;
  color: #fff;
}

.error-page > div {
  max-width: 700px;
}

.error-page h1 {
  color: #fff;
}

.error-page p {
  max-width: 620px;
  color: #edf3f2;
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #d4c08a;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 { margin: 0 0 16px; font-size: 24px; }
h3 { margin: 10px 0 8px; font-size: 21px; }
p { color: var(--muted); line-height: 1.6; }
.hero p { color: #edf3f2; font-size: 18px; max-width: 720px; }

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 11px 16px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: var(--button-font-weight);
  line-height: 1;
  cursor: pointer;
}

.button:hover,
button:hover { background: var(--brand-dark); }
.button.ghost { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.45); }
.button.ghost-dark { background: #eef2f4; color: var(--ink); }
.button.danger,
button.danger { background: var(--danger); color: #fff; }
.button.danger:hover,
button.danger:hover { background: #7e2424; }
.button.small { min-height: 42px; padding: 11px 16px; font-size: inherit; }
.button.wide { width: 100%; margin-top: 16px; }

.overview-action {
  width: 150px;
  flex: 0 0 150px;
  white-space: nowrap;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 28px 0;
}

.metric-card,
.auction-panel,
.auth,
.timeline article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric-card {
  display: block;
  padding: 20px;
}

.metric-card:hover {
  border-color: #b8d2ce;
  background: #fbfdfc;
}

.metrics strong,
.metric-card strong {
  display: block;
  color: var(--brand);
  font-size: 28px;
}

.dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin: 18px 0 26px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.dashboard-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 max-content;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #30404f;
  font-weight: var(--button-font-weight);
}

.dashboard-tabs a.active {
  border-color: #b8d2ce;
  background: #e8f3f1;
  color: var(--brand-dark);
}

.dashboard-tabs span {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 6px;
  background: #eef2f4;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.metrics span,
dt,
.list-row span {
  color: var(--muted);
  font-size: 14px;
}

.page-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 38px 0 16px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px 18px;
  margin: 38px 0 16px;
  text-align: left;
}

.section-head h2 {
  grid-column: 1;
  margin-bottom: 0;
}

.section-head p {
  grid-column: 1;
  flex: 1 1 auto;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: left;
}

.section-head > a,
.section-head > button {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  align-self: end;
}

.dashboard-tabs ~ .section-head .button,
.dashboard-tabs ~ .section-head button,
.dashboard-tabs ~ .list .button,
.dashboard-tabs ~ .list button,
.dashboard-tabs ~ .list-row .button,
.dashboard-tabs ~ .list-row button {
  min-height: 36px;
  height: 36px;
  padding: 8px 12px;
  font-size: 14px;
}

.page-title {
  display: block;
  padding: 34px 0 10px;
}

.page-title h1 {
  color: var(--ink);
  font-size: clamp(30px, 4vw, 48px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;
}

.property-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.property-card:hover,
.property-card:focus-visible {
  border-color: #b8d2ce;
  box-shadow: 0 12px 28px rgba(23, 32, 42, 0.08);
  transform: translateY(-1px);
}

.property-card:focus-visible {
  outline: 3px solid rgba(11, 90, 85, 0.24);
  outline-offset: 3px;
}

.property-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.property-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 220px;
  aspect-ratio: 4 / 3;
  border: 1px dashed #c8d3d1;
  background: #f6f8f7;
  color: var(--muted);
  font-weight: 760;
  text-align: center;
}

.property-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.property-body p {
  margin-top: auto;
}

.property-body dl {
  margin-top: 18px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 5px 12px;
  border-radius: 6px;
  background: #e6f0ef;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0 0;
}

dt { margin-bottom: 4px; }
dd { margin: 0; font-weight: 780; }

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 28px;
  margin: 28px 0;
}

.detail > img,
.gallery-main {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  background: #e9eef0;
  border-radius: 8px;
  cursor: zoom-in;
}

.gallery-main.property-placeholder {
  min-height: 320px;
  object-fit: unset;
}

.property-gallery {
  display: grid;
  gap: 10px;
  align-self: start;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  padding-bottom: 2px;
}

.gallery-thumbs img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.gallery-thumbs img:hover {
  border-color: var(--brand);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(13, 22, 30, 0.86);
}

.image-lightbox img {
  max-width: min(1100px, 96vw);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.image-lightbox button {
  position: fixed;
  width: 42px;
  height: 42px;
  min-height: 0;
  padding: 0;
  flex: 0 0 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
}

.lightbox-close {
  top: 18px;
  right: 18px;
}

.lightbox-close::before,
.lightbox-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}

.lightbox-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.lightbox-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.lightbox-arrow {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

.lightbox-arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 13px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.lightbox-prev::before {
  transform: translate(-38%, -50%) rotate(-45deg);
}

.lightbox-next::before {
  transform: translate(-62%, -50%) rotate(135deg);
}

.property-image-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.property-image-admin-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.property-image-admin-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.empty-panel {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

.detail h1 {
  color: var(--ink);
  font-size: clamp(28px, 3.6vw, 44px);
  margin-top: 12px;
}

.auction-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 22px 0;
}

.auction-panel div {
  padding: 16px;
  background: #fff;
}

.auction-panel span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.auction-panel strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.auction-panel strong.bid-flash {
  animation: bidFlash 1.4s ease-out;
}

@keyframes bidFlash {
  0% {
    color: #fff;
    background: var(--brand);
    box-shadow: 0 0 0 6px rgba(11, 90, 85, 0.18);
  }
  100% {
    color: var(--ink);
    background: transparent;
    box-shadow: none;
  }
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 28px 0;
}

.facts {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

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

.facts th { width: 34%; color: var(--muted); }

.list {
  display: grid;
  gap: 10px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.list-row > * {
  min-width: 0;
}

.list-row div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.bid-row div:first-child span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.bid-row {
  justify-content: flex-start;
  padding: 8px 10px;
}

.bid-row div:first-child span strong {
  color: var(--ink);
  font-size: 14px;
}

.buyer-bid-row {
  align-items: flex-start;
}

.buyer-bid-actions {
  display: grid;
  justify-items: end;
  align-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
  align-self: stretch;
}

.viewing-actions {
  align-self: stretch;
}

.viewing-status-form {
  display: grid;
  justify-items: end;
  align-content: end;
  height: 100%;
  gap: 8px;
  width: max-content;
}

.viewing-status-form label {
  display: grid;
  gap: 5px;
  width: 100%;
}

.viewing-status-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.viewing-status-form select {
  width: 100%;
  min-width: 208px;
}

.viewing-action-buttons {
  display: inline-flex;
  gap: 8px;
  width: 100%;
}

.viewing-action-buttons .button,
.viewing-action-buttons button {
  flex: 1 1 0;
  height: 42px;
  min-height: 42px;
  padding: 0 16px;
  line-height: 1;
}

.bid-history-list {
  display: grid;
  gap: 6px;
  margin: -4px 0 8px 18px;
}

.bid-history-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.bid-history-item strong {
  color: var(--ink);
}

.list:has(.bid-row) {
  gap: 5px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-actions form {
  margin: 0;
}

.row-actions.action-buttons a {
  min-height: 42px;
  padding: 11px 16px;
  background: var(--brand);
  color: #fff;
}

.row-actions.action-buttons a:hover {
  background: var(--brand-dark);
}

.row-actions a,
.link-danger {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-size: 13px;
  font-weight: 760;
}

.link-danger {
  color: var(--danger);
}

.link-danger:hover {
  background: transparent;
}

.list-row > form {
  flex: 0 0 auto;
}

.compliance-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 12px;
}

.compliance-row > form.compliance-form {
  width: 100%;
  max-width: none;
}

.property-edit-title {
  margin-bottom: 0;
}

.property-edit-tabs {
  margin-top: 12px;
}

.property-edit-panel {
  margin-top: 0;
}

.property-photo-upload {
  margin-bottom: 22px;
}

.form-section-title {
  margin-top: 28px;
}

.legal-pack-row {
  align-items: stretch;
}

.legal-pack-actions {
  display: grid;
  align-content: end;
  justify-items: end;
}

.document-access-form {
  display: flex;
  align-items: end;
  gap: 8px;
  margin: 0;
}

.document-access-form label {
  display: grid;
  gap: 4px;
}

.document-access-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.document-access-form select {
  min-width: 132px;
  min-height: 44px;
  padding: 9px 28px 9px 9px;
}

.document-action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.document-action-buttons .button {
  background: var(--brand);
  color: #fff;
}

.document-action-buttons .button:hover {
  background: var(--brand-dark);
}

.document-action-buttons .button.danger {
  background: var(--danger);
}

.document-action-buttons .button.danger:hover {
  background: #7e2424;
}

.list-row > a,
.list-row > .button {
  flex: 0 0 auto;
}

.auth {
  width: min(520px, 100%);
  margin: 46px auto;
  padding: 28px;
}

.wide-auth { width: min(820px, 100%); }
.auth h1 { color: var(--ink); font-size: 40px; }

.stacked {
  display: grid;
  gap: 12px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 0 18px;
}

.tabs a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  font-weight: var(--button-font-weight);
}

.tabs a.active {
  border-color: #b8d2ce;
  background: #e8f3f1;
  color: var(--brand-dark);
}

.field-help {
  display: block;
  margin: -6px 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.inline-field {
  flex: 1 1 auto;
  min-width: 0;
}

.inline-field .field-help {
  margin: 5px 0 0;
}

input,
textarea,
select {
  max-width: 100%;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #cfd8df;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select {
  height: 44px;
  line-height: 1.35;
}

select {
  padding-top: 9px;
  padding-bottom: 9px;
  font-size: 14px;
}

input[type="date"],
input[type="datetime-local"],
input[type="time"] {
  appearance: none;
  -webkit-appearance: none;
}

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

.money-input {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfd8df;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.money-input > span {
  flex: 0 0 auto;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-left: 1px solid #dfe6eb;
  background: #f4f7f8;
  color: var(--brand-dark);
  font-weight: 780;
}

.money-input input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: right;
}

.money-input input:focus {
  outline: 2px solid rgba(11, 90, 85, 0.2);
  outline-offset: -2px;
}

.inline-form,
.row-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-form .inline-field input[type="number"],
.inline-form .inline-field .money-input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: none;
}

.inline-form button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.bid-form .inline-field {
  flex: 0 1 50%;
}

.bid-form .inline-field .money-input {
  width: 100%;
}

.bid-form button {
  flex: 1 1 auto;
}

.row-form select { min-width: 120px; }

.labelled-form {
  align-items: start;
}

.labelled-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.labelled-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.labelled-form label small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.labelled-form select {
  min-width: 160px;
}

.labelled-form input[type="datetime-local"] {
  min-width: 190px;
}

.auction-settings-form {
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 760px;
}

.property-action-buttons {
  display: inline-flex;
  align-items: center;
  align-self: start;
  gap: 8px;
  margin-top: 0;
  padding-top: 17px;
}

.certificate-row {
  align-items: stretch;
}

.certificate-row .property-action-buttons {
  align-self: end;
  padding-top: 0;
}

.property-action-buttons .button,
.property-action-buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  min-height: 42px;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
}

.relist-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d6e4e1;
  border-radius: 6px;
  background: #f4faf8;
}

.relist-panel > strong {
  font-size: 14px;
}

.auction-relist-form {
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-start;
}

.auction-relist-form button {
  min-width: 150px;
}

.management-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: flex-start;
  gap: 16px;
}

.management-form {
  display: grid;
  gap: 14px;
  width: 100%;
}

.management-summary {
  width: 100%;
}

.management-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.management-fields label {
  min-width: 0;
}

.auction-event-fields {
  grid-template-columns: minmax(220px, 1.3fr) minmax(190px, 0.9fr) minmax(110px, 0.45fr);
  align-items: start;
}

.auction-event-properties,
.auction-event-description {
  grid-column: span 3;
}

.auction-event-fields select[multiple] {
  min-height: 124px;
}

.management-form textarea {
  min-height: 70px;
}

.management-fields textarea {
  width: 100%;
}

.management-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.management-actions-inline {
  width: 100%;
}

.management-actions button {
  width: auto;
}

.audit-filters {
  margin-top: 18px;
}

.audit-row div:first-child {
  gap: 6px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--muted);
}

.management-delete-form {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin: -6px 0 0;
}

.labelled-form button {
  margin-top: 17px;
}

.labelled-form .property-action-buttons .button,
.labelled-form .property-action-buttons button {
  margin-top: 0;
}

.compliance-form {
  display: grid;
  gap: 10px;
  justify-items: end;
  width: min(100%, 980px);
  max-width: none;
}

.compliance-fields {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: start;
  justify-content: flex-end;
  width: 100%;
}

.compliance-fields label {
  flex: 1 1 0;
  min-width: 0;
}

.compliance-fields select {
  width: 100%;
  min-width: 0;
}

.compliance-actions {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.compliance-actions button {
  margin-top: 0;
}

.management-form .management-actions button,
.management-delete-form button {
  margin-top: 0;
}

.status-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
  line-height: 1.45;
}

.check input {
  width: auto;
  min-height: auto;
  margin-top: 4px;
}

.demo-users {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.resend-form {
  margin-top: 12px;
}

.demo-users span {
  padding: 6px 8px;
  border-radius: 6px;
  background: #eef2f4;
  color: var(--muted);
  font-size: 12px;
}

.timeline {
  display: grid;
  gap: 14px;
  margin: 26px 0 44px;
}

.timeline article { padding: 22px; }

.flash {
  margin: 18px 0;
  padding: 13px 15px;
  border-radius: 8px;
  background: #e9f5ef;
  border: 1px solid #bcdcca;
  color: #125a34;
  transition: opacity 0.3s ease, transform 0.3s ease, margin 0.3s ease, padding 0.3s ease, border-width 0.3s ease;
}

.flash.is-hiding {
  opacity: 0;
  transform: translateY(-6px);
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
}

.flash.error {
  background: #f8eaea;
  border-color: #e8bcbc;
  color: var(--danger);
}

.bid-feedback {
  margin: 10px 0 0;
}

.notice-panel {
  display: grid;
  gap: 5px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #bcdcca;
  border-radius: 8px;
  background: #e9f5ef;
  color: #125a34;
}

.notice-panel span {
  color: #30664a;
  font-size: 14px;
  line-height: 1.45;
}

footer {
  width: min(1180px, calc(100% - 32px));
  margin: 46px auto 0;
  padding: 26px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
  }
  .brand small { display: none; }
  .brand span { font-size: 28px; }
  .language-switcher-desktop { display: none; }
  .language-switcher-mobile { display: flex; }
  .menu-toggle { display: inline-block; }
  nav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
    padding-top: 8px;
  }
  nav.is-open {
    display: grid;
    gap: 6px;
  }
  nav a {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    background: #fff;
  }
  .language-switcher {
    width: 42px;
    height: 42px;
    background: #fff;
    border: 1px solid var(--line);
  }
  .hero { min-height: 560px; }
  .hero {
    padding: 44px 18px;
  }
  h1 {
    font-size: clamp(30px, 8vw, 40px);
  }
  .page-title h1,
  .detail h1 {
    font-size: clamp(28px, 7vw, 36px);
  }
  .grid,
  .detail,
  .two-col { grid-template-columns: 1fr; }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 18px 0;
  }
  .metric-card {
    padding: 12px;
  }
  .metrics strong,
  .metric-card strong {
    font-size: 22px;
  }
  .metrics span,
  .metric-card span {
    font-size: 12px;
    line-height: 1.25;
  }
  .auction-panel { grid-template-columns: 1fr; }
  .gallery-main.property-placeholder { min-height: 260px; }
  .gallery-thumbs img {
    width: 100%;
  }
  .section-head,
  .list-row,
  .row-form,
  .inline-form { align-items: stretch; flex-direction: column; }
  .section-head {
    grid-template-columns: 1fr;
  }
  .section-head > a,
  .section-head > button {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
  }
  .buyer-bid-actions {
    justify-items: stretch;
    width: 100%;
  }
  .viewing-status-form {
    justify-items: stretch;
  }
  .viewing-status-form select {
    width: 100%;
  }
  .viewing-action-buttons {
    width: 100%;
  }
  .viewing-action-buttons .button,
  .viewing-action-buttons button {
    flex: 1 1 0;
  }
  .bid-history-list {
    margin-left: 0;
  }
  .list-row > form,
  .auction-settings-form {
    width: 100%;
    max-width: none;
  }
  .property-action-buttons {
    width: 100%;
  }
  .property-action-buttons .button,
  .property-action-buttons button {
    flex: 1 1 0;
  }
  .labelled-form input[type="date"],
  .labelled-form input[type="datetime-local"],
  .labelled-form input[type="time"] {
    width: 100%;
    min-width: 0;
  }
  .management-fields {
    grid-template-columns: 1fr;
  }
  .compliance-fields {
    flex-wrap: wrap;
  }
  .compliance-fields label {
    flex-basis: 100%;
  }
  .management-actions,
  .management-delete-form {
    justify-content: stretch;
  }
  .management-actions button,
  .management-delete-form button {
    width: 100%;
  }
  .overview-action {
    width: 100%;
    flex-basis: auto;
  }
  .status-stack {
    justify-content: flex-start;
  }
  .pill {
    white-space: normal;
  }
  .bid-row div:first-child span {
    white-space: normal;
  }
  .facts {
    table-layout: fixed;
  }
  .facts th,
  .facts td {
    display: block;
    width: 100%;
  }
  .inline-form .inline-field input[type="number"],
  .inline-form .inline-field .money-input {
    flex-basis: auto;
    width: 100%;
    max-width: none;
  }
  .bid-form .inline-field {
    flex: 1 1 auto;
  }
  dl { grid-template-columns: 1fr; }
}
