:root {
  color-scheme: light;
  --ink: #142128;
  --ink-soft: #526169;
  --ink-faint: #7c898f;
  --paper: #f5f7f6;
  --surface: #ffffff;
  --line: #dde4e2;
  --line-strong: #cbd6d2;
  --navy: #132f39;
  --navy-2: #0f252e;
  --blue: #2968e8;
  --blue-hover: #2059cc;
  --blue-soft: #edf3ff;
  --aqua: #1da89a;
  --aqua-soft: #e9f8f5;
  --amber: #e8a23d;
  --amber-soft: #fff6e8;
  --red: #ce4f51;
  --red-soft: #fff0f0;
  --violet: #7768df;
  --shadow-sm: 0 1px 2px rgb(15 37 46 / 5%), 0 5px 16px rgb(15 37 46 / 4%);
  --shadow-lg: 0 24px 80px rgb(7 29 36 / 18%);
  --radius: 14px;
  --prototype-h: 0px;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 100% 0%, rgb(41 104 232 / 4%), transparent 28rem),
    var(--paper);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgb(41 104 232 / 22%);
  outline-offset: 2px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.prototype-bar {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: var(--prototype-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 0 18px;
  color: #eaf3f5;
  background: #0b1a20;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  box-shadow: 0 4px 18px rgb(4 14 18 / 20%);
}

.prototype-title,
.prototype-nav,
.prototype-notes,
.prototype-actions {
  display: flex;
  align-items: center;
}

.prototype-title {
  gap: 8px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.prototype-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4dd7ad;
  box-shadow: 0 0 0 4px rgb(77 215 173 / 12%);
}

.prototype-badge {
  padding: 3px 7px;
  color: #b9cbd0;
  background: rgb(255 255 255 / 7%);
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 550;
}

.prototype-nav {
  min-width: 0;
  justify-content: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.prototype-nav::-webkit-scrollbar {
  display: none;
}

.prototype-link,
.prototype-notes {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.prototype-link {
  flex: none;
  padding: 7px 10px;
  color: #9fb2b8;
  border-radius: 7px;
  font-size: 11px;
}

.prototype-link:hover,
.prototype-link.active {
  color: white;
  background: rgb(255 255 255 / 9%);
}

.prototype-notes {
  gap: 6px;
  padding: 7px 9px;
  color: #bcd0d5;
  border: 1px solid rgb(255 255 255 / 11%);
  border-radius: 8px;
  font-size: 11px;
  white-space: nowrap;
}

.prototype-notes:hover {
  color: white;
  background: rgb(255 255 255 / 7%);
}

.prototype-actions {
  gap: 7px;
}

.prototype-notes svg {
  width: 14px;
  height: 14px;
}

.language-toggle {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  color: #64767c;
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
}

.language-toggle i {
  width: 1px;
  height: 11px;
  background: var(--line-strong);
}

html[lang="en"] .language-toggle .lang-en,
html[lang="zh-CN"] .language-toggle .lang-zh {
  color: var(--blue);
  font-weight: 800;
}

.prototype-language {
  min-height: 30px;
  color: #9fb2b8;
  background: rgb(255 255 255 / 4%);
  border-color: rgb(255 255 255 / 11%);
}

.prototype-language i {
  background: rgb(255 255 255 / 15%);
}

html[lang="en"] .prototype-language .lang-en,
html[lang="zh-CN"] .prototype-language .lang-zh {
  color: white;
}

main {
  min-height: 100vh;
  padding-top: var(--prototype-h);
}

.screen {
  display: none;
  min-height: calc(100vh - var(--prototype-h));
}

.screen.active {
  display: flex;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-light {
  color: white;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: white;
  background: var(--blue);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 14%);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.65;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #587078;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow.light {
  color: #9fc4cd;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: -0.035em;
}

.auth-screen {
  width: 100%;
  background: var(--surface);
}

.auth-visual {
  position: relative;
  width: 46%;
  min-height: calc(100vh - var(--prototype-h));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 42px 5vw 34px;
  color: white;
  background:
    radial-gradient(circle at 78% 22%, rgb(84 174 239 / 20%), transparent 20rem),
    radial-gradient(circle at 12% 85%, rgb(35 189 164 / 13%), transparent 26rem),
    var(--navy-2);
}

.auth-visual::before,
.auth-visual::after {
  content: "";
  position: absolute;
  border: 1px solid rgb(132 213 222 / 10%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-visual::before {
  width: 430px;
  height: 430px;
  right: -230px;
  top: 9%;
  box-shadow:
    0 0 0 52px rgb(125 210 220 / 3%),
    0 0 0 105px rgb(125 210 220 / 2%);
}

.auth-visual::after {
  width: 230px;
  height: 230px;
  left: -140px;
  bottom: 8%;
  box-shadow: 0 0 0 65px rgb(42 112 126 / 5%);
}

.auth-story {
  position: relative;
  z-index: 1;
  width: min(500px, 100%);
  margin: auto 0;
  padding: 50px 0;
}

.auth-story h1 {
  max-width: 490px;
  margin-bottom: 18px;
  color: white;
  font-size: clamp(34px, 3.5vw, 54px);
  line-height: 1.04;
}

html[lang="zh-CN"] .auth-story h1 {
  font-size: clamp(34px, 3.15vw, 48px);
  line-height: 1.15;
}

.auth-story > p {
  max-width: 440px;
  margin-bottom: 28px;
  color: #b7cbd0;
  font-size: 16px;
  line-height: 1.65;
}

.model-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.model-chips > span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  color: #dcebed;
  background: rgb(255 255 255 / 7%);
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 999px;
  font-size: 13px;
}

.model-dot {
  width: 7px;
  height: 7px;
  background: #b6c9ce;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgb(182 201 206 / 8%);
}

.claude-dot {
  background: #df9a72;
}

.codex-dot {
  background: #6bd2b5;
}

.more-dot {
  background: #8fb6ed;
}

.auth-quote {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #a7bcc1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.pulse-orb {
  width: 7px;
  height: 7px;
  background: #43d5a5;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgb(67 213 165 / 12%);
}

.live-label {
  margin-left: auto;
  padding: 4px 8px;
  color: #9be1ca;
  background: rgb(56 202 157 / 8%);
  border: 1px solid rgb(56 202 157 / 14%);
  border-radius: 999px;
  font-family: inherit;
  font-size: 10px;
}

.auth-form-wrap {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 48px 5vw 34px;
  background:
    radial-gradient(circle at 80% 15%, rgb(41 104 232 / 5%), transparent 18rem),
    var(--surface);
}

.auth-language {
  position: absolute;
  top: 22px;
  right: 26px;
}

.mobile-brand {
  display: none;
}

.auth-form-card {
  width: min(520px, 100%);
}

.auth-form-card.compact {
  width: min(410px, 100%);
}

.form-heading {
  margin-bottom: 26px;
}

.form-heading h2 {
  margin-bottom: 8px;
  font-size: 30px;
  line-height: 1.1;
}

.form-heading p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.step-row {
  display: flex;
  align-items: center;
  margin-bottom: 38px;
}

.step-row > i {
  flex: 1;
  height: 1px;
  margin: 0 8px;
  background: var(--line);
}

.step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.step b {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 9px;
}

.step.active {
  color: var(--blue);
}

.step.active b {
  color: white;
  background: var(--blue);
  border-color: var(--blue);
}

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

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.field small {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 450;
  line-height: 1.4;
}

.label-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.label-between a,
.label-between strong {
  color: var(--blue);
  font-size: 10px;
  text-decoration: none;
}

.input-shell,
.money-input,
.search-box {
  display: flex;
  align-items: center;
  color: #7e8c91;
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition:
    border 150ms ease,
    box-shadow 150ms ease;
}

.input-shell:focus-within,
.money-input:focus-within,
.search-box:focus-within {
  border-color: #87aaf5;
  box-shadow: 0 0 0 3px rgb(41 104 232 / 10%);
}

.input-shell > svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-left: 12px;
}

.input-shell input,
.money-input input,
.search-box input {
  min-width: 0;
  flex: 1;
  height: 42px;
  padding: 0 11px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
}

.input-shell input {
  padding-left: 9px;
}

.input-action {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink-faint);
  background: none;
  border: 0;
  cursor: pointer;
}

.input-action svg {
  width: 16px;
  height: 16px;
}

.password-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: -6px;
}

.password-strength > span {
  display: flex;
  flex: 1;
  gap: 4px;
}

.password-strength i {
  flex: 1;
  height: 3px;
  background: var(--line-strong);
  border-radius: 999px;
  transition: background 150ms ease;
}

.password-strength small {
  color: var(--ink-faint);
  font-size: 10px;
}

.password-strength.valid i {
  background: var(--aqua);
}

.password-strength.valid small {
  color: #138374;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.check-row input {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: var(--blue);
}

.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 100ms ease,
    background 150ms ease,
    border 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button svg {
  width: 15px;
  height: 15px;
}

.button.primary {
  color: white;
  background: var(--blue);
  box-shadow: 0 5px 16px rgb(41 104 232 / 18%);
}

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

.button.secondary {
  color: var(--ink);
  background: white;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.button.secondary:hover {
  background: #f8faf9;
}

.button.light {
  color: var(--navy-2);
  background: #f0fbfa;
  border-color: rgb(255 255 255 / 18%);
}

.button.wide {
  width: 100%;
  min-height: 43px;
}

.button.small {
  min-height: 32px;
  padding: 0 11px;
  font-size: 10px;
}

.form-footer {
  margin: 18px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
  text-align: center;
}

.form-footer button,
.resend button {
  padding: 0;
  color: var(--blue);
  background: 0;
  border: 0;
  font-weight: 650;
  cursor: pointer;
}

.security-note {
  align-self: end;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 28px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.security-note svg {
  width: 14px;
  height: 14px;
}

.verify-panel {
  flex: 1;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 34px 5vw;
  background:
    radial-gradient(circle at 50% 42%, rgb(41 104 232 / 8%), transparent 28rem),
    linear-gradient(#fff, #f5f8f8);
}

.verify-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.verification-card {
  width: min(460px, 100%);
  align-self: center;
  justify-self: center;
  padding: 42px;
  text-align: center;
  background: rgb(255 255 255 / 92%);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgb(22 47 57 / 10%);
}

.mail-orbit {
  position: relative;
  width: 74px;
  height: 74px;
  display: grid;
  margin: 0 auto 28px;
  place-items: center;
  color: white;
  background: var(--blue);
  border-radius: 24px;
  box-shadow:
    0 0 0 10px rgb(41 104 232 / 7%),
    0 0 0 20px rgb(41 104 232 / 3%);
}

.mail-orbit svg {
  width: 28px;
  height: 28px;
}

.mail-orbit span {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 17px;
  height: 17px;
  background: var(--aqua);
  border: 3px solid white;
  border-radius: 50%;
}

.verification-card h2 {
  margin-bottom: 10px;
  font-size: 30px;
}

.verification-card > p {
  max-width: 340px;
  margin: 0 auto 26px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.verification-card > p strong {
  display: block;
  color: var(--ink);
}

.code-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
  margin-bottom: 18px;
}

.code-inputs input {
  min-width: 0;
  width: 100%;
  height: 51px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 20px;
  font-weight: 750;
  text-align: center;
}

.resend {
  margin: 18px 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.resend span {
  margin: 0 5px;
}

.inline-note,
.modal-warning,
.notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #50636a;
  background: #f3f7f7;
  border: 1px solid #dde8e6;
  border-radius: 10px;
  font-size: 10px;
  line-height: 1.5;
  text-align: left;
}

.inline-note {
  padding: 10px 12px;
}

.inline-note svg,
.modal-warning svg,
.notice > svg {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--aqua);
}

.login-shell {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(360px, 40%) 1fr;
}

.login-brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px 4.5vw;
  color: white;
  background:
    radial-gradient(circle at 80% 15%, rgb(65 164 218 / 18%), transparent 18rem),
    var(--navy-2);
}

.login-brand-panel h1 {
  margin: 8px 0 14px;
  color: white;
  font-size: 48px;
}

.login-brand-panel > div > p {
  max-width: 390px;
  color: #adc2c7;
  font-size: 14px;
  line-height: 1.65;
}

.mini-usage {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: rgb(255 255 255 / 5%);
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 13px;
}

.mini-usage > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mini-usage span {
  color: #8ea8ae;
  font-size: 10px;
}

.mini-usage strong,
.mini-usage code {
  color: #d9e8eb;
  font-size: 10px;
}

.mini-usage strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.mini-usage strong i {
  width: 6px;
  height: 6px;
  background: #43d5a5;
  border-radius: 50%;
}

.login-form-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: 48px;
}

.sidebar {
  position: sticky;
  top: var(--prototype-h);
  width: 246px;
  height: calc(100vh - var(--prototype-h));
  flex: none;
  display: flex;
  flex-direction: column;
  background: #f9fbfa;
  border-right: 1px solid var(--line);
}

.sidebar-top {
  padding: 24px 18px 12px;
}

.workspace-label {
  display: block;
  margin: 27px 8px 8px;
  color: #8b999e;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.workspace-switcher {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.workspace-switcher > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.workspace-switcher strong,
.workspace-switcher small,
.account-mini strong,
.account-mini small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-switcher strong,
.account-mini strong {
  font-size: 10px;
}

.workspace-switcher small,
.account-mini small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 9px;
}

.workspace-switcher > svg {
  width: 13px;
  height: 13px;
  color: var(--ink-faint);
  transform: rotate(90deg);
}

.avatar {
  flex: none;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #315961;
  background: #dcebea;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 750;
}

.avatar.small {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.side-nav {
  flex: 1;
  padding: 4px 12px;
}

.nav-section-label {
  margin: 24px 10px 7px;
}

.side-link {
  width: 100%;
  min-height: 39px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  color: #637278;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.side-link:hover {
  color: var(--ink);
  background: #eef3f2;
}

.side-link.active {
  color: #173941;
  background: #e5eeed;
  font-weight: 700;
}

.side-link svg {
  width: 16px;
  height: 16px;
}

.side-link span {
  flex: 1;
}

.side-link b {
  min-width: 20px;
  padding: 3px 6px;
  color: #5c7176;
  background: rgb(255 255 255 / 70%);
  border-radius: 999px;
  font-size: 9px;
  text-align: center;
}

.side-link i {
  color: #96a2a6;
  font-style: normal;
}

.sidebar-bottom {
  padding: 12px;
  border-top: 1px solid var(--line);
}

.sidebar-language {
  width: 100%;
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  padding: 0 8px;
  color: var(--ink-faint);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 9px;
  cursor: pointer;
}

.sidebar-language:hover {
  color: var(--ink);
  background: #eef3f2;
}

.sidebar-language strong {
  color: var(--ink-soft);
  font-size: 9px;
}

.sidebar-language .lang-zh {
  display: none;
}

html[lang="zh-CN"] .sidebar-language .lang-en {
  display: none;
}

html[lang="zh-CN"] .sidebar-language .lang-zh {
  display: inline;
}

.account-mini {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px;
}

.account-mini > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.account-mini > button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--ink-faint);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.account-mini > button svg {
  width: 15px;
  height: 15px;
}

.app-screen {
  width: 100%;
  background:
    radial-gradient(circle at 95% 2%, rgb(45 111 220 / 4%), transparent 24rem),
    var(--paper);
}

.app-main {
  min-width: 0;
  flex: 1;
}

.app-page {
  display: none;
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
  padding: 38px 0 64px;
}

.app-page.active {
  display: block;
}

.mobile-header,
.mobile-bottom-nav {
  display: none;
}

.mobile-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-language {
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--ink-soft);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 750;
}

