:root {
  --gingerr-orange: #ff8a00;
  --gingerr-blue: #2563eb;
  --gingerr-navy: #0f172a;
  --gingerr-bg: #f4f6fb;
  --gingerr-card: #ffffff;
  --gingerr-muted: #64748b;
  --gingerr-border: #e2e8f0;
  --gingerr-danger: #dc2626;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    'Segoe UI',
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: var(--gingerr-navy);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 42%),
    radial-gradient(circle at top left, rgba(255, 138, 0, 0.1), transparent 38%),
    var(--gingerr-bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--gingerr-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  width: min(520px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0 8px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.brand img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(255, 138, 0, 0.28);
}

.brand h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gingerr-navy);
}

.brand p {
  margin: 4px 0 0;
  color: var(--gingerr-muted);
  font-size: 0.95rem;
}

.page-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 40px;
}

.hero {
  background: linear-gradient(135deg, #111827 0%, #1e3a8a 55%, #2563eb 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.hero h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.2;
}

.hero p {
  margin: 0;
  max-width: 58ch;
  color: rgba(255, 255, 255, 0.88);
}

.card {
  background: var(--gingerr-card);
  border: 1px solid var(--gingerr-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.card-lead {
  margin: 0 0 18px;
  color: var(--gingerr-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.auth-panel.hidden {
  display: none;
}

.signed-in {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--gingerr-border);
  margin-bottom: 16px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #dbeafe;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--gingerr-blue);
}

.user-meta strong {
  display: block;
  font-size: 0.98rem;
}

.user-meta span {
  color: var(--gingerr-muted);
  font-size: 0.86rem;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #475569;
}

.field input {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--gingerr-border);
  padding: 0 14px;
  font-size: 1rem;
}

.field input:focus {
  outline: 2px solid #bfdbfe;
  border-color: #93c5fd;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--gingerr-blue);
  color: #fff;
}

.btn-google {
  background: #fff;
  color: #111827;
  border: 1px solid var(--gingerr-border);
}

.btn-ghost {
  background: #f1f5f9;
  color: #334155;
}

.btn-danger {
  background: var(--gingerr-danger);
  color: #fff;
}

.hint {
  margin-top: 12px;
  font-size: 0.86rem;
  color: var(--gingerr-muted);
}

.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0;
  font-size: 0.9rem;
  color: #334155;
}

.checkbox input {
  margin-top: 4px;
}

.status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  display: none;
}

.status.show {
  display: block;
}

.status.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.status.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.status.info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.site-footer {
  text-align: center;
  color: var(--gingerr-muted);
  font-size: 0.85rem;
  padding: 8px 0 32px;
}

.otp-row {
  display: none;
  gap: 10px;
}

.otp-row.show {
  display: flex;
  flex-wrap: wrap;
}
