/* Appily twentyone — Cold Locker Trace */

.page-cold-locker {
  --cl-ink: #14221c;
  --cl-muted: #5a6d64;
  --cl-line: #c8ddd2;
  --cl-ice: #e8f6f0;
  --cl-frost: #b8e4d4;
  --cl-deep: #0a2e1f;
  --cl-green: #0b7a45;
  --cl-green-bright: #12a35c;
  --cl-warn: #c45c26;
  --cl-metal: #8a9a92;
  --cl-chalk: #2a3d34;
  background: #f2f7f4;
}

/* ── Vault hero ── */
.cl-vault {
  position: relative;
  padding: 48px 0 40px;
  background: linear-gradient(165deg, #061a12 0%, var(--cl-deep) 40%, #0d5c38 100%);
  color: #fff;
  overflow: hidden;
}

.cl-frost {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.15) 0, transparent 35%),
    radial-gradient(circle at 88% 70%, rgba(184, 228, 212, 0.2) 0, transparent 40%),
    repeating-linear-gradient(
      125deg,
      transparent,
      transparent 18px,
      rgba(255, 255, 255, 0.03) 18px,
      rgba(255, 255, 255, 0.03) 19px
    );
  pointer-events: none;
}

.cl-condense {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cl-condense span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  animation: cl-drip 4s ease-in-out infinite;
}

.cl-condense span:nth-child(1) { left: 8%; top: 18%; animation-delay: 0s; }
.cl-condense span:nth-child(2) { left: 22%; top: 42%; animation-delay: 0.8s; }
.cl-condense span:nth-child(3) { left: 76%; top: 28%; animation-delay: 1.4s; }
.cl-condense span:nth-child(4) { left: 64%; top: 62%; animation-delay: 2.1s; }
.cl-condense span:nth-child(5) { left: 42%; top: 12%; animation-delay: 2.8s; }

@keyframes cl-drip {
  0%, 100% { opacity: 0.2; transform: translateY(0); }
  50% { opacity: 0.8; transform: translateY(6px); }
}

.cl-vault-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(200px, 0.75fr);
  gap: 36px;
  align-items: center;
}

.cl-kicker {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cl-frost);
}

.cl-vault-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(1.95rem, 4.2vw, 2.85rem);
  line-height: 1.12;
  margin: 0 0 14px;
  color: #fff;
}

.cl-vault-copy h1 em {
  font-style: normal;
  color: #a8f0c8;
}

.cl-lede {
  margin: 0 0 20px;
  max-width: 52ch;
  line-height: 1.7;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.86);
}

.cl-chill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cl-chill-tags li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.cl-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7dffb8;
}

/* ── Temperature dial ── */
.cl-dial {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.cl-dial-face {
  position: relative;
  width: 120px;
  height: 120px;
}

.cl-dial-ring {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 70%, rgba(11, 122, 69, 0.4), transparent 60%);
}

.cl-dial-tick {
  position: absolute;
  width: 2px;
  height: 10px;
  background: rgba(255, 255, 255, 0.5);
  left: 50%;
  top: 8px;
  margin-left: -1px;
  transform-origin: 50% 52px;
}

.cl-dial-t1 { transform: rotate(0deg); }
.cl-dial-t2 { transform: rotate(90deg); }
.cl-dial-t3 { transform: rotate(180deg); }
.cl-dial-t4 { transform: rotate(270deg); }

