@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  color-scheme: light;
  --bg: #fbf7ef;
  --panel: #ffffff;
  --panel-alt: #fff7e8;
  --brand: #0b8f66;
  --brand-dark: #076b4d;
  --brand-soft: rgba(11,143,102,0.14);
  --accent: #b87505;
  --accent-dark: #8f5a04;
  --accent-soft: rgba(184,117,5,0.16);
  --text-main: #211821;
  --text-sec: #5f555d;
  --text-muted: #796e76;
  --surface: #fff;
  --border: rgba(34,24,33,0.12);
  --border-focus: var(--brand);
  --border-filled: rgba(11,143,102,0.22);
  --error: #f16c7c;
  --error-bg: #fde0e5;
  --success: #71d3a5;
  --success-bg: #ebf8f2;
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-serif: 'Outfit', system-ui, sans-serif;
}

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

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  background: radial-gradient(circle at top left, rgba(11,143,102,0.16), transparent 18%),
              radial-gradient(circle at bottom right, rgba(184,117,5,0.12), transparent 22%),
              linear-gradient(180deg, #fffaf1 0%, #fbf7ef 100%);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-wrapper {
  width: 100%;
  max-width: 1080px;
  background: #ffffff;
  border: 1px solid rgba(34,24,33,0.1);
  border-radius: 18px;
  box-shadow:
    0 36px 100px rgba(61,45,29,0.16),
    0 0 0 1px rgba(11,143,102,0.05);
  display: flex;
  overflow: hidden;
}

.auth-left {
  width: 42%;
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 4%, rgba(11,143,102,0.24), transparent 16rem),
    radial-gradient(circle at 8% 94%, rgba(184,117,5,0.26), transparent 15rem),
    linear-gradient(135deg, rgba(11,143,102,0.3), rgba(184,117,5,0.28)),
    #ede4d0;
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  position: relative;
}

.auth-left::before,
.auth-left::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.auth-left::before {
  width: 320px;
  height: 320px;
  top: -130px;
  right: -90px;
  background: rgba(11,143,102,0.15);
}
.auth-left::after {
  width: 260px;
  height: 260px;
  bottom: -120px;
  left: -80px;
  background: rgba(184,117,5,0.15);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  z-index: 1;
}
.brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-dark), var(--accent-dark));
  color: #fff8e8;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-main);
  font-size: 18px;
  font-weight: 700;
}

.brand-role {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(11,143,102,0.12);
  color: var(--brand-dark);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.left-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 4vw, 3.5rem);
  line-height: 1.02;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 16px;
}
.left-headline em { background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-style: normal; }

.left-subtext {
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--text-sec);
  max-width: 92%;
}

.left-bullets {
  list-style: none;
  display: grid;
  gap: 16px;
}

.bullet-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  color: var(--text-sec);
  font-size: 0.95rem;
}

.bullet-check {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(11,143,102,0.14), rgba(184,117,5,0.14));
  display: grid;
  place-items: center;
  color: var(--brand-dark);
}

.bullet-check svg { width: 14px; height: 14px; }

.auth-right {
  width: 58%;
  background:
    radial-gradient(circle at 100% 0%, rgba(11,143,102,0.12), transparent 18rem),
    radial-gradient(circle at 0% 100%, rgba(184,117,5,0.1), transparent 18rem),
    linear-gradient(180deg, #fffdf8 0%, #fffbf4 100%);
  padding: 48px 44px;
  color: #1c1321;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  position: relative;
}

.auth-right::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(11,143,102,0.28), rgba(184,117,5,0.22), transparent);
}

.auth-right > * {
  position: relative;
  z-index: 1;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.back-link {
  font-size: 0.9rem;
  color: var(--text-sec);
  text-decoration: none;
}
.back-link:hover { color: var(--brand); }

.section-tag {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--brand);
}

.form-header { margin-top: 12px; }

.form-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: #18101c;
  line-height: 1.05;
  margin-bottom: 10px;
}
.form-title em { color: var(--brand); }

.form-subtitle {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.96rem;
}

.role-tabs {
  display: flex;
  gap: 10px;
  background: linear-gradient(135deg, rgba(11,143,102,0.09), rgba(184,117,5,0.09));
  border: 1px solid rgba(11,143,102,0.22);
  border-radius: 12px;
  padding: 5px;
  max-width: 440px;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.6),
    0 12px 30px rgba(7,107,77,0.12);
}

.role-tab {
  flex: 1;
  padding: 12px 14px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4f404e;
  cursor: pointer;
  transition: all 0.2s ease;
}

.role-tab:hover { color: var(--brand); }
.role-tab.active {
  background: linear-gradient(135deg, var(--brand-dark), var(--accent-dark));
  color: #fff8e8;
  box-shadow:
    0 12px 26px rgba(7,107,77,0.24),
    0 0 0 1px rgba(255,255,255,0.2) inset;
}

.auth-form { display: flex; flex-direction: column; gap: 20px; max-width: 100%; }

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.field-group { display: flex; flex-direction: column; gap: 10px; }

.field-label-wrap { display: flex; justify-content: space-between; align-items: center; }

.field-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #3e3340;
}

.field-link {
  font-size: 0.85rem;
  color: var(--brand);
  text-decoration: none;
}
.field-link:hover { text-decoration: underline; }

.field-input-wrapper { position: relative; }

