:root {
  --white: #ffffff;
  --page: #f9fafb;
  --line-soft: #f3f4f6;
  --line: #e5e7eb;
  --muted: #99a1af;
  --text-soft: #6a7282;
  --text: #101828;

  --red: #fb2c36;
  --red-dark: #c10007;
  --red-light: #ffe2e2;

  --green: #008236;
  --green-light: #dcfce7;
  --amber: #a65f00;
  --amber-light: #fef9c2;
  --indigo: #4f39f6;
  --indigo-light: #e0e7ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--page);
  color: var(--text);
  font-family: 'Inter', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 900;
  line-height: 1.2;
}

p {
  margin: 0;
}

a {
  color: var(--red);
}

img {
  display: block;
  max-width: 100%;
}

.button {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button-red {
  background-color: var(--red);
  color: var(--white);
}
.button-red:hover {
  background-color: var(--red-dark);
}

.button-outline {
  background-color: var(--white);
  color: var(--text);
  border-color: var(--line);
  font-weight: 600;
}
.button-outline:hover {
  border-color: var(--red);
  color: var(--red);
}

.button-grey {
  background-color: var(--line);
  color: var(--muted);
}

.button-wide {
  display: block;
  width: 100%;
}

.button-small {
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 13px;
}

button.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pill-green {
  background-color: var(--green-light);
  color: var(--green);
}

.pill-amber {
  background-color: var(--amber-light);
  color: var(--amber);
}

.pill-red {
  background-color: var(--red-light);
  color: var(--red-dark);
}

.pill-indigo {
  background-color: var(--indigo-light);
  color: var(--indigo);
}

.pill-grey {
  background-color: var(--line-soft);
  color: var(--text-soft);
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--white);
  border-bottom: 1px solid var(--line-soft);
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1280px;
  width: 96%;
  height: 64px;
  margin: 0 auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
}

.logo-mark {
  width: 49px;
  height: 44px;
  margin-left: -6px;
}

.menu {
  display: flex;
  gap: 2px;
}

.menu a {
  padding: 8px 16px;
  border-radius: 12px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
/* No boxes: pointing at a link turns it red; the page you are on is red
   with a line under it */
.menu a:hover {
  color: var(--red);
}

.menu a.current {
  color: var(--red);
}

/* The line under the current page's name: grows out from the middle when a
   link becomes current (a new page, or menu.js on the home page), and
   shrinks away from the one that stops being current */
.menu-label {
  position: relative;
  display: inline-block;
}

.menu-label::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--red);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.menu a.current .menu-label::after {
  transform: scaleX(1);
  animation: menu-line-in 0.35s ease-out;
}

@keyframes menu-line-in {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-label::after {
    transition: none;
  }

  .menu a.current .menu-label::after {
    animation: none;
  }
}

.auth-buttons {
  display: flex;
  gap: 8px;
}

.inline-form {
  display: contents;
}

@media (max-width: 620px) {
  .top-bar-inner {
    width: 94%;
    height: 58px;
    gap: 4px;
  }

  .logo {
    font-size: 15px;
  }

  .logo-mark {
    width: 40px;
    height: 36px;
    margin-left: -5px;
  }

  .menu a {
    padding: 6px 5px;
    font-size: 12px;
  }

  .auth-buttons .button {
    padding: 8px 12px;
    font-size: 13px;
  }

  .menu a,
  .auth-buttons .button {
    white-space: nowrap;
  }
}

@media (max-width: 380px) {
  .logo {
    font-size: 14px;
  }

  .menu a {
    padding: 6px 2px;
    font-size: 11px;
  }

  .auth-buttons .button {
    padding: 7px 10px;
    font-size: 12px;
  }
}

.menu-checkbox {
  display: none;
}

.bar-nav {
  display: contents;
}

.menu-staff {
  display: none;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: var(--white);
  cursor: pointer;
}
.menu-toggle:hover {
  border-color: var(--red);
}

.menu-toggle span {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--text);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--text);
  transition: transform 0.18s ease;
}

.menu-toggle span::before {
  transform: translateY(-6px);
}
.menu-toggle span::after {
  transform: translateY(6px);
}