.cl-dial-needle {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 3px;
  height: 42px;
  margin-left: -1.5px;
  background: linear-gradient(180deg, #7dffb8, #fff);
  border-radius: 2px;
  transform-origin: 50% 100%;
  transform: rotate(-30deg);
  transition: transform 0.6s ease;
}

.cl-dial.is-found .cl-dial-needle { transform: rotate(45deg); }
.cl-dial.is-miss .cl-dial-needle { transform: rotate(200deg); background: linear-gradient(180deg, #ffb07d, #fff); }
.cl-dial.is-idle .cl-dial-needle { animation: cl-needle-idle 3s ease-in-out infinite; }

@keyframes cl-needle-idle {
  0%, 100% { transform: rotate(-45deg); }
  50% { transform: rotate(-15deg); }
}

.cl-dial-temp {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: #fff;
}

.cl-dial-status {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.cl-dial-id {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
}

/* ── Floor layout ── */
.cl-floor {
  padding: 36px 0 64px;
}

.cl-floor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
}

/* ── Locker door form ── */
.cl-locker-door {
  position: relative;
  padding: 26px 28px 32px;
  background: linear-gradient(145deg, #eef3f0 0%, #dce8e2 100%);
  border: 2px solid var(--cl-metal);
  border-radius: 12px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.8),
    0 8px 28px rgba(6, 26, 18, 0.1);
}

.cl-locker-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.cl-locker-plate {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #a8b5ae, #7a8a82);
  border-radius: 6px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.cl-plate-bolt {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5a6a62;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.3);
}

.cl-plate-bolt:nth-child(1) { top: 6px; left: 6px; }
.cl-plate-bolt:nth-child(2) { top: 6px; right: 6px; }
.cl-plate-bolt:nth-child(3) { bottom: 6px; left: 6px; }
.cl-plate-bolt:nth-child(4) { bottom: 6px; right: 6px; }

.cl-locker-tag {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cl-muted);
}

.cl-locker-head h2 {
  margin: 0;
  font-size: 1.3rem;
}

.cl-locker-led {
  margin-left: auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7dffb8;
  box-shadow: 0 0 8px #7dffb8;
  animation: cl-led-pulse 2s ease infinite;
  flex-shrink: 0;
}

@keyframes cl-led-pulse {
  50% { opacity: 0.5; }
}

.cl-locker-note {
  margin: 0 0 18px;
  font-size: 0.88rem;
  color: var(--cl-muted);
}

.cl-field {
  margin-bottom: 14px;
}

.cl-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cl-muted);
}

.cl-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--cl-line);
  border-radius: 6px;
  background: #fff;
  color: var(--cl-ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cl-field input:focus {
  border-color: var(--cl-green);
  box-shadow: 0 0 0 3px rgba(11, 122, 69, 0.12);
}

.cl-input-mono {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.cl-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.cl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cl-btn-primary {
  background: var(--cl-green);
  color: #fff;
}

.cl-btn-primary:hover {
  background: var(--cl-deep);
}

.cl-btn-ghost {
  background: transparent;
  border-color: var(--cl-line);
  color: var(--cl-ink);
}

.cl-btn-ghost:hover {
  border-color: var(--cl-green);
  color: var(--cl-green);
}

.cl-btn-wide {
  width: 100%;
  margin-top: 8px;
}

.cl-locker-handle {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 56px;
  background: linear-gradient(90deg, #9aa8a0, #c8d4cc);
  border-radius: 0 6px 6px 0;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
}

/* ── Chalkboard sidebar ── */
.cl-chalkboard {
  padding: 20px 18px;
  background: var(--cl-chalk);
  border-radius: 10px;
  color: #e8f0ea;
  box-shadow: var(--shadow);
  position: relative;
}

.cl-chalkboard::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255, 255, 255, 0.02) 3px,
    rgba(255, 255, 255, 0.02) 4px
  );
  pointer-events: none;
}

.cl-chalk-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cl-frost);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
}

.cl-chalk-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cl-chalk-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 6px;
  color: inherit;
  transition: background 0.2s;
}

.cl-chalk-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cl-chalk-bullet {
  color: var(--cl-frost);
  font-weight: 700;
  flex-shrink: 0;
}

.cl-chalk-link strong {
  display: block;
  font-size: 0.88rem;
}

.cl-chalk-link small {
  display: block;
  font-size: 0.72rem;
  opacity: 0.65;
  margin-top: 2px;
}

/* ── Readout / results ── */
.cl-readout {
  min-height: 120px;
}

.cl-crate-card {
  position: relative;
  padding: 28px 28px 24px;
  background: #fff;
  border: 1px solid var(--cl-line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.cl-crate-lid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--cl-green) 0,
    var(--cl-green) 12px,
    var(--cl-green-bright) 12px,
    var(--cl-green-bright) 24px
  );
}

