/* Coplost Enterprises — Order Chronograph (orders.php only)
   Independent chr-* system. Not ce-lat / slab / orbit order patterns. */

.page-orders.chr-orders {
  --chr-ink: #141414;
  --chr-slate: #333333;
  --chr-fog: #ececec;
  --chr-paper: #f7f7f7;
  --chr-line: rgba(20, 20, 20, 0.12);
  --chr-hot: #ff2d55;
  --chr-volt: #c8ff00;
  --chr-volt-ink: #1a2800;
  --chr-ok: #00a878;
  --chr-ship: #3b82f6;
  --chr-pack: #f59e0b;
  --chr-display: "Source Serif 4", Georgia, serif;
  --chr-cond: "Barlow Condensed", "Segoe UI", sans-serif;
  --chr-sans: "Barlow Condensed", "Segoe UI", sans-serif;
  --chr-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --chr-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
}

.page-orders.chr-orders.a67-body {
  margin: 0;
  color: var(--chr-ink);
  font-family: var(--chr-sans);
  background: var(--chr-paper);
}

.page-orders .a67-root-bare {
  padding: 0;
  overflow: visible;
}

.page-orders .a67-main {
  overflow: visible;
}

.chr-world {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  padding: 1.15rem clamp(1rem, 3vw, 2.25rem) 2.5rem;
  overflow-x: clip;
}

.chr-sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 90% 0%, rgba(255, 45, 85, 0.12), transparent 55%),
    radial-gradient(ellipse 45% 35% at 5% 20%, rgba(200, 255, 0, 0.14), transparent 50%),
    linear-gradient(170deg, #fafafa 0%, var(--chr-fog) 50%, #e4e4e4 100%);
}

.chr-flare {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.5;
  animation: chr-drift 16s ease-in-out infinite alternate;
}

.chr-flare-a {
  width: min(40vw, 24rem);
  height: min(40vw, 24rem);
  top: -8%;
  right: -6%;
  background: rgba(255, 45, 85, 0.2);
}

.chr-flare-b {
  width: min(34vw, 20rem);
  height: min(34vw, 20rem);
  bottom: 10%;
  left: -8%;
  background: rgba(200, 255, 0, 0.22);
  animation-delay: -5s;
}

.chr-ticks {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 47px,
      rgba(20, 20, 20, 0.04) 47px 48px
    );
  mask-image: radial-gradient(ellipse 70% 50% at 50% 25%, #000 20%, transparent 75%);
}

/* Topbar */
.chr-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  animation: chr-rise 0.5s var(--chr-ease) both;
}

.chr-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.chr-mark-seal {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  background: var(--chr-ink);
  color: var(--chr-volt);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  transition: transform 0.35s var(--chr-spring);
}

.chr-mark:hover .chr-mark-seal {
  transform: rotate(30deg) scale(1.06);
}

.chr-mark-name {
  font-family: var(--chr-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.chr-top-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.95rem;
}

.chr-top-nav a {
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--chr-slate);
  text-decoration: none;
  text-transform: uppercase;
}

.chr-top-nav a:hover {
  color: var(--chr-ink);
}

.chr-top-cta {
  padding: 0.45rem 0.85rem !important;
  background: var(--chr-ink) !important;
  color: var(--chr-volt) !important;
  border-radius: 0.35rem;
  transition: transform 0.3s var(--chr-spring) !important;
}

.chr-top-cta:hover {
  transform: translateY(-2px) scale(1.03);
}

/* Hero */
.chr-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--chr-ink);
  animation: chr-rise 0.55s var(--chr-ease) 0.04s both;
}

.chr-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--chr-hot);
}

.chr-hero h1 {
  margin: 0;
  font-family: var(--chr-display);
  font-size: clamp(2.5rem, 7vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.95;
  max-width: 12ch;
}

.chr-tag {
  margin: 0.55rem 0 0;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--chr-slate);
}

.chr-lede {
  margin: 0.45rem 0 0;
  max-width: 40ch;
  color: var(--chr-slate);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.45;
  font-family: var(--chr-display);
}

