.account-page {
  --account-ink: #18233a;
  --account-muted: #4c5b73;
  --account-blue: #2049dc;
  --account-line: #dce4f1;
  --account-wash: #f3f6fd;
  --error-color: #a4212e;
  margin: 0;
  background: var(--account-wash);
  color: var(--account-ink);
  font: 1rem/1.55 Roboto, system-ui, sans-serif;
}

.account-page *, .account-page *::before, .account-page *::after { box-sizing: border-box; }
.account-page :focus-visible { outline: 2px solid var(--account-blue); outline-offset: 3px; }
.account-page [hidden] { display: none !important; }

.account-header {
  border-bottom: 1px solid var(--account-line);
  background: #fff;
}

.account-header-inner {
  width: min(1200px, calc(100% - 40px));
  min-height: 68px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}

.account-brand, .account-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
}

.account-brand {
  color: #1b5cff;
  font-size: clamp(1.05rem, 2.5vw, 1.42rem);
  letter-spacing: -.035em;
}

.account-brand img { display: block; border-radius: 8px; }
.account-back { color: var(--account-muted); font-size: .88rem; white-space: nowrap; }
.account-back:hover, .account-forgot:hover, .account-alternative a:hover { text-decoration: underline; }

.account-main {
  display: grid;
  place-items: center;
  flex: 1;
  padding: clamp(1.2rem, 5vw, 4rem) 20px;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  width: min(880px, 100%);
  border: 1px solid var(--account-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 48px rgb(22 44 98 / 8%);
}

.account-layout--register { width: min(1060px, 100%); grid-template-columns: minmax(0, .76fr) minmax(0, 1.24fr); }

.account-art {
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 21px 0 0 21px;
  background: radial-gradient(circle at 54% 43%, #315bfc, #1c35b4);
}

.account-art img { display: block; width: 100%; height: auto; }

.account-card { min-width: 0; padding: clamp(1.45rem, 4vw, 3.25rem); }

.account-card h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.043em;
}

.account-intro { margin: .5rem 0 1.35rem; color: var(--account-muted); }
.account-form, .account-field { display: grid; gap: 1rem; }
.account-field { min-width: 0; gap: .35rem; }

.account-register-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem .8rem;
}

.account-field label, .account-role legend {
  color: var(--account-ink);
  font-size: .92rem;
  font-weight: 700;
}

.account-field input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: .62rem .72rem;
  border: 1px solid #b9c7e1;
  border-radius: 9px;
  background: #fff;
  color: var(--account-ink);
  font: inherit;
}

.account-field input:focus { border-color: var(--account-blue); }
.account-field input[aria-invalid="true"] { border-color: var(--error-color); }
.account-field input::placeholder { color: #64748b; }
.account-password { position: relative; }
.account-password input { padding-right: 5.2rem; }

.account-reveal {
  position: absolute;
  top: 2px;
  right: 2px;
  bottom: 2px;
  min-width: 74px;
  border: 0;
  border-radius: 7px;
  background: #fff;
  color: var(--account-blue);
  font: inherit;
  font-size: .83rem;
  font-weight: 700;
  cursor: pointer;
}

.account-reveal:hover { background: var(--account-wash); }
.account-reveal:focus-visible { outline-offset: -3px; }
.account-forgot, .account-alternative a { color: var(--account-blue); font-weight: 700; text-decoration: none; }
.account-forgot { justify-self: end; margin-top: -.35rem; font-size: .89rem; }

.account-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .65rem 1rem;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--account-blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.account-button:hover { background: #1536b4; }
.account-button:disabled { opacity: .64; cursor: wait; }
.account-retry { width: 100%; margin-top: .15rem; }

.account-alternative {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--account-line);
  color: var(--account-muted);
  font-size: .91rem;
  text-align: center;
}

.account-role { min-width: 0; margin: 0; padding: 0; border: 0; }
.account-role legend { margin-bottom: .38rem; padding: 0; }

.account-role-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.account-role-options label {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 48px;
  padding: .5rem .68rem;
  border: 1px solid var(--account-line);
  border-radius: 9px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}

.account-role-options label:has(:checked) {
  border-color: var(--account-blue);
  background: #edf2ff;
  color: var(--account-blue);
}

.account-role-options input, .account-terms input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--account-blue);
}

.account-hint, .account-field-error { margin: -.58rem 0 0; font-size: .83rem; }
.account-hint { color: var(--account-muted); }
.account-field-error { color: var(--error-color); font-weight: 600; }
.account-field-error:empty { display: none; }

.account-strength {
  display: grid;
  gap: .3rem;
  margin-top: -.5rem;
  color: var(--account-muted);
  font-size: .8rem;
}

.account-strength-bar { height: 5px; overflow: hidden; border-radius: 999px; background: var(--account-line); }
.account-strength-bar span { display: block; width: 0; height: 100%; }

.account-terms {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  color: var(--account-muted);
  font-size: .88rem;
}

.account-terms input { margin-top: .18rem; }
.account-terms label { cursor: pointer; }
.account-terms a { color: var(--account-blue); }

.account-notice {
  margin: 0 0 1rem;
  padding: .75rem .85rem;
  border: 1px solid #efc9ce;
  border-radius: 9px;
  background: #fff4f5;
  color: #89212b;
  font-size: .92rem;
  overflow-wrap: anywhere;
}

.account-notice[data-tone="success"] {
  border-color: #b8dfcd;
  background: #effaf4;
  color: #17613e;
}

@media (max-width: 760px) {
  .account-layout, .account-layout--register { grid-template-columns: 1fr; width: min(520px, 100%); }
  .account-art { display: none; }
}

@media (max-width: 480px) {
  .account-header-inner { width: calc(100% - 24px); min-height: 62px; }
  .account-brand img { width: 26px; height: 26px; }
  .account-back { font-size: .79rem; }
  .account-main { padding-inline: 12px; }
  .account-register-fields { grid-template-columns: 1fr; }
}
