:root {
  --bg: #f4f8ff;
  --bg-elevated: rgba(255, 255, 255, 0.88);
  --panel-border: rgba(112, 141, 183, 0.18);
  --panel-shadow: 0 24px 60px rgba(114, 145, 193, 0.18);
  --text-main: #17304d;
  --text-muted: #68819f;
  --text-soft: #33506f;
  --accent: #ff9a3c;
  --accent-soft: #ff9766;
  --accent-strong: #ff7d3f;
  --teal: #43c8ba;
  --teal-soft: rgba(67, 200, 186, 0.15);
  --warning: #ffd36b;
  --danger: #ef6f6c;
  --success: #5ccc86;
  --chip: rgba(255, 255, 255, 0.68);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --transition: 220ms ease;
  --max-width: 1380px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 151, 102, 0.35), transparent 26%),
    radial-gradient(circle at 86% 14%, rgba(67, 200, 186, 0.22), transparent 22%),
    radial-gradient(circle at 50% 105%, rgba(255, 211, 107, 0.2), transparent 30%),
    linear-gradient(180deg, #fdfefe 0%, #f4f8ff 46%, #edf5ff 100%);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
  opacity: 0.4;
  animation: floatOrb 14s ease-in-out infinite;
  pointer-events: none;
}

.ambient-a {
  width: 28rem;
  height: 28rem;
  top: -10rem;
  right: -6rem;
  background: radial-gradient(circle at center, rgba(255, 127, 80, 0.42), transparent 65%);
}

.ambient-b {
  width: 22rem;
  height: 22rem;
  left: -7rem;
  top: 26rem;
  background: radial-gradient(circle at center, rgba(89, 208, 194, 0.28), transparent 70%);
  animation-duration: 18s;
}

.ambient-c {
  width: 16rem;
  height: 16rem;
  right: 20%;
  bottom: -5rem;
  background: radial-gradient(circle at center, rgba(255, 207, 107, 0.24), transparent 70%);
  animation-duration: 16s;
}

.topbar,
.layout {
  position: relative;
  z-index: 1;
}

.topbar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.75rem 1.5rem 0;
  display: grid;
  justify-items: center;
  gap: 1rem;
  text-align: center;
}

.brand-lockup {
  display: grid;
  justify-items: center;
  gap: 0.85rem;
}

.brand-mark {
  width: 4.75rem;
  height: 4.75rem;
  padding: 0.45rem;
  border-radius: 1.45rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255, 151, 102, 0.22), rgba(67, 200, 186, 0.24));
  border: 1px solid rgba(112, 141, 183, 0.18);
  box-shadow: 0 16px 34px rgba(123, 154, 195, 0.18);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 1rem;
}

.brand-copy {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
}

.brand-lockup h1,
.hero-copy h2,
.login-card h3,
.dashboard h3,
.modal-card h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.45rem;
  color: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.2rem 1.5rem 3rem;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: center;
  justify-items: center;
  align-content: center;
  text-align: center;
  padding: 2rem 1.75rem;
  min-height: calc(100vh - 10.5rem);
}

.hero-copy {
  max-width: 34rem;
  padding: 0;
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  text-align: center;
}

.hero-copy h2 {
  font-size: clamp(2.4rem, 4.8vw, 3.8rem);
  line-height: 1.02;
  max-width: 8ch;
}

.hero-text,
.subtle-copy,
.helper-copy,
.rule-list,
.meta-label,
.snapshot-label,
.inline-message,
.detail-stack,
.config-banner {
  color: var(--text-muted);
}

.hero-text {
  max-width: 32ch;
  font-size: 1rem;
  line-height: 1.65;
  margin: 1rem 0 0;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.value-card {
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(244, 248, 255, 0.84));
  border: 1px solid rgba(112, 141, 183, 0.14);
  backdrop-filter: blur(18px);
  min-height: 10rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.value-number {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
}

.value-label {
  color: var(--text-soft);
  line-height: 1.5;
}

.glass-panel,
.modal-card,
.login-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 255, 0.94));
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(18px);
}

.login-card {
  padding: 1.7rem;
  align-self: center;
  width: min(100%, 28rem);
  max-width: 28rem;
  justify-self: center;
  text-align: center;
}

.auth-mode-switch {
  display: inline-flex;
  width: 100%;
  gap: 0.45rem;
  padding: 0.28rem;
  margin-bottom: 1.1rem;
  border-radius: 999px;
  background: rgba(233, 241, 251, 0.88);
  border: 1px solid rgba(112, 141, 183, 0.14);
}

.auth-mode-button {
  flex: 1;
  padding: 0.78rem 0.9rem;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
}

