@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap");
@import url("../site/uniroute-theme.css");

/* 控制台布局（登录后应用壳） */
.console-shell {
  flex: 1;
  width: 100%;
  max-width: var(--ur-app-max-width);
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2rem) 1.5rem 4rem;
}

.auth-shell {
  max-width: 1120px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(360px, 0.9fr);
  gap: clamp(1.25rem, 3vw, 1.9rem);
  align-items: stretch;
}

.auth-layout > * {
  min-width: 0;
}

.console-stage,
.auth-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 0;
}

.console-stage-copy,
.auth-stage-copy {
  padding: 0.15rem 0;
}

.console-app-head {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 1.2rem;
  align-items: end;
  margin-bottom: 1.1rem;
  padding: 1.35rem 1.45rem 1.15rem;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--ur-border) 74%, rgba(255, 255, 255, 0.1) 26%);
  background: linear-gradient(145deg, rgba(19, 34, 59, 0.78) 0%, rgba(13, 24, 44, 0.88) 100%);
  box-shadow: 0 18px 42px rgba(4, 9, 18, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.console-app-head-main {
  min-width: 0;
}
.console-app-head-main .console-sub {
  margin-bottom: 0;
  max-width: 58ch;
}
.console-app-head-side {
  display: grid;
  gap: 0.8rem;
  justify-items: end;
}
.console-app-identity {
  display: grid;
  justify-items: end;
  gap: 0.18rem;
  min-width: min(100%, 360px);
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--ur-border) 70%, rgba(255, 255, 255, 0.12) 30%);
  background: rgba(255, 255, 255, 0.04);
  text-align: right;
}
.console-app-identity-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ur-muted);
}
.console-app-identity strong {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ur-text);
  word-break: break-word;
}
.console-app-identity .hint {
  margin: 0;
  color: var(--ur-text-secondary);
}
.console-app-identity select {
  margin-left: 0;
  margin-top: 0.15rem;
}
.console-app-actions {
  display: flex;
  justify-content: flex-end;
}
.console-stage-kicker {
  margin: 0 0 0.45rem;
  color: var(--ur-accent-bright);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.console-stage-points,
.auth-stage-side {
  display: grid;
  gap: 0.7rem;
}

.console-stage-points article,
.auth-stage-side article {
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--ur-border) 74%, rgba(255, 255, 255, 0.1) 26%);
  background: linear-gradient(160deg, rgba(20, 34, 59, 0.84) 0%, rgba(12, 24, 43, 0.88) 100%);
  box-shadow: 0 10px 28px rgba(4, 9, 18, 0.22);
}

.console-stage-points strong,
.auth-stage-side strong {
  display: block;
  color: var(--ur-text);
  font-size: 0.92rem;
}

.console-stage-points span,
.auth-stage-side span {
  display: block;
  margin-top: 0.28rem;
  color: var(--ur-text-secondary);
  font-size: 0.82rem;
  line-height: 1.55;
}

.console-auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.auth-inline-card {
  min-height: 100%;
}

.auth-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 0.95rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(223, 229, 238, 0.72);
}

.auth-card-head-main {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 0.12rem;
}

.auth-card-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.auth-card-head h2 {
  margin: 0;
}

body.auth-page {
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #111111;
  background:
    radial-gradient(1100px 560px at 4% -6%, rgba(29, 78, 216, 0.16), transparent 62%),
    radial-gradient(860px 520px at 92% 12%, rgba(14, 165, 233, 0.11), transparent 60%),
    linear-gradient(135deg, #eef3fb 0%, #f6f8fc 42%, #ffffff 100%);
}

body.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(37, 99, 235, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.035) 1px, transparent 1px),
    radial-gradient(900px 420px at 86% -8%, rgba(37, 99, 235, 0.08), transparent 62%);
  background-size: 28px 28px, 28px 28px, auto;
  opacity: 0.55;
}

body.auth-page::after {
  content: "";
  position: fixed;
  inset: auto 0 0 auto;
  width: min(42vw, 640px);
  height: min(42vw, 640px);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(10px);
  pointer-events: none;
}

body.auth-page .top {
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-height: 56px;
  padding: 0 max(1rem, calc((100% - var(--pub-shell-width, 1120px)) / 2));
  width: auto;
  margin: 0;
  border-bottom: 1px solid #e3e9f4;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.auth-top-nav {
  display: flex;
  gap: 0.15rem;
  flex-wrap: wrap;
  align-items: center;
}

body.auth-page .top .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  background: none;
  color: #111111;
  -webkit-text-fill-color: currentColor;
}

body.auth-page .top .brand > span {
  display: none;
}

