/* Mirrors flutter/lib/theme: the same typeface, the same colour tokens and
   the same geometry, so this page and the app read as one product.
   AppRadius: sm 12, md 16 (buttons and inputs), lg 20 (cards), xl 26 (sheets).
   Primary buttons are 54px tall in the app; the same here. */

@font-face {
  font-family: 'PlusJakartaSans';
  src: url('/fonts/PlusJakartaSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'PlusJakartaSans';
  src: url('/fonts/PlusJakartaSans-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'PlusJakartaSans';
  src: url('/fonts/PlusJakartaSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --primary: #cf0a52;
  --primary-dark: #96003a;
  --primary-soft: #fceef2;
  --logo-field: #d40354;
  --ink: #19171a;
  --ink-secondary: #6b6669;
  --surface: #ffffff;
  --background: #faf9f9;
  --border: #ece9ea;
  --success: #1f9d63;
  --success-soft: #e7f6ee;

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 26px;

  --shadow-soft: 0 1px 2px rgba(25, 23, 26, .04), 0 10px 30px rgba(25, 23, 26, .07);
  --shadow-logo: 0 6px 20px rgba(207, 10, 82, .28);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f7f2f4;
    --ink-secondary: #b7aeb3;
    --surface: #221e20;
    --background: #171415;
    --border: #2e292c;
    --primary-soft: #2e1520;
    --success-soft: #14251c;
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 30px rgba(0, 0, 0, .5);
    --shadow-logo: 0 6px 20px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 40px;
  background: var(--background);
  color: var(--ink);
  font-family: 'PlusJakartaSans', -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* A faint crimson wash behind the card, the way the app tints brand screens. */
body::before {
  content: '';
  position: fixed;
  inset: -30% 0 auto;
  height: 60%;
  background: radial-gradient(60% 60% at 50% 50%, var(--primary-soft), transparent 70%);
  pointer-events: none;
}

.wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
}

/* The logo sits half over the card's top edge, as the app's sheets do. */
.logo {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto -38px;
  position: relative;
  z-index: 1;
  border-radius: 50%;
  box-shadow: var(--shadow-logo);
  object-fit: contain;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-soft);
  padding: 60px 26px 32px;
  text-align: center;
}

h1 {
  margin: 0 0 8px;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.22;
  color: var(--ink);
}

.lead {
  margin: 0;
  font-size: 15px;
  color: var(--ink-secondary);
}

/* Outcome row: a tinted tile with a mark, like the app's inline notices. */
.status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  font-size: 15px;
  text-align: left;
}

.status::before {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.status.ok { background: var(--success-soft); color: #14663f; }
.status.ok::before { content: '\2713'; background: var(--success); }
.status.bad { background: var(--primary-soft); color: var(--primary-dark); }
.status.bad::before { content: '\0021'; background: var(--primary); }

@media (prefers-color-scheme: dark) {
  .status.ok { color: #7fd3a6; }
  .status.bad { color: #f7a8c2; }
}

form { margin-top: 22px; text-align: left; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.1px;
  color: var(--ink);
  margin-bottom: 7px;
}

input[type="password"] {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}

input[type="password"]::placeholder { color: var(--ink-secondary); }

input[type="password"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.field + .field { margin-top: 14px; }

button {
  width: 100%;
  height: 54px;
  margin-top: 22px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: -0.1px;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .12s, transform .06s;
}

button:hover:not(:disabled) { background: var(--primary-dark); }
button:active:not(:disabled) { transform: scale(.99); }
button:disabled { opacity: .55; cursor: default; }

.hint {
  margin: 22px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.spinner {
  width: 22px;
  height: 22px;
  margin: 22px auto 0;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
  button { transition: none; }
}

[hidden] { display: none !important; }