.menu-checkbox:checked ~ .menu-toggle span {
  background-color: transparent;
}
.menu-checkbox:checked ~ .menu-toggle span::before {
  transform: rotate(45deg);
}
.menu-checkbox:checked ~ .menu-toggle span::after {
  transform: rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  .menu-toggle span,
  .menu-toggle span::before,
  .menu-toggle span::after {
    transition: none;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex;
  }

  .bar-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background-color: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(16, 24, 40, 0.08);
  }

  .menu-checkbox:checked ~ .bar-nav {
    display: flex;
  }

  .bar-nav .menu {
    flex-direction: column;
    gap: 2px;
  }

  .bar-nav .menu-staff {
    display: flex;
  }

  .bar-nav .menu a {
    padding: 12px 14px;
    font-size: 15px;
    text-align: center;
  }

  .bar-nav .auth-buttons {
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
  }

  .bar-nav .auth-buttons .button {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    line-height: 24px;
    text-align: center;
  }
}

.site-footer {
  background-color: var(--white);
  border-top: 1px solid var(--line);
  padding: 36px 20px 28px 20px;
}

.footer-inner {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.footer-inner .logo {
  display: inline-flex;
  margin-bottom: 10px;
}

.footer-text {
  color: var(--text-soft);
  font-size: 13px;
}

.footer-copyright {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px;
}

.section {
  max-width: 1280px;
  width: 92%;
  margin: 0 auto;
  padding: 44px 0 44px 0;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.section-title {
  font-size: 24px;
}

.film-count {
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
}

.section-note {
  color: var(--text-soft);
  font-size: 14px;
  margin-bottom: 28px;
}

.movie-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 20px;
}

.movie-card {
  display: flex;
  flex-direction: column;
  background-color: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  overflow: hidden;
}

.movie-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: var(--line);
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tag-rated,
.tag-time {
  position: absolute;
  padding: 2px 10px;
  border-radius: 999px;
  background-color: rgba(16, 24, 40, 0.6);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
}

.tag-rated {
  right: 10px;
  top: 10px;
}

.tag-time {
  right: 10px;
  bottom: 12px;
}

@media (max-width: 400px) {
  .movie-poster .tag-rated,
  .movie-poster .tag-time {
    padding: 2px 6px;
    font-size: 10px;
  }

  .movie-poster .tag-rated {
    top: 6px;
    right: 6px;
  }

  .movie-poster .tag-time {
    bottom: 8px;
    right: 6px;
  }
}

.movie-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px;
}

.movie-title {
  font-size: 15px;
  line-height: 1.3;
  margin-bottom: 12px;
}

@media (max-width: 760px) {
  .movie-title {
    text-align: center;
  }
}

.movie-info .button {
  margin-top: auto;
}

@media (max-width: 1000px) {
  .movie-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .movie-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.form-page {
  padding: 56px 20px 80px 20px;
}

.form-card {
  max-width: 448px;
  margin: 0 auto;
  padding: 32px;
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
}

.form-card h1 {
  font-size: 24px;
  margin-bottom: 4px;
}

.form-intro {
  color: var(--text-soft);
  font-size: 14px;
  margin-bottom: 24px;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.form-field input,
.form-field select {
  width: 100%;
  padding: 11px 14px;
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.form-field input::placeholder {
  color: var(--muted);
  font-weight: 500;
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--red);
}

.password-box {
  position: relative;
  display: block;
}

.form-field .password-box input {
  padding-right: 48px;
}

.password-box input::-ms-reveal,
.password-box input::-ms-clear {
  display: none;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text-soft);
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--text);
}

.agree-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
  margin: 18px 0 18px 0;
}

.agree-line input {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--red);
}

.form-card .button {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 900;
  border-radius: 16px;
}

.form-switch {
  text-align: center;
  color: var(--text-soft);
  font-size: 14px;
  margin-top: 16px;
}

.form-switch a {
  font-weight: 700;
  text-decoration: none;
}

.ticket-page {
  max-width: 448px;
  width: 92%;
  margin: 0 auto;
  padding: 48px 0 48px 0;
}

.confirm-box {
  text-align: center;
  margin-bottom: 16px;
}