.mobile-language .lang-zh {
  display: none;
}

html[lang="zh-CN"] .mobile-language .lang-en {
  display: none;
}

html[lang="zh-CN"] .mobile-language .lang-zh {
  display: inline;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.page-head h1 {
  margin-bottom: 6px;
  font-size: 30px;
  line-height: 1.1;
}

.page-head p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card,
.panel,
.key-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.metric-card {
  position: relative;
  min-height: 128px;
  overflow: hidden;
  padding: 19px;
  border-radius: 13px;
}

.metric-card.featured {
  color: white;
  background:
    radial-gradient(circle at 100% 0%, rgb(105 212 215 / 24%), transparent 12rem),
    var(--navy);
  border-color: var(--navy);
}

.metric-card.featured .metric-label,
.metric-card.featured small {
  color: #b5cbcf;
}

.metric-card.featured strong {
  color: white;
}

.metric-label {
  display: block;
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.metric-card > strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 25px;
  letter-spacing: -0.035em;
}

.metric-card > strong.text-value {
  font-size: 20px;
}

.metric-card > small {
  color: var(--ink-faint);
  font-size: 9px;
}

.metric-watermark {
  position: absolute;
  width: 78px;
  height: 78px;
  right: -10px;
  bottom: -17px;
  color: rgb(255 255 255 / 8%);
  stroke-width: 1.2;
}

.trend {
  margin-right: 3px;
  font-weight: 700;
}

.trend.down {
  color: #128875;
}

.overview-grid,
.account-balance-grid,
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  padding: 20px;
  border-radius: var(--radius);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin-bottom: 0;
  font-size: 15px;
}

