:root {
  --bg: #09090b;
  --surface: #141419;
  --surface-strong: #1d1d25;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5f5f7;
  --text-dim: #a1a1b2;
  --accent: #a78bfa;
  --accent-strong: #7c3aed;
  --success: #34d399;
  --radius: 18px;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.16), transparent 32%),
    radial-gradient(circle at bottom right, rgba(52, 211, 153, 0.12), transparent 28%),
    linear-gradient(180deg, #08080a 0%, #111116 100%);
}

a {
  color: inherit;
}

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

:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.95);
  outline-offset: 3px;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 72px;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: var(--text);
}

.hero-card,
.content-card,
.contact-card {
  background: rgba(20, 20, 25, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 48px;
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  margin-bottom: 16px;
}

.lead {
  max-width: 760px;
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.75;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.meta-item {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.meta-item span {
  display: block;
  font-size: 0.76rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.meta-item strong {
  font-size: 0.98rem;
}

.content-card {
  padding: 36px 32px;
}

.section-block + .section-block {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.section-block h2 {
  font-size: 1.45rem;
  margin-bottom: 14px;
}

.section-block p,
.section-block li {
  color: var(--text-dim);
  line-height: 1.8;
}

.section-block ul {
  margin: 14px 0 0;
  padding-left: 18px;
}

.section-block li + li {
  margin-top: 10px;
}

.contact-card {
  margin-top: 24px;
  padding: 28px 32px;
}

.contact-card h2 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.contact-pill {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.contact-pill span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.74rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-pill a,
.contact-pill strong {
  color: #fff;
  text-decoration: none;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--success);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.18);
}

.status-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.success-hero {
  padding-bottom: 36px;
}

.success-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--success);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.18);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.success-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.12);
}

.success-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
  align-items: stretch;
}

.success-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  border-radius: 20px;
  border: 1px solid rgba(52, 211, 153, 0.14);
  background:
    linear-gradient(180deg, rgba(52, 211, 153, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.03);
}

.success-panel h2 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.success-panel p {
  color: var(--text-dim);
}

.success-icon {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  color: #06140e;
  background: linear-gradient(135deg, #6ee7b7, #34d399);
  box-shadow: 0 16px 40px rgba(52, 211, 153, 0.24);
}

.success-icon svg {
  width: 36px;
  height: 36px;
}

.summary-card {
  padding: 24px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.summary-card h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.summary-list {
  list-style: none;
  display: grid;
  gap: 12px;
}

.summary-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-dim);
  line-height: 1.7;
}

.summary-list li::before {
  content: '';
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-top: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.12);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.action-link.primary {
  border-color: rgba(52, 211, 153, 0.22);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.16), rgba(16, 185, 129, 0.16));
  color: #d1fae5;
}

.action-link:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
}

.success-note {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(52, 211, 153, 0.16);
  background: rgba(52, 211, 153, 0.06);
  color: var(--text-dim);
}

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

.tracking-hero {
  padding-bottom: 28px;
}

.track-form {
  margin-top: 24px;
}

.track-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--text-dim);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.track-input-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.track-input {
  flex: 1 1 280px;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1rem;
}

.track-input::placeholder {
  color: rgba(245, 245, 247, 0.45);
}

.track-btn {
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.22), rgba(16, 185, 129, 0.2));
  color: #d1fae5;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

.track-message {
  margin-top: 12px;
  min-height: 22px;
  color: var(--text-dim);
}

.track-message.success {
  color: var(--success);
}

.track-message.error {
  color: #fca5a5;
}

.track-message.loading {
  color: #93c5fd;
}

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

.status-text {
  color: var(--success);
}

.tracking-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding-top: 38px;
  margin-bottom: 22px;
}

.tracking-line {
  position: absolute;
  top: 67px;
  left: 12.5%;
  right: 12.5%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  z-index: 0;
}

.tracking-line-progress {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa, #34d399);
  transition: width 0.45s ease;
}

.truck-indicator {
  position: absolute;
  top: 67px;
  left: 0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 8px 22px rgba(52, 211, 153, 0.2);
  z-index: 2;
  transition: left 0.45s ease, top 0.45s ease;
  animation: truckMove 0.8s ease-in-out infinite;
}

