:root {
  --green: #00b82f;
  --green-700: #078329;
  --green-800: #056321;
  --ink: #132018;
  --muted: #64736a;
  --line: #d9e5de;
  --line-strong: #c4d5cb;
  --paper: #ffffff;
  --soft: #f5f8f6;
  --soft-strong: #edf4ef;
  --yellow: #f1d400;
  --danger: #b3261e;
  --warning: #9a6700;
  --shadow: 0 18px 55px rgba(17, 34, 24, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

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

a {
  color: var(--green-700);
  font-weight: 750;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(300px, 440px) minmax(0, 1fr);
  min-height: 100vh;
}

.brand-panel {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 100vh;
  gap: 40px;
  padding: 42px;
  color: #fff;
  background: #078329;
}

.brand-panel > * {
  max-width: 100%;
}

.logo {
  width: min(240px, 70vw);
  height: auto;
  filter: brightness(0) invert(1);
}

.brand-panel .logo {
  margin-left: -28px;
}

.eyebrow,
.form-heading p,
.dashboard-title p,
.login-brand p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-panel .eyebrow,
.brand-panel .intro {
  color: rgba(255, 255, 255, 0.84);
}

h1,
h2 {
  margin: 0;
}

h1 {
  max-width: 8ch;
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 0.92;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.1;
}

.intro {
  max-width: 32rem;
  margin: 22px 0 0;
  font-size: 1.02rem;
  line-height: 1.65;
}

.brand-meta {
  display: grid;
  gap: 10px;
}

.brand-meta span {
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.88rem;
  font-weight: 750;
}

.form-panel {
  padding: 44px;
}

form {
  width: min(100%, 920px);
  margin: 0 auto;
}

.form-heading {
  margin-bottom: 22px;
}

.form-section,
fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 20px;
  padding: 22px;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(17, 34, 24, 0.02);
}

.form-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.form-grid.last {
  margin-bottom: 0;
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

fieldset > label {
  margin-bottom: 18px;
}

fieldset > label:last-child {
  margin-bottom: 0;
}

label span,
legend {
  color: var(--ink);
}

.field-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.45;
}

b {
  color: var(--green-700);
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--paper);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 12px) 21px;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
}

input::placeholder,
textarea::placeholder {
  color: #7b837e;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(0, 184, 47, 0.14);
}

legend {
  padding: 0 8px;
  font-size: 1.04rem;
  font-weight: 850;
}

.hint {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.93rem;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.option-grid label,
.inline-options label,
.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--soft);
  font-weight: 700;
}

input[type="radio"],
input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--green-700);
}

input[type="file"] {
  min-height: 54px;
  padding: 12px;
  background: var(--soft);
}

.inline-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.other-field,
.capacity-field {
  margin-top: 16px;
}

.capacity-field {
  display: none;
}

.capacity-field.visible {
  display: grid;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  color: #fff;
  background: var(--green-700);
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.button:hover {
  background: var(--green-800);
  box-shadow: 0 10px 24px rgba(5, 99, 33, 0.2);
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.button.small {
  min-height: 34px;
  padding: 0 13px;
  font-size: 0.86rem;
}

.button.wide {
  width: 100%;
}

.button.secondary {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: var(--paper);
}

.button.secondary:hover {
  color: #fff;
  background: var(--green-700);
}

.button.ghost {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.link-button {
  border: 0;
  padding: 0;
  color: var(--green-700);
  background: transparent;
  font-weight: 850;
  cursor: pointer;
}

.link-button.centered {
  justify-self: center;
  margin-top: 14px;
}

.hidden {
  display: none !important;
}

.message {
  min-height: 0;
  margin: 18px 0 0;
  border-radius: 8px;
  padding: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.45;
}

.message:empty {
  display: none;
}

.message.success {
  color: var(--green-700);
  border: 1px solid #b8e6c4;
  padding: 12px 14px;
  background: #effaf2;
}

.message.error {
  color: var(--danger);
  border: 1px solid #f1bbb6;
  padding: 12px 14px;
  background: #fff4f2;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
}

.form-footer p {
  max-width: 380px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.admin-body {
  background: #f6f8f7;
}

.admin-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 22px 34px;
  color: #fff;
  background: var(--green-800);
}

.admin-top img {
  width: 132px;
  height: auto;
  filter: brightness(0) invert(1);
}

.admin-top p {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-top h1 {
  max-width: none;
  font-size: clamp(1.25rem, 2.4vw, 2.05rem);
  line-height: 1.1;
}

.admin-shell,
.detail-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 24px auto 60px;
}

.login-panel {
  display: grid;
  min-height: calc(100vh - 132px);
  align-items: start;
  justify-items: center;
  padding-top: clamp(36px, 8vh, 84px);
}

.admin-login {
  width: min(100%, 460px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.login-brand {
  display: block;
  margin-bottom: 24px;
}

.login-brand h2 {
  font-size: 1.85rem;
}

.admin-login label {
  margin-bottom: 16px;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 4px;
}

.login-row .check-label {
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.dashboard-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  min-height: 42px;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 850;
  cursor: pointer;
}

.tab-button.active {
  border-color: var(--green-700);
  color: var(--ink);
}

.tab-panel {
  min-width: 0;
}

.dashboard-title h2 {
  font-size: 1.9rem;
}

.admin-actions {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(180px, 240px) minmax(260px, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.metric,
.search-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--paper);
}

.metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric span,
.search-field span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.metric strong {
  font-size: 2rem;
}

.search-field {
  gap: 8px;
}

.search-field input {
  min-height: 42px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--paper);
}

.pagination-bar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-controls span {
  min-width: 92px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 850;
  text-align: center;
}

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

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: var(--soft);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

tbody tr:hover,
.selected-row {
  background: #f9fcfa;
}

td strong {
  display: block;
  font-weight: 850;
}

td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  background: var(--soft-strong);
  font-size: 0.82rem;
  font-weight: 850;
}

.status-badge.good {
  color: var(--green-800);
  background: #e4f5e8;
}

.status-badge.warn {
  color: var(--warning);
  background: #fff7d6;
}

.empty {
  height: 120px;
  color: var(--muted);
  text-align: center;
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 24px;
}

.detail-shell section,
.photo-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--paper);
}

.detail-list {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 0;
  margin: 0;
}

.detail-list dt,
.detail-list dd {
  margin: 0;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-weight: 850;
}

.detail-list dd {
  overflow-wrap: anywhere;
}

.photo-panel img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--soft);
}