.panel-head .eyebrow {
  margin-bottom: 5px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 0;
  color: var(--blue);
  background: none;
  border: 0;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.text-button svg {
  width: 13px;
  height: 13px;
}

.allocation-total {
  display: flex;
  gap: 44px;
  margin-bottom: 20px;
}

.allocation-total strong,
.allocation-total span {
  display: block;
}

.allocation-total strong {
  margin-bottom: 3px;
  font-size: 20px;
}

.allocation-total span {
  color: var(--ink-faint);
  font-size: 9px;
}

.allocation-bar {
  height: 10px;
  display: flex;
  overflow: hidden;
  gap: 2px;
  margin-bottom: 15px;
  background: #edf1f0;
  border-radius: 999px;
}

.allocation-bar span {
  height: 100%;
}

.bar-account {
  background: var(--aqua);
}

.bar-claude {
  background: var(--blue);
}

.bar-codex {
  background: var(--violet);
}

.bar-spent {
  background: #cbd4d2;
}

.allocation-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}

.allocation-legend > *,
.breakdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: var(--ink-soft);
  background: 0;
  border: 0;
  font-size: 9px;
  text-align: left;
}

.allocation-legend button {
  cursor: pointer;
}

.allocation-legend strong {
  margin-left: auto;
  color: var(--ink);
}