.auth-mode-button.is-active {
  background: linear-gradient(135deg, rgba(255, 151, 102, 0.22), rgba(67, 200, 186, 0.22));
  color: var(--text-main);
}

.ticket-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0, transparent 46%, rgba(255, 255, 255, 0.38) 50%, transparent 54%, transparent 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 24%);
  pointer-events: none;
}

.ticket-notch {
  position: absolute;
  top: 50%;
  width: 1.25rem;
  height: 2.5rem;
  background: var(--bg);
  border-radius: 999px;
  transform: translateY(-50%);
  box-shadow: inset 0 0 0 1px rgba(112, 141, 183, 0.12);
}

.ticket-notch-left {
  left: -0.65rem;
}

.ticket-notch-right {
  right: -0.65rem;
}

.auth-form {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.75rem;
  width: 100%;
}

.auth-view {
  display: grid;
  justify-items: center;
  width: 100%;
}

.field-label {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--text-soft);
  font-weight: 600;
  text-align: center;
}

.field-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.field-input {
  flex: 1;
  min-width: 0;
  padding: 0.92rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(112, 141, 183, 0.18);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-main);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.field-input::placeholder {
  color: rgba(104, 129, 159, 0.62);
  text-align: center;
}

.field-input:focus {
  outline: none;
  border-color: rgba(67, 200, 186, 0.44);
  box-shadow: 0 0 0 4px rgba(67, 200, 186, 0.12);
}

.field-select {
  width: 100%;
  appearance: none;
  color-scheme: light;
  text-align: center;
  text-align-last: center;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 1.15rem) calc(50% - 0.15rem),
    calc(100% - 0.85rem) calc(50% - 0.15rem);
  background-size: 0.4rem 0.4rem, 0.4rem 0.4rem;
  background-repeat: no-repeat;
}

.field-select option {
  color: #17304d;
  background: #f8fbff;
}

.primary-button,
.ghost-button,
.auth-mode-button,
.history-tab,
.date-chip,
.slot-info-button,
.slot-book-button,
.history-action-button,
.modal-close {
  transition:
    transform var(--transition),
    background-color var(--transition),
    border-color var(--transition),
    opacity var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.2rem;
  padding: 0.92rem 1.15rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  color: #1e1203;
  background: linear-gradient(135deg, var(--accent), var(--warning));
  box-shadow: 0 16px 35px rgba(255, 127, 80, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.history-tab:hover,
.date-chip:hover,
.history-action-button:hover,
.slot-book-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.ghost-button:disabled,
.slot-book-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.ghost-button {
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(112, 141, 183, 0.16);
}

.helper-copy {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  text-align: center;
}

.config-banner,
.inline-message {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 211, 107, 0.28);
  background: rgba(255, 211, 107, 0.16);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  max-width: 44rem;
  margin: 0 auto;
}

.dashboard-sidebar,
.dashboard-main {
  display: grid;
  gap: 1.25rem;
}

.profile-panel,
.slot-panel,
.history-panel {
  padding: 1.35rem;
}

.admin-summary-panel {
  gap: 1.1rem;
}

.profile-panel {
  display: grid;
  gap: 1rem;
  text-align: center;
}

.profile-meta {
  display: grid;
  gap: 1rem;
}

.admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.admin-metric {
  padding: 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(112, 141, 183, 0.12);
}

.admin-metric strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.05rem;
}

.profile-meta strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-main);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.next-booking-panel {
  padding-top: 1rem;
  border-top: 1px solid rgba(112, 141, 183, 0.14);
}

.next-booking-panel h3 {
  margin-bottom: 0.5rem;
}

.date-badge {
  padding: 0.75rem 0.95rem;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text-soft);
  font-weight: 700;
  border: 1px solid rgba(112, 141, 183, 0.14);
  white-space: nowrap;
}

.date-rail-wrap {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) 2.6rem;
  align-items: center;
  gap: 0.55rem;
  margin: 1rem 0 0.75rem;
}

.rail-button {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(112, 141, 183, 0.16);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.date-rail {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  padding: 0.05rem 0.1rem 0.25rem;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.date-rail::-webkit-scrollbar {
  display: none;
}

.date-chip {
  flex: 0 0 auto;
  min-width: 8.2rem;
  padding: 0.82rem 0.9rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(112, 141, 183, 0.14);
  color: var(--text-main);
  text-align: center;
  scroll-snap-align: start;
}

.date-chip small,
.date-chip span {
  display: block;
}

.date-chip small {
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.date-chip.is-active {
  background: linear-gradient(135deg, rgba(255, 151, 102, 0.18), rgba(67, 200, 186, 0.2));
  border-color: rgba(112, 141, 183, 0.2);
  box-shadow: 0 16px 28px rgba(120, 150, 194, 0.18);
}

.date-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.1rem 0 1rem;
}

.date-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(104, 129, 159, 0.28);
  border: 0;
  padding: 0;
}

.date-dot.is-active {
  width: 1.35rem;
  background: linear-gradient(135deg, var(--accent), var(--teal));
}

.slot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  max-width: 34rem;
  margin: 0 auto;
}

