/* Single-card utility pages: auth/action, settings/payments, 404, apri, p, registrati.
   Needs tokens.css + base.css. */

.card-page {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center;
  padding: 40px var(--gutter) 24px;
  background: var(--surface);
}
.card-page__main { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; }
.card-page__brand { display: inline-flex; min-height: var(--tap); align-items: center; }
.card-page__brand img { width: 117px; height: 40px; }
.card-page__foot { padding-top: 24px; font-size: 15px; color: var(--text-secondary); text-align: center; }
.card-page__foot a { color: inherit; }

.panel {
  width: 100%; max-width: 440px;
  background: var(--white); border-radius: var(--r-card);
  padding: clamp(24px, 6vw, 36px);
  display: flex; flex-direction: column; gap: 20px;
}
.panel h1 { font-size: 28px; line-height: 1.15; letter-spacing: -0.03em; }
.panel p { color: var(--text-secondary); font-size: 16px; line-height: 1.5; }
.panel .center, .panel.center { text-align: center; align-items: center; }
.panel form { display: flex; flex-direction: column; gap: 18px; }
.panel .stack { display: flex; flex-direction: column; gap: 12px; }

.state-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 0 auto;
}
.state-icon .i { font-size: 34px; }
.state-icon--success { background: var(--success-bg); color: var(--success-text); }
.state-icon--danger { background: var(--danger-bg); color: var(--danger-text); }
.state-icon--warning { background: var(--warning-bg); color: var(--warning-text); }

.spinner {
  display: inline-block; width: 20px; height: 20px; flex: none;
  border: 3px solid rgba(255, 255, 255, .35); border-top-color: var(--white);
  border-radius: 50%; animation: spin .7s linear infinite;
}
.spinner--lg { width: 36px; height: 36px; border-width: 4px; border-color: var(--line); border-top-color: var(--ink); margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* Red variant (apri, p): same language as the app's launch screens. */
.card-page--red { background: var(--red); color: var(--white); --focus: var(--white); }
.card-page--red .card-page__brand img { width: 175px; height: 60px; }
.card-page--red .panel { color: var(--ink); --focus: var(--ink); }
.card-page--red .spinner--lg { border-color: rgba(255, 255, 255, .35); border-top-color: var(--white); }
/* 19px bold so white on red counts as large text (AA). */
.card-page--red .status { font: 700 19px/1.4 var(--font); text-align: center; }
.card-page--red .card-page__foot { color: var(--white); }

.store-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.store-badges a { display: inline-flex; border-radius: 10px; }
.store-badges img { height: 52px; width: auto; }

.pill {
  display: inline-flex; align-items: center; align-self: center; height: 34px; padding: 0 14px;
  border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: 600 15px var(--font);
}
.panel.center > .stack { width: 100%; }
