:root {
  --green: #176b55;
  --green-dark: #0b493a;
  --green-soft: #dff1e8;
  --cream: #f7f3e9;
  --ink: #12231e;
  --muted: #65746e;
  --line: #dce6e1;
  --white: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: #edf3f0; }
button, input { font: inherit; }

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
}

.welcome-panel {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(42px, 7vw, 104px);
  color: var(--white);
  background:
    radial-gradient(circle at 18% 18%, rgba(150, 225, 193, .3), transparent 30%),
    radial-gradient(circle at 82% 76%, rgba(237, 194, 125, .18), transparent 31%),
    linear-gradient(145deg, #0a4538 0%, #176b55 52%, #2f8a6d 100%);
}

.welcome-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .13;
  background-image:
    linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom right, black, transparent 76%);
}

.welcome-content { position: relative; z-index: 2; max-width: 710px; }
.login-brand { display: inline-flex; align-items: baseline; gap: 9px; margin-bottom: 72px; color: white; text-decoration: none; }
.brand-dose { font-size: 30px; font-weight: 900; letter-spacing: .12em; }
.brand-study { font-size: 18px; font-weight: 600; opacity: .8; }
.private-badge { display: table; margin-bottom: 22px; padding: 8px 13px; color: #d9f7e9; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; font-size: 13px; font-weight: 750; letter-spacing: .03em; }
.welcome-panel h1 { max-width: 760px; margin: 0; font-size: clamp(48px, 5.6vw, 86px); line-height: .99; letter-spacing: -.055em; }
.welcome-panel h1 em { color: #b9ebd4; font-family: Georgia, serif; font-weight: 400; }
.welcome-panel p { max-width: 650px; margin: 27px 0 28px; color: rgba(255,255,255,.78); font-size: clamp(17px, 1.5vw, 21px); line-height: 1.7; }
.welcome-points { display: flex; flex-wrap: wrap; gap: 10px 22px; color: #e7fff4; font-size: 14px; font-weight: 650; }
.login-illustration { position: absolute; z-index: 1; right: -4%; bottom: -5%; width: min(42%, 470px); opacity: .32; filter: saturate(.75) brightness(1.25); }
.decor { position: absolute; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.decor-one { right: 9%; top: 10%; width: 180px; height: 180px; }
.decor-two { right: 19%; top: 18%; width: 70px; height: 70px; background: rgba(255,255,255,.07); }

.login-panel { min-height: 100vh; display: grid; place-items: center; padding: 46px; background: linear-gradient(145deg, #fbfcfb, #edf3f0); }
.login-card { width: min(100%, 480px); padding: clamp(30px, 4vw, 52px); background: rgba(255,255,255,.94); border: 1px solid rgba(216,229,223,.9); border-radius: 28px; box-shadow: 0 28px 75px rgba(17,61,47,.14); }
.mobile-brand { display: none; align-items: baseline; gap: 7px; margin-bottom: 35px; color: var(--green); }
.mobile-brand strong { letter-spacing: .12em; }
.mobile-brand span { color: var(--muted); font-size: 13px; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 13px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.login-card h2, .setup-card h1 { margin: 0 0 12px; font-size: clamp(30px, 3vw, 42px); line-height: 1.08; letter-spacing: -.04em; }
.login-intro, .setup-card > p { margin: 0 0 30px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.login-message { margin: 0 0 22px; padding: 13px 15px; border-radius: 11px; font-size: 14px; line-height: 1.5; }
.login-message.error { color: #873e38; background: #fff0ee; border: 1px solid #f2cbc6; }
.login-message.success { color: #236148; background: #eaf8f0; border: 1px solid #bfe6d0; }
.login-message.warning { color: #7b5a1b; background: #fff8df; border: 1px solid #ead59b; }
.login-message ul { margin: 8px 0 0; padding-left: 20px; }
.login-form { display: grid; gap: 10px; }
.login-form label { margin-top: 7px; font-size: 14px; font-weight: 750; }
.input-wrap { display: grid; grid-template-columns: 42px 1fr; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfb; transition: border-color .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: #62a88e; box-shadow: 0 0 0 4px rgba(47,138,109,.12); }
.input-wrap span { display: grid; height: 100%; place-items: center; color: var(--green); border-right: 1px solid var(--line); font-size: 18px; }
.input-wrap input { width: 100%; padding: 14px 15px; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 16px; }
.login-form button, .setup-form button { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 16px; padding: 15px 18px; cursor: pointer; color: white; background: linear-gradient(135deg, var(--green), #318a6d); border: 0; border-radius: 12px; box-shadow: 0 12px 25px rgba(23,107,85,.22); font-weight: 800; }
.login-form button:hover, .setup-form button:hover { transform: translateY(-1px); box-shadow: 0 15px 30px rgba(23,107,85,.28); }
.login-form button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.privacy-note { margin: 24px 0 0; color: var(--muted); font-size: 12px; text-align: center; }

.setup-body { min-height: 100vh; padding: 40px 20px; background: linear-gradient(145deg, #e7f0ec, #fbfaf6); }
.setup-page { width: min(940px, 100%); margin: auto; }
.setup-card { padding: clamp(28px, 5vw, 58px); background: white; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 25px 65px rgba(17,61,47,.12); }
.setup-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.setup-form fieldset { display: grid; gap: 13px; margin: 0; padding: 22px; border: 1px solid var(--line); border-radius: 15px; }
.setup-form legend { padding: 0 8px; color: var(--green); font-weight: 850; }
.setup-form label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.setup-form input { width: 100%; padding: 12px 13px; color: var(--ink); background: #fbfcfb; border: 1px solid var(--line); border-radius: 9px; outline: 0; font-size: 15px; }
.setup-form input:focus { border-color: #62a88e; box-shadow: 0 0 0 3px rgba(47,138,109,.11); }
.setup-form button { grid-column: 1 / -1; max-width: 340px; justify-content: center; }
.setup-login-link { display: inline-flex; margin-top: 8px; color: var(--green); font-weight: 800; text-decoration: none; }

@media (max-width: 980px) {
  .login-page { grid-template-columns: 1fr; }
  .welcome-panel { display: none; }
  .login-panel { min-height: 100vh; padding: 24px; background: radial-gradient(circle at top left, #d8eee4, transparent 45%), linear-gradient(145deg, #f9fbfa, #edf3f0); }
  .mobile-brand { display: flex; }
}

@media (max-width: 680px) {
  .login-panel { padding: 15px; }
  .login-card { padding: 30px 22px; border-radius: 20px; }
  .setup-body { padding: 16px; }
  .setup-card { padding: 26px 19px; border-radius: 18px; }
  .setup-form { grid-template-columns: 1fr; }
  .setup-form button { grid-column: auto; max-width: none; }
}