.slot-card {
  position: relative;
  padding: 1.15rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(243, 248, 255, 0.86));
  border: 1px solid rgba(112, 141, 183, 0.14);
  overflow: hidden;
  animation: riseIn 420ms ease both;
}

.slot-card::after {
  content: "";
  position: absolute;
  inset: auto -25% -65% auto;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(89, 208, 194, 0.16), transparent 68%);
  pointer-events: none;
}

.slot-card-head,
.history-card-head,
.ticket-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.slot-time {
  margin: 0;
  font-size: 1.1rem;
}

.slot-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.9rem 0;
}

.slot-chip {
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-soft);
  font-size: 0.9rem;
}

.slot-stat span,
.history-meta span,
.ticket-label,
.detail-item span {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.slot-stat strong,
.history-meta strong,
.detail-item strong {
  display: block;
  margin-top: 0.2rem;
}

.slot-progress {
  width: 100%;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(112, 141, 183, 0.14);
  overflow: hidden;
}

.slot-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--accent));
}

.slot-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-top: 1rem;
}

.slot-foot .meta-label {
  display: none;
}

.slot-info-button,
.slot-book-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  white-space: nowrap;
}

.admin-pill-right {
  margin-left: auto;
}

.slot-info-button {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(112, 141, 183, 0.14);
  opacity: 1;
  cursor: default;
  flex: 0 0 auto;
}

.slot-info-button:disabled {
  opacity: 1;
  cursor: default;
}

.slot-book-button {
  width: auto;
  margin-left: auto;
  color: #1b1205;
  background: linear-gradient(135deg, #ffb54a, #ff8a3d);
  border: 1px solid rgba(255, 181, 74, 0.2);
  box-shadow: 0 14px 28px rgba(255, 138, 61, 0.22);
}

.slot-book-button.secondary {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(112, 141, 183, 0.14);
  box-shadow: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.75rem;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.status-available {
  color: #0c221a;
  background: linear-gradient(135deg, rgba(116, 214, 128, 0.95), rgba(89, 208, 194, 0.95));
}

.status-warning {
  color: #271600;
  background: linear-gradient(135deg, rgba(255, 207, 107, 0.95), rgba(255, 176, 128, 0.95));
}

.status-danger {
  color: #340c13;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.95), rgba(255, 127, 80, 0.95));
}

.status-muted {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.72);
}

.history-tabs {
  display: inline-flex;
  gap: 0.6rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(112, 141, 183, 0.14);
}

.history-tab {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
}

.history-tab.is-active {
  background: linear-gradient(135deg, rgba(255, 151, 102, 0.18), rgba(67, 200, 186, 0.2));
  color: var(--text-main);
}

.history-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.15rem;
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
}

.history-card {
  padding: 1rem 1.05rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(112, 141, 183, 0.14);
}

.history-card-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
}

.history-slot-title {
  display: block;
  margin-bottom: 0.6rem;
}

.history-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.booking-id-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.62rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(112, 141, 183, 0.14);
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.history-card-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin-top: 1rem;
}

.history-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.74);
}

.history-card-actions {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.history-action-button {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(112, 141, 183, 0.14);
  color: var(--text-main);
  font-weight: 700;
}

.history-action-danger {
  color: #ffd0c2;
  border-color: rgba(255, 107, 107, 0.18);
  background: rgba(255, 107, 107, 0.08);
}

.empty-state {
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed rgba(112, 141, 183, 0.22);
}

.modal-shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(244, 248, 255, 0.7);
  backdrop-filter: blur(12px);
  z-index: 20;
}

.modal-card {
  width: min(100%, 24rem);
  max-height: min(88vh, 42rem);
  padding: 1.2rem;
  overflow-y: auto;
}

.ticket-modal-card {
  width: min(100%, 26rem);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.8);
}

.detail-stack {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.76);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.ticket-preview {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-xl);
}

.ticket-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  justify-items: center;
  text-align: center;
}

.ticket-qr {
  width: 8.75rem;
  height: 8.75rem;
  display: grid;
  place-items: center;
  padding: 0.65rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.97);
}

.ticket-qr img,
.ticket-qr canvas {
  max-width: 100%;
  height: auto;
}

.toast-region {
  position: fixed;
  left: 50%;
  top: 1rem;
  transform: translateX(-50%);
  z-index: 25;
  display: grid;
  gap: 0.7rem;
  justify-items: center;
  width: min(calc(100vw - 2rem), 24rem);
  pointer-events: none;
}

