:root {
  color-scheme: light;
  --ink: #12222d;
  --muted: #5e6f78;
  --line: #d8e0e3;
  --panel: #ffffff;
  --wash: #f4f7f4;
  --navy: #12344c;
  --green: #25745d;
  --gold: #d8a829;
  --gold-soft: #f5e6b8;
  --shadow: 0 18px 50px rgba(18, 34, 45, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--wash);
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(18, 52, 76, 0.9), rgba(18, 52, 76, 0.42)),
    url("/assets/lab-bench-hero.png") center / cover;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(216, 224, 227, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.1rem;
  min-width: max-content;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  color: var(--gold);
  font-size: 1.35rem;
}

.brand-name {
  color: var(--navy);
  font-size: 1.12rem;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.85rem;
  border-radius: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.nav-button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link-active {
  color: var(--navy);
  background: #edf3f0;
  outline: none;
}

main {
  padding-bottom: 4rem;
}

.hero {
  position: relative;
  min-height: 34rem;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--navy);
}

.hero-image {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 52, 76, 0.9), rgba(18, 52, 76, 0.55) 44%, rgba(18, 52, 76, 0.16)),
    linear-gradient(0deg, rgba(18, 34, 45, 0.65), rgba(18, 34, 45, 0.08) 46%),
    url("/assets/lab-bench-hero.png") center / cover;
}

.hero-content {
  position: relative;
  width: min(100%, 72rem);
  padding: clamp(5.5rem, 12vw, 9rem) clamp(1.15rem, 5vw, 4rem) clamp(3rem, 8vw, 5rem);
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--gold-soft);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 13ch;
  margin-bottom: 0.8rem;
  font-size: clamp(3.1rem, 12vw, 7rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  color: var(--navy);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 42rem;
  margin-bottom: 1.6rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.4rem;
  font-weight: 800;
}

.button-primary {
  color: var(--navy);
  background: var(--gold);
  border-color: var(--gold);
}

.button-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
}

.button-quiet {
  min-height: 2.45rem;
  color: var(--green);
  background: #eef5f1;
  border-color: #d6e7df;
}

.is-hidden {
  display: none;
}

.quick-status,
.booking-preview,
.link-panels {
  width: min(100% - 2rem, 72rem);
  margin: 0 auto;
}

.quick-status {
  padding: 3rem 0 1.2rem;
}

.section-heading,
.table-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

.status-panel,
.feature-link,
.booking-preview {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(18, 34, 45, 0.07);
}

.status-panel {
  padding: 1.1rem;
}

.status-label {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-panel strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--navy);
  font-size: 2.2rem;
  line-height: 1;
}

.status-panel p,
.feature-link p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.booking-preview {
  margin-top: 1.2rem;
  padding: 1.15rem;
  overflow: hidden;
}

.booking-view-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.9rem;
  border: 1px solid #e4ebed;
  border-radius: 0.45rem;
  background: #f8fbf9;
}

.purge-button {
  flex: 0 0 auto;
  color: #9b3434;
  background: #fff7f5;
  border-color: rgba(155, 52, 52, 0.2);
}

.range-toggle {
  min-width: 0;
}