.dot,
.service-dot {
  flex: none;
  display: inline-block;
  border-radius: 50%;
}

.dot {
  width: 8px;
  height: 8px;
}

.dot.account {
  background: var(--aqua);
}

.dot.claude {
  background: var(--blue);
}

.dot.codex {
  background: var(--violet);
}

.dot.spent {
  background: #cbd4d2;
}

.key-limit-panel p {
  margin: 16px 0 18px;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.55;
}

.key-limit-visual {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.key-limit-visual span {
  height: 7px;
  background: #e4e9e8;
  border-radius: 999px;
}

.key-limit-visual span.used {
  background: var(--blue);
}

.pill {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.pill.success {
  color: #147b68;
  background: var(--aqua-soft);
  border-color: #cbece5;
}

.pill.warning {
  color: #9a5f11;
  background: var(--amber-soft);
  border-color: #f4ddbb;
}

.pill.danger {
  color: #a23e42;
  background: var(--red-soft);
  border-color: #f1cfd0;
}

.pill.neutral {
  color: #647278;
  background: #f0f3f2;
  border-color: #e2e7e6;
}

.pill.info {
  color: #285bbf;
  background: var(--blue-soft);
  border-color: #d7e3fd;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

th {
  padding: 0 11px 10px;
  color: #829095;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 12px 11px;
  color: #3e4d53;
  border-top: 1px solid #edf0ef;
  vertical-align: middle;
  white-space: nowrap;
}

td strong,
td small {
  display: block;
}

td small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
}

th:first-child,
td:first-child {
  padding-left: 0;
}

th:last-child,
td:last-child {
  padding-right: 0;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

code {
  color: #334d56;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9px;
}

.service-dot {
  width: 7px;
  height: 7px;
  margin-right: 6px;
}

.service-dot.claude {
  background: var(--blue);
}

.service-dot.codex {
  background: var(--violet);
}

.notice {
  align-items: center;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: #eef7f5;
  border-color: #d7e9e5;
}

.notice > div {
  flex: 1;
}

.notice strong,
.notice span {
  display: block;
}

.notice strong {
  margin-bottom: 2px;
  color: #234a4b;
  font-size: 10px;
}

.notice span {
  color: #68817f;
  font-size: 9px;
}

.keys-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  background: #e9eeec;
  border-radius: 9px;
}

.segmented button {
  min-height: 29px;
  padding: 0 10px;
  color: #6e7c81;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 9px;
  cursor: pointer;
}

.segmented button.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 1px 4px rgb(12 35 43 / 8%);
}

.segmented b {
  margin-left: 3px;
  font-size: 8px;
}

.segmented.small button {
  min-height: 26px;
  font-size: 8px;
}

.search-box {
  width: 210px;
  background: white;
}

.search-box.grow {
  min-width: 240px;
  flex: 1;
}

.search-box svg {
  flex: none;
  width: 14px;
  height: 14px;
  margin-left: 10px;
}

.search-box input {
  height: 35px;
  padding-left: 8px;
  font-size: 10px;
}

.key-card-list {
  display: grid;
  gap: 10px;
}

.key-card {
  display: grid;
  grid-template-columns: auto minmax(220px, 1.25fr) minmax(220px, 0.8fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 13px;
}

.key-card.revoked {
  background: #fafbfa;
  opacity: 0.78;
}

.provider-logo {
  flex: none;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid;
  border-radius: 11px;
  font-size: 10px;
  font-weight: 800;
}

.provider-logo.large {
  width: 49px;
  height: 49px;
  border-radius: 14px;
  font-size: 12px;
}

.claude-logo {
  color: #285fc6;
  background: #eef4ff;
  border-color: #d9e5fb;
}

.codex-logo {
  color: #6555c9;
  background: #f2efff;
  border-color: #dfd9fc;
}

.codex-logo svg {
  width: 18px;
  height: 18px;
}

.key-identity {
  min-width: 0;
}

.key-identity > div {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}

.key-identity h3 {
  margin: 0;
  font-size: 12px;
}

.key-identity p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 9px;
}

.key-identity p > span {
  padding: 3px 6px;
  background: #eef2f1;
  border-radius: 5px;
  font-weight: 650;
}

.key-identity > small {
  color: var(--ink-faint);
  font-size: 8px;
}

.icon-button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--ink-faint);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--ink);
  background: #f0f4f3;
  border-color: var(--line);
}

