/* 1.7.5 — company registration page. Standalone: does not depend on the main app stylesheet. */
:root {
  --navy: #082b60;
  --navy-2: #0d3f80;
  --navy-dark: #061f47;
  --gold: #c9973a;
  --teal: #087ec1;
  --bg: #eef2f6;
  --card: #ffffff;
  --text: #17223a;
  --muted: #5d6b80;
  --line: #d7dee8;
  --line-strong: #b8c4d4;
  --danger: #b3261e;
  --danger-bg: #fdeceb;
  --ok: #1d7a4b;
  --ok-bg: #e8f5ee;
  --info-bg: #eaf3fb;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.reg-page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--teal); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.reg-shell {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 0;
  min-height: 100vh;
}

/* ---------- brand panel ---------- */
.reg-brand {
  color: #fff;
  background: linear-gradient(160deg, var(--navy-2) 0%, var(--navy) 55%, var(--navy-dark) 100%);
}
.reg-brand-inner {
  position: sticky; top: 0;
  min-height: 100vh;
  padding: 44px 36px;
  display: flex; flex-direction: column;
}
.reg-brand-logo { background: #fff; border-radius: 14px; padding: 12px; width: 132px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.reg-brand-logo img { display: block; width: 100%; height: auto; }
.reg-brand h1 { margin: 26px 0 4px; font-size: 26px; line-height: 1.3; }
.reg-tagline { margin: 0 0 30px; color: #f0d9a8; font-weight: 600; }
.reg-steps { list-style: none; margin: 0 0 30px; padding: 0; counter-reset: step; }
.reg-steps li { position: relative; padding: 0 44px 20px 0; counter-increment: step; }
.reg-steps li::before {
  content: counter(step); position: absolute; right: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: var(--navy-dark); font-weight: 700; font-size: 14px;
}
.reg-steps li:not(:last-child)::after { content: ''; position: absolute; right: 14px; top: 34px; bottom: 4px; width: 2px; background: rgba(255,255,255,.22); }
.reg-steps b { display: block; font-size: 15.5px; }
.reg-steps span { display: block; color: #c9d6ea; font-size: 13.5px; }
.reg-modules { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.reg-modules li { border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 3px 12px; font-size: 12.5px; color: #e3ebf6; }
.reg-brand-foot { margin-top: auto; padding-top: 30px; color: #c9d6ea; }
.reg-brand-foot a { color: #fff; font-weight: 600; }

/* ---------- form card ---------- */
.reg-card { padding: 44px clamp(20px, 4vw, 56px) 56px; background: var(--card); min-height: 100vh; }
.reg-card-inner { max-width: 720px; margin: 0 auto; }
.reg-card-head h2 { margin: 0 0 4px; font-size: 24px; color: var(--navy); }
.reg-card-head p { margin: 0 0 22px; color: var(--muted); }
.req { color: var(--danger); font-weight: 700; }
.opt { color: var(--muted); font-weight: 400; font-size: 13px; }

.reg-section { border-top: 1px solid var(--line); padding: 22px 0 6px; }
.reg-section h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 17px; color: var(--navy); }
.reg-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 13px; flex: none; }

.reg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.span-2 { grid-column: 1 / -1; }
.field { margin: 0; min-width: 0; }
.field > label, fieldset.field > legend { display: block; margin: 0 0 6px; font-weight: 600; font-size: 14px; color: var(--text); padding: 0; }
.field input {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fff; color: var(--text); font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder { color: #9aa6b6; }
.field input:hover { border-color: #8fa0b6; }
.field input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,126,193,.18); }
.field input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(179,38,30,.12); }
.field input[dir="ltr"] { text-align: left; }
.field-hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

/* choice cards (radio) */
fieldset.choice-group { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
fieldset.choice-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
fieldset.choice-group > legend, fieldset.choice-group > .field-hint { grid-column: 1 / -1; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-body {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 48px; height: 100%; padding: 10px 40px 10px 12px;
  border: 1.5px solid var(--line-strong); border-radius: 10px; background: #fff;
  transition: border-color .15s ease, background .15s ease;
  position: relative;
}
.choice-body::before {
  content: ''; position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); background: #fff;
}
.choice-body b { font-size: 14.5px; }
.choice-body small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.choice:hover .choice-body { border-color: #8fa0b6; }
.choice input:checked + .choice-body { border-color: var(--navy); background: #f2f6fc; }
.choice input:checked + .choice-body::before { border-color: var(--navy); background: radial-gradient(circle, var(--navy) 0 4px, #fff 5px); }
.choice input:focus-visible + .choice-body { box-shadow: 0 0 0 3px rgba(8,126,193,.25); }

/* password */
.pw-wrap { position: relative; }
.pw-wrap input { padding-left: 74px; }
.pw-toggle {
  position: absolute; left: 6px; top: 6px; height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 6px; background: #f5f7fa; color: var(--navy);
  font: inherit; font-size: 13px; cursor: pointer;
}
.pw-toggle:hover { background: #e9eef5; }
.pw-toggle:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.pw-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.pw-rules li { display: flex; align-items: center; gap: 6px; }
.pw-rules li::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.ok::before { border-color: var(--ok); background: var(--ok); box-shadow: inset 0 0 0 2px #fff; }

/* consent, alerts, submit */
.reg-consent { display: flex; gap: 10px; align-items: flex-start; margin: 22px 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; cursor: pointer; font-size: 14px; }
.reg-consent input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--navy); cursor: pointer; }
.reg-alert { margin: 0 0 14px; padding: 11px 14px; border-radius: 8px; font-size: 14px; border: 1px solid transparent; }
.reg-alert.error { background: var(--danger-bg); color: var(--danger); border-color: #f3c2bf; }
.reg-alert-info { margin-top: 12px; background: var(--info-bg); color: #0c4a7a; border-color: #c4dcf0; }
.reg-submit {
  display: block; width: 100%; height: 50px; border: 0; border-radius: 10px;
  background: var(--navy); color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
  transition: background .15s ease;
}
.reg-submit:hover { background: var(--navy-dark); }
.reg-submit:focus-visible { outline: 3px solid rgba(8,126,193,.45); outline-offset: 2px; }
.reg-submit:disabled { background: #8a9ab0; cursor: not-allowed; }
.reg-login-link { text-align: center; margin: 16px 0 0; color: var(--muted); font-size: 14px; }

/* success */
.reg-success { text-align: center; padding: 30px 0 10px; outline: none; }
.reg-success-icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); font-size: 32px; font-weight: 700; }
.reg-success h2 { margin: 0 0 6px; color: var(--navy); }
.reg-summary { margin: 18px auto; max-width: 420px; border: 1px solid var(--line); border-radius: 10px; text-align: right; }
.reg-summary div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; }
.reg-summary div + div { border-top: 1px solid var(--line); }
.reg-summary dt { color: var(--muted); }
.reg-summary dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.reg-success-note { max-width: 460px; margin: 0 auto 20px; color: var(--muted); }
.reg-link-btn { display: grid; place-items: center; max-width: 420px; margin: 0 auto; text-decoration: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .reg-shell { grid-template-columns: 1fr; }
  .reg-brand-inner { position: static; min-height: 0; padding: 22px 16px 20px; }
  .reg-brand-logo { width: 84px; padding: 8px; border-radius: 10px; }
  .reg-brand h1 { margin-top: 14px; font-size: 21px; }
  .reg-tagline { margin-bottom: 14px; }
  .reg-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 0; }
  .reg-steps li { padding: 38px 0 0; text-align: center; }
  .reg-steps li::before { right: 50%; transform: translateX(50%); }
  .reg-steps li::after { display: none; }
  .reg-steps b { font-size: 13px; }
  .reg-steps span, .reg-modules, .reg-brand-foot { display: none; }
  .reg-card { min-height: 0; padding: 24px 16px 40px; }
}
@media (max-width: 560px) {
  .reg-grid, fieldset.choice-group { grid-template-columns: 1fr; }
  fieldset.choice-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  fieldset.choice-row .choice-body { padding: 10px 34px 10px 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
