:root {
  color-scheme: light;
  --primary: #7a5eea;
  --accent: #a8c4ed;
  --bg-one: #d7bfd8;
  --bg-two: #c6dcf2;
  --ink: #172033;
  --card-ink: #172033;
  --muted: #667085;
  --highlight-text: #7a5eea;
  --card: #ffffff;
  --header-text: #ffffff;
  --button-text: #ffffff;
  --accent-text: #172033;
  --line: rgba(23, 32, 51, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  background: #0b0f17;
}

.page-loader-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: page-loader-spin 0.8s linear infinite;
}

html:not([data-page-loading="true"]) .page-loader {
  display: none;
}

@keyframes page-loader-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .page-loader-spinner { animation-duration: 1.6s; }
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg-one), var(--bg-two));
}

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

.logistics-page { min-height: 100vh; }

.logistics-hero {
  position: relative;
  min-height: clamp(280px, 29.1667vw, 560px);
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 40%, #172033));
  color: var(--header-text);
}

.logistics-hero.has-artwork {
  min-height: 0;
}

.header-artwork {
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  object-position: center;
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 44px;
  display: flex;
  align-items: flex-end;
}

.event-logo {
  display: block;
  max-width: 180px;
  max-height: 76px;
  margin-bottom: 22px;
  object-fit: contain;
  object-position: left center;
}

.eyebrow {
  margin: 0 0 7px;
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .7;
}

.logistics-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 48px;
}

.page-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-intro h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.03em;
}

.page-intro p:last-child {
  max-width: 720px;
  margin: 12px 0 0;
  color: color-mix(in srgb, var(--ink) 72%, transparent);
  line-height: 1.65;
}

.version-pill, .activity-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 78%, transparent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.next-call {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding: 24px 26px;
  border-radius: 18px;
  background: var(--primary);
  color: var(--button-text);
  box-shadow: 0 18px 50px color-mix(in srgb, var(--primary) 28%, transparent);
}

.next-call h2 {
  margin: 0;
  font-size: clamp(25px, 3.5vw, 38px);
}

.next-call p:last-child { margin: 8px 0 0; opacity: .8; }
.next-call .activity-badge { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .22); }

.logistics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.logistics-layout.has-confirmation {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.schedule-list { display: grid; gap: 22px; }

.schedule-day {
  color: var(--card-ink);
}

.schedule-day-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
  padding: 0 2px;
}

.schedule-day-header h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.02em;
}

.schedule-day-header .eyebrow {
  color: var(--ink);
}

.day-location {
  margin: 6px 0 0;
  color: var(--highlight-text);
  font-size: 14px;
  font-weight: 750;
}

.day-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.schedule-entries {
  display: grid;
  gap: 10px;
}

.schedule-entry {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 22px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(29, 37, 54, .07);
}

.entry-time strong {
  display: block;
  font-size: 19px;
}

