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

:root {
  --bg: #f4f1ea;
  --bg-strong: #faf8f3;
  --card: rgba(255, 255, 255, 0.94);
  --card-strong: #ffffff;
  --primary: #1E7558;
  --primary-dark: #155a41;
  --primary-soft: #e8f3ee;
  --text-strong: #1a1a18;
  --text-body: #3d3d38;
  --text-muted: #7a7a72;
  --text-faint: #a8a89e;
  --border: rgba(30, 117, 88, 0.12);
  --border-soft: rgba(0, 0, 0, 0.07);
  --radius-xl: 32px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-card: 0 10px 34px rgba(16, 24, 20, 0.06), 0 2px 8px rgba(16, 24, 20, 0.04);
  --shadow-soft: 0 24px 60px rgba(17, 24, 21, 0.08);
  --shadow-btn: 0 8px 28px rgba(30, 117, 88, 0.24);
}

html,
body {
  min-height: 100%;
}

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

body,
button,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

body.auth-ready .login-page-shell {
  visibility: visible !important;
}

@supports (height: 100svh) {
  .login-page-shell,
  .login-layout {
    min-height: 100svh;
  }
}

body {
  font-family: 'DM Sans', Arial, sans-serif;
  color: var(--text-body);
  background:
    radial-gradient(circle at top left, rgba(30, 117, 88, 0.10), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-strong) 100%);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231E7558' fill-opacity='0.018'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

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

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.auth-boot-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 10% 8%, rgba(30, 117, 88, 0.16), transparent 24%),
    radial-gradient(circle at 88% 14%, rgba(30, 117, 88, 0.08), transparent 20%),
    linear-gradient(180deg, #f4f1ea 0%, #fbfaf6 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.auth-boot-box {
  min-width: 220px;
  padding: 20px 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(219, 223, 218, 0.92);
  box-shadow: var(--shadow-soft);
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.auth-boot-box p {
  color: var(--primary);
  font-size: 0.96rem;
  font-weight: 700;
}

.auth-boot-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(30, 117, 88, 0.14);
  border-top-color: var(--primary);
  animation: authBootSpin 0.85s linear infinite;
}

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

body.auth-pending .auth-boot-screen {
  opacity: 1;
  pointer-events: auto;
}

body.auth-pending .login-page-shell {
  visibility: hidden !important;
}

.login-page-shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-layout {
  width: min(1160px, 100%);
  min-height: min(760px, calc(100dvh - 48px));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 450px);
  gap: 0;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-brand-panel {
  padding: 36px 38px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06)),
    linear-gradient(135deg, rgba(30, 117, 88, 0.03), rgba(255, 255, 255, 0.08));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
}

.mobile-brand-mark {
  display: none;
}

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 16px;
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-copy small {
  color: var(--text-faint);
  font-size: 0.77rem;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.brand-copy strong {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  color: var(--text-strong);
}

.brand-hero {
  max-width: 560px;
  display: grid;
  gap: 16px;
}

.brand-pill {
  width: fit-content;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(30, 117, 88, 0.08);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-hero h1,
.mobile-hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.7rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: var(--text-strong);
}

.brand-hero em,
.mobile-hero em {
  font-style: italic;
  color: var(--primary);
}

.brand-hero p,
.mobile-hero p {
  max-width: 480px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.preview-mock {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 0.5px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}

.mock-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.86rem;
}

.mock-header strong {
  color: var(--text-body);
  font-weight: 600;
}

.mock-header span:last-child {
  margin-left: auto;
  color: var(--text-muted);
}

.mock-dots {
  display: inline-flex;
  gap: 6px;
}

.mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d9dfdb;
}

.mock-dot.active {
  background: var(--primary);
}

.mock-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.mock-task:last-of-type {
  border-bottom: 0;
}

.mock-check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #ccd4cf;
  flex-shrink: 0;
}

.mock-check.done {
  background: var(--primary);
  border-color: var(--primary);
  position: relative;
}