body.auth-page .top .brand-logo {
  width: 112px;
  height: 26px;
  object-fit: contain;
}

body.auth-page .top .nav a {
  color: var(--pub-text-secondary, #555555);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
}

body.auth-page .top .nav a:hover {
  color: var(--pub-text, #111111);
  background: var(--pub-bg-subtle, #fafafa);
  text-decoration: none;
}

body.auth-page .top .nav .lang-switch {
  display: inline-flex;
  gap: 0.25rem;
  margin-left: 0.75rem;
}

body.auth-page .top .nav .lang-switch button {
  padding: 0.2em 0.5em;
  font-size: 0.8rem;
  margin: 0;
  border-radius: 4px;
  border: 1px solid var(--pub-border, #e5e7eb);
  background: transparent;
  color: var(--pub-text-secondary, #6b7280);
  cursor: pointer;
  box-shadow: none;
}

body.auth-page .top .nav .lang-switch button:hover {
  color: var(--pub-accent, #2563eb);
  border-color: var(--pub-accent, #2563eb);
  background: transparent;
}

body.auth-page .console-stage-kicker {
  color: #2563eb;
}

body.auth-page .console-hero-title {
  background: none;
  color: #111111;
  -webkit-text-fill-color: currentColor;
}

body.auth-page .console-sub,
body.auth-page .hint,
body.auth-page .auth-stage-side span {
  color: #555555;
}

body.auth-page .auth-stage-side article {
  border: 1px solid #e7edf9;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 249, 255, 0.98) 100%);
  box-shadow: 0 18px 36px rgba(30, 41, 59, 0.06);
}

body.auth-page .auth-stage-side strong,
body.auth-page .auth-card-head h2 {
  color: #111111;
}

body.auth-page .auth-card {
  max-width: 100%;
  position: relative;
  overflow: hidden;
  padding: 1.55rem 1.55rem 1.35rem;
  border-radius: 24px;
  border: 1px solid rgba(225, 231, 240, 0.9);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(255, 255, 255, 0.96) 100%);
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

body.auth-page .auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 84px;
  background: linear-gradient(180deg, rgba(246, 249, 253, 0.72), rgba(246, 249, 253, 0));
  pointer-events: none;
}

body.auth-page .auth-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

body.auth-page label {
  color: #6b7280;
}

body.auth-page input {
  min-height: 38px;
  border-color: #dbe4f3;
  background: rgba(255, 255, 255, 0.78);
  color: #111111;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body.auth-page input:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: rgba(255, 255, 255, 0.96);
}

body.auth-page input:-webkit-autofill,
body.auth-page input:-webkit-autofill:hover,
body.auth-page input:-webkit-autofill:focus {
  -webkit-text-fill-color: #111111;
  -webkit-box-shadow: 0 0 0 1000px #fbfcff inset;
}

body.auth-page .captcha-image {
  border-radius: 10px;
  border: 1px solid #dbe4f3;
  background: #f8fbff;
}

body.auth-page button.ghost {
  background: rgba(255, 255, 255, 0.78);
  border-color: #dbe4f3;
  color: #274276;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

body.auth-page button.ghost:hover {
  background: rgba(255, 255, 255, 0.96);
  border-color: #c9d8f3;
}

body.auth-page button:not(.ghost):not(.danger):not(.tab) {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #2563eb;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.22);
}

body.auth-page .err {
  color: #dc2626;
}

body.auth-page .ok {
  color: #0f766e;
}

/* 认证页：更聚焦的窄版布局，避免过宽导致松散 */
body.auth-page .console-shell {
  max-width: 1120px;
  padding-top: clamp(1.5rem, 3vw, 2.35rem);
}

body.auth-page .console-sub {
  margin-bottom: 0;
}

body.auth-page .auth-card {
  max-width: 100%;
  margin: 0;
}

.console-hero-title {
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  background: linear-gradient(180deg, #fff 20%, var(--ur-text-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.auth-hero-title {
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  max-width: 9ch;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.console-sub {
  color: var(--ur-text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.75rem;
  max-width: 56ch;
  line-height: 1.6;
}

.auth-stage-wide {
  position: relative;
  min-height: min(700px, calc(100vh - 168px));
  padding: clamp(0.8rem, 2vw, 1.8rem) clamp(0.9rem, 2vw, 1.4rem);
  align-content: center;
  overflow: hidden;
}

.auth-stage-wide::before {
  content: "";
  position: absolute;
  inset: 4% 6% 8% 0;
  border-radius: 32px;
  background:
    radial-gradient(420px 220px at 18% 18%, rgba(255, 255, 255, 0.72), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(242, 246, 252, 0.58));
  border: 1px solid rgba(221, 229, 242, 0.95);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.66);
  opacity: 1;
  pointer-events: none;
}

.auth-stage-copy,
.auth-capability-strip,
.auth-stage-signature {
  position: relative;
  z-index: 1;
  max-width: 100%;
  min-width: 0;
}

.auth-stage-copy {
  max-width: 30rem;
}

.auth-stage-lead {
  max-width: 46ch;
  font-size: 1.04rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.auth-stage-support {
  margin: 1rem 0 0;
  color: #6b7a92;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
}

.auth-capability-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.15rem;
}

.auth-capability-strip span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 38px;
  padding: 0.5rem 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.62);
  color: #23406e;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.auth-stage-signature {
  display: grid;
  gap: 0.45rem;
  margin-top: 1.2rem;
  max-width: 28rem;
}

.auth-stage-signature strong {
  color: #13213d;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.auth-stage-signature span {
  color: #61728c;
  font-size: 0.9rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.auth-form-kicker {
  margin: 0;
  color: #8090a6;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.auth-form-section {
  position: relative;
  z-index: 1;
  margin-top: 0.82rem;
  padding: 0.9rem 0.92rem 0.95rem;
  border-radius: 18px;
  background: rgba(248, 250, 253, 0.84);
  border: 1px solid rgba(221, 228, 238, 0.82);
}

.auth-form-section-inline {
  padding-bottom: 0.82rem;
}

.auth-footnote {
  position: relative;
  z-index: 1;
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(227, 232, 240, 0.72);
}

.auth-mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, auto);
  gap: 0;
  margin-bottom: 0;
  padding: 0.16rem;
  border-radius: 999px;
  border: 1px solid rgba(228, 233, 241, 0.48);
  background: rgba(247, 249, 252, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  width: auto;
  justify-self: start;
}

body.auth-page .auth-mode-switch .auth-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin: 0;
  min-width: 84px;
  padding: 0.3rem 0.66rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #7d8ca0;
  box-shadow: none;
  transform: none;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

body.auth-page .auth-mode-switch .auth-mode-btn:hover {
  border-color: transparent;
  background: transparent;
  color: #5c6d84;
}

body.auth-page .auth-mode-switch .auth-mode-btn.active {
  border-color: rgba(226, 231, 238, 0.28);
  background: rgba(255, 255, 255, 0.88);
  color: #344255;
  box-shadow: none;
}

.auth-mode-btn strong {
  font-size: 0.74rem;
  letter-spacing: 0.01em;
  font-weight: 500;
}

body.auth-page .auth-mode-switch .auth-mode-btn.active strong {
  font-weight: 650;
}

.auth-card-head .hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #728197;
}

body.auth-page .auth-card-head h2 {
  font-size: 1.22rem;
  line-height: 1.08;
}

body.auth-page .oauth-buttons {
  margin-top: 0;
  margin-bottom: 0;
}

.auth-oauth-dock {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(227, 232, 240, 0.72);
}

.auth-oauth-label {
  margin: 0 0 0.7rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8190a3;
}

.auth-oauth-hint {
  margin-top: 0.7rem;
}

.auth-inline-action {
  gap: 0.6rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.auth-action {
  width: 100%;
  min-height: 48px;
  justify-content: center;
}

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ur-muted);
  margin: 0.65rem 0 0.35rem;
}

input {
  font: inherit;
  padding: 0.65rem 0.85rem;
  border-radius: var(--ur-radius-sm);
  border: 1px solid color-mix(in srgb, var(--ur-border) 70%, rgba(255, 255, 255, 0.14) 30%);
  background: rgba(3, 12, 26, 0.84);
  color: var(--ur-text);
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
input:focus {
  outline: none;
  border-color: rgba(91, 156, 248, 0.7);
  box-shadow: 0 0 0 3px rgba(91, 156, 248, 0.16);
  background: rgba(4, 16, 34, 0.95);
}
input.invalid {
  border-color: rgba(248, 113, 113, 0.85);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.14);
}

/* 修复浏览器自动填充导致输入框发白 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ur-text);
  -webkit-box-shadow: 0 0 0 1000px rgba(3, 12, 26, 0.92) inset;
  transition: background-color 9999s ease-in-out 0s;
}

button {
  font: inherit;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--ur-border-strong);
  background: var(--ur-elevated);
  color: var(--ur-text);
  cursor: pointer;
  margin-top: 0.65rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
button:hover {
  transform: translateY(-1px);
  border-color: rgba(126, 182, 255, 0.4);
  box-shadow: var(--ur-shadow-soft);
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
button.danger,
table button.danger {
  margin-top: 0;
  padding: 0.4rem 0.85rem;
  font-size: 0.8125rem;
  background: rgba(127, 29, 29, 0.45);
  border-color: rgba(248, 113, 113, 0.35);
  box-shadow: none;
}
button.danger:hover {
  background: rgba(127, 29, 29, 0.55);
}
button.ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: color-mix(in srgb, var(--ur-border) 70%, rgba(255, 255, 255, 0.12) 30%);
}
button:not(.ghost):not(.danger):not(.tab) {
  background: linear-gradient(135deg, #3d7eea 0%, #2563eb 50%, #4f46e5 100%);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: 0 4px 20px var(--ur-glow);
}

/* 认证页语言切换按钮：与公开站保持一致，不走主按钮蓝色渐变 */
body.auth-page .top .nav .lang-switch button,
body.auth-page .top .nav .lang-switch button:not(.ghost):not(.danger):not(.tab) {
  padding: 0.2em 0.5em;
  font-size: 0.8rem;
  font-weight: 400;
  margin: 0;
  border-radius: 4px;
  cursor: pointer;
  color: var(--pub-text-secondary, #6b7280);
  border: 1px solid var(--pub-border, #e5e7eb);
  background: transparent;
  box-shadow: none;
  transform: none;
}

body.auth-page .top .nav .lang-switch button:hover,
body.auth-page .top .nav .lang-switch button:not(.ghost):not(.danger):not(.tab):hover {
  color: var(--pub-accent, #2563eb);
  border-color: var(--pub-accent, #2563eb);
  background: transparent;
  box-shadow: none;
}

.row {
  display: flex;
  gap: 1.15rem;
  flex-wrap: wrap;
}
.row > * {
  flex: 1;
  min-width: 170px;
}

/* 认证页行内操作按钮不再拉伸过长 */
.row.row-cta > .ghost,
.row.row-cta > button {
  flex: 0 0 auto;
  min-width: 170px;
  width: auto;
  margin-top: 0;
}

/* 登录页图形验证码区域：让左右视觉比例更平衡 */
body.auth-page .captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
}

body.auth-page .captcha-row .captcha-image {
  width: 100%;
  max-width: 220px;
  justify-self: stretch;
  min-width: 128px;
  height: 42px;
}

body.auth-page .captcha-row .captcha-refresh {
  min-width: 96px;
  padding-inline: 0.9rem;
}

@media (max-width: 640px) {
  body.auth-page .captcha-row {
    grid-template-columns: 1fr;
  }

  body.auth-page .captcha-row .captcha-image {
    max-width: 100%;
  }

  body.auth-page .captcha-row .captcha-refresh {
    justify-self: end;
  }
}

/* 亮色主题对比度修复：确保文本和卡片可读 */
html.console-light body::before {
  background:
    radial-gradient(920px 420px at 88% -12%, rgba(59, 130, 246, 0.12), transparent 58%),
    radial-gradient(860px 420px at -10% -4%, rgba(14, 165, 233, 0.08), transparent 60%);
}

html.console-light .console-top {
  background: rgba(255, 255, 255, 0.82);
  border-bottom-color: rgba(30, 58, 138, 0.14);
}

html.console-light .console-top .brand {
  background: linear-gradient(135deg, #0f172a 0%, #2563eb 65%, #1d4ed8 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

html.console-light .console-top a.back,
html.console-light .console-top .wb-theme-btn,
html.console-light .console-nav .lang-switch button {
  color: #334155;
  border-color: rgba(30, 58, 138, 0.18);
  background: rgba(255, 255, 255, 0.76);
}

html.console-light .console-top a.back:hover,
html.console-light .console-top .wb-theme-btn:hover,
html.console-light .console-nav .lang-switch button:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.96);
}

html.console-light .console-account-bar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

html.console-light .console-app-head {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 248, 254, 0.96) 100%);
  border-color: rgba(30, 58, 138, 0.12);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.06);
}

html.console-light .console-app-identity {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(30, 58, 138, 0.12);
}

html.console-light .console-app-identity-label {
  color: #64748b;
}

html.console-light .console-app-identity strong {
  color: #0f172a;
}

html.console-light .console-app-identity .hint {
  color: #475569;
}

html.console-light .console-account-bar strong,
html.console-light .console-account-bar .hint {
  color: #1e293b;
}

html.console-light .console-tabs {
  background: transparent;
  border-color: transparent;
}

html.console-light .tabs button {
  color: #334155;
}

html.console-light .tabs button:hover {
  color: #0f172a;
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.12);
}

html.console-light .tabs button.active {
  background: rgba(37, 99, 235, 0.1);
  color: #0f172a;
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

html.console-light .tabs button small {
  color: #64748b;
}

html.console-light .workspace-nav-meta {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(30, 58, 138, 0.12);
}

html.console-light .workspace-nav-kicker {
  color: #2563eb;
}

html.console-light .workspace-nav-meta strong {
  color: #0f172a;
}

html.console-light .workspace-nav-meta p,
html.console-light .summary-card-note,
html.console-light .summary-card-eyebrow,
html.console-light .summary-chip em {
  color: #64748b;
}

html.console-light .summary-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 255, 0.96) 100%);
  border-color: rgba(30, 58, 138, 0.14);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

html.console-light .summary-card-badge,
html.console-light .summary-chip {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.12);
  color: #1e3a8a;
}

html.console-light .summary-card-value,
html.console-light .summary-chip strong {
  color: #0f172a;
}

html.console-light .card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.97) 100%);
  border-color: rgba(30, 58, 138, 0.16);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

