/* Production console styles. */

html,
body {
  min-height: 100%;
}

body.console-mode {
  height: 100%;
  overflow: hidden;
}

body.network-busy::after {
  content: "";
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 28%;
  height: 2px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-hi));
  box-shadow: 0 0 12px rgb(var(--accent-rgb) / 0.5);
  animation: network-progress 1s var(--ease) infinite;
  pointer-events: none;
}

@keyframes network-progress {
  from { transform: translateX(-110%); }
  to { transform: translateX(470%); }
}

/* Login shell */

#shell.auth-layout {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 570px);
  gap: clamp(48px, 3.2vw, 68px);
  align-items: start;
  padding: clamp(56px, 10vh, 88px) clamp(32px, 3.5vw, 72px) 0;
  min-height: 100dvh;
}

.brand.auth-hero .brand-mark {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 18px;
  box-shadow: 0 12px 26px -14px rgb(var(--accent-rgb) / 0.8);
}

.brand.auth-hero {
  width: 100%;
  max-width: 760px;
  padding-top: clamp(8px, 1.2vh, 14px);
  justify-self: start;
}

.auth-hero h1 {
  font-size: clamp(34px, 3.4vw, 46px);
  margin-bottom: 16px;
}

.auth-hero p {
  max-width: 48ch;
  font-size: 15px;
  line-height: 1.7;
}

.auth-hero-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 30px;
  padding-top: 16px;
  border-top: var(--hair) solid rgb(var(--accent-rgb) / 0.2);
}

.auth-hero-detail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.auth-detail-index {
  color: var(--brand-pink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: var(--w-bold);
  letter-spacing: 0.08em;
}

.auth-hero-detail strong {
  color: var(--text);
  font-size: 14px;
  font-weight: var(--w-semibold);
}

.auth-hero-detail > span:last-child {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-panel {
  width: 100%;
}

#shell.auth-layout .auth-card {
  width: 100%;
  max-width: 570px;
  justify-self: stretch;
  margin-top: 0;
  padding: 28px 38px;
}

#auth {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#auth input,
#auth select,
#auth textarea {
  width: 100%;
}

#auth input::placeholder,
#auth textarea::placeholder {
  color: var(--muted);
  opacity: 0.82;
}

@media (max-width: 1080px) {
#shell.auth-layout {
    grid-template-columns: minmax(0, 560px);
    justify-content: center;
    gap: 28px;
    padding-top: max(28px, env(safe-area-inset-top));
    padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right));
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }

.brand.auth-hero {
    justify-self: center;
    text-align: center;
  }

.brand.auth-hero .brand-mark {
    margin-inline: auto;
  }

.auth-hero p {
    margin-inline: auto;
  }

.auth-hero-details {
    text-align: left;
  }

#shell.auth-layout .auth-card {
    justify-self: center;
  }
}

@media (max-width: 600px) {
#shell.auth-layout {
    gap: 24px;
    padding-top: max(22px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

.brand.auth-hero .brand-mark {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    border-radius: 16px;
  }

.auth-hero h1 {
    font-size: clamp(30px, 8vw, 38px);
    margin-bottom: 10px;
  }

.auth-hero p {
    font-size: 13.5px;
    line-height: 1.55;
  }

.auth-hero-details {
    display: none;
  }

#shell.auth-layout .auth-card {
    padding: 26px 22px;
  }
}

body.from-home:not(.console-mode) .auth-card,
body.from-home:not(.console-mode) .auth-hero {
  animation: auth-enter 0.42s var(--ease-out) both;
}

body.from-home:not(.console-mode) .auth-card {
  animation-delay: 60ms;
}

@keyframes auth-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Restored sessions must render the saved view before async auth completes. */

body.session-restoring .brand,
body.session-restoring #auth {
  display: none !important;
}

body.session-restoring #app.hidden {
  display: flex !important;
}

body.session-restoring[data-restore-view] .view.active {
  display: none;
}

body.session-restoring[data-restore-view="user"] #view-user,
body.session-restoring[data-restore-view="chat"] #view-chat,
body.session-restoring[data-restore-view="media"] #view-media,
body.session-restoring[data-restore-view="logs"] #view-logs,
body.session-restoring[data-restore-view="models"] #view-models,
body.session-restoring[data-restore-view="admin"] #view-admin,
body.session-restoring[data-restore-view="users"] #view-users,
body.session-restoring[data-restore-view="invites"] #view-invites,
body.session-restoring[data-restore-view="notifications"] #view-notifications,
body.session-restoring[data-restore-view="finance"] #view-finance,
body.session-restoring[data-restore-view="accounts"] #view-accounts,
body.session-restoring[data-restore-view="runtime"] #view-runtime,
body.session-restoring[data-restore-view="monitor"] #view-monitor,
body.session-restoring[data-restore-view="usage"] #view-usage {
  display: block;
}

