/* ============================================================================
   Presstropic — sign-in pages (company, user, two-step, device naming)
   Standalone: these pages load only this file, not the app's style.css.
   House rules honoured: no gradients, bright off-white surface, black
   Inter type (self-hosted), gold accent, official logo files only.
   ============================================================================ */
:root {
  --pa-bg: #fbfaf7;
  --pa-card: #ffffff;
  --pa-ink: #0d0d0d;
  --pa-ink-2: #4a4a4a;
  --pa-ink-3: #8a8780;
  --pa-line: #e8e4da;
  --pa-line-2: #d9d4c7;
  --pa-field: #fdfcf9;
  --pa-gold: #f5c518;
  --pa-gold-ink: #7a5d00;
  --pa-gold-soft: #fdf3cc;
  --pa-focus: rgba(245, 197, 24, .35);
  --pa-red: #b42318;
  --pa-red-soft: #fef1f0;
  --pa-red-line: #f7c9c4;
  --pa-blue-soft: #f2f6fd;
  --pa-blue-line: #d6e2f7;
  --pa-blue-ink: #1f4e9c;
  --pa-dark: #0d0d0d;
  --pa-dark-2: #161616;
  --pa-dark-line: rgba(255, 255, 255, .09);
}

/* ── Inter (UI font) — variable, self-hosted, SIL Open Font License 1.1
      (see /static/fonts/Inter-OFL.txt). Latin covers the UI; the small
      latin-ext file is fetched only for characters outside it — chiefly the
      rupee sign ₹ (U+20B9) used on challans and amounts. ── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/Inter-Variable-latin.woff2') format('woff2-variations'),
       url('/static/fonts/Inter-Variable-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/Inter-Variable-latin-ext.woff2') format('woff2-variations'),
       url('/static/fonts/Inter-Variable-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.pa {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--pa-bg);
  color: var(--pa-ink);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}
a { color: inherit; }
[hidden] { display: none !important; }

.pa-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); min-height: 100vh; }

/* ── left: the form column ─────────────────────────────────────────────── */
.pa-main { display: flex; flex-direction: column; min-height: 100vh; padding: 28px 40px 22px; }
.pa-top { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.pa-logo img { height: 30px; width: auto; display: block; }
.pa-toplink {
  font-size: 13px; font-weight: 600; color: var(--pa-ink-2); text-decoration: none;
  padding: 7px 12px; border: 1px solid var(--pa-line); border-radius: 8px; background: var(--pa-card);
  transition: border-color .15s, color .15s;
}
.pa-toplink:hover { border-color: var(--pa-ink); color: var(--pa-ink); }

.pa-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 0 20px; }
.pa-card {
  width: 100%; max-width: 420px; background: var(--pa-card);
  border: 1px solid var(--pa-line); border-radius: 16px;
  padding: 34px 34px 26px;
  box-shadow: 0 1px 2px rgba(13, 13, 13, .04), 0 12px 40px -18px rgba(13, 13, 13, .18);
}
.pa-secure {
  display: flex; align-items: flex-start; gap: 7px; justify-content: center;
  margin: 18px 0 0; font-size: 12px; color: var(--pa-ink-3); text-align: left; max-width: 420px;
}
.pa-secure svg { flex: 0 0 auto; margin-top: 2px; }
.pa-foot { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; font-size: 12px; color: var(--pa-ink-3); }

