@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: 'Libre Caslon Display';
  src: url('/fonts/libre-caslon-display.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #294e4c;
  --muted: #617267;
  --paper: #faf6eb;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #e7e1d3;
  color: var(--ink);
  font: 15px/1.8 'DM Sans', Arial, sans-serif;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 36px 24px;
  font: 400 25px/1.3 'Libre Caslon Display', Georgia, serif;
}
.brand img { width: 35px; height: 35px; object-fit: contain; }
.access-card {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  max-width: 980px;
  margin: 12px auto 0;
  overflow: hidden;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 16px 50px #494b3914;
}
.landscape {
  position: relative;
  min-height: 570px;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  padding: 44px;
}
.landscape img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.landscape::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #143c3910 25%, #103733bd);
}
.landscape p {
  margin: 0;
  color: #fff7e7;
  font: 400 47px/1.1 'Libre Caslon Display', Georgia, serif;
}
.access-form { padding: 58px 52px 46px; }
.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}
h1 {
  margin: 0 0 18px;
  font: 400 62px/1.1 'Libre Caslon Display', Georgia, serif;
  letter-spacing: -.6px;
}
.introduction { margin: 0 0 24px; font-size: 16px; line-height: 1.7; }
.instruction { margin: 0 0 25px; color: var(--muted); font-size: 13px; }
label { display: block; margin-bottom: 8px; font-size: 12px; }
input {
  display: block;
  width: 100%;
  min-height: 49px;
  padding: 12px 14px;
  border: 1px solid #b9c9b7;
  border-radius: 6px;
  color: var(--ink);
  background: #fffdf7;
  font: 16px/1.5 'DM Sans', Arial, sans-serif;
}
input::placeholder { color: #819083; }
button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 49px;
  margin-top: 16px;
  padding: 13px 18px;
  border: 1px solid #315d54;
  border-radius: 6px;
  background: #315d54;
  color: #fff8e8;
  font: 400 12px/1.5 'DM Sans', Arial, sans-serif;
  cursor: pointer;
}
button:hover { background: #254b44; }
button span { font-size: 20px; line-height: 1; }
input:focus-visible, button:focus-visible { outline: 2px solid #6b8460; outline-offset: 4px; }
.help { margin: 23px 0 0; color: var(--muted); font-size: 11px; }
.message {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid #d4ba9e;
  border-radius: 6px;
  background: #f4e9da;
  color: #734a33;
  font-size: 13px;
}
body { padding-bottom: 36px; }
@media (max-width: 1040px) {
  .access-card { margin-inline: 30px; }
}
@media (max-width: 700px) {
  .brand { padding: 26px 20px; font-size: 23px; }
  .access-card { display: block; max-width: 480px; margin: 0 auto; }
  .landscape { min-height: 175px; padding: 25px 30px; }
  .landscape img { object-position: center 40%; }
  .landscape p { font-size: 32px; }
  .access-form { padding: 32px 30px; }
  h1 { font-size: 51px; }
}
@media (max-width: 520px) {
  .access-card { margin-inline: 18px; }
  .brand { font-size: 21px; gap: 10px; }
  .brand img { width: 30px; height: 30px; }
  .access-form { padding: 29px 25px; }
  .introduction { font-size: 15px; }
}
/* Access page with workbook-inspired landscape. */
.landscape { min-height: 500px; }
.access-form { display: flex; flex-direction: column; justify-content: center; }
.instruction { font-size: 15px; margin-bottom: 30px; }
.landscape::after { background: linear-gradient(180deg, #143c3900, #143c3914); }
@media (max-width:700px) {
  .landscape { min-height: 210px; }
  .access-form { padding-block: 36px; }
}

.admin-card {
  width: min(100% - 36px, 960px);
  margin: 48px auto;
  padding: 36px;
  border-radius: 14px;
  background: var(--paper);
  overflow-wrap: anywhere;
}
.admin-card:has(input[type=password]) { max-width: 460px; }
.admin-card h1 { font-size: 42px; }
.admin-card label { margin-top: 18px; }
.admin-card table { display: block; overflow-x: auto; width: 100%; margin-top: 24px; border-collapse: collapse; font-size: 12px; }
.admin-card th, .admin-card td { padding: 12px; text-align: left; border-bottom: 1px solid #d5dbcd; }
.admin-card th { font-weight: 600; }
.admin-card code { font-size: 13px; }
.admin-card table button { margin: 0; }
.admin-signout { display: flex; justify-content: flex-end; margin-bottom: 20px; }
.admin-signout button { width: auto; margin: 0; }
@media (max-width: 520px) {
  .admin-card { margin-block: 24px; padding: 25px; }
  .admin-card h1 { font-size: 36px; }
}
.archived-codes { margin-top: 28px; padding-top: 20px; border-top: 1px solid #d5dbcd; }
.archived-codes summary { cursor: pointer; font-weight: 600; }
.duration-field { border: 0; padding: 0; margin: 0; }
.duration-field legend { font-size: 15px; }
.duration-controls { display: flex; gap: 16px; max-width: 420px; }
.duration-controls > div { flex: 1; min-width: 0; }
.duration-controls select {
  width: 100%;
  min-height: 49px;
  padding: 12px 14px;
  border: 1px solid #b9c9b7;
  border-radius: 6px;
  color: var(--ink);
  background: #fffdf7;
  font: 16px/1.5 'DM Sans', Arial, sans-serif;
}
.duration-controls select:focus-visible { outline: 2px solid #6b8460; outline-offset: 4px; }
.bulk-archive { display: flex; justify-content: flex-end; margin-top: 20px; }
.bulk-archive button { width: auto; margin: 0; }
.admin-card input[type=checkbox] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  padding: 0;
  accent-color: #315d54;
  cursor: pointer;
}
.admin-card input[type=checkbox]:disabled { opacity: .35; cursor: default; }
.admin-card button:disabled { opacity: .5; cursor: default; }

.admin-dashboard {
  width: min(100% - 40px, 1100px);
  padding: 0;
  margin: 28px auto 48px;
  overflow: hidden;
  background: #faf6eb;
  box-shadow: 0 14px 45px #494b3912;
}
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 32px;
}
.admin-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font: 23px/1.3 'Libre Caslon Display', Georgia, serif; }
.admin-brand img { width: 32px; height: 32px; object-fit: contain; }
.admin-toolbar .admin-signout { margin: 0; flex-shrink: 0; }
.admin-toolbar .admin-signout button { padding: 8px 16px; min-height: 38px; border-color: #b9c9b7; background: transparent; color: var(--ink); }
.admin-toolbar .admin-signout button:hover { background: #e9edde; }
.admin-water { position: relative; isolation: isolate; padding: 36px 40px; min-height: 190px; display: flex; align-items: flex-end; }
.admin-water img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 56%; }
.admin-water::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #103a35bb, #103a3515); }
.admin-water h1 { margin: 0; color: #fff8e7; font-size: 47px; letter-spacing: -.4px; }
.dashboard-content { padding: 30px; display: grid; gap: 24px; }
.code-panel { padding: 26px; border: 1px solid #d8d9c9; border-radius: 12px; min-width: 0; }
.create-panel { background: #fffdf7; }
.active-panel { background: #e5eddf; border-color: #c8d6bd; }
.inactive-panel { background: #eee7d9; border-color: #dcd2c1; }
.code-panel h2 { font: 400 29px/1.2 'Libre Caslon Display', Georgia, serif; margin: 0; }
.create-panel h2 { margin-bottom: 22px; }
.create-code-form { display: flex; gap: 24px; align-items: flex-end; }
.create-code-form .duration-field { flex: 1; }
.create-code-form > button { margin: 0; width: auto; min-width: 170px; }
.create-code-form .duration-field legend { font-size: 12px; }
.create-code-form .duration-controls { max-width: 420px; }
.create-code-form label { margin-top: 10px; }
.panel-heading, .panel-title { display: flex; align-items: center; gap: 12px; }
.panel-heading { justify-content: space-between; flex-wrap: wrap; }
.active-panel .panel-heading { justify-content: flex-start; }
.code-count { display: inline-flex; min-width: 28px; height: 28px; padding: 0 8px; align-items: center; justify-content: center; border-radius: 50px; background: #ffffff80; font-size: 12px; }
.inactive-panel .bulk-archive { margin: 0; }
.bulk-archive button { padding: 9px 14px; min-height: 38px; }
.code-panel table { margin-top: 18px; }
.code-panel th { color: #617267; font-size: 11px; font-weight: 500; }
.code-panel th, .code-panel td { padding: 13px 10px; }
.code-panel td { border-bottom-color: #294e4c1c; }
.code-panel table button { min-height: 34px; padding: 7px 13px; font-size: 11px; background: #fffdf7; color: var(--ink); border-color: #b9c9b7; }
.empty-codes { color: #617267; font-size: 13px; margin: 18px 0 0; }
.dashboard-content .archived-codes { margin: 0; padding: 2px 4px 4px; border: 0; }
.archived-codes summary { font-weight: 400; font-size: 13px; color: #617267; }
.issued-message { padding: 20px 26px; border: 1px solid #b9c9b7; border-radius: 12px; background: #e5eddf; }
.issued-message p { margin: 6px 0; }
.issued-message code { font-size: 16px; }
@media (max-width: 700px) {
  .admin-dashboard { width: calc(100% - 28px); margin-top: 14px; }
  .admin-toolbar { padding: 20px; gap: 14px; }
  .admin-brand { font-size: 19px; gap: 8px; }
  .admin-brand img { width: 26px; height: 26px; }
  .admin-water { padding: 28px 24px; min-height: 160px; }
  .admin-water h1 { font-size: 38px; }
  .dashboard-content { padding: 18px; gap: 18px; }
  .code-panel { padding: 20px; }
  .create-code-form { flex-direction: column; align-items: stretch; gap: 18px; }
  .create-code-form .duration-controls { max-width: none; }
  .code-panel h2 { font-size: 27px; }
}
@media (max-width: 430px) {
  .admin-brand { max-width: 200px; font-size: 18px; }
  .admin-water h1 { font-size: 35px; }
  .panel-title { flex-wrap: wrap; }
  .code-panel { padding: 18px 14px; }
}
.admin-dashboard th, .admin-dashboard td { white-space: nowrap; }
.admin-dashboard table code { overflow-wrap: normal; }
