/* Owner workspace and public notices share the five-colour Wisam identity. */
#admin {
  width: min(960px, calc(100vw - 28px));
  max-width: 960px;
  max-height: 92dvh;
  padding: 28px;
  overflow: auto;
  border-radius: 22px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
#admin .dialoghead {
  position: sticky;
  top: -28px;
  background: var(--panel);
  z-index: 4;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
#admin .dialoghead h2 {
  margin: 4px 0;
  font-size: 26px;
}
#admin .dialoghead button {
  min-width: 44px;
  min-height: 44px;
  font-size: 25px;
}
.owner-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0 0 24px;
  padding: 5px;
  background: var(--surface-soft);
  border-radius: 14px;
  align-items: stretch;
}
.owner-tabs button {
  border: 0;
  background: transparent;
  border-radius: 10px;
  color: var(--muted);
  padding: 12px 8px;
  min-height: 48px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.owner-tabs button[aria-selected="true"] {
  background: var(--panel);
  color: var(--heading);
  box-shadow: 0 3px 12px var(--shadow);
}
.owner-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 24px 0 16px;
}
.owner-step > span {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
  font-size: 12px;
}
#admin h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--heading);
}
#admin p {
  line-height: 1.8;
  color: var(--muted);
  font-size: 14px;
}
.owner-step p {
  margin: 0;
}
.owner-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
#admin label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 14px;
}
#admin input:not([type="radio"]),
#admin select,
#admin textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--input-surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  box-sizing: border-box;
}
#admin textarea {
  resize: vertical;
}
#admin :is(input, select, textarea, button):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.owner-select-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 6px 0 14px;
}
#ownerSelectionCount {
  margin-inline-end: auto;
  color: var(--heading);
  font-size: 14px;
}
.owner-select-tools button {
  padding: 10px;
  min-height: 44px;
  font: inherit;
  font-size: 12px;
}
.owner-text-button {
  color: var(--link-ink);
  border: 0;
  background: none;
  cursor: pointer;
}
.owner-plot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 4px;
}
.owner-plot {
  position: relative;
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.owner-plot strong {
  font-size: 23px;
  font-weight: 500;
}
.owner-plot small {
  font-size: 10px;
  color: var(--muted);
}
.owner-plot[data-status="reserved"]::after,
.owner-plot[data-status="auction"]::after,
.owner-plot[data-status="sold"]::after {
  content: "";
  position: absolute;
  top: 7px;
  inset-inline-start: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}
.owner-plot[data-status="sold"]::after {
  background: var(--muted);
}
.owner-plot[aria-pressed="true"] {
  border: 2px solid var(--gold);
  background: var(--panel);
  box-shadow: inset 0 0 0 2px var(--panel);
}
.owner-plot[aria-pressed="true"]::before {
  content: "✓";
  position: absolute;
  top: 4px;
  inset-inline-end: 7px;
  color: var(--gold);
  font-size: 12px;
}
.selection-numbers {
  font-size: 12px !important;
  max-height: 46px;
  overflow: auto;
  margin: 10px 4px;
}
.market-status-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border: 0;
  padding: 0;
  margin: 0 0 18px;
}
.market-status-options legend {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
#admin .market-status-options label {
  flex: 1 1 125px;
  position: relative;
  margin: 0;
  cursor: pointer;
}
.market-status-options input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.market-status-options span {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface-soft);
}
.market-status-options input:checked + span {
  border-color: var(--gold);
  background: var(--brand-forest);
  color: var(--brand-ivory);
}
.market-status-options input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.auction-fields {
  padding: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 16px;
}
.auction-fields p {
  font-size: 12px !important;
  margin: 0 0 14px;
}
.market-save {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
#admin .gold,
#admin .outline {
  min-height: 48px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  padding: 12px 18px;
}
#admin button:disabled {
  opacity: 0.5;
  cursor: wait;
}
#marketMessage,
#noticeMessage,
#adminMessage {
  color: var(--link-ink) !important;
  min-height: 22px;
}
#logout {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 20px;
  background: none;
  color: var(--muted);
  margin-top: 24px;
  cursor: pointer;
}
.notice-state {
  display: inline-block;
  font-size: 12px;
  color: var(--gold);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 24px;
  margin: 0 0 18px;
}
.owner-language {
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 22px;
}
.owner-language summary {
  color: var(--link-ink);
  font-size: 13px;
  cursor: pointer;
}
.owner-language label:first-of-type {
  margin-top: 15px;
}
.notice-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.notice-actions button {
  flex: 1;
}
.site-notice {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  margin: 24px 26px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(115deg, var(--surface-soft), var(--panel));
  box-shadow: 0 12px 32px var(--shadow);
  position: relative;
  overflow: hidden;
}
.site-notice::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 24px;
  bottom: 24px;
  width: 3px;
  background: var(--brand-gold);
}
.site-notice .notice-mark {
  color: var(--gold);
  font-size: 33px;
  line-height: 1.2;
}
.notice-copy {
  min-width: 0;
  flex: 1;
}
.site-notice small {
  display: block;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.site-notice h2 {
  color: var(--heading);
  font-size: 24px;
  line-height: 1.6;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}
.site-notice p {
  color: var(--text);
  font-size: 15px;
  line-height: 1.95;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}
#noticePreview {
  margin: 14px 0;
}
.auction-public {
  padding: 22px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auction-public small {
  color: var(--gold);
  font-size: 12px;
}
.auction-public span {
  color: var(--muted);
  font-size: 13px;
}
.auction-public strong {
  color: var(--heading);
  font-size: 27px;
  font-weight: 500;
}
.auction-public p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
}
#original-map .original-lot.reserved .original-lot-art {
  stroke: var(--brand-gold) !important;
  stroke-width: 7px !important;
  stroke-dasharray: 14 8;
}
#original-map .original-lot.auction .original-lot-art {
  stroke: var(--brand-gold) !important;
  stroke-width: 7px !important;
}
[hidden] {
  display: none !important;
}
@media (max-width: 640px) {
  #admin {
    width: calc(100vw - 16px);
    max-height: 95dvh;
    padding: 16px;
    border-radius: 18px;
  }
  #admin .dialoghead {
    top: -16px;
    padding: 12px 0;
  }
  #admin .dialoghead h2 {
    font-size: 22px;
  }
  .owner-tabs {
    margin-bottom: 18px;
    gap: 2px;
    padding: 4px;
  }
  .owner-tabs button {
    font-size: 12px;
    padding: 10px 5px;
  }
  .owner-filters {
    gap: 8px;
  }
  .owner-select-tools {
    gap: 8px;
  }
  #ownerSelectionCount {
    width: 100%;
  }
  .owner-plot-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-height: 270px;
    gap: 7px;
  }
  .owner-plot {
    min-height: 76px;
  }
  .owner-plot small {
    font-size: 9px;
  }
  .market-status-options {
    gap: 7px;
  }
  #admin .market-status-options label {
    flex-basis: 40%;
  }
  .market-status-options span {
    padding: 10px 7px;
    font-size: 13px;
  }
  .site-notice {
    margin: 18px 16px;
    padding: 20px;
    gap: 13px;
  }
  .site-notice h2 {
    font-size: 20px;
  }
  .site-notice p {
    font-size: 14px;
  }
  .site-notice .notice-mark {
    font-size: 24px;
  }
  .auction-fields {
    padding: 14px;
  }
  .notice-actions button {
    flex-basis: 100%;
  }
}