/* App shell */

body.console-mode #shell {
  display: block;
  width: 100%;
  min-height: 100dvh;
  padding: 0;
}

body.console-mode #shell > .auth-panel {
  display: contents;
}

#app.app {
  position: fixed;
  inset: 0;
  height: 100dvh;
  min-height: 0;
}

.console-card {
  flex: 1;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.console-shell {
  height: 100%;
}

.console-content {
  min-width: 0;
  overscroll-behavior: contain;
  scroll-padding-top: 18px;
}

.console-content > .view-surface {
  width: min(100%, 1320px);
  margin-inline: auto;
}

.console-title .brand-mark {
  margin: 0;
  box-shadow: 0 5px 14px -7px rgb(var(--accent-rgb) / 0.8);
}

.console-actions,
.modal-actions,
.notification-head-actions,
.user-detail-actions,
.provider-account-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.console-actions .notice-btn,
.console-actions .docs-link,
.console-actions .logout {
  min-height: var(--h-ctrl-sm);
  padding: 0 11px;
  border: var(--hair) solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: var(--w-semibold);
  line-height: 1;
  text-decoration: none;
}

.console-actions .notice-btn:hover,
.console-actions .docs-link:hover,
.console-actions .logout:hover {
  color: var(--text);
  background: var(--fill);
  text-decoration: none;
}

.console-tabs button {
  font-family: inherit;
}

.nav-icon {
  flex: 0 0 18px;
  border: var(--hair) solid transparent;
}

.nav-item:hover .nav-icon {
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active .nav-icon {
  border-color: rgb(var(--accent-rgb) / 0.18);
  background: rgb(var(--accent-rgb) / 0.1);
}

.view:not(.active) {
  display: none;
}

.view.active {
  display: flex;
  flex-direction: column;
  animation: none;
}

.account-section-title,
.user-modal-head,
.notification-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.toolbar {
  justify-content: flex-end;
}

.toolbar input:not([type="checkbox"]):not([type="radio"]) {
  width: min(260px, 100%);
}

.toolbar select {
  width: auto;
  min-width: 132px;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

input:not([type="checkbox"]):not([type="radio"]):not(.control),
select:not(.control),
textarea:not(.control) {
  width: 100%;
  min-height: var(--h-ctrl);
  padding: 0 13px;
  border: var(--hair) solid transparent;
  border-radius: var(--r-sm);
  color: var(--text);
  background: var(--fill);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.12);
  outline: none;
}

textarea:not(.control) {
  min-height: 112px;
  padding-top: 11px;
  padding-bottom: 11px;
  line-height: 1.55;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #6f7276;
}

input:not([type="checkbox"]):not([type="radio"]):not(.control):hover,
select:not(.control):hover,
textarea:not(.control):hover {
  background: var(--fill-2);
}

input:not([type="checkbox"]):not([type="radio"]):not(.control):focus,
select:not(.control):focus,
textarea:not(.control):focus {
  border-color: rgb(var(--accent-rgb) / 0.62);
  background: var(--surface-2);
  box-shadow: var(--focus);
}

select:not(.control) {
  appearance: none;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

select option,
select optgroup {
  color: var(--text);
  background: var(--surface-2);
}

input[type="checkbox"],
input[type="radio"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.form-grid .field {
  margin: 0;
}

.form-grid .field:has(> label:only-child) {
  display: none;
}

.form-grid .field > button {
  align-self: end;
}

/* 批量创建按“额度”和“策略”拆成独立卡片。 */

.key-batch-shell {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: var(--gap-card);
}

.key-batch-shell > .panel-head {
  margin-bottom: 0 !important;
}

.key-batch-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 0;
}

.key-batch-group {
  min-width: 0;
  padding: 14px;
  border: var(--hair) solid var(--line-soft);
  border-radius: var(--r-md);
  background: rgb(255 255 255 / 0.035);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.035);
}

.key-batch-group-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.key-batch-group-index {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border: var(--hair) solid rgb(var(--accent-rgb) / 0.42);
  border-radius: var(--r-sm);
  color: var(--accent-hi);
  background: rgb(var(--accent-rgb) / 0.08);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: var(--w-bold);
  letter-spacing: 0.08em;
}

.key-batch-group-head .kicker {
  margin-bottom: 3px;
}

.key-batch-group-note {
  max-width: 46ch;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.key-batch-fields {
  display: grid;
  gap: 14px 12px;
}

.key-batch-fields > .field {
  min-width: 0;
}

#view-admin .key-batch-fields-quota,
#view-admin .key-batch-fields-policy,
#view-invites .key-batch-fields,
#view-notifications .key-batch-fields {
  grid-template-columns: 1fr;
}

#view-notifications .notification-rule-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#view-notifications .notification-rule-fields > .span-2 {
  grid-column: 1 / -1;
}

#view-notifications .notification-body-control {
  min-height: 88px;
}