.field-input {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid rgba(11,143,102,0.16);
  padding: 0 16px;
  font-size: 0.96rem;
  color: #1b1220;
  background: rgba(255, 253, 248, 0.88);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-input:focus {
  border-color: var(--border-focus);
  outline: none;
  box-shadow:
    0 0 0 4px rgba(11,143,102,0.12),
    0 14px 28px rgba(184,117,5,0.08);
}

.field-input.has-error { border-color: var(--error); }
.field-label.has-error { color: var(--error); }

.pw-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-sec);
  font-size: 0.9rem;
}

.checkbox-input { accent-color: var(--brand); width: 16px; height:16px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0,0,0,0.06);
}

.btn-primary {
  min-height: 52px;
  border-radius: 10px;
  border: none;
  padding: 0 20px;
  font-size: 0.96rem;
  font-weight: 700;
  color: #fff8e8;
  background: linear-gradient(135deg, #087a58 0%, #256c2a 48%, #8f5a04 100%);
  cursor: pointer;
  box-shadow:
    0 16px 36px rgba(7,107,77,0.22),
    inset 0 1px 0 rgba(255,255,255,0.18);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow:
    0 20px 42px rgba(7,107,77,0.3),
    inset 0 1px 0 rgba(255,255,255,0.22);
}

.form-footer {
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.form-footer a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}
.form-footer a:hover { text-decoration: underline; }

.strength-container { margin-top: 12px; }
.strength-bars { display: flex; gap: 6px; margin-bottom: 10px; }
.strength-segment { flex: 1; height: 4px; border-radius: 999px; background: rgba(0,0,0,0.06); }
.strength-label { font-size: 0.84rem; color: var(--text-muted); }

.strength-container[data-score='1'] .segment-1,
.strength-container[data-score='2'] .segment-1,
.strength-container[data-score='3'] .segment-1,
.strength-container[data-score='4'] .segment-1 { background: #9d3d3d; }
.strength-container[data-score='2'] .segment-2,
.strength-container[data-score='3'] .segment-2,
.strength-container[data-score='4'] .segment-2 { background: var(--accent-dark); }
.strength-container[data-score='3'] .segment-3,
.strength-container[data-score='4'] .segment-3 { background: var(--accent); }
.strength-container[data-score='4'] .segment-4 { background: var(--brand); }

.strength-container[data-score='1'] .strength-label { color: #9d3d3d; }
.strength-container[data-score='2'] .strength-label { color: var(--accent-dark); }
.strength-container[data-score='3'] .strength-label { color: var(--accent); }
.strength-container[data-score='4'] .strength-label { color: var(--brand); }

.hints-list { list-style: none; display: grid; gap: 10px; margin-top: 12px; }
.hints-grid { grid-template-columns: 1fr 1fr; }
.hint-item { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.88rem; }
.hint-item.met { color: #71d3a5; }
.hint-item svg { width: 14px; height: 14px; }

.auth-flash { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 16px; font-size: 0.92rem; }
.auth-flash.error { background: var(--error-bg); color: var(--error); border: 1px solid rgba(241,108,124,0.25); }
.auth-flash.success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(113,211,165,0.26); }

@media (max-width: 900px) {
  body {
    align-items: flex-start;
  }

  .auth-wrapper {
    flex-direction: column;
    max-width: 720px;
    border-radius: 16px;
  }

  .auth-left {
    width: 100%;
    min-width: auto;
    padding: 28px 26px;
    gap: 16px;
  }

  .auth-right {
    width: 100%;
    padding: 30px 26px;
    gap: 18px;
  }

  .hints-grid {
    grid-template-columns: 1fr;
  }

  .left-headline {
    max-width: 12ch;
    margin-top: 6px;
    font-size: 2.25rem;
  }

  .left-subtext {
    max-width: 58ch;
  }

  .left-bullets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
  }

  .field-row { grid-template-columns: 1fr; }
  .role-tabs { max-width: 100%; }
}

@media (max-width: 640px) {
  body {
    display: block;
    padding: 12px;
  }

  .auth-wrapper {
    min-height: auto;
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0,0,0,0.32);
  }

  .auth-left {
    padding: 18px;
  }

  .brand-badge {
    gap: 10px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .brand-text {
    font-size: 1rem;
  }

  .left-headline {
    max-width: 100%;
    font-size: 1.82rem;
  }

  .left-subtext {
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 100%;
  }

  .left-bullets {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .bullet-item {
    gap: 10px;
    font-size: 0.86rem;
  }

  .bullet-check {
    width: 24px;
    height: 24px;
    border-radius: 8px;
  }

  .auth-right {
    padding: 22px 18px 24px;
    gap: 16px;
  }

  .top-bar {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .back-link {
    font-size: 0.82rem;
  }

  .section-tag {
    font-size: 0.68rem;
  }

  .form-header {
    margin-top: 0;
  }

  .form-title {
    font-size: 1.82rem;
  }

  .form-subtitle {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .role-tabs {
    gap: 6px;
    padding: 4px;
    border-radius: 10px;
  }

  .role-tab {
    padding: 10px 8px;
    font-size: 0.76rem;
  }

  .auth-form {
    gap: 16px;
  }

  .field-group {
    gap: 8px;
  }

  .field-label-wrap {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .field-input {
    min-height: 46px;
    padding: 0 13px;
    font-size: 0.92rem;
  }

  .field-input-wrapper:has(.pw-toggle) .field-input {
    padding-right: 78px;
  }

  .pw-toggle {
    right: 12px;
    font-size: 0.78rem;
  }

  .btn-primary {
    min-height: 48px;
  }

  .auth-flash {
    border-radius: 10px;
    padding: 12px;
    font-size: 0.86rem;
  }
}

@media (max-width: 410px) {
  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .role-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }
}
