:root {
  color-scheme: light;
  --ink: #1f2926;
  --muted: #66736e;
  --line: #d6dfdb;
  --surface: #ffffff;
  --canvas: #f3f6f4;
  --brand: #174f45;
  --brand-strong: #0f3d35;
  --accent: #b64132;
  --accent-soft: #f7e9e6;
  --success: #176b50;
  --focus: #2c7e70;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

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

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 66px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 112px;
  height: 38px;
  object-fit: contain;
}

.brand span {
  padding-left: 11px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  border-left: 1px solid var(--line);
}

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

.verified-badge,
.status-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  color: var(--success);
  background: #e6f2ed;
  border: 1px solid #bfdbd0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.text-button,
.inline-button {
  padding: 5px 0;
  color: var(--brand);
  background: transparent;
  border: 0;
  font-weight: 750;
}

.text-button:hover,
.inline-button:hover {
  color: var(--accent);
}

main {
  min-width: 0;
}

.loading-view {
  min-height: 60vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--muted);
}

.loading-mark {
  width: 36px;
  aspect-ratio: 1;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.auth-layout {
  min-height: calc(100vh - 66px);
  background: var(--surface);
}

.auth-visual {
  position: relative;
  min-height: 290px;
  overflow: hidden;
  background: var(--brand);
}

.auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 52, 45, 0.52);
}

.auth-visual img {
  width: 100%;
  height: 100%;
  min-height: 290px;
  position: absolute;
  inset: 0;
  object-fit: cover;
}

.auth-visual-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
  padding: 38px 22px 34px;
  color: #fff;
}

.auth-visual-copy h1,
.account-intro h1 {
  max-width: 14ch;
  margin: 4px 0 12px;
  font-size: clamp(32px, 8vw, 54px);
  line-height: 1.03;
}

.auth-visual-copy p:last-child {
  max-width: 42ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-visual .eyebrow {
  color: #f2b6ac;
}

.auth-workspace {
  padding: 24px 18px 34px;
  display: grid;
  align-items: center;
}

.auth-panel {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

.auth-heading h2,
.section-heading h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.15;
}

.auth-heading > p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
}

.message {
  margin-top: 18px;
  padding: 11px 12px;
  color: var(--brand-strong);
  background: #e9f1ee;
  border-left: 3px solid var(--brand);
  font-size: 14px;
}

.message.is-error {
  color: #7f2b21;
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

.form-stack {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

label {
  font-size: 13px;
  font-weight: 750;
}

label span {
  color: var(--muted);
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid #b8c5c0;
  border-radius: 6px;
  outline: none;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(44, 126, 112, 0.18);
  outline: none;
}

input:disabled {
  color: #52615c;
  background: #edf1ef;
}

.phone-input {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  border: 1px solid #b8c5c0;
  border-radius: 6px;
  overflow: hidden;
}

.phone-input:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(44, 126, 112, 0.18);
}

.phone-input span {
  padding: 0 12px;
  color: var(--muted);
  font-weight: 750;
  border-right: 1px solid var(--line);
}

.phone-input input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 800;
}

.primary-button {
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
}

.primary-button:hover {
  background: var(--brand-strong);
}

.secondary-button {
  color: var(--brand);
  background: var(--surface);
  border: 1px solid var(--brand);
}

.secondary-button:hover {
  background: #edf4f1;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.captcha-slot {
  min-height: 1px;
}

.otp-input {
  height: 58px;
  font-size: 25px;
  font-weight: 800;
  text-align: center;
}

.step-summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.step-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
}

.verified-phone-line {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--success);
  background: #e6f2ed;
  border-radius: 6px;
}

.verified-phone-line p {
  margin: 0;
}

.account-view {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.account-intro {
  padding-bottom: 25px;
}

.account-intro h1 {
  max-width: none;
  margin: 2px 0 5px;
  font-size: 35px;
}

.account-intro > p:last-child {
  margin: 0;
  color: var(--muted);
}

.account-tabs {
  position: sticky;
  z-index: 10;
  top: 66px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}

.tab-button {
  min-height: 48px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  font-weight: 750;
}

.tab-button.is-active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.account-message {
  margin: 20px 0 0;
}

.account-section {
  padding: 30px 0;
}

.section-heading {
  margin-bottom: 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading.compact {
  margin-top: 38px;
  margin-bottom: 12px;
}

.profile-form {
  display: grid;
  gap: 16px;
}

.profile-form > div {
  display: grid;
  gap: 7px;
}

.profile-submit {
  width: 100%;
}

.service-links {
  margin-top: 35px;
  padding-top: 2px;
  border-top: 1px solid var(--line);
}

.service-row {
  min-height: 66px;
  padding: 11px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.service-row div {
  min-width: 0;
  display: grid;
}

.service-row span:not(.status-label) {
  color: var(--muted);
  font-size: 13px;
}

.fit-button {
  width: fit-content;
}

.status-label.is-muted {
  color: var(--muted);
  background: #edf1ef;
  border-color: #d2dbd7;
}

.order-sources {
  border-top: 1px solid var(--line);
}

.order-source {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.order-source-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.order-source-heading h3 {
  margin: 0;
  font-size: 18px;
}

.order-source-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.order-empty {
  margin: 17px 0 0;
  padding: 17px;
  color: var(--muted);
  border: 1px dashed #aebcb7;
}

.security-list {
  margin: 17px 0 24px;
  display: grid;
  gap: 12px;
}

.security-list > div {
  padding: 14px 0;
  display: grid;
  gap: 3px;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

dd {
  margin: 0;
  font-weight: 650;
}

footer {
  padding: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 18px;
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

@media (min-width: 720px) {
  .site-header {
    padding-inline: 30px;
  }

  .auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  }

  .auth-visual {
    min-height: calc(100vh - 66px);
  }

  .auth-visual img {
    min-height: 100%;
  }

  .auth-visual-copy {
    position: absolute;
    left: clamp(24px, 5vw, 72px);
    bottom: clamp(30px, 8vh, 90px);
    padding: 0;
  }

  .auth-workspace {
    padding: 48px clamp(30px, 5vw, 74px);
  }

  .account-view {
    width: min(1100px, calc(100% - 64px));
    padding-top: 48px;
  }

  .profile-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-submit {
    width: fit-content;
    align-self: end;
  }

  .order-sources {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    display: grid;
  }
}

@media (max-width: 520px) {
  .brand img {
    width: 96px;
  }

  .brand span,
  .verified-badge {
    display: none;
  }

  .auth-visual {
    min-height: 235px;
  }

  .auth-visual img {
    min-height: 235px;
  }

  .auth-visual-copy {
    padding-top: 30px;
  }

  .auth-visual-copy h1 {
    font-size: 36px;
  }

  .account-view {
    width: min(100% - 24px, 1100px);
  }

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

  .section-heading .fit-button {
    width: 100%;
  }

  .order-source-heading {
    align-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-mark {
    animation: none;
  }
}