.truck-indicator svg {
  width: 21px;
  height: 21px;
}

.truck-indicator.stopped {
  animation: none;
  background: rgba(52, 211, 153, 0.24);
}

@keyframes truckMove {
  0%,
  100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-2px); }
}

.track-step {
  position: relative;
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  z-index: 1;
}

.track-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-bottom: 8px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.track-step p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.track-step small {
  display: block;
  margin-top: 4px;
  color: rgba(161, 161, 178, 0.8);
  font-size: 0.76rem;
  line-height: 1.35;
}

.track-step.completed,
.track-step.active {
  border-color: rgba(52, 211, 153, 0.24);
  background: rgba(52, 211, 153, 0.08);
}

.track-step.completed span,
.track-step.active span {
  background: var(--success);
  color: #052e1f;
}

.track-step.active p {
  color: #d1fae5;
}

.tracking-meta {
  margin-top: 0;
}

.tracking-schema p {
  margin: 0 0 12px;
  color: var(--text-dim);
}

.tracking-schema pre {
  margin: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.26);
  padding: 16px;
  overflow-x: auto;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
  line-height: 1.6;
  font-size: 0.9rem;
}

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

.admin-card {
  padding: 24px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.admin-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.admin-desc {
  margin: 0;
  color: var(--text-dim);
}

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

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

.admin-field {
  display: grid;
  gap: 7px;
}

.admin-field label {
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.admin-field input,
.admin-field select {
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0 14px;
  font-size: 0.95rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.admin-btn {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

.admin-btn.primary {
  border-color: rgba(52, 211, 153, 0.25);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.18), rgba(16, 185, 129, 0.2));
  color: #d1fae5;
}

.admin-btn.warn {
  border-color: rgba(248, 113, 113, 0.2);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
}

.admin-msg {
  min-height: 20px;
  margin: 2px 0 0;
  color: var(--text-dim);
}

.admin-msg.error {
  color: #fca5a5;
}

.admin-msg.success {
  color: var(--success);
}

.admin-hidden {
  display: none;
}

.admin-helper {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.admin-helper a {
  color: #c4b5fd;
}

.orders-table-wrap {
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: auto;
}

.orders-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.16);
}

.orders-table th,
.orders-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
}

.orders-table th {
  color: #d4d4de;
  letter-spacing: 0.03em;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
}

.orders-table td {
  color: var(--text-dim);
}

.orders-table td strong {
  color: var(--text);
}

.table-inline-action {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-pill.delivered,
.status-pill.shipped {
  border-color: rgba(52, 211, 153, 0.26);
  background: rgba(52, 211, 153, 0.14);
  color: #d1fae5;
}

.status-pill.assembling {
  border-color: rgba(250, 204, 21, 0.24);
  background: rgba(250, 204, 21, 0.1);
  color: #fef08a;
}

.status-pill.processing {
  border-color: rgba(96, 165, 250, 0.26);
  background: rgba(96, 165, 250, 0.1);
  color: #bfdbfe;
}

@media (max-width: 800px) {
  .page-shell {
    width: min(100% - 24px, 1120px);
    padding-top: 20px;
  }

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

  .hero-card,
  .content-card,
  .contact-card {
    padding: 24px 20px;
  }

  .success-layout {
    grid-template-columns: 1fr;
  }

  .tracking-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 4px;
    padding-left: 34px;
  }

  .tracking-line {
    top: 24px;
    bottom: 24px;
    left: 16px;
    right: auto;
    width: 4px;
    height: auto;
  }

  .truck-indicator {
    top: 0;
    left: 16px;
    transform: translate(-50%, -50%);
  }

  .track-step {
    text-align: left;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px 14px 14px 0;
    background: transparent;
    border-color: transparent;
  }

  .track-step span {
    margin-bottom: 0;
  }

  .track-step div {
    min-width: 0;
  }

  .track-step p {
    font-size: 0.98rem;
  }

  .tracking-result-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .meta-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

  .orders-table {
    min-width: 640px;
  }

  .success-panel {
    padding: 22px;
  }
}