/* steps */
.pa-steps { list-style: none; display: flex; gap: 8px; margin: 0 0 22px; padding: 0; }
.pa-steps li {
  display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600;
  color: var(--pa-ink-3); flex: 1; padding-bottom: 10px; border-bottom: 2px solid var(--pa-line);
}
.pa-steps li span {
  width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; border: 1.5px solid var(--pa-line-2); color: var(--pa-ink-3); background: var(--pa-card);
}
.pa-steps li.on { color: var(--pa-ink); border-bottom-color: var(--pa-ink); }
.pa-steps li.on span { background: var(--pa-ink); border-color: var(--pa-ink); color: #fff; }
.pa-steps li.done { color: var(--pa-ink-2); border-bottom-color: var(--pa-gold); }
.pa-steps li.done span { background: var(--pa-gold); border-color: var(--pa-gold); color: var(--pa-ink); }

.pa-title { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; margin: 0 0 6px; color: var(--pa-ink); }
.pa-sub { font-size: 14px; color: var(--pa-ink-2); margin: 0 0 20px; }
.pa-sub b { color: var(--pa-ink); font-weight: 600; word-break: break-all; }

.pa-shield {
  width: 48px; height: 48px; border-radius: 12px; background: var(--pa-gold-soft); color: var(--pa-gold-ink);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}

/* the company the user is signing into */
.pa-org {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 0 0 20px;
  border: 1px solid var(--pa-line); border-radius: 12px; background: var(--pa-field);
}
.pa-org-avatar {
  width: 36px; height: 36px; border-radius: 9px; background: var(--pa-gold); color: var(--pa-ink);
  font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.pa-org-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.pa-org-text small { font-size: 11px; color: var(--pa-ink-3); font-weight: 500; }
.pa-org-text b { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-org-switch { font-size: 12.5px; font-weight: 600; color: var(--pa-ink-2); text-decoration: none; padding: 5px 8px; border-radius: 6px; }
.pa-org-switch:hover { background: var(--pa-gold-soft); color: var(--pa-ink); }

/* alerts */
.pa-alerts:empty { display: none; }
.pa-alert {
  display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; line-height: 1.45;
  padding: 11px 13px; border-radius: 10px; margin: 0 0 18px; border: 1px solid;
}
.pa-alert svg { flex: 0 0 auto; margin-top: 1px; }
.pa-alert-error { background: var(--pa-red-soft); border-color: var(--pa-red-line); color: var(--pa-red); }
.pa-alert-info { background: var(--pa-blue-soft); border-color: var(--pa-blue-line); color: var(--pa-blue-ink); }

/* fields */
.pa-form { margin: 0; }
.pa-field { margin-bottom: 16px; }
.pa-field label { display: block; font-size: 13px; font-weight: 600; color: var(--pa-ink); margin-bottom: 6px; }
.pa-field input, .pa-select select {
  width: 100%; height: 46px; padding: 0 14px; font: inherit; font-size: 15px; color: var(--pa-ink);
  background: var(--pa-field); border: 1px solid var(--pa-line-2); border-radius: 10px;
  transition: border-color .15s, box-shadow .15s, background .15s; outline: none;
}
.pa-field input::placeholder { color: #b4afa3; }
.pa-field input:hover, .pa-select select:hover { border-color: #c5bfae; }
.pa-field input:focus, .pa-select select:focus {
  border-color: var(--pa-ink); background: #fff; box-shadow: 0 0 0 4px var(--pa-focus);
}
.pa-field input[aria-invalid="true"] { border-color: var(--pa-red); box-shadow: 0 0 0 4px rgba(180, 35, 24, .12); }
.pa-hint { font-size: 12px; color: var(--pa-ink-3); margin-top: 6px; }
.pa-field-inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pa-field-inline label { margin: 0; }
.pa-field-inline .pa-select { width: 170px; }
.pa-select { position: relative; }
.pa-select select { appearance: none; -webkit-appearance: none; height: 40px; font-size: 14px; padding-right: 34px; cursor: pointer; }
.pa-select::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
  border-right: 2px solid var(--pa-ink-2); border-bottom: 2px solid var(--pa-ink-2); transform: rotate(45deg); pointer-events: none;
}

.pa-pw { position: relative; }
.pa-pw input { padding-right: 48px; }
.pa-eye {
  position: absolute; right: 5px; top: 5px; width: 36px; height: 36px; border: 0; border-radius: 8px;
  background: transparent; color: var(--pa-ink-3); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.pa-eye:hover { color: var(--pa-ink); background: #f3f0e8; }
.pa-eye:focus-visible { outline: 2px solid var(--pa-ink); outline-offset: 1px; }
.pa-eye .i-hide { display: none; }
.pa-eye[aria-pressed="true"] .i-show { display: none; }
.pa-eye[aria-pressed="true"] .i-hide { display: block; }
.pa-caps {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 12px; font-weight: 600;
  color: var(--pa-gold-ink); background: var(--pa-gold-soft); padding: 3px 8px; border-radius: 6px;
}

/* checkbox */
.pa-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--pa-ink-2); margin: 4px 0 20px; cursor: pointer; user-select: none; }
.pa-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pa-box {
  width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--pa-line-2); background: #fff;
  flex: 0 0 auto; margin-top: 1px; position: relative; transition: background .12s, border-color .12s;
}
.pa-check input:checked + .pa-box { background: var(--pa-ink); border-color: var(--pa-ink); }
.pa-check input:checked + .pa-box::after {
  content: ""; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.pa-check input:focus-visible + .pa-box { box-shadow: 0 0 0 4px var(--pa-focus); }

/* primary button */
.pa-btn {
  width: 100%; height: 48px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--pa-ink); color: #fff; font: inherit; font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, transform .05s; position: relative;
}
.pa-btn:hover { background: #2a2a2a; }
.pa-btn:active { transform: translateY(1px); }
.pa-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--pa-focus); }
.pa-btn-arrow { transition: transform .15s; }
.pa-btn:hover .pa-btn-arrow { transform: translateX(2px); }
.pa-spin {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .3); border-top-color: var(--pa-gold); animation: pa-spin .7s linear infinite;
}
.pa-btn.is-loading { pointer-events: none; background: #2a2a2a; }
.pa-btn.is-loading .pa-spin { display: inline-block; }
.pa-btn.is-loading .pa-btn-arrow { display: none; }
@keyframes pa-spin { to { transform: rotate(360deg); } }

.pa-help { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--pa-line); font-size: 13px; color: var(--pa-ink-3); text-align: center; }
.pa-help-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; text-align: left; }
.pa-link, .pa-linkbtn { font: inherit; font-size: 13px; font-weight: 600; color: var(--pa-ink-2); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--pa-line-2); }
.pa-link:hover, .pa-linkbtn:hover { color: var(--pa-ink); text-decoration-color: var(--pa-ink); }

