:root {
  --fjord: #062a2f;
  --deep: #041f24;
  --panel: #173b3d;
  --panel-2: #21494a;
  --paper: #f7f7f3;
  --moss: #b8d7c2;
  --muted: rgba(247, 247, 243, 0.72);
  --line: rgba(247, 247, 243, 0.16);
  --ink: #07282d;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--deep);
  color: var(--paper);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(circle at 86% 0%, rgba(184, 215, 194, 0.1), transparent 32rem),
    linear-gradient(135deg, #061c21 0%, var(--fjord) 58%, #0f3836 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: auto -10rem -12rem auto;
  width: 34rem;
  height: 34rem;
  background: url("easy-access-mark.svg") center / contain no-repeat;
  opacity: 0.025;
  pointer-events: none;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

.portal-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid rgba(247, 247, 243, 0.1);
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.82rem;
  width: max-content;
  max-width: 100%;
  color: #fff;
  text-decoration: none;
}

.portal-brand-mark {
  display: block;
  width: 3.45rem;
  height: 2.62rem;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}

.portal-brand span {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.portal-brand strong {
  color: #fff;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.portal-brand small {
  margin-top: 0.4rem;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.portal-mark {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.45rem;
  color: var(--moss);
}

.portal-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-weight: 650;
}

.portal-nav a,
.portal-nav button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.portal-nav a:hover,
.portal-nav button:hover {
  border-color: rgba(247, 247, 243, 0.16);
  color: #fff;
}

.portal-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.25rem 0 5rem;
}

.portal-hero,
.report-head,
.login-panel,
.portal-panel {
  padding: clamp(2rem, 5vw, 4.5rem);
  border: 1px solid rgba(247, 247, 243, 0.17);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.045));
  border-radius: 0.6rem;
  box-shadow: 0 1.2rem 4rem rgba(0, 0, 0, 0.18);
}

.portal-hero.compact {
  padding: 2rem;
}

.archive-hero {
  padding: clamp(1.7rem, 3.6vw, 3rem);
}

.portal-hero h1,
.report-head h1,
.login-panel h1,
.portal-panel h1 {
  max-width: 980px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.2rem, 5.2vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.portal-hero.compact h1 {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
}

.portal-hero p,
.report-head > p,
.login-panel p,
.portal-panel p {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.6;
}

.archive-hero p {
  max-width: 820px;
  margin-bottom: 0;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--moss);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.archive-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, minmax(9rem, 0.22fr));
  gap: 0.75rem;
  align-items: end;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
}

.archive-tools label {
  gap: 0.35rem;
}

.archive-tools span {
  color: var(--moss);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.archive-search-label input {
  min-height: 3.25rem;
}

.archive-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-weight: 650;
}

.archive-result-row p {
  margin: 0;
}

.archive-list-panel {
  margin-top: 0.8rem;
}

.archive-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.045);
}

.archive-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.archive-table th,
.archive-table td {
  padding: 0.72rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.archive-table th {
  background: rgba(255, 255, 255, 0.065);
}

.archive-table th button,
.archive-table th span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--moss);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.archive-table th button {
  cursor: pointer;
}

.archive-table th button[aria-sort="ascending"]::after {
  content: "↑";
}

.archive-table th button[aria-sort="descending"]::after {
  content: "↓";
}

.archive-table tbody tr:last-child td {
  border-bottom: 0;
}

.archive-table td {
  color: var(--muted);
  font-weight: 600;
}

.archive-table .document-title-link {
  max-width: 34rem;
  font-weight: 700;
}

.archive-table .status-badge {
  margin: 0;
  font-weight: 700;
}

.archive-table .button {
  min-height: 2rem;
  padding: 0.42rem 0.72rem;
  font-weight: 750;
  white-space: nowrap;
}

.archive-filter-row th {
  padding: 0.58rem 0.8rem;
  background: rgba(255, 255, 255, 0.035);
}

.archive-filter-row input,
.archive-filter-row select {
  min-height: 2.6rem;
  padding: 0.62rem 0.72rem;
  font-size: 0.9rem;
}