.chr-meter {
  display: grid;
  gap: 0.15rem;
  text-align: right;
  min-width: 6rem;
}

.chr-meter strong {
  font-family: var(--chr-cond);
  font-size: clamp(2.8rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--chr-ink);
}

.chr-meter span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chr-slate);
}

/* Filters */
.chr-toolbar {
  margin-bottom: 1.1rem;
  animation: chr-rise 0.5s var(--chr-ease) 0.08s both;
}

.chr-toolbar-label {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chr-slate);
}

.chr-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chr-filters button {
  appearance: none;
  border: 1.5px solid var(--chr-line);
  background: #fff;
  cursor: pointer;
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--chr-slate);
  border-radius: 0.35rem;
  transition: background 0.2s, color 0.2s, transform 0.25s var(--chr-spring), border-color 0.2s;
}

.chr-filters button:hover {
  transform: translateY(-2px);
  color: var(--chr-ink);
}

.chr-filters button.is-on {
  background: var(--chr-ink);
  border-color: var(--chr-ink);
  color: var(--chr-volt);
}

/* Stage */
.chr-stage {
  min-height: 12rem;
}

.chr-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 22rem;
  margin: 2rem auto;
  padding: 1rem 1.15rem;
  border-radius: 0.85rem;
  background: #fff;
  border: 1.5px solid var(--chr-line);
  font-weight: 650;
  color: var(--chr-slate);
}

.chr-spinner {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  border: 2px solid rgba(20, 20, 20, 0.12);
  border-top-color: var(--chr-hot);
  animation: chr-spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* Gate */
.chr-gate {
  text-align: center;
  max-width: 28rem;
  margin: 2rem auto;
  padding: 2.25rem 1.5rem;
  background: #fff;
  border: 1.5px solid var(--chr-line);
  border-radius: 1rem;
  animation: chr-rise 0.5s var(--chr-ease) both;
}

.chr-gate-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--chr-hot);
}

.chr-gate h2 {
  margin: 0.4rem 0 0;
  font-family: var(--chr-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.chr-gate > p {
  margin: 0.5rem 0 0;
  color: var(--chr-slate);
  font-family: var(--chr-display);
  font-size: 1.02rem;
  line-height: 1.45;
}

.chr-gate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.chr-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.1rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0.35rem;
  transition: transform 0.3s var(--chr-spring), background 0.2s, color 0.2s;
}

.chr-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.chr-btn-fill {
  background: var(--chr-ink);
  color: var(--chr-volt);
}

.chr-btn-line {
  background: transparent;
  color: var(--chr-ink);
  box-shadow: inset 0 0 0 1.5px var(--chr-ink);
}

/* Reel of tickets */
.chr-reel {
  display: grid;
  gap: 0.85rem;
}

.chr-ticket {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) auto;
  gap: 0;
  align-items: stretch;
  background: #fff;
  border: 1.5px solid var(--chr-line);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.35s var(--chr-spring), box-shadow 0.3s, border-color 0.2s;
  animation: chr-rise 0.5s var(--chr-ease) both;
  animation-delay: calc(0.05s + var(--i, 0) * 45ms);
}

.chr-ticket.is-hidden {
  display: none;
}

.chr-ticket:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 18px 40px rgba(20, 20, 20, 0.1);
}

.chr-ticket.tone-delivered { border-left: 4px solid var(--chr-ok); }
.chr-ticket.tone-shipped { border-left: 4px solid var(--chr-ship); }
.chr-ticket.tone-packed { border-left: 4px solid var(--chr-pack); }
.chr-ticket.tone-placed { border-left: 4px solid var(--chr-ink); }
.chr-ticket.tone-cancelled { border-left: 4px solid var(--chr-hot); }

/* Calendar stamp */
.chr-cal {
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 0.85rem 0.5rem;
  background: var(--chr-ink);
  color: #fff;
  text-align: center;
  position: relative;
}

.chr-cal::after {
  content: "";
  position: absolute;
  right: -0.45rem;
  top: 50%;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--chr-paper);
  transform: translateY(-50%);
  box-shadow: 0 2.8rem 0 var(--chr-paper), 0 -2.8rem 0 var(--chr-paper);
}