.cl-crate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.cl-badge {
  display: inline-block;
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
}

.cl-badge-ok {
  background: var(--cl-ice);
  color: var(--cl-green);
}

.cl-badge-warn {
  background: #fdf0e8;
  color: var(--cl-warn);
}

.cl-status-pill {
  padding: 6px 14px;
  background: var(--cl-deep);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
}

.cl-order-id {
  margin: 0 0 16px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cl-ink);
  letter-spacing: 0.03em;
}

.cl-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 24px;
  padding: 16px;
  background: var(--cl-ice);
  border-radius: 10px;
}

.cl-stats div {
  text-align: center;
}

.cl-stats dt {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cl-muted);
}

.cl-stats dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cl-ink);
}

/* ── Chill ladder (vertical) ── */
.cl-ladder {
  margin-bottom: 20px;
}

.cl-ladder-title {
  margin: 0 0 16px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cl-muted);
}

.cl-ladder-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cl-rung {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.cl-rung-marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
}

.cl-rung-code {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 10px;
  background: #fff;
  border: 2px solid var(--cl-line);
  color: var(--cl-muted);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.cl-rung-temp {
  margin-top: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cl-muted);
}

.cl-rung-line {
  display: none;
}

.cl-rung.is-done .cl-rung-code {
  background: var(--cl-green);
  border-color: var(--cl-green);
  color: #fff;
}

.cl-rung.is-live .cl-rung-code {
  background: var(--cl-deep);
  border-color: var(--cl-green-bright);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(11, 122, 69, 0.2);
}

.cl-rung.is-live .cl-rung-temp {
  color: var(--cl-green);
}

.cl-rung-zone {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cl-muted);
}

.cl-rung-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cl-ink);
  margin-top: 2px;
}

/* ── Miss / idle states ── */
.cl-crate-miss {
  text-align: center;
  padding: 40px 28px;
}

.cl-empty-locker {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 18px;
}

.cl-empty-frame {
  position: absolute;
  inset: 0;
  border: 3px dashed var(--cl-line);
  border-radius: 10px;
}

.cl-empty-x {
  position: absolute;
  inset: 20%;
  background:
    linear-gradient(45deg, transparent 46%, var(--cl-warn) 46%, var(--cl-warn) 54%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, var(--cl-warn) 46%, var(--cl-warn) 54%, transparent 54%);
}

.cl-crate-miss h3 {
  margin: 12px 0 8px;
}

.cl-crate-miss p {
  margin: 0 0 20px;
  color: var(--cl-muted);
  max-width: 40ch;
  margin-left: auto;
  margin-right: auto;
}

.cl-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 24px;
  text-align: center;
  background: #fff;
  border: 2px dashed var(--cl-line);
  border-radius: 14px;
}

.cl-idle p {
  margin: 0;
  color: var(--cl-muted);
  max-width: 36ch;
}

.cl-idle-locker {
  position: relative;
  width: 100px;
  height: 72px;
}

.cl-idle-door {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #e8efeb, #d4e0da);
  border: 2px solid var(--cl-metal);
  border-radius: 8px;
}

.cl-idle-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: rgba(11, 122, 69, 0.15);
  animation: cl-glow-pulse 2.5s ease infinite;
}

@keyframes cl-glow-pulse {
  50% { transform: scale(1.2); opacity: 0.5; }
}

.cl-idle-slot {
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 36px;
  height: 6px;
  margin-left: -18px;
  background: #5a6a62;
  border-radius: 2px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .cl-vault-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cl-dial {
    max-width: 220px;
    margin: 0 auto;
  }

  .cl-floor-grid {
    grid-template-columns: 1fr;
  }

  .cl-locker-handle {
    display: none;
  }

  .cl-ladder-steps {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .cl-stats {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .cl-stats div {
    display: flex;
    justify-content: space-between;
    text-align: left;
  }
}

@media (max-width: 520px) {
  .cl-ladder-steps {
    grid-template-columns: 1fr;
  }

  .cl-rung {
    flex-direction: row;
    text-align: left;
    gap: 14px;
  }

  .cl-rung-marker {
    margin-bottom: 0;
  }
}