.archive-empty-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.archive-empty-inline span {
  color: var(--muted);
}

.document-kind-inspection {
  background: rgba(139, 174, 197, 0.2);
  color: #d7e7ef;
}

.archive-grid {
  align-items: stretch;
}

.portal-card,
.content-band,
.split-band,
.ack-panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
}

.portal-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.4rem;
}

.report-card {
  height: 100%;
}

.report-card-main {
  display: grid;
  gap: 0.8rem;
}

.report-card .button {
  margin-top: auto;
}

.archive-empty {
  grid-column: 1 / -1;
  align-items: flex-start;
}

.portal-card h2,
.content-band h2,
.split-band h2,
.ack-panel h2,
.report-section h2,
.login-panel h1 {
  margin: 0;
  color: #fff;
}

.portal-card p,
.report-section p,
.ack-panel p,
.empty-state p,
.muted {
  color: var(--muted);
  line-height: 1.6;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 3rem;
  padding: 0.85rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
}

.button:hover {
  transform: translateY(-1px);
}

.button.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.button.tiny {
  min-height: 2.1rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.8rem;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(184, 215, 194, 0.75);
  outline-offset: 2px;
}

.meta-list,
.report-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.8rem;
  margin: 0;
}

.meta-list div,
.report-facts div {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
}

dt {
  color: var(--moss);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

dd {
  margin: 0.3rem 0 0;
  color: #fff;
  font-weight: 800;
}

.content-band,
.split-band,
.ack-panel {
  margin-top: 1rem;
  padding: clamp(1.3rem, 3vw, 2rem);
}

.section-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
}

.report-section {
  display: grid;
  grid-template-columns: minmax(12rem, 0.75fr) minmax(0, 1.25fr);
  gap: 1.5rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.section-meta {
  margin: 0 0 0.55rem;
  color: var(--moss);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.report-section p {
  margin: 0;
}

.band-heading {
  margin-bottom: 1rem;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  min-width: 0;
}

.gallery-heading {
  grid-column: 1 / -1;
  margin: 1rem 0 0;
  color: #fff;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.media-card {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.18);
}

.media-open {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.media-card img,
.media-card video {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #001417;
}

.media-card figcaption {
  display: grid;
  gap: 0.4rem;
  padding: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.media-card strong {
  color: #fff;
}

.media-card em {
  color: #fff;
  font-style: normal;
  font-weight: 800;
}

.media-lightbox {
  position: relative;
  width: min(1120px, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 1px solid rgba(247, 247, 243, 0.18);
  border-radius: 0.75rem;
  background: #041f24;
  color: #fff;
  box-shadow: 0 2rem 7rem rgba(0, 0, 0, 0.5);
}

.media-lightbox::backdrop {
  background: rgba(0, 10, 12, 0.82);
  backdrop-filter: blur(8px);
}

.media-lightbox[open] {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.media-lightbox img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 10rem);
  object-fit: contain;
  background: #001417;
}

.media-lightbox-caption {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border-top: 1px solid var(--line);
}

.media-lightbox-caption strong {
  font-size: 1.05rem;
}

.media-lightbox-caption span {
  color: var(--muted);
  line-height: 1.5;
}

.media-lightbox-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(247, 247, 243, 0.22);
  border-radius: 999px;
  background: rgba(4, 31, 36, 0.84);
  color: #fff;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

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

  .archive-tools {
    grid-template-columns: 1fr 1fr;
  }

  .archive-search-label {
    grid-column: 1 / -1;
  }
}

.empty-state {
  padding: 1.2rem;
  border: 1px dashed rgba(247, 247, 243, 0.25);
  border-radius: 0.65rem;
}

.split-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.financial-list,
.attachment-list,
.admin-list,
.audit-list {
  display: grid;
  gap: 0.65rem;
}

.financial-list div,
.attachment-list a,
.admin-list a,
.audit-list div {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.financial-list strong {
  color: #fff;
  font-size: 1.45rem;
}

.financial-list small,
.attachment-list span,
.admin-list span,
.audit-list span {
  color: var(--muted);
}

.contact-request-list {
  display: grid;
  gap: 0.75rem;
}

.contact-request-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.055);
}

.contact-request-card strong {
  color: #fff;
}

.contact-request-card span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.contact-request-card p {
  margin: 0;
  color: rgba(247, 247, 243, 0.84);
  line-height: 1.55;
}

.basecamp-admin-split {
  align-items: start;
}

.basecamp-admin-booking {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  overflow-wrap: anywhere;
}

.basecamp-admin-booking > div:first-child {
  display: grid;
  gap: 0.35rem;
}

.basecamp-admin-booking strong {
  color: #fff;
}

.basecamp-admin-booking span,
.basecamp-admin-booking small,
.basecamp-admin-booking p {
  color: var(--muted);
  line-height: 1.55;
}

.inline-actions {
  display: inline-flex;
  margin: 0 0.4rem 0 0;
}

.basecamp-admin-head {
  margin-bottom: 1rem;
}

.basecamp-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(20rem, 0.75fr);
  gap: 1rem;
  align-items: start;
  max-width: 100%;
}

.basecamp-admin-layout > * {
  min-width: 0;
}

.basecamp-admin-calendar-panel,
.basecamp-admin-form-panel,
.basecamp-upcoming,
.basecamp-booking-requests {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 1rem;
}

.basecamp-admin-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.basecamp-admin-toolbar strong {
  color: #fff;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  text-align: center;
}

.basecamp-admin-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.45rem;
}