.entry-time {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.calendar-download {
  display: inline-grid;
  flex: none;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  cursor: pointer;
}

.calendar-download:hover {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  background: color-mix(in srgb, var(--accent) 34%, transparent);
}

.calendar-download svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.entry-content h4 {
  margin: 0 0 7px;
  font-size: 20px;
}

.entry-responsible {
  margin: 0 0 9px;
  color: var(--card-ink);
  font-size: 14px;
  font-weight: 800;
}

.entry-location {
  margin: 0 0 10px;
  color: var(--highlight-text);
  font-weight: 750;
}

.entry-content > p:not(.entry-location) {
  margin: 0 0 10px;
  color: color-mix(in srgb, var(--card-ink) 74%, transparent);
  line-height: 1.58;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.schedule-action {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.schedule-aside {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 16px;
}

.aside-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  color: var(--card-ink);
  box-shadow: 0 14px 44px rgba(29, 37, 54, .07);
}

.aside-card h3 { margin: 0 0 12px; font-size: 20px; }
.aside-card > p:not(.eyebrow) { margin: 7px 0; color: var(--muted); line-height: 1.5; }

#confirm-schedule {
  width: 100%;
  margin-top: 14px;
  padding: 13px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: var(--button-text);
  font-weight: 800;
  cursor: pointer;
}

#confirm-schedule:disabled { cursor: default; opacity: .72; }
.confirmation-card[data-confirmed="true"] { border-color: color-mix(in srgb, #15803d 34%, transparent); }
.confirmation-card[data-confirmed="true"] #confirm-schedule { background: #15803d; }
.confirmation-time { font-size: 12px; }

.entry-status-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.entry-status-button {
  min-height: 40px;
  border: 1px solid color-mix(in srgb, var(--primary) 36%, var(--line));
  border-radius: 9px;
  padding: 9px 11px;
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
  color: var(--card-ink);
  cursor: pointer;
  font-weight: 800;
}

.entry-status-button:hover:not(:disabled) {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 14%, var(--card));
}

.entry-status-button:disabled { cursor: default; opacity: .65; }
.entry-status-button.is-done {
  border-color: color-mix(in srgb, #15803d 40%, var(--line));
  background: color-mix(in srgb, #15803d 12%, var(--card));
  color: #15803d;
  opacity: 1;
}

.entry-status-time {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.4;
}

.logistics-footer {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.footer-logo {
  display: block;
  width: min(100%, 720px);
  height: auto;
  max-height: none;
  object-fit: contain;
}

.logistics-footer p {
  max-width: 720px;
  margin: 0;
}

.safe-error {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.safe-error-card {
  width: min(480px, 100%);
  padding: 38px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  text-align: center;
  box-shadow: 0 20px 70px rgba(23, 32, 51, .14);
}

.error-mark {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: var(--button-text);
  font-weight: 900;
}

.safe-error-card h1 { margin: 22px 0 10px; }
.safe-error-card p { margin: 0; color: var(--muted); line-height: 1.6; }

@media (max-width: 820px) {
  .logistics-hero { min-height: 230px; }
  .logistics-hero.has-artwork { min-height: 0; }
  .hero-content, .logistics-shell { width: min(100% - 28px, 720px); }
  .hero-content { padding: 40px 0 32px; }
  .event-logo { max-width: 140px; max-height: 58px; }
  .footer-logo { width: min(100%, 620px); }
  .logistics-shell { padding-top: 28px; }
  .page-intro { display: grid; }
  .version-pill { width: fit-content; }
  .next-call { align-items: flex-start; }
  .logistics-layout,
  .logistics-layout.has-confirmation { grid-template-columns: 1fr; }
  .schedule-aside { position: static; grid-row: auto; }
  .confirmation-card { order: -1; }
}

@media (max-width: 560px) {
  .logistics-hero { min-height: 190px; }
  .logistics-hero.has-artwork { min-height: 0; }
  .hero-content { padding: 28px 0 26px; }
  .logistics-shell { padding-top: 24px; }
  .page-intro { gap: 12px; margin-bottom: 18px; }
  .page-intro h2 { font-size: 30px; }
  .page-intro p:last-child { margin-top: 8px; line-height: 1.5; }
  .next-call { display: grid; padding: 20px; border-radius: 14px; }
  .next-call h2 { font-size: 27px; line-height: 1.15; }
  .activity-badge { width: fit-content; }
  .schedule-list { gap: 24px; }
  .schedule-day-header { display: grid; gap: 12px; align-items: start; }
  .schedule-day-header h3 { font-size: 19px; }
  .day-actions { justify-content: flex-start; }
  .schedule-entry {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 17px;
    border-radius: 14px;
  }
  .entry-time strong {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--highlight-text);
    font-size: 16px;
  }
  .entry-content h4 { font-size: 19px; }
  .entry-content > p:not(.entry-location) { line-height: 1.48; }
  .entry-meta, .day-actions { width: 100%; }
  .schedule-action { justify-content: center; min-height: 38px; }
  .entry-status-actions { grid-template-columns: 1fr; }
  .entry-status-time { grid-column: auto; }
  .aside-card { border-radius: 14px; }
}