#view-notifications #noticeCreated {
  width: auto;
  max-width: min(320px, 32vw);
  max-height: 64px !important;
  padding: 8px 10px !important;
  font-family: inherit;
  font-size: 11.5px;
  line-height: 1.35;
}

@media (min-width: 1101px) {
.key-batch-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
  }
}

@media (max-width: 720px) {
.key-batch-layout {
    gap: 12px;
  }

#view-notifications .notification-rule-fields {
    grid-template-columns: 1fr;
  }

#view-notifications .notification-rule-fields > .span-2 {
    grid-column: auto;
  }
}

.table-section {
  gap: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}

.section-block.card-flush.table-section > .panel-head {
  padding: 8px 14px !important;
}

.table-section > .table-wrap {
  border: 0;
  border-top: var(--hair) solid var(--line-soft);
  border-radius: 0;
}

/* Cards, statistics and page sections */

.finance-kpi,
.finance-settings,
.user-detail {
  border: var(--hair) solid var(--line-soft);
  border-radius: var(--r-md);
  background: rgb(255 255 255 / 0.028);
  box-shadow: var(--shadow-xs);
}

.finance-settings,
.user-detail {
  padding: 18px;
  margin-bottom: var(--gap-section);
}

/* 用户台首屏：把“绑定 Key”作为主任务，统计退到右侧形成明确的视觉锚点。 */

/* 管理台创建表单在宽屏上使用三列参数带，减少长表单的纵向拖曳。 */

/* 窄屏按任务优先级落下：先完成激活，再查看摘要，最后进入列表。 */

.stat-grid .stat {
  transition:
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.stat-grid .stat:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-1px);
}

.sync-line,
.context-bar,
.log-summary,
.provider-selection-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  color: var(--muted);
  font-size: 12px;
}

.sync-line,
.context-bar {
  margin-bottom: var(--gap-section);
}

.sync-line span,
.context-bar span,
.log-chip,
.provider-selection-status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: var(--hair) solid var(--line-soft);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.035);
}

.log-summary {
  margin-bottom: var(--gap-section);
}

.log-summary {
  gap: 6px;
}