.mock-check.done::after {
  content: '';
  position: absolute;
  inset: 3px 4px 4px 3px;
  border-right: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(38deg);
}

.mock-task-copy {
  flex: 1;
  font-size: 0.92rem;
  color: var(--text-body);
}

.mock-task.done .mock-task-copy {
  color: var(--text-faint);
  text-decoration: line-through;
}

.mock-badge {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 700;
}

.mock-badge.neutral {
  background: #f2f3f1;
  color: var(--text-muted);
}

.mock-badge.high {
  background: #fff0ed;
  color: #c45032;
}

.mock-badge.medium {
  background: var(--primary-soft);
  color: var(--primary);
}

.mock-ai-bar {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}

.mock-ai-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  flex-shrink: 0;
  font-size: 0.8rem;
}

.mock-ai-bar p {
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--primary-dark);
}

.brand-benefits {
  display: grid;
  gap: 12px;
}

.benefit-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(30, 117, 88, 0.08);
  box-shadow: 0 12px 24px rgba(15, 22, 19, 0.04);
}

.benefit-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.benefit-card strong,
.mini-benefit strong {
  color: var(--text-strong);
  font-size: 0.96rem;
  font-weight: 600;
}

.benefit-card p,
.mini-benefit p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.87rem;
  line-height: 1.55;
}

.login-side {
  padding: 18px;
  display: flex;
  flex-direction: column;
  /* justify-content: center; */
  gap: 18px;
}

.mobile-hero {
  display: none;
}

.login-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, #ffffff 100%);
  border-radius: 28px;
  padding: 34px 32px 30px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 64px rgba(15, 22, 19, 0.08), 0 10px 24px rgba(15, 22, 19, 0.05);
  display: grid;
  gap: 18px;
  position: relative;
  isolation: isolate;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.88), rgba(30,117,88,0.10), rgba(255,255,255,0.88));
  pointer-events: none;
}

.login-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 27px;
  background: linear-gradient(180deg, rgba(255,255,255,0.34), rgba(255,255,255,0));
  pointer-events: none;
  z-index: -1;
}

.login-card-head {
  display: grid;
  gap: 8px;
}

.card-kicker {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-card-head h2 {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-strong);
}

.card-subtitle {
  color: var(--text-muted);
  font-size: 0.97rem;
  line-height: 1.65;
  max-width: 34ch;
}

.google-hint {
  margin-top: -10px;
  font-size: 0.81rem;
  line-height: 1.55;
  color: var(--text-muted);
  font-weight: 500;
}

.card-proof {
  margin-top: -4px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-body);
}

.secure-login-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(30, 117, 88, 0.08);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(30, 117, 88, 0.10);
}

.secure-login-icon {
  font-size: 0.86rem;
  line-height: 1;
}

.btn {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
  will-change: transform;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.995);
}

.btn:focus-visible,
.link-btn:focus-visible,
.field input:focus-visible {
  outline: none;
}

.btn:disabled {
  opacity: 0.76;
  cursor: wait;
}

