:root {
  --account-ink: #101112;
  --account-muted: #64686d;
  --account-line: #d9dcdf;
  --account-line-strong: #aeb3b8;
  --account-paper: #f5f4ef;
  --account-panel: #ffffff;
  --account-accent: #c9ff36;
  --account-danger: #b42318;
  --account-danger-bg: #fff1f0;
  --account-success: #18794e;
  --account-focus: #1976d2;
  --account-action-bg: #101112;
  --account-action-fg: #ffffff;
}

* { box-sizing: border-box; }

.account-body {
  min-height: 100vh;
  margin: 0;
  color: var(--account-ink);
  background: var(--account-paper);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.account-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .34;
  background-image: linear-gradient(rgba(16,17,18,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(16,17,18,.055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

.account-body a { color: inherit; }
.account-body a.account-button { color: var(--account-action-fg); }

.account-skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: white !important;
  background: var(--account-ink);
  transform: translateY(-150%);
  transition: transform .18s ease;
}

.account-skip-link:focus { transform: translateY(0); }

.account-nav {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid rgba(16,17,18,.12);
  background: rgba(245,244,239,.88);
  backdrop-filter: blur(18px);
}

.account-nav .nav-inner {
  width: min(1440px, calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.account-nav .nav-logo { display: inline-flex; min-height: 44px; align-items: center; }
.account-nav .nav-logo-img { width: auto; height: 34px; display: block; }
.account-nav .logo-img-dark { display: none; }
.dark .account-nav .logo-img-light { display: none; }
.dark .account-nav .logo-img-dark { display: block; }

.account-nav__actions { display: flex; align-items: center; gap: 10px; }

.account-home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font: 600 13px/1 "DM Sans", sans-serif;
  text-decoration: none;
}

.account-home-link:hover { background: rgba(16,17,18,.06); }
.account-home-link svg { width: 16px; height: 16px; }

.account-nav .theme-toggle,
.account-nav .lang-switcher summary {
  min-width: 40px;
  min-height: 40px;
  border: 1px solid rgba(16,17,18,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.65);
}

.account-nav .theme-toggle { display: grid; place-items: center; cursor: pointer; }
.account-nav .theme-toggle svg { width: 17px; height: 17px; }

.account-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: calc(100vh - 77px);
  padding: clamp(34px, 6vw, 80px) 24px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.account-shell__orb {
  position: absolute;
  width: 460px;
  height: 460px;
  border: 1px solid rgba(16,17,18,.08);
  border-radius: 50%;
  pointer-events: none;
}

.account-shell__orb::before,
.account-shell__orb::after {
  content: "";
  position: absolute;
  inset: 15%;
  border: inherit;
  border-radius: inherit;
}

.account-shell__orb::after { inset: 31%; }
.account-shell__orb--one { top: -240px; right: -90px; }
.account-shell__orb--two { bottom: -310px; left: -160px; }

.account-shell__frame {
  position: relative;
  width: min(1140px, 100%);
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(320px, .92fr) minmax(440px, 1.08fr);
  overflow: hidden;
  border: 1px solid rgba(16,17,18,.16);
  border-radius: 18px;
  background: var(--account-panel);
  box-shadow: 0 28px 80px rgba(16,17,18,.12);
}

.account-context {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 5vw, 68px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 50px;
  color: white;
  background: #101112;
}

.account-context::after {
  content: "MPL / ID";
  position: absolute;
  right: -30px;
  bottom: 72px;
  color: rgba(255,255,255,.035);
  font: 800 92px/1 "Sora", sans-serif;
  letter-spacing: -.09em;
  white-space: nowrap;
  transform: rotate(-90deg);
}

.account-context__eyebrow,
.account-card__eyebrow {
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 9px;
  font: 600 11px/1 "JetBrains Mono", monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.account-context__eyebrow { color: rgba(255,255,255,.66); }
.account-context__eyebrow span { width: 22px; height: 1px; background: var(--account-accent); }

.account-context h1 {
  max-width: 470px;
  margin: 0;
  color: #ffffff;
  font: 700 clamp(36px, 4vw, 58px)/1.02 "Sora", sans-serif;
  letter-spacing: -.055em;
}

.account-context__intro {
  max-width: 440px;
  margin: 26px 0 0;
  color: rgba(255,255,255,.62);
  font-size: 16px;
  line-height: 1.65;
}

.account-context__signals {
  position: relative;
  z-index: 1;
  margin: auto 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
  list-style: none;
}

.account-context__signals li {
  padding: 15px 0;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  border-top: 1px solid rgba(255,255,255,.11);
}

.account-context__signals li > span {
  color: var(--account-accent);
  font: 500 11px/1.5 "JetBrains Mono", monospace;
}

.account-context__signals strong,
.account-context__signals small,
.account-context__status strong,
.account-context__status small { display: block; }
.account-context__signals strong { font-size: 14px; }
.account-context__signals small { margin-top: 4px; color: rgba(255,255,255,.48); line-height: 1.45; }

.account-context__status {
  position: relative;
  z-index: 1;
  padding-top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.account-context__pulse {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--account-accent);
  box-shadow: 0 0 0 5px rgba(201,255,54,.12);
}

.account-context__status strong { font-size: 12px; }
.account-context__status small { margin-top: 3px; color: rgba(255,255,255,.46); font: 400 10px/1.4 "JetBrains Mono", monospace; }

.account-panel {
  min-width: 0;
  padding: clamp(36px, 5vw, 68px);
  display: grid;
  align-items: center;
  background: var(--account-panel);
}

.account-card { width: min(100%, 460px); margin: auto; }
.account-card__eyebrow { margin-bottom: 14px; color: var(--account-muted); }
.account-card__eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--account-ink); }

.account-card__header { margin-bottom: 30px; }
.account-card__header h2,
.account-manage__header h1,
.account-panel > h1 {
  margin: 0;
  font: 700 clamp(30px, 3.4vw, 43px)/1.08 "Sora", sans-serif;
  letter-spacing: -.045em;
}

.account-card__intro,
.account-manage__header p,
.account-panel > p {
  margin: 13px 0 0;
  color: var(--account-muted);
  font-size: 15px;
  line-height: 1.6;
}

.account-form { display: grid; gap: 20px; }
.account-field { display: grid; gap: 8px; }

.account-field__label,
.account-panel .form-label {
  color: #292c30;
  font-size: 13px;
  font-weight: 600;
}

.account-field__hint { margin: -1px 0 0; color: var(--account-muted); font-size: 12px; line-height: 1.45; }

.account-input,
.account-panel .form-control,
.account-panel select {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  color: var(--account-ink);
  border: 1px solid var(--account-line-strong);
  border-radius: 8px;
  outline: none;
  background: #fff;
  font: 500 15px/1.2 "DM Sans", sans-serif;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.account-panel textarea.form-control { min-height: 120px; padding-block: 12px; resize: vertical; }
.account-input::placeholder, .account-panel .form-control::placeholder { color: #909499; }
.account-input:hover, .account-panel .form-control:hover { border-color: #72777d; }
.account-input:focus, .account-panel .form-control:focus, .account-panel select:focus {
  border-color: var(--account-focus);
  box-shadow: 0 0 0 3px rgba(25,118,210,.16);
}

.account-input[aria-invalid="true"],
.account-panel .input-validation-error { border-color: var(--account-danger); background: #fffafa; }

.account-password { position: relative; }
.account-password .account-input { padding-right: 48px; }
.account-password__toggle {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: var(--account-muted);
  background: transparent;
  cursor: pointer;
}
.account-password__toggle:hover { color: var(--account-ink); background: #f1f1ed; }
.account-password__toggle svg { width: 18px; height: 18px; }

.account-check-row,
.account-panel .form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.account-check-row input,
.account-panel .form-check-input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--account-ink);
}
.account-check-row label, .account-panel .form-check-label {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #4c5055;
  font-size: 13px;
  line-height: 1.45;
}

.account-form__meta { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.account-link, .account-panel .btn-link {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  color: var(--account-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #a7aaad;
  text-underline-offset: 4px;
}
.account-link:hover, .account-panel .btn-link:hover { text-decoration-color: var(--account-ink); }

.account-button,
.account-panel .btn {
  min-height: 50px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--account-action-bg);
  border-radius: 8px;
  color: var(--account-action-fg);
  background: var(--account-action-bg);
  font: 600 14px/1 "DM Sans", sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.account-button:hover, .account-panel .btn:hover { color: var(--account-action-fg); background: #2b2e31; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(16,17,18,.14); }
.account-button:focus-visible, .account-panel .btn:focus-visible { outline: 3px solid rgba(25,118,210,.3); outline-offset: 2px; }
.account-button:disabled { opacity: .65; cursor: wait; transform: none; }
.account-button--block { width: 100%; }
.account-button--danger, .account-panel .btn-danger { border-color: var(--account-danger); background: var(--account-danger); }
.account-button__spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: account-spin .7s linear infinite; }
[hidden] { display: none !important; }

.account-card__switch {
  margin: 24px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--account-line);
  color: var(--account-muted);
  font-size: 13px;
  text-align: center;
}
.account-card__switch .account-link { margin-left: 4px; }

.account-alert,
.account-panel .alert {
  margin: 0 0 22px;
  padding: 12px 14px;
  border: 1px solid var(--account-line);
  border-radius: 8px;
  color: #3b3e42;
  background: #f7f7f4;
  font-size: 13px;
  line-height: 1.5;
}
.account-alert--error, .account-panel .alert-danger { color: #7a271a; border-color: #f2b8b5; background: var(--account-danger-bg); }
.account-alert--success, .account-panel .alert-success { color: #0f5132; border-color: #a7d8c0; background: #effaf4; }
.account-alert ul, .account-validation ul { margin: 0; padding-left: 18px; }
.account-validation, .account-panel .text-danger, .account-panel .field-validation-error { color: var(--account-danger); font-size: 12px; line-height: 1.4; }
.account-validation:empty, .account-panel .field-validation-valid { display: none; }

.account-card--message { text-align: center; }
.account-message__icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--account-line);
  border-radius: 50%;
  background: #f6f6f2;
}
.account-message__icon svg { width: 24px; height: 24px; }
.account-card--message .account-card__eyebrow { justify-content: center; }
.account-message__actions { margin-top: 28px; display: flex; justify-content: center; gap: 10px; }

.account-manage { width: 100%; min-width: 0; align-self: start; }
.account-manage__header { margin-bottom: 26px; }
.account-manage__header .account-card__eyebrow { margin-bottom: 12px; }
.account-manage__header h1 { font-size: clamp(27px, 3vw, 37px); }
.account-manage__nav,
.account-panel .nav-pills {
  margin: 0 0 28px;
  padding: 5px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border: 1px solid var(--account-line);
  border-radius: 10px;
  background: #f5f5f1;
  list-style: none;
  scrollbar-width: thin;
}
.account-manage__nav .nav-item { flex: none; }
.account-manage__nav .nav-link,
.account-panel .nav-pills .nav-link {
  min-height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  color: #5f6368;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.account-manage__nav .nav-link:hover, .account-panel .nav-pills .nav-link:hover { color: var(--account-ink); background: #fff; }
.account-manage__nav .nav-link.active, .account-panel .nav-pills .nav-link.active { color: #fff; background: var(--account-ink); }
.account-manage__content { max-width: 620px; }

.account-panel .row { display: grid; gap: 24px; }
.account-panel [class*="col-md-"] { width: 100%; max-width: none; }
.account-panel form { display: grid; gap: 18px; }
.account-panel .form-floating { display: grid; gap: 7px; }
.account-panel .form-floating > label { position: static; order: -1; padding: 0; transform: none; color: #292c30; font-size: 13px; font-weight: 600; }
.account-panel .form-floating > .form-control { padding: 0 14px; }
.account-panel .input-group { display: flex; }
.account-panel .input-group .form-control { border-radius: 8px 0 0 8px; }
.account-panel .input-group .btn { min-height: 50px; border-radius: 0 8px 8px 0; }
.account-panel hr { margin: 26px 0; border: 0; border-top: 1px solid var(--account-line); }
.account-panel h2, .account-panel h3 { font-family: "Sora", sans-serif; letter-spacing: -.025em; }
.account-panel code { padding: 2px 5px; border-radius: 4px; color: #303438; background: #ecece7; font-family: "JetBrains Mono", monospace; }
.account-panel table { width: 100%; border-collapse: collapse; font-size: 13px; }
.account-panel th, .account-panel td { padding: 10px; border-bottom: 1px solid var(--account-line); text-align: left; }
.account-panel .btn-link { min-height: auto; padding: 0; border: 0; color: var(--account-ink); background: none; box-shadow: none; }

.dark .account-body { --account-paper: #101214; --account-panel: #17191b; --account-ink: #f4f4ef; --account-muted: #a4a8ad; --account-line: #363a3e; --account-line-strong: #555b61; --account-action-bg: #f4f4ef; --account-action-fg: #101112; background: var(--account-paper); }
.dark .account-body::before { background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); }
.dark .account-nav { border-color: rgba(255,255,255,.1); background: rgba(16,18,20,.88); }
.dark .account-nav .theme-toggle, .dark .account-nav .lang-switcher summary { color: #f4f4ef; border-color: #3c4044; background: #202326; }
.dark .account-home-link:hover { background: rgba(255,255,255,.07); }
.dark .account-shell__frame { border-color: #363a3e; box-shadow: 0 28px 80px rgba(0,0,0,.3); }
.dark .account-field__label, .dark .account-panel .form-label, .dark .account-panel .form-floating > label { color: #e6e6e1; }
.dark .account-input, .dark .account-panel .form-control, .dark .account-panel select { color: #f4f4ef; border-color: #555b61; background: #202326; }
.dark .account-password__toggle:hover { color: #fff; background: #2b2f32; }
.dark .account-check-row label, .dark .account-panel .form-check-label { color: #c3c6c9; }
.dark .account-card__eyebrow::before { background: #f4f4ef; }
.dark .account-alert, .dark .account-panel .alert { color: #d3d5d6; background: #202326; }
.dark .account-alert--error, .dark .account-panel .alert-danger { color: #ffb4ab; border-color: #743732; background: #2a1918; }
.dark .account-message__icon, .dark .account-manage__nav, .dark .account-panel .nav-pills { background: #202326; }
.dark .account-panel code { color: #e5e5df; background: #282c2f; }

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

@media (max-width: 900px) {
  .account-shell { padding: 28px 20px 48px; align-items: start; }
  .account-shell__frame { min-height: 0; grid-template-columns: 1fr; }
  .account-context { min-height: auto; padding: 34px 38px; gap: 28px; }
  .account-context h1 { font-size: clamp(31px, 7vw, 46px); }
  .account-context__intro { margin-top: 18px; }
  .account-context__signals { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .account-context__signals li { grid-template-columns: 1fr; gap: 5px; }
  .account-context__signals small { display: none; }
  .account-context__status { padding-top: 16px; }
  .account-panel { padding: 44px 38px; }
}

@media (max-width: 620px) {
  html, .account-body { width: 100%; max-width: 100%; overflow-x: hidden; }
  .account-nav .nav-inner { width: calc(100% - 28px); min-height: 68px; }
  .account-nav .nav-logo-img { width: min(190px, 52vw); height: auto; }
  .account-nav__actions { gap: 6px; }
  .account-home-link span { display: none; }
  .account-home-link { min-width: 38px; padding-inline: 10px; }
  .account-shell { width: 100%; max-width: 100%; min-height: calc(100vh - 69px); padding: 16px 12px 32px; display: block; }
  .account-shell__frame { width: 100%; max-width: 100%; display: block; overflow: hidden; border-radius: 12px; }
  .account-context, .account-panel, .account-card, .account-form, .account-field, .account-password { width: 100%; min-width: 0; max-width: 100%; }
  .account-context { padding: 28px 24px; }
  .account-context h1 { font-size: 33px; }
  .account-context h1, .account-context__intro, .account-card__intro { max-width: 100%; overflow-wrap: break-word; }
  .account-context__intro { font-size: 14px; }
  .account-context__signals { display: none; }
  .account-context__status small { display: none; }
  .account-panel { padding: 36px 24px 40px; }
  .account-input, .account-panel .form-control, .account-panel select { min-width: 0; max-width: 100%; }
  .account-card__header { margin-bottom: 25px; }
  .account-form__meta { align-items: flex-start; flex-direction: column; }
  .account-message__actions { align-items: stretch; flex-direction: column; }
  .account-message__actions .account-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