html.console-light .console-stage-points article,
html.console-light .auth-stage-side article {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 255, 0.96) 100%);
  border-color: rgba(30, 58, 138, 0.14);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

html.console-light .console-stage-points strong,
html.console-light .auth-stage-side strong,
html.console-light .auth-card-head h2 {
  color: #0f172a;
}

html.console-light .console-stage-points span,
html.console-light .auth-stage-side span {
  color: #475569;
}

html.console-light .auth-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 255, 0.97) 100%);
  border-color: rgba(30, 58, 138, 0.16);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

html.console-light .card h2,
html.console-light .card p,
html.console-light .hint,
html.console-light label,
html.console-light th,
html.console-light td {
  color: #334155;
}

html.console-light .dash-card-usage .metric-line {
  border-bottom-color: rgba(30, 58, 138, 0.16);
}

html.console-light .dash-card-usage .metric-line strong,
html.console-light .stat {
  color: #1d4ed8;
  -webkit-text-fill-color: initial;
  background: none;
}

html.console-light input,
html.console-light select,
html.console-light textarea {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  border-color: rgba(30, 58, 138, 0.2);
}

html.console-light button {
  color: #0f172a;
}

html.console-light button.ghost {
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  border-color: rgba(30, 58, 138, 0.18);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

html.console-light button.ghost:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(30, 58, 138, 0.28);
}