.btn-google {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(180deg, #218060 0%, #1E7558 100%);
  color: #fff;
  box-shadow: 0 16px 36px rgba(30, 117, 88, 0.26), inset 0 1px 0 rgba(255,255,255,0.18);
  overflow: hidden;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.btn-google::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.btn-google:hover {
  background: linear-gradient(180deg, #1d785a 0%, var(--primary-dark) 100%);
  box-shadow: 0 18px 40px rgba(30, 117, 88, 0.30), inset 0 1px 0 rgba(255,255,255,0.16);
}

.btn-google:focus-visible {
  box-shadow: 0 0 0 4px rgba(30, 117, 88, 0.10), 0 18px 40px rgba(30, 117, 88, 0.22);
}

.btn-google img {
  width: 18px;
  height: 18px;
  position: relative;
  z-index: 1;
}

.btn-google .btn-label,
.btn-primary .btn-label {
  position: relative;
  z-index: 1;
}

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  animation: btnSpin 0.7s linear infinite;
  position: relative;
  z-index: 1;
}

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

.btn-google[aria-busy="true"] img {
  display: none;
}

.btn-google[aria-busy="true"] .btn-spinner {
  display: inline-block;
}

.btn-primary {
  background: #f3f6f4;
  color: var(--text-strong);
  border: 1px solid rgba(30, 117, 88, 0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.email-section-intro {
  margin-top: -2px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.email-section {
  opacity: 0.88;
}

.btn-primary:hover {
  background: #eef3f0;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.divider span {
  font-size: 0.74rem;
  color: var(--text-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.form {
  display: grid;
  gap: 14px;
}

.hidden {
  display: none !important;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-body);
}

.field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fafaf8;
  color: var(--text-strong);
  outline: none;
  font-size: 16px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field input::placeholder {
  color: var(--text-faint);
}

.field input:focus {
  border-color: rgba(30, 117, 88, 0.36);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30, 117, 88, 0.08);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.actions-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}

.link-btn:hover {
  color: var(--primary-dark);
}

.safe-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.terms-copy {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-faint);
}

.auth-message {
  min-height: 22px;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-top: 2px;
}

.auth-message.error {
  color: #b14242;
}

.auth-message.success {
  color: #1f7a4f;
}

.mobile-benefits {
  display: none;
}

.mini-benefit {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.login-footer-rdk {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 2px;
}

@media (max-width: 980px) {
  .login-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-brand-panel {
    display: none;
  }

  .login-side {
    padding: 28px 22px;
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
  }

  .mobile-brand-mark {
    display: inline-flex;
    margin-bottom: 8px;
  }

  .mobile-hero {
    display: grid;
    gap: 12px;
    margin-bottom: 6px;
  }

  .mobile-hero h1 {
    font-size: clamp(2.2rem, 9vw, 3.2rem);
  }

  .mobile-hero p {
    max-width: 34ch;
    font-size: 0.98rem;
  }

  .login-card {
    padding: 28px 22px 24px;
  }

  .mobile-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .mini-benefit {
    padding: 14px;
  }
}

@media (max-width: 640px) {
  .login-page-shell {
    padding: 0;
    align-items: stretch;
  }

  .login-layout {
    min-height: 100dvh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    background: transparent;
  }

  .login-side {
    padding: max(16px, calc(14px + env(safe-area-inset-top))) 16px max(18px, calc(18px + env(safe-area-inset-bottom)));
    gap: 14px;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .brand-copy strong {
    font-size: 1.8rem;
  }

  .mobile-hero {
    gap: 10px;
    margin-bottom: 2px;
  }

  .mobile-hero h1 {
    font-size: clamp(2.18rem, 8.8vw, 2.58rem);
    line-height: 1.02;
  }

  .login-card {
    border-radius: 24px;
    padding: 22px 18px max(18px, calc(16px + env(safe-area-inset-bottom)));
    gap: 15px;
  }

  .card-proof {
    font-size: 0.84rem;
  }

  .secure-login-note {
    font-size: 0.74rem;
  }

  .login-card-head h2 {
    font-size: 1.8rem;
  }

  .card-subtitle {
    font-size: 0.93rem;
  }

  .actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions-copy {
    flex-wrap: wrap;
  }

  .google-hint {
    margin-top: -6px;
  }

  .mobile-benefits {
    grid-template-columns: 1fr;
  }
}


@media (hover: none) {
  .btn:hover {
    transform: none;
  }

  .btn-google:hover {
    background: linear-gradient(180deg, #218060 0%, #1E7558 100%);
    box-shadow: 0 16px 36px rgba(30, 117, 88, 0.26), inset 0 1px 0 rgba(255,255,255,0.18);
  }

  .btn-primary:hover {
    background: #f3f6f4;
  }

  .link-btn:hover {
    color: var(--primary);
  }
}