.range-toggle legend {
  color: var(--navy);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.range-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.range-toggle legend {
  flex: 0 0 100%;
  margin-bottom: 0.35rem;
  padding: 0;
}

.range-toggle label {
  display: block;
}

.range-toggle input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.range-toggle span {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0 0.75rem;
  border: 1px solid #cdd9dd;
  border-radius: 0.35rem;
  color: var(--muted);
  background: #ffffff;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.range-toggle input:checked + span {
  color: var(--navy);
  border-color: #d6e7df;
  background: #eaf4ef;
}

.range-toggle input:focus-visible + span {
  border-color: var(--green);
  outline: 3px solid rgba(37, 116, 93, 0.16);
}

.text-link {
  color: var(--green);
  font-weight: 850;
}

.booking-table {
  display: grid;
  gap: 0.2rem;
  overflow-x: auto;
}

.booking-row {
  display: grid;
  grid-template-columns: 5.8rem 5.8rem 5.5rem minmax(16rem, 1fr) 5.5rem 6rem;
  align-items: center;
  min-width: 46rem;
  min-height: 3.1rem;
  border-bottom: 1px solid #eef2f2;
  color: var(--ink);
}

.booking-row:last-child {
  border-bottom: 0;
}

.booking-row-empty {
  grid-template-columns: 1fr;
  min-width: 0;
  color: var(--muted);
}

.booking-row span {
  padding: 0.35rem 0.5rem;
}

.booking-row-head {
  min-height: 2.3rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.booking-table[data-table-mode="manage"] .booking-row {
  grid-template-columns: 5.8rem 5.8rem 5.5rem minmax(16rem, 1fr) 5.2rem 5.8rem;
}

.table-action {
  min-height: 2rem;
  border: 1px solid #cdd9dd;
  border-radius: 0.35rem;
  padding: 0 0.65rem;
  color: var(--green);
  background: #f7faf8;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 850;
  cursor: pointer;
}

.table-action:hover,
.table-action:focus-visible {
  border-color: rgba(37, 116, 93, 0.45);
  outline: 3px solid rgba(37, 116, 93, 0.14);
}

.table-action-danger {
  color: #9b3434;
  background: #fff7f5;
}

.table-action-danger:hover,
.table-action-danger:focus-visible {
  border-color: rgba(155, 52, 52, 0.45);
  outline-color: rgba(155, 52, 52, 0.14);
}

.table-action-confirm {
  color: #ffffff;
  background: #9b3434;
  border-color: #9b3434;
}

.tick {
  display: inline-grid;
  width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  border: 2px solid #b8c6c9;
  border-radius: 0.25rem;
}

.tick.is-on {
  border-color: var(--green);
  background: var(--green);
}

.tick.is-on::after {
  width: 0.34rem;
  height: 0.62rem;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  content: "";
  transform: rotate(45deg) translate(-1px, -1px);
}

.table-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  min-height: 1.75rem;
}

.table-check input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--green);
  cursor: pointer;
}

.table-check input:disabled {
  cursor: progress;
  opacity: 0.7;
}

.table-check span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.link-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.2rem;
}

.feature-link {
  display: block;
  padding: 1.2rem;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.feature-link:hover,
.feature-link:focus-visible {
  border-color: rgba(37, 116, 93, 0.45);
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-2px);
}

.feature-link span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 850;
}

.page-shell {
  width: min(100% - 2rem, 72rem);
  margin: 0 auto;
  padding-top: 3rem;
}

.page-intro {
  max-width: 48rem;
  margin-bottom: 1.5rem;
}

.page-intro h1 {
  margin-bottom: 0.7rem;
  color: var(--navy);
  font-size: clamp(2.4rem, 7vw, 4.6rem);
}

