/* Sign-in pages (mobile number + PIN). Tokens from UI_V3_PROMPTS.md Part B §6 (same as ops.css). */
:root {
  --text: #111827; --text-2: #4b5563; --muted: #6b7280; --page: #f3f4f6; --card: #fff; --border: #e5e7eb;
  --accent: #c2410c; --accent-hover: #9a3412; --accent-tint: #fff7ed;
  --good: #166534; --good-bg: #dcfce7; --warn: #92400e; --warn-bg: #fef3c7; --bad: #991b1b; --bad-bg: #fee2e2;
  --info: #1e40af; --info-bg: #dbeafe; --radius: 12px; --control: 44px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.auth { background: var(--page); color: var(--text); font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
a { color: var(--accent); font-weight: 600; text-decoration: none; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

.auth-split { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-hero { background: linear-gradient(150deg, #9a3412 0%, #c2410c 55%, #ea580c 100%); color: #fff; padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between; }
.auth-hero .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.auth-hero .brand span { width: 36px; height: 36px; border-radius: 10px; background: #fff; color: var(--accent);
  display: grid; place-items: center; font-weight: 800; }
.auth-hero h2 { font-size: 30px; line-height: 1.2; max-width: 18ch; margin: 40px 0 0; }
.auth-hero ul { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; }
.auth-hero li::before { content: "●  "; color: #fed7aa; }
.auth-hero .foot { font-size: 12px; opacity: .85; }
.auth-pane { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-box { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 26px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 8px 24px rgba(17, 24, 39, .06); }
.auth-box h1 { font-size: 21px; margin: 0; }
.auth-box .sub { color: var(--text-2); font-size: 13.5px; margin: -8px 0 0; }
.mark { width: 56px; height: 56px; border-radius: 16px; background: var(--accent); color: #fff; display: grid;
  place-items: center; font-weight: 800; font-size: 26px; margin: 0 auto; }
.only-phone { display: none; }

.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #374151; }
.phone-in { display: flex; align-items: center; min-height: 52px; border: 1px solid #d1d5db; border-radius: var(--radius);
  background: #fff; padding: 0 14px; gap: 10px; }
.phone-in:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(194, 65, 12, .15); }
.phone-in .pre { color: var(--text-2); font-weight: 600; font-size: 16px; }
.phone-in input, .text-in { border: 0; outline: none; font: 600 17px Inter, sans-serif; flex: 1; min-width: 0; background: transparent; }
.phone-in input::placeholder, .text-in::placeholder { color: #b0b6bf; font-weight: 500; }
.text-in { border: 1px solid #d1d5db; border-radius: var(--radius); min-height: 48px; padding: 0 14px; font-size: 16px; background: #fff; }
.text-in:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(194, 65, 12, .15); }

.pins { display: flex; gap: 8px; }
.pins span { flex: 1; height: 50px; border: 1.5px solid var(--border); border-radius: 10px; display: grid; place-items: center;
  font-size: 22px; font-weight: 700; background: #fff; }
.pins span.f { border-color: var(--text); }
.pins span.cur { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(194, 65, 12, .15); }
.pins.err span { border-color: var(--bad); color: var(--bad); }
.pins.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.pin-input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }

.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.key { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 60px; border-radius: 14px;
  background: #fff; border: 1px solid var(--border); font: 600 24px Inter, system-ui, sans-serif; color: var(--text); cursor: pointer;
  touch-action: manipulation; }
.key small { font-size: 10px; font-weight: 600; letter-spacing: .12em; color: var(--muted); }
.key:active { background: var(--accent-tint); }
.key.del { background: transparent; border-color: transparent; }

.btn { min-height: var(--control); border-radius: 10px; border: 0; background: var(--accent); color: #fff; font: 700 15px Inter, sans-serif;
  padding: 0 16px; cursor: pointer; width: 100%; }
.btn:hover { background: var(--accent-hover); }
.btn.sec { background: #fff; color: var(--text); border: 1px solid var(--border); }
.chk { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #374151; font-weight: 500; }
.chk input { width: 20px; height: 20px; accent-color: var(--accent); }
.msg { border-radius: var(--radius); padding: 10px 12px; font-size: 13.5px; }
.msg.bad { background: var(--bad-bg); color: var(--bad); }
.msg.warn { background: var(--warn-bg); color: var(--warn); }
.msg.info { background: var(--info-bg); color: var(--info); }
.msg.good { background: var(--good-bg); color: var(--good); }
.timer { font-size: 32px; font-weight: 700; text-align: center; }
.small { font-size: 13px; color: var(--text-2); text-align: center; margin: 0; }
.rules { list-style: none; margin: 0; padding: 0; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.rules li::before { content: "✓ "; color: var(--good); font-weight: 700; }
.rules li.no { color: var(--muted); }
.rules li.no::before { content: "○ "; color: var(--muted); }
.divider { border-top: 1px solid var(--border); padding-top: 12px; }
/* "Sign in with username and password": a highlighted bar so it's easy to spot under the PIN keypad */
details.pw summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--control); padding: 0 14px; border: 1.5px solid var(--accent); border-radius: 10px;
  background: var(--accent-tint); color: var(--accent-hover); font-size: 14.5px; font-weight: 700; text-align: center; }
details.pw summary::-webkit-details-marker { display: none; }
details.pw summary::before { content: "🔑"; font-size: 16px; }
details.pw summary::after { content: "▾"; font-size: 14px; transition: transform .15s; }
details.pw[open] summary::after { transform: rotate(180deg); }
details.pw summary:hover { background: #ffedd5; }
details.pw[open] summary { margin-bottom: 10px; }
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.names button { min-height: 64px; border-radius: 14px; border: 1px solid var(--border); background: #fff; font: 600 16px Inter, sans-serif; cursor: pointer; }
.names button.on { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-hover); }
.who { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.who .av { width: 34px; height: 34px; border-radius: 50%; background: #0d9488; color: #fff; display: grid; place-items: center; font-weight: 700; }

@media (max-width: 860px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
}
@media (max-width: 640px) {
  .auth-pane { align-items: stretch; padding: 20px 16px; }
  .auth-box { border: 0; box-shadow: none; background: transparent; padding: 8px 4px; max-width: none; }
  .only-phone { display: grid; }
  .only-desk { display: none; }
  .pins span { height: 18px; flex: 0 0 18px; border-radius: 9px; border: 2px solid #9ca3af; font-size: 0; }
  .pins { justify-content: center; gap: 14px; }
  .pins span.f { background: var(--text); border-color: var(--text); }
  .pins span.cur { box-shadow: none; }
  .pins.err span.f { background: var(--bad); border-color: var(--bad); }
  input, select, textarea { font-size: 16px; }
}