.confirm-box h1 {
  font-size: 24px;
}

.confirm-box p {
  color: var(--text-soft);
  font-size: 14px;
  margin-top: 4px;
}

.ticket {
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
}

.ticket-header {
  padding: 28px;
  color: var(--white);
  background-color: var(--indigo);
}

.ticket-brand {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.ticket-header h2 {
  font-size: 20px;
}

.ticket-brand-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.ticket-brand-row .ticket-brand {
  margin-bottom: 0;
}

.ticket-cinema {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

.ticket-when {
  color: var(--indigo-light);
  font-size: 14px;
  margin-top: 6px;
}

.ticket-tear {
  border-top: 1px dashed var(--line);
}

.ticket-body {
  padding: 24px 28px;
}

.ticket-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.ticket-row {
  margin-bottom: 20px;
}

.ticket-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.ticket-value {
  font-size: 20px;
  font-weight: 900;
  margin-top: 4px;
}

.ticket-reference {
  color: var(--red);
  letter-spacing: 1px;
}

.ticket-value-small {
  font-size: 14px;
  font-weight: 600;
}

.ticket-qr {
  padding: 20px;
  background-color: var(--page);
  border-radius: 16px;
  text-align: center;
}

.ticket-qr img {
  width: 180px;
  height: 180px;
  margin: 0 auto;
}

.ticket-qr p {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1px;
}

.ticket-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.ticket-actions .button {
  flex: 1;
  padding: 12px;
}

@media (max-width: 620px) {
  .ticket-actions {
    flex-direction: column;
  }
}

.terms-page {
  max-width: 768px;
  width: 92%;
  margin: 0 auto;
  padding: 48px 0 64px 0;
}

.terms-page h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

.terms-intro {
  color: var(--text-soft);
  font-size: 15px;
  margin-bottom: 28px;
}

.terms-block {
  padding: 24px 24px 14px 24px;
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 14px;
}

.terms-block h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.terms-block p {
  color: var(--text-soft);
  font-size: 14px;
  margin-bottom: 10px;
}

/* The clauses of a section */
.terms-block ul {
  margin: 0 0 10px 0;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 14px;
}

.terms-block li {
  margin-bottom: 8px;
}


.admin-page {
  max-width: 900px;
  width: 92%;
  margin: 0 auto;
  padding: 40px 0 64px 0;
}

.admin-page h1 {
  font-size: 32px;
  margin-bottom: 6px;
}

.admin-intro {
  color: var(--text-soft);
  font-size: 15px;
  margin-bottom: 20px;
}

/* Staff pages: the page is centred, with room on both sides so the icon rail
   (the sidebar, fixed on the far left) never covers it. The hamburger widens
   the rail over the page, so the page never moves (sidebar.js). */
.admin-layout {
  padding: 0 96px;
}

.admin-head,
.admin-layout .admin-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
}

.admin-head {
  padding-top: 40px;
  margin-bottom: 24px;
}

.admin-head h1 {
  font-size: 32px;
  margin-bottom: 6px;
}

.admin-head h1 + .stat-row {
  margin-top: 20px;
}

.admin-head > :last-child {
  margin-bottom: 0;
}

.admin-layout .admin-page {
  padding-bottom: 64px;
}

/* Under the top bar (64px and its line), down to the bottom of the screen;
   under the top bar's own layer */
.admin-sidebar {
  position: fixed;
  top: 65px;
  bottom: 0;
  left: 0;
  z-index: 9;
  box-sizing: border-box;
  width: 72px;
  padding: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: var(--white);
  border-right: 1px solid var(--line);
}

.admin-sidebar.is-open {
  width: 220px;
  box-shadow: 8px 0 24px rgba(16, 24, 40, 0.08);
}

.admin-sidebar.can-slide {
  transition: width 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background-color: transparent;
  color: var(--text);
  cursor: pointer;
}

.sidebar-toggle:hover {
  background-color: var(--page);
}

.sidebar-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.sidebar-menu a:hover {
  background-color: var(--page);
  color: var(--text);
}

.sidebar-menu a.current {
  background-color: var(--red);
  color: var(--white);
}

.sidebar-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

/* Closed: icons only. The names stay for screen readers. */
.admin-sidebar:not(.is-open) .sidebar-title,
.admin-sidebar:not(.is-open) .sidebar-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Phones: no rail; the staff links are in the top bar's menu */
@media (max-width: 760px) {
  .admin-layout {
    padding: 0 4%;
  }

  .admin-head {
    padding-top: 24px;
    margin-bottom: 20px;
  }

  .admin-sidebar {
    display: none;
  }
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-head .panel-note {
  margin-bottom: 0;
}

.panel-head .button {
  flex-shrink: 0;
  white-space: nowrap;
}

.panel {
  padding: 24px;
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 24px;
}

.panel h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.panel-note {
  color: var(--text-soft);
  font-size: 14px;
  margin-bottom: 20px;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.stat {
  flex: 1;
  min-width: 180px;
  padding: 20px;
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.stat-name {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.stat-figure {
  font-size: 26px;
  font-weight: 900;
  margin-top: 6px;
}

.stat-extra {
  color: var(--text-soft);
  font-size: 12px;
}

.stat-money .stat-name,
.stat-money .stat-figure {
  color: var(--red);
}

@media (max-width: 620px) {
  .stat-row {
    gap: 12px;
  }

  .stat {
    flex-basis: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name  figure"
      "extra figure";
    align-items: center;
    column-gap: 16px;
    padding: 16px 20px;
  }

  .stat-name {
    grid-area: name;
    align-self: end;
  }

  .stat-extra {
    grid-area: extra;
    align-self: start;
  }

  .stat-figure {
    grid-area: figure;
    margin-top: 0;
    font-size: 24px;
  }
}

.order-group {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.order-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  margin-bottom: 4px;
}

.empty-note {
  padding: 10px 0 2px 0;
  color: var(--muted);
  font-size: 14px;
}

.order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 110px;
  grid-template-areas: "left price action";
  align-items: center;
  gap: 6px 16px;
  padding: 14px 0 14px 0;
  border-top: 1px solid var(--line-soft);
}

.order-left {
  grid-area: left;
}

.order-row .button,
.order-row .sold-tag {
  grid-area: action;
  justify-self: center;
}

@media (max-width: 620px) {
  .order-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "left price"
      "left action";
    column-gap: 12px;
  }

  .order-row .order-price {
    align-self: end;
    justify-self: end;
    min-width: 62px;
    text-align: center;
  }

  .order-row .button,
  .order-row .sold-tag {
    align-self: start;
    justify-self: end;
  }
}

.order-items {
  font-size: 15px;
  font-weight: 700;
}

.order-who {
  color: var(--text-soft);
  font-size: 13px;
}

.order-price {
  grid-area: price;
  justify-self: center;
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.sold-tag {
  padding: 7px 14px;
  font-size: 13px;
}

.movie-table {
  width: 100%;
  border-collapse: collapse;
}

.movie-table th {
  padding: 0 10px 10px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: left;
}

.movie-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  vertical-align: middle;
}

.movie-table tr:last-child td {
  border-bottom: none;
}

.right {
  text-align: right;
}

.movie-table th.right {
  text-align: right;
}

.table-poster {
  width: 40px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
}

.cell-with-poster {
  display: flex;
  align-items: center;
  gap: 12px;
}

.movie-name {
  display: block;
  font-weight: 700;
}

.movie-sub {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
}

.add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-hint {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.length-pair {
  display: flex;
  gap: 10px;
}

.length-part {
  position: relative;
  flex: 1;
}

.length-part input {
  padding-right: 46px;
}

.length-unit {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}

.date-field {
  position: relative;
}

.date-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.date-button:hover,
.date-button:focus {
  outline: none;
  border-color: var(--red);
}

.date-arrow {
  color: var(--muted);
  font-size: 11px;
}

.calendar {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  min-width: 260px;
  padding: 14px;
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.15);
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.calendar-month {
  font-size: 14px;
  font-weight: 900;
}

.calendar-nav {
  width: 28px;
  height: 28px;
  padding: 0;
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
}

.calendar-nav:hover {
  border-color: var(--red);
  color: var(--red);
}

.calendar-nav:disabled {
  color: var(--line);
  border-color: var(--line-soft);
  cursor: default;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day-names span {
  padding-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.calendar-date {
  padding: 8px 0;
  background-color: var(--white);
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.calendar-date:hover {
  background-color: var(--red-light);
  border-color: var(--red);
}

.calendar-date:disabled {
  background-color: var(--white);
  border-color: transparent;
  color: var(--muted);
  cursor: default;
}

.calendar-date-today:enabled {
  color: var(--indigo);
  border-color: var(--indigo-light);
}

.calendar-date-picked,
.calendar-date-picked:enabled,
.calendar-date-picked:hover {
  background-color: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.calendar-hint {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 620px) {
  .hide-small {
    display: none;
  }

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

  .panel {
    padding: 20px 18px;
  }

  .movie-table,
  .movie-table tbody {
    display: block;
  }

  .movie-table thead {
    display: none;
  }

  .movie-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "movie sold"
      "movie remove";
    align-items: center;
    gap: 6px 8px;
    padding: 12px 0;
    border-top: 1px solid var(--line-soft);
  }

  .movie-table tr:first-child {
    border-top: none;
  }

  .movie-table td {
    padding: 0;
    border-bottom: none;
  }

  .movie-table td:first-child {
    grid-area: movie;
  }

  .movie-table .sold-cell {
    grid-area: sold;
    align-self: end;
    justify-self: center;
    font-weight: 900;
    white-space: nowrap;
  }

  .movie-table .sold-cell::after {
    content: " sold";
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 600;
  }

  .movie-table .movie-row td:last-child,
  .movie-table .row-actions {
    display: contents;
  }

  .movie-table .status-menu {
    grid-area: remove;
    justify-self: end;
  }
}

.camera-panel {
  text-align: center;
}

.camera-video {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 3;
  margin: 0 auto 12px auto;
  border-radius: 16px;
  background-color: var(--text);
}

.camera-message {
  color: var(--text-soft);
  font-size: 14px;
  margin-bottom: 16px;
}

.camera-message:empty {
  display: none;
}

.scan-result {
  max-width: 420px;
  margin: 0 auto 12px auto;
  padding: 14px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 900;
}
.scan-result-good {
  background-color: var(--green-light);
  color: var(--green);
}
.scan-result-used {
  background-color: var(--amber-light);
  color: var(--amber);
}
.scan-result-bad {
  background-color: var(--red-light);
  color: var(--red-dark);
}

.scan-result-who {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
}

/* Scanner: a small black title over the big red reference, no box */
.scan-result-plain {
  padding: 0;
  background-color: transparent;
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
}

.camera-panel .panel-note {
  margin-bottom: 12px;
}

.scan-result-plain .scan-result-who {
  margin-top: 0;
  color: var(--red);
  font-size: 22px;
  font-weight: 900;
}

.scan-items {
  margin: 10px 0 0 0;
  padding: 10px 0 0 0;
  border-top: 1px solid rgba(16, 24, 40, 0.1);
  list-style: none;
  font-size: 16px;
  font-weight: 700;
}

.scan-items li {
  padding: 2px 0;
}

.scan-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.search-field {
  flex: 1;
  margin-bottom: 0;
}

.search-field input {
  border-color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.search-field input::placeholder {
  text-transform: none;
  letter-spacing: 0;
}


.form-message {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
}

.form-message-error {
  padding: 0;
  color: var(--red);
}

.form-message-notice {
  background-color: var(--amber-light);
  color: var(--amber);
}

/* "We emailed you a link", "Your password was changed": plain black text
   that fades up into place */
.form-message-success {
  padding: 0;
  color: var(--text);
  animation: message-in 0.45s ease-out both;
}

@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .form-message-success {
    animation: none;
  }
}

/* Sign up: the email box with "Verify" inside it, then six code boxes */
.email-row {
  position: relative;
}

.form-field .email-row input {
  padding-right: 96px;
}

.otp-verify {
  position: absolute;
  top: 50%;
  right: 6px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text);
  font-family: inherit;
  /* Same size as the "Terms and Conditions" link */
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transform: translateY(-50%);
}

/* Like the top menu's links (.menu a:hover): only the colour changes */
.otp-verify:hover,
.otp-verify:focus-visible {
  color: var(--red);
}

.otp-verify:focus:not(:focus-visible) {
  outline: none;
}

.otp-verify:disabled {
  color: var(--muted);
  background: none;
  cursor: default;
}

/* Their own display would otherwise keep them showing when hidden */
.email-row[hidden],
.otp-area[hidden],
.otp-verified[hidden],
.field-error[hidden] {
  display: none;
}

.otp-note {
  color: var(--text-soft);
  font-size: 13px;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.otp-note strong {
  color: var(--text);
}

.otp-boxes {
  display: flex;
  gap: 8px;
}

.form-field .otp-box {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
}

.otp-box:disabled {
  opacity: 0.6;
}

.otp-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--red);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.link-button:disabled {
  color: var(--muted);
  cursor: default;
}

.otp-verified {
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.otp-verified .link-button {
  margin-left: 6px;
}

/* Sign in: "Keep me signed in" and "Forgot password?" on one line */
.signin-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 18px 0;
  font-size: 13px;
}

.signin-options a {
  font-weight: 700;
  text-decoration: none;
}

.remember-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  cursor: pointer;
}

.remember-line input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--red);
}

.field-error {
  display: block;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}

.form-field input.invalid,
.form-field select.invalid,
.form-field .date-button.invalid {
  border-color: var(--red-dark);
}

.empty-state {
  padding: 28px 16px;
  color: var(--text-soft);
  font-size: 14px;
  text-align: center;
}

.empty-state strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  margin-bottom: 4px;
}

/* 17. UTILITIES ------------------------------------------------------------*/

.hidden {
  display: none !important;
}

/* Skeleton: a grey shimmer where a picture or part is still loading
   (skeleton.js removes it from a picture once it is in) */
@keyframes skeleton-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

.skeleton {
  background-color: var(--line);
  background-image: linear-gradient(90deg, var(--line) 0%, var(--line-soft) 50%, var(--line) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
  }
}

/* Error and maintenance pages (render_error_page): the same look as offline.html */
.status-page {
  box-sizing: border-box;
  min-height: 100vh;
  max-width: 320px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
}

.status-brand {
  margin: 0 0 20px;
  color: var(--red);
  font-weight: 900;
  letter-spacing: 0.2em;
  text-decoration: none;
}

.status-page h1 {
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 8px;
}

.status-page p {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 24px;
}

.status-page .button {
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
}

/* Home page: a faint film strip of the posters sliding behind everything.
   Each frame takes exactly 110px (92 + 18), a multiple of the 22px holes,
   and the track holds the frames twice, so sliding it by half loops without
   a jump. A run is 48 frames (index.php): 5280px in 210s, about 25px a
   second. */
.film-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.film-strip {
  position: absolute;
  left: -20vw;
  width: 140vw;
  overflow: hidden;
  opacity: 0.12;
}

/* Upper strip: tilted up, sliding to the left */
.film-strip-left {
  top: 32%;
  transform: translateY(-50%) rotate(-6deg);
}

/* Lower strip: tilted the other way, sliding to the right */
.film-strip-right {
  top: 74%;
  transform: translateY(-50%) rotate(5deg);
}

.film-strip-right .film-track {
  animation-direction: reverse;
}

.film-track {
  display: flex;
  width: max-content;
  padding: 16px 0;
  background-color: var(--text);
  background-image:
    repeating-linear-gradient(90deg, #ffffff 0 10px, transparent 10px 22px),
    repeating-linear-gradient(90deg, #ffffff 0 10px, transparent 10px 22px);
  background-repeat: no-repeat;
  background-size: 100% 8px, 100% 8px;
  background-position: 0 4px, 0 calc(100% - 4px);
  animation: film-slide 210s linear infinite;
}

.film-frame {
  flex-shrink: 0;
  width: 92px;
  height: 122px;
  margin: 0 9px;
  border-radius: 4px;
  object-fit: cover;
}

@keyframes film-slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .film-track {
    animation: none;
  }
}
