@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --lilly-red: #E4002B;
  --lilly-red-hover: #C70024;
  --lilly-red-light: #FEF1F3;
  --lilly-white: #FFFFFF;
  --lilly-off-white: #FAFAFA;
  --lilly-gray-50: #F9FAFB;
  --lilly-gray-100: #F3F4F6;
  --lilly-gray-200: #E5E7EB;
  --lilly-gray-300: #D1D5DB;
  --lilly-gray-400: #9CA3AF;
  --lilly-gray-500: #6B7280;
  --lilly-gray-700: #374151;
  --lilly-gray-900: #111827;
  --lilly-teal: #00857C;
  --lilly-teal-dark: #006B64;
  --lilly-dark: #1A1A1A;
  --lilly-muted: #6B7280;
  --lilly-border: #E5E7EB;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 50px -12px rgba(0, 0, 0, 0.12);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--lilly-white);
  color: var(--lilly-gray-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ------------------------------------------------------------------ */
/* Header — clean Lilly-style top bar                                  */
/* ------------------------------------------------------------------ */
.header {
  background: var(--lilly-white);
  border-bottom: 1px solid var(--lilly-gray-200);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header__logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--lilly-red);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.02em;
}
.header__logo span {
  color: var(--lilly-gray-900);
  font-weight: 700;
}
.header__nav { display: flex; gap: 24px; align-items: center; }
.header__link {
  color: var(--lilly-gray-500);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}
.header__link:hover { color: var(--lilly-gray-900); }

/* ------------------------------------------------------------------ */
/* Main content area                                                   */
/* ------------------------------------------------------------------ */
.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: linear-gradient(180deg, var(--lilly-white) 0%, var(--lilly-gray-50) 100%);
}

/* ------------------------------------------------------------------ */
/* Card — elevated white surface                                       */
/* ------------------------------------------------------------------ */
.card {
  background: var(--lilly-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--lilly-gray-200);
  padding: 48px 44px;
  max-width: 460px;
  width: 100%;
}
.card--wide { max-width: 720px; }
.card__title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--lilly-gray-900);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.card__subtitle {
  font-size: 15px;
  color: var(--lilly-gray-500);
  margin-bottom: 36px;
  line-height: 1.6;
}
.card__divider {
  border: none;
  border-top: 1px solid var(--lilly-gray-200);
  margin: 28px 0;
}
.card__or {
  text-align: center;
  color: var(--lilly-gray-400);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 20px 0;
  position: relative;
}
.card__or::before,
.card__or::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 24px);
  height: 1px;
  background: var(--lilly-gray-200);
}
.card__or::before { left: 0; }
.card__or::after { right: 0; }

/* ------------------------------------------------------------------ */
/* Buttons — Lilly-style bold, rounded CTAs                            */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: all var(--transition);
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(0.98); }
.btn--red {
  background: var(--lilly-red);
  color: var(--lilly-white);
  box-shadow: 0 2px 8px rgba(228, 0, 43, 0.25);
}
.btn--red:hover {
  background: var(--lilly-red-hover);
  box-shadow: 0 4px 16px rgba(228, 0, 43, 0.3);
}
.btn--teal {
  background: var(--lilly-gray-900);
  color: var(--lilly-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.btn--teal:hover {
  background: #000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.btn--outline {
  background: transparent;
  color: var(--lilly-gray-900);
  border: 2px solid var(--lilly-gray-200);
}
.btn--outline:hover {
  border-color: var(--lilly-gray-900);
  background: var(--lilly-gray-50);
}
.btn--small {
  padding: 10px 20px;
  font-size: 14px;
}
.btn--danger {
  background: var(--lilly-red-light);
  color: var(--lilly-red);
}
.btn--danger:hover { background: #FEE2E2; }

/* ------------------------------------------------------------------ */
/* Forms — clean, accessible inputs                                    */
/* ------------------------------------------------------------------ */
.form-group { margin-bottom: 24px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--lilly-gray-700);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.form-input {
  width: 100%;
  padding: 18px 20px;
  border: 1.5px solid var(--lilly-gray-300);
  border-radius: var(--radius-sm);
  font-size: 20px;
  font-family: inherit;
  color: var(--lilly-gray-900);
  background: var(--lilly-white);
  transition: all var(--transition);
}
.form-input::placeholder {
  color: var(--lilly-gray-400);
}
.form-input:hover {
  border-color: var(--lilly-gray-400);
}
.form-input:focus {
  outline: none;
  border-color: var(--lilly-red);
  box-shadow: 0 0 0 3px rgba(228, 0, 43, 0.1);
}
.form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--lilly-gray-500);
  cursor: pointer;
}
.form-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--lilly-red);
  border-radius: 4px;
}

