:root {
  --bg-page: #f4f5f7;
  --bg-card: #ffffff;
  --border-subtle: #e2e4ea;
  --text-main: #111827;
  --text-muted: #6b7280;
  --primary: #2563eb;
  --primary-soft: #eef2ff;
  --radius-lg: 24px;
  --radius-md: 12px;
  --shadow-soft: 0 20px 40px rgba(15, 23, 42, 0.08);
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-main);
  color: var(--text-main);
  background: var(--bg-page);
}

.btn {
  appearance: none;
  border: none;
  outline: none;
  cursor: pointer;
  font: inherit;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.08s ease, box-shadow 0.08s ease,
    background-color 0.15s ease;
}

.btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.btn.is-loading {
  cursor: wait;
}

.btn.is-loading span:last-child::after {
  content: "…";
  margin-left: 4px;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
  padding-inline: 26px;
}

.btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn-secondary:hover {
  background: #d1d5db;
  transform: translateY(-1px);
}

.app--login .login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-image: radial-gradient(circle at 0 0, #ffffff 0, transparent 55%),
    radial-gradient(circle at 100% 100%, #ffffff 0, transparent 55%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 32px 32px 24px;
  text-align: center;
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.login-logo img {
  width: 40px;
  height: 40px;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.btn-google {
  width: 100%;
  background: #f3f4f6;
  color: var(--text-main);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
}

.btn-google:hover:not(:disabled) {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.btn-google-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-google-icon img {
  width: 14px;
  height: 14px;
  display: block;
}

.btn.is-loading span:last-child::after {
  content: "…";
}

.login-footer-links {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
}

.link {
  color: var(--text-muted);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.app--onboarding {
  background: #f4f5f7;
}

.onboarding-header {
  height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
}

.onboarding-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 18px;
}

.onboarding-brand img {
  width: 28px;
  height: 28px;
}

.onboarding-page {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  min-height: calc(100vh - 64px);
}

.onboarding-card {
  width: 100%;
  max-width: 1100px;
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 40px 80px rgba(15, 23, 42, 0.16);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  overflow: hidden;
}

.onboarding-left {
  padding: 32px 40px 32px 40px;
  background: #ffffff;
}

.onboarding-right {
  background: #eff3ff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.onboarding-step-header {
  margin-bottom: 16px;
}

.onboarding-step-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.onboarding-progress {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.onboarding-progress-bar {
  height: 100%;
  width: 33%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #4f46e5);
  transition: width 0.2s ease;
}

.onboarding-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}

.onboarding-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.onboarding-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.onboarding-step {
  display: none;
}

.onboarding-step[data-step="1"] {
  display: block;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

.field input {
  border-radius: var(--radius-md);
  border: 1px solid #d1d5db;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
  background: #f9fafb;
}

.field input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb1a;
  background: #ffffff;
}

.field-inline-group {
  display: flex;
  gap: 8px;
}

.country-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 14px;
  white-space: nowrap;
}

.country-flag {
  font-size: 16px;
}

.country-code {
  color: #111827;
  font-weight: 500;
}

.field-inline-group input {
  flex: 1;
}

.field-error {
  font-size: 12px;
  color: #dc2626;
  margin-top: 2px;
  display: none;
}

.field.has-error input,
.field.has-error select {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px #dc26261a;
  background: #fef2f2;
}

.field.has-error .field-error {
  display: block;
}

.onboarding-review-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.onboarding-review {
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  background: #f9fafb;
}

.onboarding-review div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.review-label {
  color: var(--text-muted);
}

.review-value {
  font-weight: 500;
}

.onboarding-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.onboarding-illustration {
  background: radial-gradient(circle at top left, #ffffff 0, #dde7ff 55%);
  border-radius: 24px;
  padding: 24px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 24px 45px rgba(30, 64, 175, 0.25);
}

.illustration-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-size: 12px;
  margin-bottom: 12px;
}

.illustration-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.illustration-text {
  font-size: 14px;
  color: #4b5563;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #111827;
  color: #f9fafb;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

.toast-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .onboarding-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .onboarding-right {
    display: none;
  }

  .onboarding-page {
    padding: 16px 16px 32px;
    min-height: calc(100vh - 64px);
  }
}