.page-intro p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.booking-layout {
  display: grid;
  grid-template-columns: minmax(17rem, 23rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.booking-form,
.booking-board {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(18, 34, 45, 0.07);
}

.booking-form {
  display: grid;
  gap: 0.95rem;
  padding: 1.15rem;
}

.form-heading h2 {
  margin-bottom: 0.35rem;
}

.form-heading p,
.form-message {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.booking-form label {
  display: grid;
  gap: 0.4rem;
}

.booking-form label span {
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.booking-form input,
.booking-form select,
.booking-form textarea {
  width: 100%;
  min-height: 2.7rem;
  border: 1px solid #cdd9dd;
  border-radius: 0.4rem;
  padding: 0.65rem 0.75rem;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

.booking-form textarea {
  min-height: 6rem;
  resize: vertical;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.login-shell {
  width: min(100% - 2rem, 28rem);
  padding: 2rem 0;
}

.login-panel {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 1.35rem;
}

.login-brand {
  margin-bottom: 1.5rem;
}

.login-panel h1 {
  margin-bottom: 0.6rem;
  color: var(--navy);
  font-size: clamp(2.3rem, 8vw, 3.8rem);
}

.login-form {
  padding: 0;
  border: 0;
  box-shadow: none;
}

.resource-filters {
  display: grid;
  grid-template-columns: 7rem minmax(13rem, 1fr) minmax(8rem, 0.8fr) minmax(9rem, 0.9fr) auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: 0.9rem;
  border: 1px solid #e4ebed;
  border-radius: 0.45rem;
  background: #f8fbf9;
}

.resource-filters label {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.resource-filters label span {
  color: var(--navy);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.resource-filters input,
.resource-filters select {
  width: 100%;
  min-height: 2.45rem;
  border: 1px solid #cdd9dd;
  border-radius: 0.35rem;
  padding: 0 0.65rem;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

.resource-list {
  display: grid;
  gap: 0.8rem;
}

.resource-card,
.resource-empty {
  border: 1px solid #e4ebed;
  border-radius: 0.5rem;
  background: #ffffff;
}

.resource-card {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
}

.resource-card-head,
.resource-footer,
.resource-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.resource-card-head,
.resource-footer {
  justify-content: space-between;
}

.resource-id {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0 0.55rem;
  border-radius: 0.35rem;
  color: var(--navy);
  background: #edf3f0;
  font-size: 0.82rem;
  font-weight: 850;
}

.resource-meta,
.resource-category,
.resource-footer {
  color: var(--muted);
  font-size: 0.9rem;
}

.resource-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.2rem;
  line-height: 1.2;
}

.resource-card p {
  margin-bottom: 0;
  line-height: 1.48;
}

.resource-category {
  font-weight: 800;
}

.resource-actions {
  padding-top: 0.4rem;
}

.resource-empty {
  padding: 1rem;
  color: var(--muted);
}

.guide-layout {
  display: grid;
  gap: 1rem;
}

.guide-section {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(18, 34, 45, 0.07);
  padding: 1.15rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.guide-grid-compact {
  grid-template-columns: 1fr;
}

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

.guide-link,
.guide-placeholder {
  min-height: 4.4rem;
  border: 1px solid #dfe8ea;
  border-radius: 0.45rem;
  background: #f8fbf9;
}

.guide-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.85rem;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.guide-link:hover,
.guide-link:focus-visible {
  border-color: rgba(37, 116, 93, 0.45);
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-2px);
}

.guide-link span {
  color: var(--navy);
  font-weight: 850;
  line-height: 1.2;
}

.guide-link small,
.guide-placeholder {
  color: var(--muted);
  line-height: 1.4;
}

.guide-placeholder {
  display: flex;
  align-items: center;
  padding: 0.85rem;
}

.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus {
  border-color: var(--green);
  outline: 3px solid rgba(37, 116, 93, 0.16);
}

.booking-board {
  min-width: 0;
  padding: 1.15rem;
  overflow: hidden;
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    min-height: 32rem;
  }

  .hero-image {
    background:
      linear-gradient(90deg, rgba(18, 52, 76, 0.92), rgba(18, 52, 76, 0.58)),
      linear-gradient(0deg, rgba(18, 34, 45, 0.68), rgba(18, 34, 45, 0.08)),
      url("/assets/lab-bench-hero.png") center / cover;
  }

  .status-grid,
  .link-panels,
  .booking-layout,
  .resource-filters,
  .guide-grid,
  .guide-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .quick-status,
  .booking-preview,
  .link-panels,
  .page-shell {
    width: min(100% - 1rem, 72rem);
  }

  .nav-link {
    min-height: 2.35rem;
    padding: 0 0.65rem;
    font-size: 0.84rem;
  }

  .hero-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .section-heading,
  .table-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