.icon-button svg {
  width: 14px;
  height: 14px;
}

.key-identity .icon-button {
  width: 24px;
  height: 24px;
}

.quota-summary > span:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 7px;
}

.quota-summary small {
  color: var(--ink-faint);
  font-size: 8px;
}

.quota-summary strong {
  font-size: 12px;
}

.quota-track,
.large-quota-track {
  overflow: hidden;
  background: #e7eceb;
  border-radius: 999px;
}

.quota-track {
  height: 6px;
  margin-bottom: 5px;
}

.quota-track i,
.large-quota-track i {
  display: block;
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
}

.codex-track i {
  background: var(--violet);
}

.quota-meta {
  color: var(--ink-faint);
  font-size: 8px;
}

.key-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-panel {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  padding: 12px;
}

.filter-button {
  height: 35px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: var(--ink-soft);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 9px;
  cursor: pointer;
}

.filter-button svg {
  width: 13px;
  height: 13px;
}

.filter-button span {
  color: var(--ink-faint);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.summary-strip > span {
  padding: 13px 17px;
  border-right: 1px solid var(--line);
}

.summary-strip > span:last-child {
  border-right: 0;
}

.summary-strip small,
.summary-strip strong {
  display: block;
}

.summary-strip small {
  margin-bottom: 4px;
  color: var(--ink-faint);
  font-size: 8px;
}

.summary-strip strong {
  font-size: 14px;
}

.messages-panel {
  padding-bottom: 10px;
}

.messages-table td {
  padding-top: 13px;
  padding-bottom: 13px;
}

.key-name {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.key-name > span > strong,
.key-name > span > small {
  display: block;
}

.model-note {
  display: inline-flex;
  margin-left: 5px;
  padding: 2px 5px;
  color: #6a5ac2;
  background: #f2efff;
  border-radius: 4px;
  font-size: 7px;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  color: var(--ink-faint);
  border-top: 1px solid #edf0ef;
  font-size: 9px;
}

.table-footer div {
  display: flex;
  gap: 6px;
}

.table-footer button {
  min-height: 29px;
  padding: 0 10px;
  color: var(--ink-soft);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font-size: 8px;
  cursor: pointer;
}

.table-footer button:disabled {
  opacity: 0.45;
  cursor: default;
}

.account-balance-grid {
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
}

.balance-hero {
  position: relative;
  min-height: 278px;
  overflow: hidden;
  padding: 28px;
  color: white;
  background:
    radial-gradient(circle at 90% 8%, rgb(100 212 211 / 25%), transparent 15rem),
    var(--navy);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.balance-hero > * {
  position: relative;
  z-index: 1;
}

.balance-hero > strong {
  display: block;
  margin: 28px 0 5px;
  font-size: 43px;
  letter-spacing: -0.045em;
}

.balance-hero > p {
  max-width: 290px;
  margin-bottom: 35px;
  color: #acc4ca;
  font-size: 10px;
  line-height: 1.5;
}

.balance-orbit {
  position: absolute;
  z-index: 0;
  border: 1px solid rgb(158 225 224 / 12%);
  border-radius: 50%;
}

.balance-orbit.one {
  width: 260px;
  height: 260px;
  right: -135px;
  bottom: -110px;
  box-shadow: 0 0 0 42px rgb(145 219 220 / 3%);
}

.balance-orbit.two {
  width: 90px;
  height: 90px;
  right: 72px;
  top: 38px;
}

.account-breakdown {
  padding: 24px;
}

.breakdown-row {
  padding: 13px 0;
  border-bottom: 1px solid #edf0ef;
  font-size: 10px;
}

.breakdown-row strong {
  margin-left: auto;
  color: var(--ink);
}

.breakdown-row.muted {
  color: var(--ink-faint);
}

.breakdown-total {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  font-size: 11px;
  font-weight: 750;
}

.ledger-panel {
  margin-top: 16px;
}

.ledger-kind {
  display: inline-grid;
  width: 25px;
  height: 25px;
  margin-right: 9px;
  place-items: center;
  border-radius: 8px;
  font-weight: 800;
  vertical-align: middle;
}

.ledger-kind + span {
  display: inline-block;
  vertical-align: middle;
}

.ledger-kind.allocation {
  color: #536bcd;
  background: #eef1ff;
}

.ledger-kind.topup {
  color: #15806c;
  background: #e7f7f3;
}

.ledger-kind.debit {
  color: #a95d35;
  background: #fff1e9;
}

.positive {
  color: #15806c;
  font-weight: 700;
}

.negative {
  color: #a34d50;
  font-weight: 700;
}

.back-button {
  margin-bottom: 17px;
  padding: 0;
  color: var(--ink-soft);
  background: none;
  border: 0;
  font-size: 10px;
  cursor: pointer;
}

.key-detail-head {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 24px;
}

.key-detail-head > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.key-detail-head h1 {
  margin-bottom: 5px;
  font-size: 25px;
}

.key-detail-head p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.key-metrics .metric-card {
  min-height: 115px;
}

.quota-panel {
  margin-bottom: 16px;
}

.large-quota-track {
  height: 12px;
  background: #e7eceb;
}

.large-quota-track i {
  background: linear-gradient(90deg, var(--blue), #4b8bf1);
}

.quota-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--ink-faint);
  font-size: 8px;
}

.quota-axis strong {
  color: #2d63c8;
}

.detail-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
}

.chart {
  height: 150px;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  padding: 10px 4px 0;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(to bottom, transparent 32%, #edf1f0 33%, transparent 34%),
    linear-gradient(to bottom, transparent 65%, #edf1f0 66%, transparent 67%);
}

.chart span {
  flex: 1;
  min-width: 4px;
  background: #4e7fe5;
  border-radius: 4px 4px 1px 1px;
  opacity: 0.82;
}

.chart span:hover {
  opacity: 1;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: var(--ink-faint);
  font-size: 8px;
}

.setup-panel > p {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

.code-block {
  position: relative;
  overflow-x: auto;
  padding: 16px;
  color: #d8e7e9;
  background: #10252d;
  border-radius: 10px;
  line-height: 1.8;
}

.code-block code {
  color: #b9cdd2;
  font-size: 8px;
}

.code-block code span {
  color: #91c3ff;
}

.code-block code b {
  color: #d7e9ec;
  font-weight: 500;
}

.code-block button {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: #a5bec4;
  background: rgb(255 255 255 / 6%);
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 7px;
  cursor: pointer;
}

.code-block button svg {
  width: 13px;
  height: 13px;
}

.modal-backdrop {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgb(9 26 33 / 54%);
  backdrop-filter: blur(5px);
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  position: relative;
  width: min(510px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 27px;
  background: white;
  border: 1px solid rgb(255 255 255 / 65%);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  animation: modal-in 160ms ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.985);
  }
}

.modal-close {
  position: absolute;
  z-index: 1;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  color: var(--ink-faint);
  background: #f1f4f3;
  border: 0;
  border-radius: 8px;
  font-size: 19px;
  cursor: pointer;
}

.modal-head {
  padding-right: 28px;
}

.modal-head.centered {
  padding: 0 20px;
  text-align: center;
}

.modal-head h2 {
  margin-bottom: 7px;
  font-size: 23px;
}

.modal-head p {
  margin-bottom: 21px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.service-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 0;
  border: 0;
}

.service-picker legend {
  grid-column: 1 / -1;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 650;
}

.service-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  cursor: pointer;
}

.service-choice.selected {
  background: var(--blue-soft);
  border-color: #8fb0f5;
  box-shadow: 0 0 0 2px rgb(41 104 232 / 7%);
}

.service-choice input {
  position: absolute;
  opacity: 0;
}

.service-choice .provider-logo {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  font-size: 8px;
}

.service-choice strong,
.service-choice small {
  display: block;
}

.service-choice strong {
  margin-bottom: 3px;
  font-size: 10px;
}

.service-choice small {
  color: var(--ink-faint);
  font-size: 8px;
}

.service-choice > i {
  display: none;
  width: 17px;
  height: 17px;
  margin-left: auto;
  place-items: center;
  color: white;
  background: var(--blue);
  border-radius: 50%;
}

.service-choice.selected > i {
  display: grid;
}

.service-choice > i svg {
  width: 11px;
  height: 11px;
}

.money-input {
  color: var(--ink);
}

.money-input b {
  margin-left: 13px;
  color: var(--ink-faint);
  font-size: 14px;
}

.money-input input {
  padding-left: 5px;
  font-size: 14px;
  font-weight: 700;
}

.money-input span {
  padding-right: 12px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 550;
}

.range {
  width: 100%;
  height: 4px;
  margin: -3px 0 1px;
  accent-color: var(--blue);
  cursor: pointer;
}

.quota-preview,
.quota-stats {
  display: grid;
  background: #f4f7f6;
  border: 1px solid #e2e8e6;
  border-radius: 10px;
}

.quota-preview {
  grid-template-columns: 1fr 1fr;
}

.quota-preview span {
  padding: 10px 12px;
  color: var(--ink-faint);
  border-right: 1px solid #e0e7e5;
  font-size: 8px;
}

.quota-preview span:last-child {
  border-right: 0;
}

.quota-preview strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 11px;
}

.modal-warning {
  padding: 10px 12px;
  background: var(--amber-soft);
  border-color: #f2dfc1;
  color: #775b30;
}

.modal-warning svg {
  color: #be7b20;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 3px;
}

.success-mark {
  display: grid;
  width: 45px;
  height: 45px;
  margin: 0 auto 17px;
  place-items: center;
  color: white;
  background: var(--aqua);
  border-radius: 50%;
  box-shadow: 0 0 0 8px var(--aqua-soft);
}

.success-mark svg {
  width: 21px;
  height: 21px;
}

.issued-key-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  padding: 8px 8px 8px 12px;
  background: #f4f7f6;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.issued-key-box code {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 9px;
}