.admin-calendar-weekday {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.admin-calendar-day {
  min-width: 0;
  min-height: 7rem;
  border: 1px solid rgba(247, 247, 243, 0.12);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.055);
  overflow: hidden;
}

.admin-calendar-day > button {
  display: block;
  width: 100%;
  min-height: 2.7rem;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
  padding: 0.65rem;
}

.admin-calendar-day > button:focus-visible,
.admin-entry-pill:focus-visible {
  outline: 3px solid rgba(184, 215, 194, 0.45);
  outline-offset: -2px;
}

.admin-calendar-day b {
  font-size: 1rem;
}

.admin-calendar-day.selected-range {
  border-color: rgba(184, 215, 194, 0.62);
  background: rgba(184, 215, 194, 0.14);
}

.admin-entry-pill,
.status-badge {
  display: block;
  width: fit-content;
  max-width: calc(100% - 0.6rem);
  margin: 0 0.3rem 0.3rem;
  padding: 0.32rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
}

.admin-entry-pill span {
  display: block;
  margin-top: 0.15rem;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.admin-entry-pill.external-entry {
  cursor: default;
  opacity: 0.88;
}

.status-tentative {
  background: rgba(226, 192, 137, 0.24);
  color: #ffe2af;
}

.status-confirmed {
  background: rgba(184, 215, 194, 0.18);
  color: #dff1e5;
}

.status-owner_use {
  background: rgba(156, 180, 194, 0.2);
  color: #d6e8ef;
}

.status-maintenance {
  background: rgba(231, 130, 116, 0.22);
  color: #ffd0ca;
}

.basecamp-admin-side {
  display: grid;
  gap: 1rem;
}

.basecamp-admin-form-panel h2 {
  margin: 0 0 1rem;
  color: #fff;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
}

.basecamp-pricing-panel h2 {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.field-note {
  margin: -0.15rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.status-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.status-choice legend {
  grid-column: 1 / -1;
  margin-bottom: 0.2rem;
  color: var(--moss);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-choice label {
  cursor: pointer;
}

.status-choice input {
  position: absolute;
  opacity: 0;
}

.status-choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 900;
  text-align: center;
}

.status-choice input:checked + span {
  background: var(--paper);
  color: var(--ink);
}

.customer-fields {
  display: grid;
  gap: 0.75rem;
}

.customer-fields[hidden] {
  display: none;
}

.basecamp-upcoming .admin-list a {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.basecamp-upcoming .admin-list small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.basecamp-booking-requests h2 {
  margin: 0 0 1rem;
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.basecamp-request-list {
  display: grid;
  gap: 0.75rem;
}

.basecamp-request-card {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid rgba(247, 247, 243, 0.12);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.055);
  overflow-wrap: anywhere;
}

.basecamp-request-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: start;
}

.basecamp-request-head a {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.basecamp-request-head strong {
  display: block;
  color: #fff;
}

.basecamp-request-head span:not(.status-badge) {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.basecamp-request-meta {
  display: grid;
  gap: 0.4rem;
  margin: 0;
}

.basecamp-request-meta div {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 0.5rem;
}

.basecamp-request-meta dt {
  color: var(--moss);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.basecamp-request-meta dd {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.basecamp-request-card p {
  margin: 0;
  color: rgba(247, 247, 243, 0.82);
  font-size: 0.92rem;
  line-height: 1.55;
}

.basecamp-media-panel {
  grid-column: 1 / -1;
}

.basecamp-admin-image-preview,
.basecamp-gallery-admin-card figure {
  margin: 0;
  border: 1px solid rgba(247, 247, 243, 0.12);
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.basecamp-admin-image-preview {
  margin-bottom: 1rem;
}

.basecamp-admin-image-preview img,
.basecamp-gallery-admin-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.basecamp-admin-gallery-panel {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
}

.basecamp-gallery-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.basecamp-gallery-admin-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
}

.basecamp-gallery-add {
  padding: 1rem;
  border: 1px solid rgba(247, 247, 243, 0.12);
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.14);
}

.basecamp-gallery-admin-carousel {
  display: grid;
  gap: 1rem;
}

.basecamp-gallery-admin-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid rgba(247, 247, 243, 0.12);
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.14);
}

.basecamp-gallery-admin-controls strong {
  min-width: 0;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basecamp-gallery-admin-controls span {
  color: var(--muted);
  font-weight: 900;
}

.basecamp-gallery-admin-grid {
  display: block;
  min-width: 0;
}

.basecamp-gallery-admin-card {
  display: grid;
  grid-template-columns: minmax(15rem, 0.65fr) minmax(0, 1.35fr);
  gap: 0.85rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid rgba(247, 247, 243, 0.12);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.055);
}

.basecamp-gallery-admin-card[hidden] {
  display: none;
}

.basecamp-gallery-admin-card.is-inactive {
  opacity: 0.58;
}

.basecamp-gallery-card-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.basecamp-gallery-card-head strong {
  color: #fff;
}

.basecamp-gallery-card-head span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.basecamp-gallery-admin-card figure {
  align-self: start;
}

.basecamp-gallery-admin-card > form {
  min-width: 0;
}

.basecamp-gallery-admin-card > form:last-child {
  grid-column: 2;
  justify-self: start;
}

.basecamp-inline-check {
  display: inline-flex;
  width: fit-content;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-weight: 900;
}

.basecamp-inline-check input {
  width: auto;
}

@media (max-width: 1220px) {
  .basecamp-admin-layout {
    grid-template-columns: 1fr;
  }

  .basecamp-admin-side {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .basecamp-admin-calendar-panel,
  .basecamp-admin-form-panel,
  .basecamp-upcoming,
  .basecamp-admin-gallery-panel {
    padding: 0.75rem;
  }

  .basecamp-gallery-admin-head,
  .basecamp-gallery-admin-controls {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .basecamp-gallery-admin-head {
    flex-direction: column;
  }

  .basecamp-gallery-admin-card {
    grid-template-columns: 1fr;
  }

  .basecamp-gallery-admin-card > form:last-child {
    grid-column: 1;
  }

  .basecamp-admin-toolbar {
    grid-template-columns: auto 1fr auto;
  }

  .basecamp-admin-toolbar a:nth-of-type(2) {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: center;
  }

  .basecamp-admin-calendar {
    gap: 0.28rem;
  }

  .admin-calendar-day {
    min-height: 5.4rem;
    border-radius: 0.45rem;
  }

  .admin-calendar-day > button {
    min-height: 2.4rem;
    padding: 0.55rem;
  }

  .admin-entry-pill {
    max-width: calc(100% - 0.3rem);
    margin-inline: 0.15rem;
    padding: 0.25rem 0.3rem;
    font-size: 0.58rem;
  }

  .basecamp-admin-side {
    grid-template-columns: 1fr;
  }

  .status-choice {
    grid-template-columns: 1fr;
  }
}

.status-pill {
  width: fit-content;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--moss);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.ack-panel {
  background: #f7f7f3;
  color: var(--ink);
}

.ack-panel h2,
.ack-panel .eyebrow {
  color: var(--ink);
}

.ack-panel p {
  color: rgba(7, 40, 45, 0.72);
}

.login-panel {
  max-width: 640px;
  margin: 3.25rem auto 0;
  padding: clamp(2rem, 4vw, 3.5rem);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.045)),
    rgba(7, 40, 45, 0.2);
}

.login-panel h1 {
  font-size: clamp(2.35rem, 4vw, 3.55rem);
}

.login-panel p {
  font-size: clamp(1rem, 1.5vw, 1.16rem);
}

.stack-form {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--moss);
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid rgba(247, 247, 243, 0.2);
  border-radius: 0.5rem;
  padding: 0.9rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-weight: 500;
}

input[type="file"] {
  overflow: hidden;
  font-size: 0.86rem;
}

textarea {
  resize: vertical;
}

.portal-notice {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid rgba(184, 215, 194, 0.45);
  border-radius: 0.55rem;
  background: rgba(184, 215, 194, 0.13);
  color: #fff;
  font-weight: 800;
}

.manual-access-link {
  display: grid;
  gap: 0.65rem;
}

.manual-access-link span {
  color: var(--muted);
  font-weight: 700;
}

.manual-access-link input {
  width: 100%;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
}

.manual-access-link a {
  width: fit-content;
  color: #fff;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.manual-access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.admin-head {
  display: grid;
  gap: 0.8rem;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.07);
}

.admin-head h1 {
  max-width: 940px;
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4.4vw, 3.8rem);
  line-height: 1.02;
}

.admin-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.document-admin-band {
  display: grid;
  gap: 1rem;
}

.admin-document-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 0.22fr) minmax(9rem, 0.22fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.admin-document-tools label {
  gap: 0.35rem;
}

.admin-document-tools label span {
  color: var(--moss);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-document-count {
  align-self: center;
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
}

.admin-document-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
}

.admin-document-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

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

.admin-document-table th {
  background: rgba(255, 255, 255, 0.07);
}

.admin-document-table th button,
.admin-document-table th span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--moss);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-document-table th button {
  cursor: pointer;
}

