@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/inter-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f7f9fc;
  --panel: #fbfcff;
  --line: #e7ecf3;
  --text: #020407;
  --muted: #5a6472;
  --charcoal: #20242b;
  --charcoal-hover: #151922;
  --blue: #2255c6;
  --danger: #b42318;
  --success: #067647;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr;
}

.auth-header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  padding: 0 42px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.045);
}

.auth-brand img {
  display: block;
  width: 132px;
  height: auto;
}

.auth-header-link {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.auth-main {
  display: grid;
  place-items: center;
  padding: 48px 24px;
}

.auth-card {
  width: min(100%, 420px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 32px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.06);
}

.register-card {
  width: min(100%, 940px);
  padding: 34px;
}

.register-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 24px;
}

.register-heading .auth-title {
  margin: 0;
}

.register-heading p {
  max-width: 280px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: right;
}

.auth-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
}

.auth-copy {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.auth-form,
.verify-form {
  display: grid;
  gap: 16px;
}

.register-card .auth-form {
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 28px 34px;
}

.form-section {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 0;
}

.form-section-wide {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.form-section h2 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid-use {
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.8fr);
  align-items: start;
}

.field {
  display: grid;
  align-content: start;
  gap: 7px;
}

.field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.field label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  background: #fdfdff;
  color: var(--text);
  font: inherit;
  padding: 0 13px;
  outline: none;
}

.field textarea {
  min-height: 132px;
  padding: 12px 13px;
  resize: vertical;
  line-height: 1.5;
}

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #5a6472 50%),
    linear-gradient(135deg, #5a6472 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 19px,
    calc(100% - 13px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(34, 85, 198, 0.12);
}

.code-input {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 8px;
  text-align: center;
}

.password-meter {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ecf3;
}

.password-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #b42318;
  transition: width 160ms ease, background 160ms ease;
}

.password-meter[data-strength="weak"] span {
  width: 32%;
  background: #b42318;
}

.password-meter[data-strength="medium"] span {
  width: 66%;
  background: #b7791f;
}

.password-meter[data-strength="strong"] span {
  width: 100%;
  background: #067647;
}

.password-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.policy-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.policy-check input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--charcoal);
}

.form-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.primary-btn {
  border: 1px solid var(--charcoal);
  background: var(--charcoal);
  color: #f8fafc;
}

.primary-btn:hover {
  background: var(--charcoal-hover);
}

.secondary-btn {
  border: 1px solid var(--line);
  background: #f7f9fc;
  color: var(--text);
}

.text-btn {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

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

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-switch {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.auth-switch a {
  color: var(--text);
  font-weight: 600;
}

.status {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--success);
}

.hidden {
  display: none;
}

.panel-main {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 56px 24px;
}

.panel-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 28px;
}

@media (max-width: 860px) {
  .auth-main {
    padding: 32px 18px;
  }

  .register-card {
    padding: 28px;
  }

  .register-card .auth-form {
    grid-template-columns: 1fr;
  }

  .form-grid-use {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .auth-header {
    min-height: 68px;
    padding: 0 18px;
  }

  .auth-brand img {
    width: 118px;
  }

  .auth-card {
    padding: 24px;
  }

  .register-heading {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
  }

  .register-heading p {
    max-width: none;
    text-align: left;
  }

  .form-section {
    padding: 16px;
  }

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

  .form-footer {
    grid-template-columns: 1fr;
  }

  .button-row {
    grid-template-columns: 1fr;
  }
}