.issued-key-box button {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  color: white;
  background: var(--blue);
  border: 0;
  border-radius: 7px;
  font-size: 9px;
  cursor: pointer;
}

.issued-key-box button svg {
  width: 12px;
  height: 12px;
}

.issued-modal > .button {
  margin-top: 14px;
}

.quota-stats {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 17px;
}

.quota-stats > span {
  padding: 12px;
  border-right: 1px solid #e0e7e5;
}

.quota-stats > span:last-child {
  border-right: 0;
}

.quota-stats small,
.quota-stats strong {
  display: block;
}

.quota-stats small {
  margin-bottom: 5px;
  color: var(--ink-faint);
  font-size: 8px;
}

.quota-stats strong {
  font-size: 12px;
}

.notes-drawer {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(490px, 100%);
  padding: 34px;
  overflow-y: auto;
  background: white;
  box-shadow: -24px 0 70px rgb(4 20 26 / 18%);
  animation: drawer-in 180ms ease-out;
}

@keyframes drawer-in {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
}

.notes-drawer h2 {
  margin-bottom: 25px;
  font-size: 25px;
}

.notes-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes-list li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.notes-list li > span {
  color: #94a1a5;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.notes-list strong {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
}

.notes-list p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.notes-callout {
  display: flex;
  gap: 9px;
  margin-top: 20px;
  padding: 13px;
  color: #24565a;
  background: var(--aqua-soft);
  border: 1px solid #cbeae4;
  border-radius: 11px;
  font-size: 10px;
  line-height: 1.5;
}

