:root {
  --bg: #0c1626;
  --panel: rgba(255, 255, 255, 0.98);
  --ink: #101a2b;
  --muted: #64768b;
  --accent: #3fb3ff;
  --accent-dark: #1b6cb6;
  --border: #d7dee8;
  --shadow: 0 18px 40px rgba(8, 16, 28, 0.32);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, #7bbbe7 0%, rgba(123, 187, 231, 0.65) 25%, rgba(40, 92, 140, 0.6) 45%, rgba(20, 42, 70, 0.8) 70%, #0c1626 100%),
    linear-gradient(140deg, #21436a 0%, #0d1a2c 60%, #080c12 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.45) 0, transparent 60%),
    radial-gradient(1px 1px at 90px 110px, rgba(255, 255, 255, 0.25) 0, transparent 60%),
    radial-gradient(1px 1px at 140px 60px, rgba(255, 255, 255, 0.2) 0, transparent 60%),
    radial-gradient(1px 1px at 60px 160px, rgba(255, 255, 255, 0.2) 0, transparent 60%);
  background-size: 180px 180px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3 {
  font-family: "Fraunces", serif;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
}

.primary {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.muted {
  color: var(--muted);
}

.status {
  font-size: 0.95rem;
  color: var(--muted);
  margin-left: 10px;
}

/* Pickup */ 

.pickup-screen {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  position: relative;
  z-index: 1;
}

.pickup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.brand-mark {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  font-family: "Montserrat", "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f4f8ff;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  text-transform: uppercase;
}

.brand-one {
  color: #f7fbff;
}

.brand-fix,
.brand-tech {
  color: var(--accent);
}

.brand-tech {
  font-size: 0.7em;
  letter-spacing: 0.12em;
}

.brand-context {
  font-size: 0.42em;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.72);
}

.kiosk-header,
.admin-header,
.pickup-header {
  color: #e9f2ff;
}

.pickup-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: rgba(233, 242, 255, 0.72);
}

.pickup-card {
  background: var(--panel);
  border-radius: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.scan-hero {
  display: grid;
  gap: 24px;
  align-items: center;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
}

.scan-illustration {
  position: relative;
  display: grid;
  place-items: center;
  gap: 16px;
}

.scan-device {
  width: 180px;
  height: 260px;
  border-radius: 22px;
  background: #0d1d33;
  border: 2px solid rgba(255, 255, 255, 0.18);
  position: relative;
  box-shadow: 0 12px 26px rgba(12, 22, 38, 0.35);
}

.scan-speaker {
  width: 50px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.scan-camera {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  position: absolute;
  top: 28px;
  right: 18px;
}

.scan-screen {
  position: absolute;
  inset: 40px 16px 16px 16px;
  border-radius: 16px;
  background: radial-gradient(circle at top, rgba(82, 174, 255, 0.35), rgba(9, 27, 48, 0.9));
  overflow: hidden;
}

.scan-line {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(79, 198, 255, 0.9), transparent);
  box-shadow: 0 0 12px rgba(79, 198, 255, 0.8);
  animation: scanLine 2.2s ease-in-out infinite;
}

.scan-ticket {
  width: 150px;
  height: 100px;
  border-radius: 14px;
  background: #f7f9fc;
  border: 1px solid rgba(13, 29, 51, 0.15);
  box-shadow: 0 10px 20px rgba(12, 22, 38, 0.18);
  position: absolute;
  right: -10px;
  bottom: 8px;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.scan-ticket-header {
  width: 60%;
  height: 8px;
  border-radius: 6px;
  background: rgba(13, 29, 51, 0.2);
}

.scan-ticket-lines {
  width: 90%;
  height: 6px;
  border-radius: 6px;
  background: rgba(13, 29, 51, 0.15);
}

.scan-ticket-code {
  height: 16px;
  border-radius: 6px;
  background: repeating-linear-gradient(
    90deg,
    rgba(13, 29, 51, 0.6) 0 3px,
    transparent 3px 6px
  );
}

.scan-copy h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

@keyframes scanLine {
  0% {
    top: 10%;
    opacity: 0.3;
  }
  50% {
    top: 60%;
    opacity: 1;
  }
  100% {
    top: 10%;
    opacity: 0.3;
  }
}

.scan-copy .muted {
  color: var(--muted);
}

.pickup-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pickup-badge {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #eff6ff;
  font-weight: 600;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
}

.pickup-card ul {
  margin: 12px 0 12px 20px;
  display: grid;
  gap: 6px;
}

.pickup-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.pickup-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  margin: 12px 0;
}

.pickup-label input,
.pickup-label select {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fbfaf8;
}

.billing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.billing-grid .full {
  grid-column: span 2;
}

.payment-block .label {
  font-weight: 600;
  margin-bottom: 8px;
}

.payment-options {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.payment-hint {
  margin-top: 6px;
}

.card-details {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(11, 33, 59, 0.2);
  background: rgba(255, 255, 255, 0.7);
}

.card-details.hidden {
  display: none;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.card-hint {
  margin-top: 6px;
}

.pickup-card .checks {
  margin: 18px 0;
}

.pickup-card .check-item {
  font-size: 1.05rem;
}

.pickup-card .terms {
  margin: 16px 0;
  display: grid;
  gap: 10px;
  font-size: 1rem;
  line-height: 1.45;
}

.pickup-card .terms h3 {
  margin-bottom: 4px;
}

.pickup-card .single-check {
  margin: 12px 0 6px;
  align-items: flex-start;
}

.pickup-card .actions {
  margin-top: 12px;
}

/* Kiosk */

.kiosk {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  position: relative;
  z-index: 1;
}

.idle-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    linear-gradient(160deg, rgba(10, 18, 30, 0.75), rgba(4, 8, 14, 0.85)),
    radial-gradient(circle at 15% 20%, rgba(63, 179, 255, 0.35), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.18), transparent 50%),
    url("/images/onefix-hero.png") center/cover no-repeat;
  z-index: 9;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.idle-screen.show {
  opacity: 1;
  pointer-events: auto;
}

.idle-orbit {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 80px rgba(63, 179, 255, 0.25);
  animation: orbit 8s linear infinite;
}

@keyframes orbit {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.idle-content {
  position: relative;
  z-index: 1;
  max-width: 520px;
  padding: 24px;
  color: #fff;
}

.idle-eyebrow {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
}

.idle-title {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2.6rem, 5vw, 4rem);
  margin-bottom: 12px;
}

.idle-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 20px;
}

.idle-touch {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

.idle-action {
  font-size: 1.05rem;
  padding: 14px 26px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.idle-hint {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
}

.kiosk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.kiosk-title {
  font-size: clamp(2rem, 4vw, 3rem);
}

.kiosk-subtitle {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: rgba(233, 242, 255, 0.72);
}

.kiosk-lead {
  max-width: 520px;
  margin-top: 10px;
  font-size: 1.05rem;
  color: rgba(233, 242, 255, 0.8);
}

.kiosk-clock {
  margin-top: 8px;
  font-size: 0.95rem;
  color: rgba(233, 242, 255, 0.7);
}

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

.lang-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  text-decoration: none;
  color: #eff6ff;
  font-weight: 600;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.kiosk-card {
  background: var(--panel);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.kiosk-hidden {
  display: none;
}

.kiosk-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field.full {
  grid-column: span 2;
}

.id-scan {
  padding: 16px;
  border-radius: 16px;
  border: 1px dashed #d3deee;
  background: #f4f8ff;
}

.id-scan .muted {
  color: #5b6b7f;
}

.id-scan-status {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #e8f1ff;
  color: #1c2a44;
  font-weight: 600;
}

.id-scan-status.success {
  background: #d8ecff;
  color: #1c3a5c;
  border: 1px solid #9ecbff;
}

.id-scan input {
  margin-top: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.scan-help {
  margin-top: 10px;
  color: #5b6b7f;
  font-size: 0.9rem;
  line-height: 1.4;
}

.scan-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.scan-row input {
  flex: 1;
  margin-top: 0;
}

.scan-btn {
  white-space: nowrap;
  padding: 10px 16px;
}

.scan-help ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

.scan-help li {
  margin-bottom: 4px;
}

.field label {
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fbfaf8;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.privacy-note {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.privacy-note a {
  color: var(--accent);
  font-weight: 600;
}

.kiosk-success {
  position: fixed;
  inset: 0;
  background: rgba(27, 24, 20, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.kiosk-success.show {
  opacity: 1;
  pointer-events: auto;
}

.success-card {
  background: var(--panel);
  padding: 32px;
  border-radius: 24px;
  width: min(480px, 90%);
  text-align: center;
  box-shadow: var(--shadow);
}

.success-card h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* Status lookup */

.status-card {
  margin-bottom: 18px;
}

.status-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.status-actions {
  grid-column: span 2;
}

.status-result.hidden {
  display: none;
}

.status-hint {
  margin: 6px 0 16px;
  color: var(--muted);
}

.status-history-title {
  margin-top: 18px;
  font-size: 1.2rem;
}

.status-history {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.status-history-item {
  background: #fbfaf8;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.status-history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-history-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.status-help {
  margin-left: 6px;
  color: var(--muted);
}

/* Admin */

.admin {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  position: relative;
  z-index: 1;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.admin-header .ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
}

.admin-header .ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.admin-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: rgba(233, 242, 255, 0.72);
}

.admin-clock {
  margin-top: 8px;
  font-size: 0.95rem;
  color: rgba(233, 242, 255, 0.7);
}

.search {
  display: flex;
  gap: 12px;
}

.search input {
  width: min(320px, 60vw);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
}

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

.live-kiosk {
  background: var(--panel);
  border-radius: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 16px;
}

.live-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.95rem;
}

.live-item.full {
  grid-column: 1 / -1;
}

.live-item .label {
  font-weight: 600;
  color: var(--muted);
}

.export-card {
  background: var(--panel);
  border-radius: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.export-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.square-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.square-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fbfaf8;
}

.square-item p {
  margin: 0;
}

.results {
  background: var(--panel);
  border-radius: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-height: 400px;
}

.results-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.results-item {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
  background: #fbfaf8;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.results-item:hover {
  border-color: var(--accent);
}

.results-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-pill {
  background: #e9f2ff;
  color: #1f3d8a;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.results-meta,
.results-date {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
}

.results-meta {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.detail {
  background: var(--panel);
  border-radius: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.detail p,
.detail li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

.print-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-title {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.detail-section {
  margin-bottom: 20px;
}

.issue-block {
  background: #fbfaf8;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin-top: 10px;
}

.issue-block .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fbfaf8;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.photo-item {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  display: block;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  display: block;
}

.photo-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.photo-upload {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}

.photo-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-upload.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.photo-upload.disabled input {
  cursor: not-allowed;
}

.pickup {
  background: #fff8f1;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #f2dcc7;
}

.checks {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.check-item {
  display: flex;
  gap: 8px;
  font-size: 0.95rem;
}

.signature {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.signature canvas {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: #fff;
  touch-action: none;
}

.signature-preview {
  width: 200px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-top: 8px;
}

@media (max-width: 900px) {
  .kiosk-form {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: span 1;
  }

  .status-form {
    grid-template-columns: 1fr;
  }

  .status-actions {
    grid-column: span 1;
  }

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

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