html.console-light input:focus,
html.console-light select:focus,
html.console-light textarea:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

html.console-light pre.key-once {
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.98) 0%, rgba(226, 232, 240, 0.98) 100%);
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.35);
}

html.console-light .chart {
  border-top-color: rgba(30, 58, 138, 0.14);
}

html.console-light .chart .bar {
  background: linear-gradient(180deg, #60a5fa, #3b82f6, #2563eb);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.22);
}

body.auth-page #btnLoginPassword,
body.auth-page #btnLoginOtp,
body.auth-page #btnRegister,
body.auth-page #btnForgot,
body.auth-page #btnReset {
  min-width: 94px;
  padding-inline: 1.2rem;
}

.err {
  color: #f87171;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}
.ok {
  color: #4ade80;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

header.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding: 1rem 1.25rem;
  border-radius: var(--ur-radius);
  border: 1px solid var(--ur-border);
  background: rgba(255, 255, 255, 0.03);
}

.tabs {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  width: auto;
  max-width: 100%;
}
.tabs button {
  margin: 0;
  min-width: 118px;
  padding: 0.72rem 0.86rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ur-text-secondary);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.16rem;
}
.tabs button span {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.tabs button small {
  font-size: 0.72rem;
  color: var(--ur-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tabs button:hover {
  color: var(--ur-text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  transform: none;
}
.tabs button.active {
  background: rgba(70, 126, 232, 0.1);
  color: var(--ur-text);
  border-color: rgba(91, 156, 248, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  border-radius: var(--ur-radius-sm);
  overflow: hidden;
}
th,
td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--ur-border);
}
thead th {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ur-muted);
  background: rgba(255, 255, 255, 0.03);
}
tbody tr:hover {
  background: rgba(91, 156, 248, 0.05);
}

.stat {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--ur-accent-bright), var(--ur-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hint {
  font-size: 0.8125rem;
  color: var(--ur-muted);
  margin-top: 0.4rem;
  line-height: 1.5;
}
.hint.warn {
  color: #fca5a5;
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 160px;
  margin-top: 1rem;
  padding: 1rem 0.5rem 0;
  border-top: 1px solid var(--ur-border);
}
.chart .col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.chart .bar {
  width: 100%;
  max-width: 16px;
  background: linear-gradient(180deg, var(--ur-accent-bright), #2563eb, var(--ur-violet));
  border-radius: 6px 6px 2px 2px;
  min-height: 3px;
  box-shadow: 0 0 20px rgba(91, 156, 248, 0.15);
}
.chart .lbl {
  font-size: 0.65rem;
  color: var(--ur-muted);
  transform: rotate(-42deg);
  white-space: nowrap;
}

pre.key-once {
  background: rgba(5, 8, 14, 0.75);
  padding: 1rem;
  border-radius: var(--ur-radius-sm);
  overflow: auto;
  border: 1px solid var(--ur-border);
  font-family: var(--ur-mono);
  font-size: 0.8125rem;
  color: #e2e8f0;
  margin: 0;
  flex: 1;
}

.key-once-wrap {
  display: grid;
  gap: 0.65rem;
}

.key-once-actions {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.key-copy-btn {
  margin-top: 0;
  align-self: flex-start;
  white-space: nowrap;
}

.mono {
  font-family: var(--ur-mono);
  font-size: 0.8125rem;
  word-break: break-all;
}

/* 顶栏：与公开站一致 */
.console-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 2rem;
  max-width: var(--ur-app-max-width);
  margin: 0 auto;
  width: 100%;
  border-bottom: 1px solid var(--ur-border);
  background: rgba(8, 12, 20, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.console-top .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, var(--ur-accent-bright) 55%, var(--ur-violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.console-top .brand-logo {
  width: 112px;
  height: 26px;
  object-fit: contain;
}

.console-top .brand > span {
  display: none;
}
.console-top a.back {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ur-text-secondary);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--ur-border);
}
.console-top a.back:hover {
  color: var(--ur-text);
  background: rgba(255, 255, 255, 0.06);
}

.console-nav {
  display: flex;
  gap: 0.2rem;
  flex-wrap: wrap;
  align-items: center;
}
.console-nav .lang-switch {
  display: inline-flex;
  gap: 0.25rem;
  margin-left: 0.5rem;
}
.console-nav .lang-switch button {
  padding: 0.2em 0.5em;
  font-size: 0.8rem;
  margin: 0;
  border-radius: 4px;
  border: 1px solid var(--ur-border);
  background: transparent;
  color: var(--ur-text-secondary);
}
.console-nav .lang-switch button:hover {
  color: var(--ur-text);
}

header.bar select {
  font: inherit;
  padding: 0.35rem 0.6rem;
  border-radius: var(--ur-radius-sm);
  border: 1px solid var(--ur-border);
  background: var(--ur-elevated);
  color: var(--ur-text);
  margin-left: 0.5rem;
  max-width: 200px;
}

header.bar strong {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ur-text);
}

.card p {
  color: var(--ur-text-secondary);
  margin: 0.35rem 0;
  font-size: 0.9rem;
}
.card p strong {
  color: var(--ur-text);
}

/* 告警横幅 */
.alert-banner {
  padding: 0.75rem 1rem;
  border-radius: var(--ur-radius-sm);
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fcd34d;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.85rem 1.5rem;
  background: var(--ur-elevated);
  border: 1px solid var(--ur-border);
  border-radius: 999px;
  box-shadow: var(--ur-shadow);
  z-index: 100;
  font-size: 0.9rem;
}

/* 首次登录引导 */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.onboarding-modal {
  background: var(--ur-panel);
  border: 1px solid var(--ur-border);
  border-radius: var(--ur-radius);
  padding: 1.5rem 2rem;
  max-width: 420px;
}
.onboarding-modal h3 { margin-top: 0; }
.onboarding-steps { margin: 1rem 0; font-size: 0.9rem; color: var(--ur-text-secondary); }
.onboarding-steps p { margin: 0.4rem 0; }

/* OAuth 登录按钮 */
.oauth-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.oauth-buttons .oauth-btn {
  margin-top: 0;
}

.oauth-buttons-brands {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.oauth-brand-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 88px;
  padding: 0.95rem 0.75rem 0.85rem;
  border-radius: 18px;
  border: 1px solid rgba(220, 228, 239, 0.9);
  background: rgba(250, 252, 255, 0.82);
  color: #425267;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.oauth-brand-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(187, 200, 221, 0.92);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

.oauth-brand-btn.is-disabled,
.oauth-brand-btn[aria-disabled="true"] {
  opacity: 0.58;
  cursor: not-allowed;
  box-shadow: none;
}

.oauth-brand-btn.is-disabled:hover,
.oauth-brand-btn[aria-disabled="true"]:hover {
  transform: none;
  border-color: rgba(220, 228, 239, 0.9);
  background: rgba(250, 252, 255, 0.82);
  box-shadow: none;
}

.oauth-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.oauth-brand-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.oauth-brand-name {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.oauth-brand-wechat .oauth-brand-icon {
  color: #18b35b;
  background: rgba(24, 179, 91, 0.1);
}

.oauth-brand-feishu .oauth-brand-icon {
  color: #1677ff;
  background: rgba(22, 119, 255, 0.1);
}

.oauth-brand-dingtalk .oauth-brand-icon {
  color: #2468f2;
  background: rgba(36, 104, 242, 0.1);
}

/* 主题切换按钮 */
.wb-theme-btn {
  padding: 0.35rem 0.6rem;
  font-size: 1rem;
  border: 1px solid var(--ur-border);
  border-radius: var(--ur-radius-sm);
  background: transparent;
  color: var(--ur-text-secondary);
  cursor: pointer;
  margin: 0;
}
.wb-theme-btn:hover { color: var(--ur-text); }

/* 模型收藏按钮 */
.fav-btn {
  padding: 0.2rem 0.4rem;
  font-size: 1rem;
  border: none;
  background: transparent;
  color: var(--ur-muted);
  cursor: pointer;
  margin: 0;
}
.fav-btn:hover { color: var(--ur-accent-bright); }
.fav-btn[data-fav="1"] { color: #fcd34d; }

/* 浅色主题 */
html.console-light {
  --ur-bg-deep: #f1f5f9;
  --ur-bg: #f8fafc;
  --ur-elevated: rgba(255, 255, 255, 0.9);
  --ur-panel: rgba(255, 255, 255, 0.95);
  --ur-border: rgba(30, 58, 138, 0.2);
  --ur-border-strong: rgba(30, 58, 138, 0.35);
  --ur-text: #0f172a;
  --ur-text-secondary: #475569;
  --ur-muted: #64748b;
}
html.console-light body {
  background-image: linear-gradient(180deg, var(--ur-bg) 0%, var(--ur-bg-deep) 100%);
}
html.console-light .console-hero-title {
  background: linear-gradient(180deg, #0f172a 20%, #475569 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* -------- Console Product Polish -------- */
.console-shell {
  max-width: var(--ur-app-max-width);
  padding: clamp(1.35rem, 3vw, 2.1rem) 1.25rem 4rem;
}

body {
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1000px 500px at 88% -12%, rgba(63, 100, 255, 0.2), transparent 55%),
    radial-gradient(900px 460px at -12% 0%, rgba(0, 196, 255, 0.13), transparent 58%);
  z-index: -1;
}

.console-top {
  position: sticky;
  top: 0;
  z-index: 20;
}

.console-top .wb-theme-btn {
  border-radius: 10px;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.console-account-bar {
  padding: 1rem 1.1rem;
  border-color: color-mix(in srgb, var(--ur-border) 72%, rgba(84, 159, 255, 0.25) 28%);
  background: linear-gradient(100deg, rgba(18, 31, 55, 0.76) 0%, rgba(13, 24, 44, 0.8) 100%);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.console-account-bar > div {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.console-account-bar strong::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  margin-right: 0.45rem;
  display: inline-block;
  vertical-align: 0.05em;
  background: linear-gradient(180deg, #5eead4, #38bdf8);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.console-tabs {
  margin-bottom: 0;
  position: sticky;
  top: 0.45rem;
  z-index: 8;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.workspace-nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.workspace-nav-meta {
  display: grid;
  gap: 0.22rem;
  min-width: 220px;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--ur-border) 78%, rgba(255, 255, 255, 0.08) 22%);
  background: linear-gradient(135deg, rgba(14, 27, 48, 0.78) 0%, rgba(10, 21, 38, 0.88) 100%);
}

.workspace-nav-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.workspace-nav-meta strong {
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.workspace-nav-meta p {
  margin: 0;
  color: var(--ur-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.summary-layout {
  margin-bottom: 1.15rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.summary-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.15rem 1.1rem;
}

.summary-card-balance {
  position: relative;
  overflow: hidden;
}

.summary-card-balance::after {
  content: "";
  position: absolute;
  right: -72px;
  top: -72px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(93, 147, 255, 0.2) 0%, transparent 66%);
  pointer-events: none;
}

.summary-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.summary-card-head h2 {
  margin: 0.16rem 0 0;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}

.summary-card-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ur-muted);
}

.summary-card-badge {
  padding: 0.34rem 0.56rem;
  border-radius: 999px;
  border: 1px solid rgba(91, 156, 248, 0.16);
  background: rgba(70, 126, 232, 0.1);
  color: #bfdbfe;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-card-value {
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f8fbff;
}

.summary-card-note {
  margin: -0.15rem 0 0;
  min-height: 2.6em;
  color: var(--ur-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.summary-card-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem;
}

.summary-card-actions > div {
  display: grid;
  gap: 0.28rem;
}

.summary-card-chips {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.summary-chip {
  min-width: 108px;
  padding: 0.6rem 0.72rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 0.18rem;
}

.summary-chip em {
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ur-muted);
}

.summary-chip strong {
  font-size: 0.94rem;
  color: #e4f1ff;
}

.summary-qr-wrap {
  margin-top: 0.2rem;
}

.summary-qr-wrap p {
  margin: 0 0 0.45rem;
}

.card {
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--ur-border) 74%, rgba(255, 255, 255, 0.1) 26%);
  background: linear-gradient(170deg, rgba(19, 34, 59, 0.8) 0%, rgba(14, 27, 48, 0.88) 100%);
  box-shadow: 0 8px 30px rgba(4, 9, 18, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  padding: 1.15rem 1.1rem;
}

.card h2 {
  margin: 0 0 0.55rem;
  font-size: 0.94rem;
  letter-spacing: 0.04em;
}

.dash-card {
  min-height: 184px;
}

.dash-card-wallet {
  position: relative;
  overflow: hidden;
}

.dash-card-wallet::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(93, 147, 255, 0.2) 0%, transparent 65%);
  pointer-events: none;
}

.dash-card-usage .metric-line {
  margin: 0;
  padding: 0.42rem 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.dash-card-usage .metric-line:last-child {
  border-bottom: none;
}

.dash-card-usage .metric-line strong {
  color: #e4f1ff;
  font-family: var(--ur-mono);
  font-size: 0.95rem;
}

.dash-chart-card {
  margin-top: 0.25rem;
}

.dash-chart-card .chart {
  min-height: 170px;
}

.foot {
  margin-top: 2.2rem;
  padding: 1rem 0 1.6rem;
  text-align: center;
  color: var(--ur-muted);
  font-size: 0.78rem;
  border-top: 1px solid color-mix(in srgb, var(--ur-border) 78%, rgba(255, 255, 255, 0.08) 22%);
  max-width: var(--ur-app-max-width);
  margin-left: auto;
  margin-right: auto;
}

.foot a {
  color: var(--ur-text-secondary);
}

@media (max-width: 640px) {
  .console-shell {
    padding: 1rem 0.85rem 2.4rem;
  }

  .console-stage,
  .auth-stage,
  .console-auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .console-app-head {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 1rem;
  }

  .console-app-head-side,
  .console-app-identity,
  .console-app-actions {
    justify-items: stretch;
  }

  .console-app-identity {
    min-width: 0;
    justify-items: start;
    text-align: left;
  }

  .console-app-actions {
    justify-content: flex-start;
  }

  .auth-hero-title {
    font-size: clamp(2rem, 11vw, 2.8rem);
    max-width: none;
  }

  .auth-stage-wide {
    min-height: auto;
    padding: 0.2rem 0 0;
  }

  .auth-stage-wide::before {
    inset: 0;
    border-radius: 28px;
  }

  .auth-card {
    padding: 1.45rem 1rem 1.15rem;
  }

  .auth-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-card-head-actions {
    justify-content: flex-start;
  }

  .auth-form-section {
    padding: 0.85rem 0.8rem 0.9rem;
  }

  .auth-capability-strip {
    gap: 0.55rem;
  }

  .auth-capability-strip span {
    width: 100%;
    justify-content: center;
  }

  .auth-top-nav {
    width: 100%;
    gap: 0.2rem;
  }

  body.auth-page .top .nav .lang-switch {
    margin-left: 0;
  }

  body.auth-page .top {
    padding: 0.7rem 0.85rem;
  }

  body.auth-page .top .nav a {
    padding: 0.42rem 0.72rem;
  }

  .console-top .wb-theme-btn {
    height: 2rem;
    min-width: 2rem;
  }

  .console-tabs {
    top: 0.3rem;
  }

  .workspace-nav-shell {
    flex-direction: column;
    align-items: stretch;
  }

  .workspace-nav-meta {
    min-width: 0;
  }

  .tabs button {
    min-width: calc(50% - 0.3rem);
    flex: 1 1 140px;
  }

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

  .summary-card {
    min-height: 0;
  }

  .summary-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-card-actions > div,
  .summary-card-actions button,
  .summary-card-actions select,
  .summary-card-actions input {
    width: 100%;
    max-width: none;
  }

  .key-once-actions {
    flex-direction: column;
  }

  .key-copy-btn {
    width: 100%;
  }

  .dash-card {
    min-height: 0;
  }

  .dash-card-usage .metric-line {
    font-size: 0.84rem;
  }

  .foot {
    margin-top: 1.4rem;
    padding-top: 0.9rem;
  }
}