.notes-callout svg {
  flex: none;
  width: 16px;
  height: 16px;
}

.toast {
  position: fixed;
  z-index: 300;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  color: white;
  background: #132c34;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgb(5 23 30 / 25%);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast svg {
  width: 14px;
  height: 14px;
  color: #62ddb4;
}

@media (max-width: 1040px) {
  .prototype-title {
    display: none;
  }

  .prototype-bar {
    grid-template-columns: 1fr auto;
  }

  .prototype-nav {
    justify-content: flex-start;
  }

  .auth-visual {
    width: 41%;
  }

  .auth-story h1 {
    font-size: 38px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .key-card {
    grid-template-columns: auto 1fr auto;
  }

  .quota-summary {
    grid-column: 2;
  }

  .key-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --prototype-h: 44px;
  }

  .prototype-bar {
    gap: 8px;
    padding: 0 8px;
  }

  .prototype-notes {
    width: 34px;
    height: 32px;
    justify-content: center;
    padding: 0;
  }

  .prototype-notes span {
    display: none;
  }

  .prototype-link {
    padding: 6px 8px;
    font-size: 10px;
  }

  .auth-visual {
    display: none;
  }

  .auth-form-wrap {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: start;
    padding: 22px 18px 28px;
  }

  .auth-language {
    z-index: 2;
    top: 20px;
    right: 18px;
  }

  .mobile-brand {
    display: flex;
    justify-self: start;
    align-items: center;
    gap: 9px;
    margin-bottom: 38px;
    font-size: 16px;
    font-weight: 750;
  }

  .auth-form-card,
  .auth-form-card.compact {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-self: stretch;
  }

  .auth-form-wrap > .security-note {
    margin-top: auto;
    align-self: center;
  }

  .step-row {
    margin-bottom: 28px;
  }

  .step {
    font-size: 0;
  }

  .step b {
    font-size: 9px;
  }

  .field-pair {
    grid-template-columns: 1fr;
  }

  .verify-panel {
    padding: 22px 16px;
  }

  .verification-card {
    padding: 32px 20px;
  }

  .login-shell {
    display: block;
  }

  .login-brand-panel {
    min-height: 220px;
    padding: 28px 24px;
  }

  .login-brand-panel > div:nth-child(2) {
    margin-top: 45px;
  }

  .login-brand-panel h1 {
    font-size: 36px;
  }

  .login-brand-panel > div > p,
  .mini-usage {
    display: none;
  }

  .login-form-panel {
    padding: 34px 20px;
  }

  .sidebar {
    display: none;
  }

  .mobile-header {
    position: sticky;
    z-index: 20;
    top: var(--prototype-h);
    height: 57px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: rgb(249 251 250 / 92%);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
  }

  .mobile-header .brand-mark {
    width: 29px;
    height: 29px;
    border-radius: 8px;
  }

  .mobile-header .brand {
    font-size: 15px;
  }

  .app-page {
    width: calc(100% - 28px);
    padding: 25px 0 92px;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 25;
    inset: auto 0 0;
    height: 65px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 5px 8px 8px;
    background: rgb(255 255 255 / 94%);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(12px);
  }

  .mobile-bottom-nav button {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    color: #829095;
    background: none;
    border: 0;
    font-size: 8px;
  }

  .mobile-bottom-nav button svg {
    width: 17px;
    height: 17px;
  }

  .mobile-bottom-nav button.active {
    color: var(--blue);
  }

  .page-head {
    align-items: flex-start;
    margin-bottom: 22px;
  }

  .page-head h1 {
    font-size: 26px;
  }

  .page-head p {
    max-width: 240px;
    line-height: 1.45;
  }

  .page-head > .button {
    width: 38px;
    min-width: 38px;
    padding: 0;
    font-size: 0;
  }

  .page-head > .button svg {
    margin: 0;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .metric-card {
    min-height: 116px;
    padding: 15px;
  }

  .metric-card > strong {
    font-size: 21px;
  }

  .overview-grid,
  .account-balance-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 16px;
  }

  .allocation-legend {
    grid-template-columns: 1fr;
  }

  .panel-head {
    margin-bottom: 16px;
  }

  .table-wrap {
    margin-right: -16px;
    padding-right: 16px;
  }

  .keys-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .key-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 11px;
    padding: 14px;
  }

  .quota-summary {
    grid-column: 1 / -1;
  }

  .key-actions {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-content: flex-end;
  }

  .key-actions .button {
    flex: 1;
  }

  .key-identity p {
    flex-wrap: wrap;
  }

  .filter-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .filter-panel .search-box {
    grid-column: 1 / -1;
  }

  .summary-strip {
    grid-template-columns: 1fr 1fr;
  }

  .summary-strip > span:nth-child(2) {
    border-right: 0;
  }

  .summary-strip > span:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .balance-hero {
    min-height: 250px;
  }

  .key-detail-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .key-detail-head > div:nth-child(2) {
    width: calc(100% - 65px);
  }

  .detail-actions {
    width: 100%;
  }

  .detail-actions .button {
    flex: 1;
  }

  .key-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .service-picker {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 24px 18px;
    border-radius: 20px 20px 0 0;
  }

  .notes-drawer {
    padding: 28px 20px;
  }
}