/* ------------------------------------------------------------------ */
/* Dashboard                                                           */
/* ------------------------------------------------------------------ */
.dashboard { padding: 40px 24px; max-width: 960px; margin: 0 auto; width: 100%; }
.dashboard__welcome {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.dashboard__meta {
  font-size: 14px;
  color: var(--lilly-gray-500);
  margin-bottom: 36px;
}
.dashboard__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.dash-card {
  background: var(--lilly-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--lilly-gray-200);
  padding: 28px;
  transition: box-shadow var(--transition);
}
.dash-card:hover { box-shadow: var(--shadow-md); }
.dash-card__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lilly-gray-400);
  margin-bottom: 14px;
}
.dash-card__value {
  font-size: 22px;
  font-weight: 700;
  color: var(--lilly-gray-900);
  letter-spacing: -0.01em;
}
.dash-card__detail {
  font-size: 14px;
  color: var(--lilly-gray-500);
  margin-top: 8px;
  line-height: 1.6;
}
.dash-card--accent { border-left: 4px solid var(--lilly-red); }
.dash-card--teal { border-left: 4px solid var(--lilly-teal); }

/* ------------------------------------------------------------------ */
/* Auth method badge                                                   */
/* ------------------------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge--phone { background: #ECFDF5; color: #059669; }
.badge--email { background: #EFF6FF; color: #2563EB; }

/* ------------------------------------------------------------------ */
/* Spinner — Lilly red accent                                          */
/* ------------------------------------------------------------------ */
.spinner {
  width: 52px;
  height: 52px;
  border: 3px solid var(--lilly-gray-200);
  border-top-color: var(--lilly-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 28px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ */
/* Alert banners                                                       */
/* ------------------------------------------------------------------ */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}
.alert--success { background: #ECFDF5; color: #059669; border: 1px solid #D1FAE5; }
.alert--error { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }
.alert--info { background: #EFF6FF; color: #2563EB; border: 1px solid #DBEAFE; }

/* ------------------------------------------------------------------ */
/* Footer — minimal Lilly-style                                        */
/* ------------------------------------------------------------------ */
.footer {
  text-align: center;
  padding: 28px 24px;
  font-size: 12px;
  color: var(--lilly-gray-400);
  border-top: 1px solid var(--lilly-gray-200);
  background: var(--lilly-white);
  line-height: 1.7;
}
.footer a {
  color: var(--lilly-red);
  text-decoration: none;
  font-weight: 500;
}
.footer a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ */
/* Welcome back (returning user)                                       */
/* ------------------------------------------------------------------ */
.welcome-back {
  text-align: center;
  padding: 20px 0;
}
.welcome-back__phone {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--lilly-gray-900);
  margin: 14px 0;
  font-variant-numeric: tabular-nums;
}
.welcome-back__change {
  font-size: 13px;
  color: var(--lilly-red);
  text-decoration: none;
  display: inline-block;
  margin-top: 10px;
  font-weight: 500;
}
.welcome-back__change:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ */
/* Toggle switch                                                       */
/* ------------------------------------------------------------------ */
.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle__slider {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background: var(--lilly-gray-300);
  border-radius: 24px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle__slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle__input:checked + .toggle__slider {
  background: #4F46E5;
}
.toggle__input:checked + .toggle__slider::after {
  transform: translateX(20px);
}
.toggle__input:focus-visible + .toggle__slider {
  outline: 2px solid #4F46E5;
  outline-offset: 2px;
}
.toggle__label {
  font-size: 14px;
  color: var(--lilly-gray-700);
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 600px) {
  .header { padding: 0 16px; }
  .card { padding: 32px 24px; border-radius: 12px; }
  .card__title { font-size: 22px; }
  .main { padding: 32px 16px; }
  .dashboard__grid { grid-template-columns: 1fr; }
}
