:root {
  --ink: #101722;
  --muted: #687384;
  --line: #e1e6ea;
  --soft: #f6f8fa;
  --green: #08a77c;
  --green-dark: #087e62;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--soft); color: var(--ink); font-family: Inter, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
.auth-header {
  height: 72px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; background: #fff; border-bottom: 1px solid #e5e9ed;
}
.auth-brand { display: flex; align-items: center; }
.auth-logo { display: block; width: 169px; height: auto; }
.auth-header-link { color: #334155; font-size: 14px; }
.auth-main { max-width: 1080px; margin: 38px auto 60px; padding: 0 24px; }
.auth-intro { text-align: center; margin-bottom: 30px; }
.auth-intro h1 { margin: 0; font-size: 34px; }
.auth-intro p { margin: 10px 0 0; color: var(--muted); }
.auth-stepper { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 740px; margin: 0 auto 28px; }
.auth-step { display: flex; align-items: center; color: #7a8492; font-size: 13px; }
.auth-step:not(:last-child)::after { content: ""; height: 1px; flex: 1; margin: 0 14px; background: #dce2e7; }
.auth-step-number { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; border: 1px solid #ccd4da; margin-right: 8px; background: #fff; }
.auth-step.active, .auth-step.done { color: var(--green-dark); font-weight: 700; }
.auth-step.active .auth-step-number, .auth-step.done .auth-step-number { color: #fff; border-color: var(--green); background: var(--green); }
.auth-panel { max-width: 760px; margin: 0 auto; padding: 30px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 28px rgba(20,35,50,.05); }
.auth-panel h2 { margin: 0 0 6px; font-size: 21px; }
.auth-sub { margin: 0 0 24px; color: #707b89; font-size: 14px; line-height: 1.5; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.auth-field { display: block; color: #374151; font-size: 13px; font-weight: 650; }
.auth-field.wide { grid-column: 1 / -1; }
.auth-field input {
  width: 100%; height: 44px; margin-top: 8px; padding: 0 13px;
  border: 1px solid #ccd4da; border-radius: 6px; font: inherit; outline: none;
}
.auth-field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(8,167,124,.1); }
.auth-field input:disabled { color: #8b95a1; background: #f1f4f6; cursor: not-allowed; }
.auth-hint { margin: 7px 0 0; color: #7b8490; font-size: 11px; line-height: 1.4; }
.auth-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; color: #5e6875; font-size: 12px; font-weight: 500; line-height: 1.45; }
.auth-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.auth-notice { display: flex; gap: 12px; margin-top: 18px; padding: 14px; border: 1px solid #b9e6da; background: #f0fbf8; border-radius: 6px; color: #35574f; font-size: 13px; line-height: 1.5; }
.auth-notice strong { color: var(--green-dark); }
.auth-icon { width: 27px; height: 27px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: var(--green-dark); background: #d9f4ed; font-weight: 800; }
.auth-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; }
.auth-button { min-height: 44px; padding: 0 22px; border: 0; border-radius: 6px; background: var(--green); color: #fff; font-weight: 750; cursor: pointer; }
.auth-button:hover { background: #07956f; }
.auth-button:disabled { background: #9db8b0; cursor: wait; }
.auth-back { border: 0; background: none; color: #4f5b68; cursor: pointer; }
.auth-error { display: none; margin-top: 16px; padding: 12px; border: 1px solid #f0b8b8; background: #fff5f5; color: #9a3030; border-radius: 6px; font-size: 13px; }
.auth-error.visible { display: block; }
.auth-stage[hidden] { display: none; }
.signature-box { height: 205px; position: relative; overflow: hidden; border: 1.5px dashed #aeb8c1; border-radius: 7px; background: #fbfcfd; touch-action: none; }
.signature-box canvas { width: 100%; height: 100%; display: block; }
.signature-clear { position: absolute; top: 10px; right: 10px; border: 0; background: #fff; color: #66717f; cursor: pointer; }
.otp { display: flex; justify-content: center; gap: 10px; margin: 26px 0 14px; }
.otp input { width: 52px; height: 58px; padding: 0; text-align: center; border: 1px solid #cbd3da; border-radius: 6px; font-size: 24px; font-weight: 750; outline: none; }
.otp input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(8,167,124,.1); }
.auth-center { text-align: center; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 20px; padding: 3px; background: #f0f3f5; border-radius: 6px; }
.auth-tab { padding: 9px; border: 0; background: transparent; color: #65707d; font-size: 12px; font-weight: 700; cursor: pointer; }
.auth-tab.active { color: var(--ink); background: #fff; border: 1px solid #dfe4e8; border-radius: 5px; }
.login-panel { max-width: 500px; }
@media (max-width: 700px) {
  .auth-header { padding: 0 20px; }
  .auth-main { padding: 0 14px; }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-field.wide { grid-column: auto; }
  .auth-panel { padding: 22px; }
  .auth-step { font-size: 0; }
  .auth-step-number { font-size: 13px; }
  .otp { gap: 5px; }
  .otp input { width: 42px; height: 52px; }
}