.toast {
  min-width: 17rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(112, 141, 183, 0.18);
  box-shadow: 0 16px 32px rgba(120, 150, 194, 0.18);
  animation: riseIn 180ms ease both;
}

.loading-hud {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  width: min(calc(100vw - 2rem), 24rem);
  padding: 0.85rem 1rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(112, 141, 183, 0.16);
  box-shadow: 0 18px 36px rgba(120, 150, 194, 0.22);
}

.loading-spinner,
.button-spinner {
  border-radius: 999px;
  border-style: solid;
  border-color: rgba(23, 48, 77, 0.14);
  border-top-color: var(--accent-strong);
  border-right-color: var(--teal);
  animation: spinFast 0.55s linear infinite;
}

.loading-spinner {
  width: 1.25rem;
  height: 1.25rem;
  border-width: 0.18rem;
  flex: 0 0 auto;
}

.button-spinner {
  width: 0.95rem;
  height: 0.95rem;
  border-width: 0.16rem;
  flex: 0 0 auto;
}

.loading-copy {
  display: grid;
  gap: 0.1rem;
}

.loading-copy strong {
  font-size: 0.86rem;
}

.loading-copy span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.button-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.primary-button.is-loading,
.slot-book-button.is-loading,
.history-action-button.is-loading {
  pointer-events: none;
}

.is-hidden {
  display: none !important;
}

@keyframes floatOrb {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, 18px, 0) scale(1.06);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spinFast {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 761px) {
  .ticket-modal-card {
    width: min(100%, 34rem);
  }

  .ticket-body {
    grid-template-columns: 9.5rem minmax(0, 1fr);
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 1100px) {
  .hero-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar,
  .layout {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .topbar {
    padding-top: 1rem;
    gap: 0.75rem;
  }

  .brand-mark {
    width: 4.1rem;
    height: 4.1rem;
    border-radius: 1.2rem;
  }

  .hero-panel,
  .profile-panel,
  .slot-panel,
  .history-panel,
  .modal-card,
  .login-card {
    padding: 1rem;
  }

  .hero-panel {
    gap: 1rem;
    min-height: calc(100vh - 8.25rem);
  }

  .hero-copy h2 {
    font-size: clamp(2rem, 12vw, 3rem);
    max-width: 7ch;
  }

  .hero-text {
    margin-top: 0.7rem;
    font-size: 0.94rem;
    line-height: 1.55;
  }

  .field-row,
  .modal-actions,
  .panel-header {
    flex-direction: column;
    align-items: center;
  }

  .slot-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    max-width: 100%;
  }

  .history-card-head,
  .history-meta {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .date-rail-wrap {
    grid-template-columns: 2.25rem minmax(0, 1fr) 2.25rem;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
  }

  .rail-button {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.9rem;
  }

  .history-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .history-tab {
    flex: 1;
  }

  .date-chip {
    min-width: 7rem;
    padding: 0.72rem 0.75rem;
    font-size: 0.92rem;
  }

  .date-chip small {
    font-size: 0.78rem;
  }

  .slot-card,
  .history-card {
    padding: 0.95rem;
  }

  .slot-card-head,
  .ticket-header {
    gap: 0.75rem;
  }

  .slot-time {
    font-size: 1rem;
  }

  .slot-meta-row {
    gap: 0.45rem;
    justify-content: center;
  }

  .slot-foot {
    gap: 0.65rem;
    margin-top: 0.85rem;
  }

  .slot-info-button,
  .slot-book-button,
  .primary-button,
  .ghost-button,
  .history-action-button {
    min-height: 2.95rem;
    padding: 0.78rem 0.9rem;
    font-size: 0.94rem;
  }

  .history-list {
    gap: 0.85rem;
    max-width: 100%;
  }

  .detail-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
  }

  .modal-shell {
    padding: 0.75rem;
  }

  .modal-card {
    width: min(100%, 21.75rem);
    max-height: calc(100vh - 1.5rem);
    padding: 1rem;
  }

  .ticket-modal-card {
    width: min(100%, 21.75rem);
  }

  .ticket-preview {
    padding: 0.9rem;
  }

  .ticket-body {
    gap: 0.85rem;
  }

  .ticket-qr {
    width: 8rem;
    height: 8rem;
    padding: 0.55rem;
  }

  .toast-region {
    left: 50%;
    top: 0.75rem;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    width: calc(100vw - 1.5rem);
  }

  .toast {
    min-width: 0;
    width: 100%;
  }

  .loading-hud {
    width: calc(100vw - 1.5rem);
    top: 50%;
    bottom: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0ms !important;
    scroll-behavior: auto !important;
  }
}