.admin-document-table th button[aria-sort="ascending"]::after {
  content: "↑";
}

.admin-document-table th button[aria-sort="descending"]::after {
  content: "↓";
}

.admin-document-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-document-table td {
  color: var(--muted);
  font-weight: 600;
}

.document-title-link {
  display: block;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.admin-document-table small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.document-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.document-type-offer,
.attachment-visibility-customer {
  background: rgba(184, 215, 194, 0.2);
  color: #d9efde;
}

.attachment-visibility-admin {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(247, 247, 243, 0.86);
}

.access-panel {
  margin-top: 1rem;
}

.access-grant-form {
  margin-bottom: 1rem;
}

.access-list {
  display: grid;
  gap: 0.65rem;
}

.access-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.05);
}

.access-row span,
.access-row small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  line-height: 1.5;
}

.access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.ai-shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.ai-shortcut p {
  max-width: 680px;
  margin: 0.6rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.admin-editor {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.ai-draft-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.helper {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
}

.ai-notes {
  min-height: 28rem;
  line-height: 1.7;
}

.ai-dropzone {
  justify-items: stretch;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px dashed rgba(184, 215, 194, 0.45);
  border-radius: 0.75rem;
  background: rgba(184, 215, 194, 0.08);
}

.ai-dropzone input {
  margin-top: 0.8rem;
}

.ai-dropzone span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.ai-submit-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(184, 215, 194, 0.32);
  border-radius: 0.75rem;
  background: rgba(184, 215, 194, 0.1);
}

.ai-submit-band p {
  margin: 0;
  color: #fff;
  font-weight: 900;
}

.ai-config-note {
  display: grid;
  gap: 0.3rem;
  max-width: 56rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(184, 215, 194, 0.28);
  border-radius: 0.65rem;
  background: rgba(184, 215, 194, 0.08);
}

.ai-config-note strong {
  color: #fff;
}

.ai-config-note span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.45;
}

