/* ============================================================================
   device-code.css — the "Check your email" step inside the login card (2026-11)
   public/js/device-code.js builds the markup. Same card, fonts and buttons as
   the sign-in form; flat colours only (no gradients, glow or blur).
   ========================================================================== */

.alp-view[hidden] { display: none !important; }

.dc-step { text-align: left; }

/* Envelope in a soft circle; drops in once when the step opens. */
.dc-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: #eef4ff; color: #1d4ed8;
  margin: 0 0 18px;
  transition: background-color .25s ease, color .25s ease;
}
.dc-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dc-step.is-entering .dc-icon { animation: dcDrop .34s cubic-bezier(.2,.8,.25,1) both; }
@keyframes dcDrop { 0% { opacity: 0; transform: translateY(-10px) scale(.9); } 100% { opacity: 1; transform: none; } }

.dc-icon .dc-check { display: none; }
.dc-step.is-ok .dc-icon { background: #e7f6ee; color: #12805c; }
.dc-step.is-ok .dc-icon .dc-env { display: none; }
.dc-step.is-ok .dc-icon .dc-check { display: block; }
.dc-step.is-ok .dc-icon .dc-check path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: dcDraw .4s .05s ease-out forwards; }
@keyframes dcDraw { to { stroke-dashoffset: 0; } }

.dc-step h2 { margin: 0; color: #101828; font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -0.4px; }
.dc-sub { margin: 10px 0 24px; color: #667085; font-size: 14px; line-height: 1.55; }
.dc-sub b { color: #101828; font-weight: 600; word-break: break-all; }

/* ── The six boxes: ONE real input lying over six drawn cells ───────────── */
.dc-boxes { position: relative; margin: 0 0 12px; }
.dc-input {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; margin: 0; padding: 0; border: 0; outline: none;
  background: transparent; color: transparent; caret-color: transparent;
  /* iPhone zooms the page when a tapped box's text is under 16px ON SCREEN.
     Phones draw this page at 0.88 scale (MOBILE_ZOOM in admin.html), so 16px
     here was ~14px on screen and Safari zoomed in. 20px x 0.88 = 17.6px. The
     text itself is invisible (the cells show the digits), so size costs nothing. */
  font-size: 20px;
  touch-action: manipulation;
  letter-spacing: 0; text-indent: -9999px;
  -webkit-appearance: none; appearance: none; cursor: text;
}
.dc-input::selection { background: transparent; }
.dc-cells { display: flex; gap: 8px; }
.dc-cell {
  flex: 1 1 0; min-width: 0; height: 60px;
  display: grid; place-items: center; position: relative;
  border: 1.5px solid #d8e0ea; border-radius: 12px; background: #fff;
  color: #101828; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.dc-cell:nth-child(4) { margin-left: 8px; } /* 3 + 3, easier to read */
.dc-cell.is-filled span { animation: dcPop .12s ease-out; }
@keyframes dcPop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
.dc-boxes.is-focus .dc-cell.is-active { border-color: #1570ef; box-shadow: 0 0 0 4px rgba(21,112,239,.1); }
.dc-boxes.is-focus .dc-cell.is-active::after {
  content: ''; width: 2px; height: 26px; background: #1570ef; border-radius: 1px;
  animation: dcBlink 1s steps(1) infinite;
}
@keyframes dcBlink { 50% { opacity: 0; } }

.dc-boxes.is-error .dc-cell { border-color: #f04438; background: #fffbfa; color: #b42318; }
.dc-boxes.is-error .dc-cells { animation: dcShake .3s ease; }
@keyframes dcShake { 0%,100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.dc-boxes.is-ok .dc-cell { border-color: #12b76a; background: #f6fef9; color: #05603a; }
.dc-boxes.is-busy .dc-cell { opacity: .7; }

.dc-msg { min-height: 0; margin: 0 0 14px; font-size: 13px; font-weight: 500; line-height: 1.45; color: #b42318; }
.dc-msg:empty { display: none; }
.dc-msg.is-info { color: #475467; }

.dc-step .admin-login-submit:disabled { background: #98a2b3; box-shadow: none; transform: none; cursor: default; }

.dc-note { margin: 14px 0 0; color: #667085; font-size: 13px; line-height: 1.5; }

.dc-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #eaecf0; }
.dc-link {
  background: none; border: 0; padding: 6px 0; min-height: 0; margin: 0;
  font: inherit; font-size: 13px; font-weight: 600; color: #1d4ed8; cursor: pointer; text-align: left;
}
.dc-link:hover:not(:disabled) { text-decoration: underline; }
.dc-link:disabled { color: #98a2b3; cursor: default; font-weight: 500; font-variant-numeric: tabular-nums; }
.dc-link:focus-visible, .dc-input:focus-visible { outline: none; }
.dc-link:focus-visible { box-shadow: 0 0 0 3px rgba(21,112,239,.25); border-radius: 6px; }
.dc-back { color: #475467; font-weight: 500; text-align: right; }

.dc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 560px) {
  .dc-step { text-align: center; }
  .dc-icon { margin: 0 auto 16px; width: 48px; height: 48px; }
  .dc-step h2 { font-size: 24px; }
  .dc-sub { font-size: 13.5px; margin-bottom: 20px; }
  .dc-cells { gap: 6px; }
  .dc-cell { height: 54px; font-size: 24px; border-radius: 11px; }
  .dc-cell:nth-child(4) { margin-left: 6px; }
  .dc-msg { text-align: center; }
  .dc-foot { flex-direction: column-reverse; gap: 4px; }
  .dc-link, .dc-back { text-align: center; padding: 8px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .dc-step.is-entering .dc-icon, .dc-cell.is-filled span, .dc-boxes.is-error .dc-cells,
  .dc-step.is-ok .dc-icon .dc-check path { animation: none !important; }
  .dc-step.is-ok .dc-icon .dc-check path { stroke-dashoffset: 0; }
  .dc-boxes.is-focus .dc-cell.is-active::after { animation: none; }
}

/* Success: the button goes green; the resend / account links are no longer needed. */
.dc-step.is-ok .admin-login-submit:disabled { background: #12805c; color: #fff; }
.dc-step.is-ok .dc-foot, .dc-step.is-ok .dc-note { visibility: hidden; }