.chr-cal-mon {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--chr-volt);
}

.chr-cal-day {
  font-family: var(--chr-cond);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.chr-cal-yr {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.82);
}

.chr-core {
  padding: 1rem 1.15rem 1.05rem;
  min-width: 0;
  display: grid;
  gap: 0.4rem;
  align-content: start;
}

.chr-core-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
}

.chr-seq {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--chr-slate);
}

.chr-state {
  padding: 0.25rem 0.55rem;
  border-radius: 0.25rem;
  background: var(--chr-fog);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chr-ticket.tone-delivered .chr-state { background: rgba(0, 168, 120, 0.15); color: #067a56; }
.chr-ticket.tone-shipped .chr-state { background: rgba(59, 130, 246, 0.15); color: #1d4ed8; }
.chr-ticket.tone-packed .chr-state { background: rgba(245, 158, 11, 0.18); color: #b45309; }
.chr-ticket.tone-placed .chr-state { background: rgba(20, 20, 20, 0.08); color: var(--chr-ink); }
.chr-ticket.tone-cancelled .chr-state { background: rgba(255, 45, 85, 0.12); color: var(--chr-hot); }

.chr-id {
  margin: 0;
  font-family: var(--chr-display);
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  word-break: break-word;
}

.chr-items {
  margin: 0;
  color: var(--chr-slate);
  font-family: var(--chr-display);
  font-size: 0.95rem;
  line-height: 1.4;
}

.chr-invoice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.35rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.65rem;
  background: var(--chr-paper);
  border: 1px dashed var(--chr-line);
}

.chr-inv-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--chr-slate);
}

.chr-inv-amt {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--chr-cond);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--chr-ink);
}

.chr-inv-pay {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.chr-beat {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.chr-beat i {
  flex: 1;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.1);
  transition: background 0.3s, transform 0.3s var(--chr-spring);
}

.chr-beat i.is-on {
  background: var(--chr-ink);
  transform: scaleY(1.35);
}

.chr-ticket.tone-delivered .chr-beat i.is-on { background: var(--chr-ok); }
.chr-ticket.tone-shipped .chr-beat i.is-on { background: var(--chr-ship); }
.chr-ticket.tone-packed .chr-beat i.is-on { background: var(--chr-pack); }
.chr-ticket.tone-cancelled .chr-beat i.is-on { background: var(--chr-hot); }

.chr-ticket-foot {
  display: grid;
  place-items: center;
  padding: 1rem 1.1rem;
  background: var(--chr-fog);
  border-left: 1.5px dashed var(--chr-line);
}

.chr-filter-empty {
  margin: 1.5rem 0 0;
  text-align: center;
  padding: 1.25rem;
  border-radius: 0.85rem;
  border: 1.5px dashed var(--chr-line);
  color: var(--chr-slate);
  font-weight: 650;
  background: rgba(255, 255, 255, 0.6);
}

/* Foot */
.chr-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--chr-line);
  color: var(--chr-slate);
  font-size: 0.88rem;
  font-weight: 600;
}

.chr-foot p { margin: 0; }

.chr-foot nav {
  display: flex;
  gap: 0.85rem;
}

.chr-foot a {
  color: var(--chr-ink);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
}

.chr-foot a:hover {
  color: var(--chr-hot);
}

@keyframes chr-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes chr-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-4%, 6%) scale(1.08); }
}

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

@media (prefers-reduced-motion: reduce) {
  .chr-topbar,
  .chr-hero,
  .chr-toolbar,
  .chr-ticket,
  .chr-gate,
  .chr-flare,
  .chr-spinner {
    animation: none !important;
  }
}

@media (max-width: 800px) {
  .chr-ticket {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }

  .chr-ticket-foot {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1.5px dashed var(--chr-line);
  }

  .chr-cal::after {
    display: none;
  }
}

@media (max-width: 560px) {
  .chr-invoice {
    grid-template-columns: 1fr;
  }

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

  .chr-meter {
    text-align: left;
  }

  .chr-world {
    padding-bottom: 4.5rem;
  }
}