.review-flags-panel {
  margin-top: 1rem;
  border-color: rgba(184, 215, 194, 0.35);
}

.review-flags-form {
  display: grid;
  gap: 0.8rem;
}

.review-flag {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 0.28fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.16);
}

.review-flag strong {
  color: #fff;
}

.review-flag p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.review-flag span {
  display: block;
  margin-top: 0.55rem;
  color: rgba(247, 247, 243, 0.5);
  font-size: 0.82rem;
  font-weight: 800;
}

.sticky-save {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(4, 31, 36, 0.92);
  backdrop-filter: blur(10px);
}

.sticky-save span {
  color: var(--moss);
  font-weight: 900;
}

.editor-panel {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.4rem);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.075);
}

.panel-heading h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
}

.form-grid {
  display: grid;
  gap: 0.9rem;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.editor-stack,
.media-editor-list {
  display: grid;
  gap: 0.85rem;
}

.editor-block {
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.16);
}

.block-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.block-toolbar > div {
  display: flex;
  gap: 0.45rem;
}

.delete-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
}

.delete-line input {
  width: auto;
}

.media-edit-block {
  display: grid;
  grid-template-columns: minmax(12rem, 0.7fr) minmax(0, 1.3fr);
  gap: 1rem;
  min-width: 0;
}