/* honeypot: present for bots, invisible and unreachable for people */
.pa-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* OTP boxes */
.pa-otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 4px 0 20px; }
.pa-otp input {
  width: 100%; height: 56px; text-align: center; font: inherit; font-size: 24px; font-weight: 700;
  color: var(--pa-ink); background: var(--pa-field); border: 1px solid var(--pa-line-2); border-radius: 10px; outline: none;
  transition: border-color .15s, box-shadow .15s; caret-color: var(--pa-gold-ink);
}
.pa-otp input:nth-child(3) { margin-right: 8px; }
.pa-otp input:focus { border-color: var(--pa-ink); background: #fff; box-shadow: 0 0 0 4px var(--pa-focus); }
.pa-otp.is-error input { border-color: var(--pa-red); animation: pa-shake .3s; }
@keyframes pa-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

.pa-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 20px; }
.pa-chipbtn {
  font: inherit; font-size: 12.5px; font-weight: 500; color: var(--pa-ink-2); background: var(--pa-field);
  border: 1px solid var(--pa-line); border-radius: 999px; padding: 5px 11px; cursor: pointer;
}
.pa-chipbtn:hover { border-color: var(--pa-ink); color: var(--pa-ink); }

/* ── right: product panel ──────────────────────────────────────────────── */
.pa-aside { background: var(--pa-dark); color: #fff; position: relative; overflow: hidden; display: flex; align-items: center; }
/* registration-mark rings — the print trade's own motif (solid lines, no gradient) */
.pa-aside::before, .pa-aside::after {
  content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(245, 197, 24, .16); pointer-events: none;
}
.pa-aside::before { width: 520px; height: 520px; right: -220px; top: -200px; }
.pa-aside::after { width: 300px; height: 300px; right: -90px; top: -80px; }
.pa-aside-inner { position: relative; z-index: 1; padding: 56px 56px; width: 100%; max-width: 620px; margin: 0 auto; }
.pa-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--pa-gold); margin-bottom: 14px; }
.pa-headline { font-size: clamp(26px, 2.5vw, 34px); line-height: 1.18; font-weight: 700; letter-spacing: -.02em; margin: 0 0 30px; max-width: 16em; text-wrap: balance; }

.pa-preview { background: var(--pa-dark-2); border: 1px solid var(--pa-dark-line); border-radius: 14px; padding: 16px 16px 14px; margin-bottom: 28px; }
.pa-preview-head { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, .7); margin-bottom: 10px; }
.pa-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--pa-gold); }
.pa-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--pa-gold); animation: pa-blink 1.6s ease-in-out infinite; }
@keyframes pa-blink { 50% { opacity: .3; } }
.pa-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--pa-dark-line); font-size: 12.5px; }
.pa-row-id { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 11px; color: rgba(255, 255, 255, .55); }
.pa-row-name { color: rgba(255, 255, 255, .88); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-chip { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pa-chip-y { background: rgba(245, 197, 24, .16); color: var(--pa-gold); }
.pa-chip-o { background: rgba(245, 124, 0, .18); color: #ffb366; }
.pa-chip-g { background: rgba(46, 160, 67, .2); color: #6fdc8c; }
.pa-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 70px; align-items: end; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--pa-dark-line); }
.pa-bars div { height: 100%; display: flex; align-items: flex-end; }
.pa-bars span { display: block; width: 100%; background: rgba(245, 197, 24, .28); border-radius: 4px 4px 1px 1px; }
.pa-bars div:last-child span { background: var(--pa-gold); }
.pa-preview-foot { font-size: 11px; color: rgba(255, 255, 255, .45); margin-top: 8px; }

.pa-mods { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.pa-mods li { display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; align-items: center; }
.pa-mods img { width: 28px; height: 28px; grid-row: span 2; opacity: .9; }
.pa-mods b { font-size: 13.5px; font-weight: 600; }
.pa-mods span { font-size: 12px; color: rgba(255, 255, 255, .5); }

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .pa-aside-inner { padding: 44px 36px; }
  .pa-mods { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .pa-shell { grid-template-columns: 1fr; }
  .pa-aside { display: none; }
  .pa-main { padding: 20px 16px 18px; }
  .pa-center { justify-content: flex-start; padding-top: 28px; }
}
@media (max-width: 480px) {
  .pa-card { padding: 26px 20px 20px; border-radius: 14px; }
  .pa-title { font-size: 23px; }
  .pa-otp { gap: 6px; }
  .pa-otp input { height: 50px; font-size: 21px; }
  .pa-otp input:nth-child(3) { margin-right: 4px; }
  .pa-field-inline { flex-direction: column; align-items: stretch; }
  .pa-field-inline .pa-select { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .pa-live i, .pa-spin, .pa-otp.is-error input { animation: none; }
}

/* Phones: 16px field text stops iOS Safari zooming into a field on focus */
@media (max-width: 700px) {
  .pa-field input, .pa-select select { font-size: 16px; }
}