@media (max-width: 430px) {
  .metric-grid,
  .key-metrics {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 102px;
  }

  .allocation-total {
    justify-content: space-between;
    gap: 12px;
  }

  .page-head .button.secondary {
    width: auto;
    padding: 0 10px;
    font-size: 9px;
  }

  .quota-stats {
    grid-template-columns: 1fr;
  }

  .quota-stats > span {
    border-right: 0;
    border-bottom: 1px solid #e0e7e5;
  }

  .quota-stats > span:last-child {
    border-bottom: 0;
  }
}

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

/* Production customer application additions. */
:root {
  --prototype-h: 0px !important;
}

.prototype-bar {
  display: none !important;
}

.is-busy {
  opacity: 0.72;
  pointer-events: none;
}

.empty-state {
  display: grid;
  min-height: 160px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  color: var(--ink-faint);
  text-align: center;
}

.empty-state > svg {
  width: 26px;
  height: 26px;
  color: var(--blue);
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.empty-state h3 {
  font-size: 15px;
}

.empty-state p {
  max-width: 420px;
  font-size: 11px;
  line-height: 1.6;
}

.compact-filter {
  min-height: auto;
  justify-content: space-between;
}

.filter-select {
  display: inline-flex;
  min-width: 220px;
  height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
}

.filter-select > svg {
  width: 15px;
  height: 15px;
  color: var(--ink-faint);
}

.filter-select select {
  flex: 1;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
}

.filter-summary {
  color: var(--ink-faint);
  font-size: 11px;
}

.button.danger-outline {
  color: var(--red);
  background: var(--surface);
  border-color: #efc9ca;
}

.button.danger-outline:hover {
  background: var(--red-soft);
}

.single-setup {
  grid-template-columns: minmax(0, 1fr);
}

.ledger-kind.invitation_credit,
.ledger-kind.adjustment {
  color: var(--violet);
  background: #f1efff;
}

.toast.error svg {
  color: #ff9b9d;
}

.toast.error {
  border-color: rgb(206 79 81 / 35%);
}

@media (max-width: 760px) {
  .compact-filter {
    align-items: stretch;
  }

  .filter-select {
    width: 100%;
  }
}