.log-chip {
  gap: 6px;
  padding: 4px 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.log-chip strong {
  color: var(--text);
  font-weight: var(--w-bold);
  font-variant-numeric: tabular-nums;
}

.logging-panel > .context-bar,
.logging-panel > .log-summary {
  margin-bottom: 0;
}

.filter-actions {
  display: flex;
  flex: 0 0 auto;
  gap: var(--space-2);
}

.created,
.logs {
  min-height: 0;
  overflow: auto;
  border: var(--hair) solid var(--line-soft);
  border-radius: var(--r-sm);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.15);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.created {
  max-height: 120px;
  margin: 0;
  padding: 10px 12px;
  word-break: break-word;
}

.logs {
  margin: var(--space-3) 0 var(--gap-section);
  padding: 11px 13px;
}

.created:empty,
.logs:empty {
  display: none;
}

.created.ok {
  color: var(--success);
  border-color: rgb(var(--success-rgb) / 0.22);
}

.created.err {
  color: #ffb0a6;
  border-color: rgb(var(--danger-rgb) / 0.28);
}

/* Tables */

.table-wrap {
  width: 100%;
  overscroll-behavior: contain;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 12.5px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: var(--hair) solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--faint);
  background: rgba(255, 255, 255, 0.025);
  font-size: 11px;
  font-weight: var(--w-bold);
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.table-wrap table > thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(31, 36, 42, 0.98);
  box-shadow: 0 1px 0 var(--line-soft);
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

td.num,
th.num,
.bal,
.cost,
.key-balance {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.select-cell {
  width: 38px;
}

td:last-child:has(> .toolbar) {
  white-space: nowrap;
}

td:last-child > .toolbar {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

#view-admin th:nth-child(4),
#view-admin th:nth-child(5),
#view-admin td:nth-child(4),
#view-admin td:nth-child(5),
#view-users th:nth-child(5),
#view-users th:nth-child(6),
#view-users th:nth-child(7),
#view-users td:nth-child(5),
#view-users td:nth-child(6),
#view-users td:nth-child(7),
#view-logs th:nth-child(5),
#view-logs th:nth-child(6),
#view-logs td:nth-child(5),
#view-logs td:nth-child(6) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#view-admin th:last-child,
#view-admin td:last-child,
#view-users th:last-child,
#view-users td:last-child,
#view-invites th:last-child,
#view-invites td:last-child,
#view-notifications th:last-child,
#view-notifications td:last-child,
#view-accounts th:last-child,
#view-accounts td:last-child,
#view-runtime th:last-child,
#view-runtime td:last-child {
  text-align: right;
  white-space: nowrap;
}

.cell-main {
  color: var(--text);
  font-weight: var(--w-medium);
}

.cell-sub {
  font-size: 11px;
  line-height: 1.35;
}

.empty-row {
  height: 132px;
  padding: 38px 16px !important;
  color: var(--muted);
  text-align: center !important;
  white-space: normal !important;
}

td.empty-row {
  text-align: center !important;
}

td.empty-row::before,
.usage-empty::before {
  content: "—";
  display: block;
  margin-bottom: 7px;
  color: var(--faint);
  font-size: 18px;
  line-height: 1;
}

.copy-key {
  min-height: 26px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 11px;
}

.copy-key.missing {
  color: var(--faint);
}

.pill.neutral,
.tag.neutral {
  color: var(--muted);
}

.pill.ok,
.tag.ok,
.notice-level.normal {
  color: var(--success);
  border-color: rgb(var(--success-rgb) / 0.22);
  background: rgb(var(--success-rgb) / 0.1);
}

.pill.warn,
.tag.warn,
.notice-level.maintenance {
  color: var(--warn);
  border-color: rgb(var(--warn-rgb) / 0.22);
  background: rgb(var(--warn-rgb) / 0.1);
}

.pill.bad,
.tag.bad,
.notice-level.urgent {
  color: #ffb0a6;
  border-color: rgb(var(--danger-rgb) / 0.24);
  background: rgb(var(--danger-rgb) / 0.1);
}

/* Chat */

.chat-empty-icon .ui-icon,
.media-empty-mark .ui-icon {
  width: 20px;
  height: 20px;
}

/* Realtime monitor */

.event-row.status-error { background: rgb(var(--danger-rgb) / 0.04); }

.event-row.status-rejected { background: rgb(var(--warn-rgb) / 0.03); }

/* Media studio */

#runtimeSummary,
#providerRuntimeSummary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rule-params {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

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

/* 画布节点自己管理高度与滚动，这里只约束结果区的滚动容器。 */

/* 登录页第二版：收拢内容组，让登录动作成为唯一主焦点。 */

body.theme-anime[data-console-page]:not(.console-mode) #shell.auth-layout {
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 480px);
  gap: clamp(48px, 6vw, 92px);
  align-items: center;
  padding: clamp(32px, 7vh, 72px) max(24px, calc((100% - 1360px) / 2 + 24px));
}

body.theme-anime[data-console-page]:not(.console-mode) .brand.auth-hero {
  max-width: 680px;
  padding-top: 0;
}

body.theme-anime[data-console-page]:not(.console-mode) .brand.auth-hero .brand-mark {
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 16px;
}

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero h1 {
  margin-bottom: 12px;
  font-size: clamp(38px, 3.2vw, 48px);
  letter-spacing: -0.025em;
}

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero p {
  max-width: 40ch;
  font-size: 15px;
  line-height: 1.7;
}

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero-details {
  gap: 0;
  margin-top: 32px;
  padding-top: 18px;
}

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero-detail {
  padding: 0 18px;
  border-right: var(--hair) solid rgb(var(--accent-rgb) / 0.16);
}

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero-detail:first-child {
  padding-left: 0;
}

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero-detail:last-child {
  padding-right: 0;
  border-right: 0;
}