.admin-media-fields {
  min-width: 0;
}

.admin-media-preview img,
.admin-media-preview video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.5rem;
  background: #001417;
}

.media-draw-open {
  width: 100%;
  margin-top: 0.65rem;
}

.media-draw-panel {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.18);
}

.media-draw-panel[hidden] {
  display: none;
}

.media-draw-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.media-draw-toolbar strong {
  margin-right: 0.15rem;
  color: #fff;
}

.media-draw-toolbar label {
  display: inline-flex;
  width: auto;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.media-draw-toolbar input[type="color"] {
  width: 2.4rem;
  height: 2.1rem;
  padding: 0.12rem;
}

.media-draw-toolbar input[type="range"] {
  width: 6.5rem;
  padding: 0;
}

.media-canvas-wrap {
  max-height: 72vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #001417;
}

.media-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}

.media-draw-status {
  margin: 0;
  font-size: 0.86rem;
}

.admin-upload-band {
  align-items: start;
}

.admin-side-stack,
.organization-choice-field,
.new-organization-fields {
  display: grid;
  gap: 1rem;
}

.organization-choice-field {
  align-content: end;
}

.organization-choice-field .button {
  justify-self: start;
}

.new-organization-fields {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.14);
}

.new-organization-fields[hidden] {
  display: none;
}

@media (max-width: 780px) {
  .portal-shell {
    width: min(100% - 1rem, 1180px);
  }

  .portal-topbar,
  .portal-nav,
  .split-band,
  .report-section,
  .form-grid.two,
  .media-edit-block,
  .review-flag,
  .archive-tools,
  .admin-document-tools,
  .access-row {
    grid-template-columns: 1fr;
  }

  .archive-hero {
    padding: 1.45rem;
  }

  .archive-tools {
    padding: 0.8rem;
  }

  .access-actions {
    justify-content: flex-start;
  }

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

  .media-lightbox {
    width: calc(100% - 1rem);
  }

  .portal-topbar,
  .portal-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-shortcut,
  .ai-submit-band {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-brand {
    gap: 0.62rem;
  }

  .portal-brand-mark {
    width: 3.15rem;
    height: 2.4rem;
  }

  .portal-brand strong {
    font-size: 0.86rem;
  }

  .portal-brand small {
    font-size: 0.54rem;
  }

  .sticky-save {
    align-items: stretch;
    flex-direction: column;
  }

  .sticky-save .button {
    width: 100%;
  }
}
