/* Pointcoin auth pages (/signin, /verify-otp): one shared shell so the two
   screens line up exactly — same card, same logo size and position, same
   heading rhythm — on desktop and on phones. Reuses the product tokens
   (Instrument Sans, brand #314a6b, 16px cards) from /ai and /dashboard. */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&display=swap');

:root {
  --pca-brand: #314a6b;
  --pca-brand-dark: #253a52;
  --pca-accent: #28A2C8;
  --pca-bg: #f5f5f5;
  --pca-card: #ffffff;
  --pca-border: #e0e0e0;
  --pca-text: #1f2733;
  --pca-muted: #5f6368;
  --pca-logo-h: 40px; /* wordmark height: identical on every auth screen */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.pca-body {
  font-family: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--pca-bg);
  color: var(--pca-text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

/* The card: fixed width, fixed inner padding, centered content. */
.pca-card {
  width: 100%;
  max-width: 400px;
  margin: auto;
  background: var(--pca-card);
  border: 1px solid var(--pca-border);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  padding: 32px 28px 28px;
  text-align: center;
}

/* Logo: a fixed-height box so the wordmark sits in the same spot on both
   screens (width is derived from the SVG's aspect ratio, never set directly). */
.pca-logo {
  height: var(--pca-logo-h);
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pca-logo img { height: var(--pca-logo-h); width: auto; display: block; }

.pca-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--pca-text);
  margin-bottom: 6px;
}
.pca-sub {
  font-size: 15px;
  line-height: 1.5;
  color: var(--pca-muted);
  margin-bottom: 22px;
}
.pca-sub strong { color: var(--pca-text); font-weight: 600; overflow-wrap: anywhere; }

.pca-error {
  background: #fdecec;
  color: #b3261e;
  border: 1px solid #f5c2c0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 18px;
  text-align: left;
}

.pca-notice {
  background: #e9f6ec;
  color: #1e6b36;
  border: 1px solid #bfe3c8;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 18px;
  text-align: left;
}

.pca-field { margin-bottom: 18px; text-align: left; }
.pca-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pca-text);
}
.pca-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--pca-border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px; /* >=16px keeps iOS from zooming the field on focus */
  color: var(--pca-text);
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pca-input:focus {
  border-color: var(--pca-brand);
  box-shadow: 0 0 0 3px rgba(49, 74, 107, 0.12);
}
.pca-input::placeholder { color: #6b7280; }

/* One-time code: big, centered digits. text-indent cancels the trailing
   letter-spacing so the digits are truly centered, not nudged right. */
.pca-field-code { text-align: center; }
.pca-field-code .pca-label { text-align: center; }
.pca-input-code {
  font-size: 26px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.45em;
  text-indent: 0.45em;
  padding: 12px 14px;
}

.pca-btn {
  width: 100%;
  padding: 14px 20px;
  background: var(--pca-brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.pca-btn:hover { background: var(--pca-brand-dark); }

.pca-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  font-size: 13px;
  line-height: 1.45;
  color: var(--pca-muted);
  margin-bottom: 18px;
}
.pca-terms input { margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; }
.pca-terms label { font-size: 13px; line-height: 1.45; color: var(--pca-muted); }
.pca-terms a { color: var(--pca-brand); text-decoration: none; font-weight: 500; }
.pca-terms a:hover { text-decoration: underline; }

/* Footer row: helper text + secondary link, same slot on both screens. */
.pca-foot {
  margin-top: 18px;
  font-size: 13px;
  color: var(--pca-muted);
  line-height: 1.5;
}
.pca-foot a { color: var(--pca-brand); text-decoration: none; font-weight: 500; }
.pca-foot a:hover { text-decoration: underline; }
.pca-foot-link { display: inline-block; margin-top: 8px; font-size: 14px; }
.pca-resend { margin: 8px 0 2px; }
.pca-link-btn {
  background: none;
  border: none;
  padding: 6px 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--pca-brand);
  cursor: pointer;
  min-height: 32px;
}
.pca-link-btn:hover:not(:disabled) { text-decoration: underline; }
.pca-link-btn:disabled { color: var(--pca-muted); cursor: default; }

@media (max-width: 480px) {
  :root { --pca-logo-h: 36px; }
  .pca-card { padding: 28px 20px 24px; border-radius: 14px; }
  .pca-logo { margin-bottom: 18px; }
  .pca-title { font-size: 20px; }
  .pca-sub { margin-bottom: 18px; }
  .pca-field { margin-bottom: 16px; }
}