body.theme-anime[data-console-page]:not(.console-mode) #shell.auth-layout .auth-card {
  max-width: 480px;
  padding: 30px 32px 24px;
  box-shadow:
    0 28px 62px -38px rgb(0 0 0 / 0.94),
    inset 0 1px 0 rgb(220 232 255 / 0.08);
}

body.theme-anime[data-console-page]:not(.console-mode) #auth {
  gap: 14px;
}

body.theme-anime[data-console-page]:not(.console-mode) #auth .field {
  margin-bottom: 0;
}

body.theme-anime[data-console-page]:not(.console-mode) #auth .field label {
  margin-bottom: 7px;
}

body.theme-anime[data-console-page]:not(.console-mode) #auth .control {
  min-height: 52px;
  border-radius: 12px;
}

@media (max-width: 1080px) {
body.theme-anime[data-console-page]:not(.console-mode) #shell.auth-layout {
    width: min(100%, 620px);
    grid-template-columns: minmax(0, 560px);
    gap: 24px;
    padding-top: max(32px, env(safe-area-inset-top));
    padding-bottom: max(32px, env(safe-area-inset-bottom));
    padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right));
  }

body.theme-anime[data-console-page]:not(.console-mode) .brand.auth-hero {
    justify-self: center;
    text-align: center;
  }

body.theme-anime[data-console-page]:not(.console-mode) .brand.auth-hero .brand-mark {
    margin-inline: auto;
  }

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero p {
    margin-inline: auto;
  }

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero-details {
    text-align: left;
  }

body.theme-anime[data-console-page]:not(.console-mode) #shell.auth-layout .auth-card {
    justify-self: center;
  }
}

@media (max-width: 600px) {
body.theme-anime[data-console-page]:not(.console-mode) #shell.auth-layout {
    width: 100%;
    gap: 16px;
    padding-top: max(22px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

body.theme-anime[data-console-page]:not(.console-mode) .brand.auth-hero .brand-mark {
    width: 50px;
    height: 50px;
    margin-bottom: 14px;
    border-radius: 14px;
  }

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero h1 {
    font-size: clamp(30px, 9vw, 38px);
  }

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero p {
    font-size: 14px;
  }

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero-details {
    display: none;
  }

body.theme-anime[data-console-page]:not(.console-mode) #shell.auth-layout .auth-card {
    padding: 22px 20px 16px;
  }

body.theme-anime[data-console-page]:not(.console-mode) #auth {
    gap: 11px;
  }

body.theme-anime[data-console-page]:not(.console-mode) #auth .field label {
    margin-bottom: 5px;
  }
}

/* 登录页第二版：提高辅助信息的可读性，不让背景承担文字对比度。 */

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero-detail strong {
  font-size: 15px;
}

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero-detail > span:last-child {
  color: var(--text);
  opacity: 0.76;
}

body.theme-anime[data-console-page]:not(.console-mode) #auth .field label {
  color: var(--text);
  font-weight: var(--w-semibold);
}

/* 平板横向短屏：让品牌、能力栏和完整登录卡在首屏内完成闭合。 */

@media (min-width: 601px) and (max-width: 1080px) and (max-height: 820px) {
body.theme-anime[data-console-page]:not(.console-mode) #shell.auth-layout {
    gap: 16px;
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

body.theme-anime[data-console-page]:not(.console-mode) .brand.auth-hero .brand-mark {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 14px;
  }

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero h1 {
    margin-bottom: 8px;
    font-size: 36px;
  }

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero p {
    font-size: 14px;
    line-height: 1.5;
  }

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero-details {
    margin-top: 20px;
    padding-top: 12px;
  }

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero-detail {
    gap: 3px;
  }

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero-detail strong {
    font-size: 14px;
  }

body.theme-anime[data-console-page]:not(.console-mode) .auth-hero-detail > span:last-child {
    font-size: 11px;
  }

body.theme-anime[data-console-page]:not(.console-mode) #shell.auth-layout .auth-card {
    padding: 22px 30px 18px;
  }

body.theme-anime[data-console-page]:not(.console-mode) #auth {
    gap: 12px;
  }

body.theme-anime[data-console-page]:not(.console-mode) #auth .field label {
    margin-bottom: 5px;
  }
}