.photo-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-detail {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--paper);
}

.admin-detail h2 {
  margin: 0 0 18px;
  font-size: 1.45rem;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 24px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.settings-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--paper);
}

.settings-card h3 {
  margin: 0 0 8px;
  font-size: 1.16rem;
}

.settings-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.settings-card .button {
  margin-top: 18px;
}

.settings-card .form-grid + .button,
.settings-card label + .button {
  margin-top: 22px;
}

.mini-list {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 0;
  margin: 0;
}

.mini-list dt,
.mini-list dd {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.mini-list dt {
  color: var(--muted);
  font-weight: 850;
}

.mini-list dd {
  overflow-wrap: anywhere;
}

.admin-users-wrap {
  margin-top: 18px;
  overflow: visible;
}

#adminsTab .settings-grid {
  grid-template-columns: minmax(0, 1fr);
}

.row-menu {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}

.row-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  display: grid;
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.row-menu-panel button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

.row-menu-panel button:hover {
  background: var(--soft);
}

.row-menu-panel button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(19, 32, 24, 0.42);
}

.modal-card {
  width: min(100%, 480px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.submission-modal-card {
  width: min(100%, 1040px);
  max-height: min(86vh, 840px);
  overflow: hidden;
}

.submission-modal-body {
  max-height: calc(min(86vh, 840px) - 100px);
  overflow: auto;
  padding-right: 4px;
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-head {
  margin-bottom: 16px;
}

.modal-head p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.modal-head h2 {
  font-size: 1.55rem;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
  font-size: 1.35rem;
  font-weight: 750;
  cursor: pointer;
}

.modal-copy {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

@media (max-width: 920px) {
  .page-shell,
  .detail-shell,
  .admin-detail-grid {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    position: static;
    min-height: 420px;
    justify-content: flex-start;
    gap: 28px;
  }

  h1 {
    max-width: none;
  }

  .form-panel,
  .brand-panel {
    padding: 28px 18px;
  }

  .form-grid.two,
  .option-grid,
  .admin-actions,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-tabs {
    overflow-x: auto;
  }

  .pagination-bar,
  .pagination-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-controls .button {
    width: 100%;
  }

  .modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .submission-modal-card {
    max-height: 90vh;
  }

  .submission-modal-body {
    max-height: calc(90vh - 104px);
  }

  .admin-users-wrap {
    overflow-x: auto;
  }

  .form-footer,
  .dashboard-title,
  .login-row {
    align-items: stretch;
    flex-direction: column;
  }

  .form-footer {
    gap: 12px;
    margin-top: 14px;
  }

  .form-footer p {
    max-width: none;
  }

  .form-footer .button,
  .dashboard-title .button {
    width: 100%;
  }

  .admin-top {
    grid-template-columns: 1fr;
    padding: 22px 18px;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .detail-list dt {
    padding-bottom: 4px;
    border-bottom: 0;
  }

  .detail-list dd {
    padding-top: 0;
  }
}

@media (max-width: 560px) {
  .page-shell {
    min-width: 0;
  }

  .brand-panel {
    min-height: auto;
    padding: 28px 24px 34px;
  }

  .logo {
    width: min(210px, 58vw);
  }

  .brand-panel .logo {
    margin-left: -28px;
  }

  .brand-panel .eyebrow {
    margin-top: 8px;
  }

  h1 {
    max-width: 7.4ch;
    font-size: clamp(3.05rem, 13vw, 4.15rem);
    line-height: 0.96;
  }

  .intro {
    max-width: 100%;
    margin-top: 18px;
    font-size: 1rem;
    line-height: 1.55;
  }

  .brand-meta {
    width: 100%;
    gap: 8px;
  }

  .brand-meta span {
    max-width: 100%;
    white-space: normal;
  }

  .form-panel {
    padding: 26px 16px 34px;
  }

  .form-section,
  fieldset {
    padding: 18px;
  }

  .inline-options label {
    flex: 1 1 130px;
    justify-content: flex-start;
  }

  .button {
    min-height: 54px;
    padding: 0 16px;
  }
}
