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

:root {
  font-family: 'DM Sans', sans-serif;
  color: #172b2a;
  background: #f5f8f7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  font-weight: 400;
  --green: #087e70;
  --green-dark: #075e55;
  --ink: #172b2a;
  --muted: #657572;
  --line: #e1eae7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #8ed6ca;
  outline-offset: 2px;
}

a {
  color: inherit;
}

#root {
  min-height: 100vh;
}
.screen {
  width: min(1160px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 42px;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-family: Manrope, sans-serif;
  font-size: 21px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.8px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--green);
  color: white;
  font-family: Manrope, sans-serif;
  font-size: 20px;
  font-weight: 800;
}

.topbar-note,
.optional {
  color: var(--muted);
  font-size: 13px;
}

.auth-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 470px);
  align-items: center;
  gap: 72px;
  padding: 62px 0;
}

.intro-panel {
  max-width: 510px;
}

.eyebrow {
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.intro-panel h1,
.welcome-card h1 {
  margin: 18px 0;
  color: var(--ink);
  font-family: Manrope, sans-serif;
  font-size: clamp(36px, 4.4vw, 55px);
  font-weight: 800;
  letter-spacing: -2.2px;
  line-height: 1.12;
}

.intro-panel > p,
.welcome-card > p {
  max-width: 470px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.intro-points {
  display: grid;
  gap: 16px;
  margin-top: 32px;
  color: #354b47;
  font-size: 14px;
  font-weight: 600;
}

.point-check {
  display: inline-grid;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  place-items: center;
  border-radius: 50%;
  background: #dff3ee;
  color: var(--green-dark);
}

.auth-card,
.welcome-card,
.loading-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  box-shadow: 0 18px 55px rgba(20, 65, 56, 0.07);
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  border-radius: 12px;
  background: #f2f6f5;
}

.mode-switch button {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.mode-switch button.mode-active {
  background: white;
  color: var(--green-dark);
  box-shadow: 0 2px 8px rgba(25, 60, 53, 0.08);
}

.form-heading {
  margin: 28px 0 22px;
}

.form-heading h2 {
  margin: 8px 0 5px;
  color: var(--ink);
  font-family: Manrope, sans-serif;
  font-size: 25px;
  letter-spacing: -0.8px;
}

.form-heading p,
.security-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-card form {
  display: flex;
  flex-direction: column;
}

.auth-card label {
  margin: 13px 0 7px;
  color: #304541;
  font-size: 13px;
  font-weight: 700;
}

.auth-card input,
.auth-card select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #dce6e3;
  border-radius: 9px;
  background: white;
  color: var(--ink);
  font-size: 14px;
}

.auth-card input:focus,
.auth-card select:focus {
  border-color: var(--green);
  outline: 3px solid rgba(8, 126, 112, 0.1);
}

.button {
  min-height: 43px;
  padding: 0 17px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.button-primary {
  background: var(--green);
  color: white;
}

.button-primary:hover:not(:disabled) {
  background: var(--green-dark);
}

.submit-button {
  min-height: 49px;
  margin-top: 22px;
  font-size: 14px;
}

.button-quiet {
  background: #eaf4f1;
  color: var(--green-dark);
}

.form-error {
  margin-top: 15px;
  padding: 11px 12px;
  border: 1px solid #f0c9c5;
  border-radius: 8px;
  background: #fff5f4;
  color: #a12c25;
  font-size: 13px;
  line-height: 1.5;
}

.security-note {
  margin: 18px 0 0;
  text-align: center;
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.welcome-card {
  width: min(650px, 100%);
  margin: auto;
}

.welcome-card h1 {
  font-size: clamp(32px, 5vw, 46px);
}

.account-details {
  display: grid;
  gap: 20px;
  margin: 28px 0;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.account-details > div {
  display: grid;
  gap: 8px;
}

.detail-label {
  color: var(--muted);
  font-size: 12px;
}

.account-details strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-pill {
  padding: 5px 10px;
  border-radius: 20px;
  background: #e8f5f1;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
}

.next-step {
  padding: 13px;
  border-radius: 9px;
  background: #f3f8f6;
  font-size: 13px !important;
}

.loading-card {
  margin: auto;
  display: grid;
  justify-items: center;
  gap: 15px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .screen {
    padding: 0 20px;
  }

  .topbar {
    min-height: 70px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 38px 0;
  }

  .intro-panel {
    padding: 0 3px;
  }

  .intro-panel h1 {
    max-width: 440px;
    font-size: clamp(34px, 10vw, 45px);
  }

  .intro-panel > p {
    font-size: 14px;
  }

  .intro-points {
    gap: 11px;
    margin-top: 22px;
    font-size: 12px;
  }

  .auth-card {
    padding: 22px;
  }

  .page-footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .screen {
    padding: 0 14px;
  }

  .auth-card {
    padding: 17px;
  }

  .topbar-note {
    font-size: 11px;
  }
}
