:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-raised: #fbfcfe;
  --line: #dbe3ee;
  --line-soft: #edf1f6;
  --text: #172033;
  --text-soft: #40516a;
  --muted: #748197;
  --primary: #0b8f70;
  --primary-dark: #08795f;
  --primary-soft: #e8f6f1;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --warn: #a16207;
  --warn-soft: #fff6dc;
  --danger: #d92d46;
  --danger-dark: #b4233a;
  --danger-soft: #fff1f3;
  --focus: rgba(37, 99, 235, 0.2);
  --shadow: 0 16px 34px rgba(16, 24, 40, 0.08);
  --shadow-modal: 0 22px 70px rgba(16, 24, 40, 0.22);
  --admin-sidebar-width: 195px;
  --admin-page-padding-x: 24px;
  --admin-gap: 14px;
  --table-min-width: 760px;
  --table-compact-min-width: 560px;
  --z-toast: 70;
  --z-modal: 50;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

body:not(.is-authenticated) .app-shell {
  display: none;
}

body.is-authenticated .auth-screen {
  display: none;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 28px;
  box-shadow: var(--shadow);
}

.auth-brand,
.sidebar-brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.auth-brand {
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.auth-brand > div,
.sidebar-brand > div {
  display: grid;
  min-width: 0;
}

.auth-brand strong {
  color: var(--text);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.2;
}

.auth-brand span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 9px;
  object-fit: cover;
}

.brand-mark--auth {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-checking-state {
  display: none;
  gap: 6px;
  text-align: center;
}

.auth-checking-state strong {
  color: var(--text);
  font-size: 15px;
}

.auth-checking-state span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

body.is-auth-checking .auth-checking-state {
  display: grid;
}

body.is-auth-checking .auth-form {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--admin-sidebar-width) minmax(0, 1fr);
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
}

.sidebar {
  min-width: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 18px 14px;
}

.sidebar-brand {
  gap: 10px;
  min-height: 40px;
  margin: 0 4px 12px;
  padding: 0 4px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.sidebar-brand strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-brand span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-group {
  display: grid;
  gap: 5px;
  padding-top: 18px;
}

.sidebar > .nav-group:first-child {
  padding-top: 0;
}

.nav-label {
  margin: 0 8px 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  padding: 0 10px;
  text-align: left;
  font-size: 14px;
  font-weight: 800;
}

.nav-item:hover {
  background: var(--surface-raised);
  color: var(--text);
}

.nav-item.is-active {
  border-color: rgba(11, 143, 112, 0.24);
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 22px;
  border-radius: 6px;
  background: #eef3f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.nav-item.is-active .nav-key {
  background: var(--primary);
  color: #ffffff;
}

.main {
  min-width: 0;
  padding: 22px var(--admin-page-padding-x) 32px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  margin-bottom: 16px;
}

.crumb {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 25px;
  line-height: 1.2;
  font-weight: 900;
}

.topbar p,
.panel__head p,
.admin-panel__head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.topbar__actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.session-chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

.button:hover {
  background: var(--surface-raised);
  border-color: #c9d3df;
}

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

.button:focus-visible,
.nav-item:focus-visible,
.language-tab:focus-visible,
.control:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.button--primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.button--primary:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.button--danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #ffffff;
}

.button--danger:hover {
  border-color: var(--danger-dark);
  background: var(--danger-dark);
}

.button--wide {
  width: 100%;
}

.button:disabled,
.control:disabled,
.nav-item:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.nav-item:disabled {
  color: var(--muted);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.admin-page {
  display: grid;
  gap: var(--admin-gap);
}

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

.summary-grid--characters {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.summary-card,
.panel,
.side-panel,
.admin-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.summary-card {
  min-width: 0;
  padding: 14px;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.summary-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.admin-workspace {
  display: grid;
  gap: var(--admin-gap);
  align-items: start;
}

.admin-workspace--split {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
}

.admin-workspace--split-wide {
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
}

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

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 14px;
  align-items: start;
}

.content-grid--wide {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.panel {
  overflow: hidden;
}

.admin-panel,
.panel {
  overflow: hidden;
}

.panel__head,
.admin-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-raised);
  padding: 12px 14px;
}

.panel__head > div,
.admin-panel__head > div {
  min-width: 0;
}

.panel__head h2,
.admin-panel__head h2 {
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
}

.admin-panel__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.panel__body {
  padding: 14px;
}

.admin-detail-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.form-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.form-section__title {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.admin-action-box {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(11, 143, 112, 0.2);
  border-radius: 8px;
  background: #f7fffb;
  padding: 12px;
}

.admin-action-box--danger {
  border-color: rgba(217, 45, 70, 0.22);
  background: var(--danger-soft);
}

.admin-action-box__title {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.admin-action-box__text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.admin-action-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-raised);
  padding: 12px 14px;
}

.model-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  gap: 14px;
  align-items: start;
}

.settings-column {
  display: grid;
  gap: 14px;
}

.section-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.key-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 12px;
}

.key-box p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.control {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
  outline: none;
  font-size: 13px;
  font-weight: 750;
}

.control--textarea {
  min-height: 74px;
  padding: 10px;
  resize: vertical;
  line-height: 1.5;
}

.control:focus {
  border-color: rgba(11, 143, 112, 0.7);
  box-shadow: 0 0 0 3px rgba(11, 143, 112, 0.12);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.toolbar,
.admin-toolbar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line-soft);
  background: #fcfdff;
}

.toolbar > *,
.admin-toolbar > * {
  min-width: 0;
}

.admin-toolbar--dense {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
}

.admin-toolbar--commercial {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
}

.toolbar--dense {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
}

.admin-toolbar--dense .field,
.admin-toolbar--commercial .field,
.toolbar--dense .field {
  flex: 0 1 190px;
}

.admin-toolbar--dense .field:has(input[type="search"]),
.admin-toolbar--commercial .field:has(input[type="search"]),
.toolbar--dense .field:has(input[type="search"]) {
  flex: 1 1 280px;
}

.admin-toolbar--dense .button,
.admin-toolbar--commercial .button,
.toolbar--dense .button {
  align-self: flex-end;
  flex: 0 0 auto;
  min-height: 38px;
  min-width: 84px;
}

.table-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.table-primary-text {
  color: var(--text);
  font-weight: 900;
}

.toolbar--calls {
  grid-template-columns: minmax(130px, 150px) minmax(150px, 180px) minmax(220px, 1fr);
}

.language-editor {
  display: grid;
  gap: 8px;
}

.language-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.language-tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--text-soft);
  cursor: pointer;
  padding: 9px 10px;
  text-align: left;
}

.language-tab span,
.language-tab small {
  display: block;
}

.language-tab span {
  font-size: 13px;
  font-weight: 900;
}

.language-tab small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.language-tab.is-selected {
  border-color: rgba(11, 143, 112, 0.7);
  box-shadow: 0 0 0 3px rgba(11, 143, 112, 0.1);
}

.language-tab.is-incomplete small {
  color: #b45309;
}

.language-tab.is-complete small {
  color: #047857;
}

.language-editor p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.character-detail-workspace {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 18px;
}

.character-detail-workspace__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.character-detail-workspace__head strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
}

.character-detail-workspace__head p {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.character-detail-updated {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.character-detail-identity {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.character-detail-fact {
  min-width: 0;
  background: var(--surface-raised);
  padding: 12px;
}

.character-detail-fact span,
.character-detail-copy-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.character-detail-fact strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.character-detail-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.character-detail-copy-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 13px;
}

.character-detail-copy-card p,
.character-detail-boundary {
  margin-top: 7px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.character-detail-boundary {
  margin-top: 0;
  border-left: 3px solid rgba(11, 143, 112, 0.42);
  border-radius: 0 8px 8px 0;
  background: var(--surface-raised);
  padding: 12px 14px;
}

.character-legacy-fields {
  display: none !important;
}

.character-voice-preview-panel {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.character-voice-preview-meta {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.character-voice-preview-meta div {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px 12px;
}

.character-voice-preview-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.character-voice-preview-meta strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
}

.character-voice-preview-status {
  display: grid;
  gap: 10px;
}

.character-voice-preview-status audio {
  width: 100%;
  max-width: 520px;
}

.character-voice-preview-status audio[hidden] {
  display: none;
}

.character-greeting-video-list {
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.character-greeting-video-current {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--muted);
}

.character-greeting-video-current__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.character-greeting-video-current__head div,
.character-greeting-video-current__head time {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.character-greeting-video-current__head span,
.character-greeting-video-current__head time {
  color: var(--muted);
  font-size: 12px;
}

.character-greeting-video-current__head strong {
  color: var(--ink);
}

.character-greeting-video-current__body {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.character-greeting-video-current video {
  width: 100%;
  max-height: 420px;
  border-radius: 8px;
  background: #0d0b12;
}

.character-greeting-video-current__placeholder {
  min-height: 300px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.character-greeting-video-current__info {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.character-greeting-video-current__summary {
  border-left: 3px solid rgba(11, 143, 112, 0.42);
  background: var(--surface-raised);
  padding: 11px 13px;
}

.character-greeting-video-current__summary strong {
  color: var(--ink);
  font-size: 13px;
}

.character-greeting-video-current__summary p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.character-greeting-video-current__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--line-soft);
}

.character-greeting-video-current__facts div {
  min-width: 0;
  background: var(--surface-raised);
  padding: 10px 12px;
}

.character-greeting-video-current__facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.character-greeting-video-current__facts dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.character-greeting-video-history {
  border-top: 1px solid var(--line-soft);
}

.character-greeting-video-history > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  font-weight: 850;
}

.character-greeting-video-history > summary::-webkit-details-marker {
  display: none;
}

.character-greeting-video-history__toggle {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.character-greeting-video-history[open] .character-greeting-video-history__toggle {
  font-size: 0;
}

.character-greeting-video-history[open] .character-greeting-video-history__toggle::after {
  content: "收起";
  font-size: 12px;
}

.character-greeting-video-history__list {
  border-top: 1px solid var(--line-soft);
}

.character-greeting-video-history__row {
  display: grid;
  grid-template-columns: 8px minmax(132px, auto) minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
}

.character-greeting-video-history__row + .character-greeting-video-history__row {
  border-top: 1px solid var(--line-soft);
}

.character-greeting-video-history__indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.character-greeting-video-history__row.is-failed .character-greeting-video-history__indicator {
  background: var(--danger);
}

.character-greeting-video-history__row.is-success .character-greeting-video-history__indicator {
  background: var(--primary);
}

.character-greeting-video-history__status strong,
.character-greeting-video-history__status time {
  display: block;
}

.character-greeting-video-history__status strong {
  color: var(--ink);
  font-size: 13px;
}

.character-greeting-video-history__status time,
.character-greeting-video-history__row p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.character-greeting-video-technical {
  min-width: 86px;
}

.character-greeting-video-technical > summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  list-style: none;
  text-align: right;
}

.character-greeting-video-technical > summary::-webkit-details-marker {
  display: none;
}

.character-greeting-video-technical[open] {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-raised);
}

.character-greeting-video-history__row > .character-greeting-video-technical[open] {
  grid-column: 2 / -1;
}

.character-greeting-video-technical[open] > summary {
  margin-bottom: 10px;
  text-align: left;
}

.character-greeting-video-technical dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0;
}

.character-greeting-video-technical dl div {
  min-width: 0;
}

.character-greeting-video-technical dt {
  color: var(--muted);
  font-size: 11px;
}

.character-greeting-video-technical dd {
  margin: 3px 0 0;
  color: var(--ink);
  overflow-wrap: anywhere;
  font-size: 12px;
}

.character-greeting-video-technical__error {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.character-greeting-video-technical__error strong {
  color: var(--muted);
  font-size: 11px;
}

.character-greeting-video-technical__error pre {
  max-height: 120px;
  margin: 6px 0 0;
  overflow: auto;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (max-width: 760px) {
  .character-detail-workspace__head {
    flex-direction: column;
  }

  .character-detail-identity,
  .character-detail-copy-grid {
    grid-template-columns: 1fr;
  }

  .character-greeting-video-current__body,
  .character-greeting-video-current__facts {
    grid-template-columns: 1fr;
  }

  .character-greeting-video-current__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .character-greeting-video-history__row {
    grid-template-columns: 8px minmax(0, 1fr) auto;
  }

  .character-greeting-video-history__row > p {
    grid-column: 2 / -1;
  }

  .character-greeting-video-history__row > .character-greeting-video-technical[open] {
    grid-column: 2 / -1;
  }

  .character-greeting-video-technical dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.side-panel {
  padding: 14px;
}

.side-panel__title {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.config-readout {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
}

.config-readout div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 10px;
}

.config-readout div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.config-readout dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.config-readout dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-raised);
  padding: 12px 14px;
}

.save-state {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.tag--ok {
  background: var(--primary-soft);
  color: var(--primary);
}

.tag--warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.tag--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.tag--muted {
  background: #eef3f7;
  color: var(--muted);
}

.priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 24px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.priority--p0 {
  background: var(--danger-soft);
  color: var(--danger);
}

.priority--p1 {
  background: var(--warn-soft);
  color: var(--warn);
}

.task-list {
  display: grid;
  gap: 0;
}

.task-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.task-row:last-child {
  border-bottom: 0;
}

.task-row strong {
  display: block;
  font-size: 13px;
}

.task-row p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.table-wrap--compact {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: var(--table-min-width);
  border-collapse: collapse;
}

.table-wrap--compact table {
  min-width: var(--table-compact-min-width);
}

.character-production-status-cell {
  min-width: 220px;
}

.character-production-progress {
  display: grid;
  width: min(240px, 100%);
  gap: 5px;
  margin-top: 8px;
}

.character-production-progress__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.character-production-progress__meta strong {
  color: var(--text-soft);
  font-size: 11px;
}

.character-production-progress__track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line-soft);
}

.character-production-progress__track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 180ms ease;
}

.character-production-progress.is-queued .character-production-progress__track span {
  background: var(--muted);
}

.character-production-progress.is-complete .character-production-progress__track span {
  background: var(--primary);
}

.character-production-progress.is-failed .character-production-progress__track span {
  background: var(--danger);
}

.character-production-progress.is-failed .character-production-progress__meta strong {
  color: var(--danger);
}

.task-center__toolbar {
  display: grid;
  grid-template-columns: 220px 180px minmax(260px, 1fr);
  gap: 10px;
  align-items: center;
}

.task-center__identity,
.task-center__status {
  min-width: 230px;
  white-space: normal;
}

.task-center__identity strong {
  display: block;
  color: var(--text);
  line-height: 1.35;
}

.task-center__identity .subtle-id,
.task-center__status .subtle-id {
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.task-center__progress {
  min-width: 180px;
  margin-top: 0;
}

.task-error {
  display: grid;
  gap: 3px;
  max-width: 360px;
  margin-top: 8px;
  border-left: 3px solid var(--danger);
  background: var(--danger-soft);
  color: var(--danger-dark);
  padding: 7px 9px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.task-error strong,
.task-error span {
  font-size: 11px;
  line-height: 1.4;
}

#view-users th {
  white-space: nowrap;
}

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

th {
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

td {
  color: var(--text-soft);
  font-weight: 650;
  white-space: nowrap;
}

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

tr.is-selected td {
  background: var(--primary-soft);
}

.avatar-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.avatar-mark--image {
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface-raised);
}

.character-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.character-cell .avatar-mark {
  display: inline-flex;
  flex: 0 0 30px;
}

.character-cell strong,
.character-cell > div span {
  display: block;
}

.character-cell > div span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.character-recent {
  max-width: 320px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  white-space: normal;
}

.character-preview {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  padding: 12px;
}

.character-preview__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: var(--primary);
  background-position: center;
  background-size: cover;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.character-preview__avatar.has-image {
  border: 1px solid var(--line);
  background-color: var(--surface-raised);
}

.character-preview__body {
  min-width: 0;
}

.character-preview__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.character-preview__topline strong {
  min-width: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.character-preview p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.character-preview blockquote {
  margin: 9px 0 0;
  border-left: 3px solid rgba(11, 143, 112, 0.26);
  color: var(--text-soft);
  padding-left: 10px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.character-app-card-photo {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.character-app-card-photo__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.character-app-card-photo__head strong,
.character-app-card-photo__details strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}

.character-app-card-photo__head p,
.character-app-card-photo__details p,
.character-app-card-photo__details li {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
}

.character-app-card-photo__head p,
.character-app-card-photo__details p {
  margin-top: 4px;
}

.character-app-card-photo__body {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.character-app-card-photo__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}

.character-app-card-photo__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.character-app-card-photo__frame img[hidden],
.character-app-card-photo__placeholder[hidden] {
  display: none;
}

.character-app-card-photo__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  padding: 24px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.character-app-card-photo__placeholder.is-error {
  background: #fff5f5;
  color: var(--danger);
}

.character-app-card-photo__details {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-top: 4px;
}

.character-app-card-photo__details ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 760px) {
  .character-app-card-photo__head {
    display: grid;
  }

  .character-app-card-photo__body {
    grid-template-columns: 1fr;
  }

  .character-app-card-photo__frame {
    max-width: 360px;
  }
}

.character-review-panel {
  display: grid;
  gap: 12px;
  border: 1px solid #f6d891;
  border-radius: 8px;
  background: #fffaf0;
  padding: 12px;
}

.character-review-panel[hidden] {
  display: none;
}

.character-review-panel__head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.character-review-panel__head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}

.character-review-panel__head p,
.character-review-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.character-review-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.character-review-item {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(246, 216, 145, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 9px;
}

.character-review-item span {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.character-voice-age-profile {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--muted);
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.character-voice-age-profile strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.character-voice-age-profile.is-match {
  border-color: rgba(32, 142, 103, 0.26);
  background: rgba(234, 248, 242, 0.78);
}

.character-voice-age-profile.is-review {
  border-color: rgba(212, 151, 30, 0.34);
  background: rgba(255, 250, 240, 0.9);
}

.module-empty {
  display: grid;
  gap: 14px;
}

.module-empty__intro {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.module-empty__intro h2 {
  font-size: 18px;
}

.module-empty__intro p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.definition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.definition-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.definition-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.definition-card strong {
  display: block;
  margin-top: 7px;
  font-size: 14px;
  line-height: 1.35;
}

.system-status-banner {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}

.system-status-banner strong {
  font-size: 14px;
  font-weight: 900;
}

.system-status-banner span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.system-status-banner--ok {
  border-color: rgba(11, 143, 112, 0.26);
  background: rgba(11, 143, 112, 0.08);
  color: var(--primary);
}

.system-status-banner--warn,
.system-status-banner--loading {
  border-color: rgba(161, 98, 7, 0.25);
  background: var(--warn-soft);
  color: var(--warn);
}

.system-status-banner--danger {
  border-color: rgba(217, 45, 70, 0.25);
  background: var(--danger-soft);
  color: var(--danger);
}

.deployment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.deployment-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.deployment-card__label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.deployment-card > strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.deployment-card dl {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.deployment-card dl div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.deployment-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.deployment-card dd {
  min-width: 0;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.inline-alert {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--text-soft);
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.inline-alert:not(:empty) {
  display: block;
}

.inline-alert--danger {
  border-color: rgba(217, 45, 70, 0.25);
  background: var(--danger-soft);
  color: var(--danger);
}

.inline-alert--warn {
  border-color: rgba(161, 98, 7, 0.25);
  background: var(--warn-soft);
  color: var(--warn);
}

.muted-cell {
  color: var(--muted);
}

.subtle-id {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.publish-blockers {
  display: grid;
  gap: 3px;
  margin-top: 6px;
  color: var(--warn);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.product-entitlement-matrix-wrap {
  border-top: 1px solid var(--line-soft);
}

.product-entitlement-matrix {
  width: 100%;
  min-width: 1500px;
  table-layout: fixed;
}

.product-entitlement-matrix th,
.product-entitlement-matrix td {
  padding: 11px 12px;
  vertical-align: top;
  white-space: normal;
}

.product-entitlement-matrix thead th {
  height: 104px;
}

.product-entitlement-matrix thead th > strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.product-entitlement-matrix thead th > .tag {
  margin-top: 7px;
}

.product-entitlement-matrix thead .subtle-id {
  overflow-wrap: anywhere;
}

.product-entitlement-matrix__axis {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 220px !important;
  background: var(--surface-raised);
  box-shadow: 1px 0 0 var(--line-soft);
}

.product-entitlement-matrix thead .product-entitlement-matrix__axis {
  z-index: 3;
}

.product-entitlement-matrix tbody .product-entitlement-matrix__axis {
  color: var(--text);
  font-size: 12px;
}

.product-entitlement-matrix tbody .product-entitlement-matrix__axis > span:first-child {
  display: block;
}

.product-entitlement-matrix tbody .product-entitlement-matrix__axis > .tag {
  margin-top: 6px;
}

.product-entitlement-matrix__section th {
  position: static;
  width: auto !important;
  border-top: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--muted);
  padding: 9px 12px;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.product-entitlement-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.product-entitlement-cell strong {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.product-entitlement-cell span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.product-entitlement-cell--included strong {
  color: var(--primary);
}

.product-entitlement-cell--considering strong {
  color: var(--warn);
}

.product-entitlement-cell--muted strong {
  color: var(--muted);
}

.product-entitlement-cell--code strong {
  font-size: 11px;
  font-weight: 800;
}

.product-entitlement-matrix__notice {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 10px 14px 14px;
  padding: 10px;
  border-radius: 8px;
  background: var(--primary-soft);
}

.product-entitlement-matrix__notice strong {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 12px;
}

.product-entitlement-matrix__notice span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
}

.call-detail-body {
  display: grid;
  gap: 14px;
}

.detail-section {
  display: grid;
  gap: 10px;
}

.detail-readout {
  display: grid;
  gap: 8px;
  margin: 0;
}

.detail-readout div {
  display: grid;
  grid-template-columns: minmax(110px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 8px;
}

.detail-readout div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.detail-readout dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.detail-readout dd {
  min-width: 0;
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.summary-grid--matrix {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.matrix-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.matrix-dimension {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.matrix-dimension strong,
.matrix-distribution strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.matrix-dimension p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.matrix-target-list,
.matrix-distribution-list {
  display: grid;
  gap: 8px;
}

.matrix-target-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 92px 18px;
  gap: 8px;
  align-items: center;
}

.matrix-target-row span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.matrix-target-row .control {
  min-height: 34px;
  text-align: right;
}

.matrix-target-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.matrix-job-library {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.matrix-job-library__head,
.matrix-job-family__footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.matrix-job-library__head p {
  max-width: 720px;
}

.matrix-job-family-list {
  display: grid;
  gap: 8px;
}

.matrix-job-family {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-subtle);
  overflow: hidden;
}

.matrix-job-family > summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
}

.matrix-job-family > summary::-webkit-details-marker {
  display: none;
}

.matrix-job-family > summary span:first-child {
  display: grid;
  gap: 2px;
}

.matrix-job-family > summary small,
.matrix-job-family__summary-action,
.matrix-job-family__footer > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.matrix-job-family[open] .matrix-job-family__summary-action {
  color: var(--accent-strong);
}

.matrix-job-family__body {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line-soft);
  padding: 10px;
}

.matrix-job-row {
  display: grid;
  grid-template-columns: 68px minmax(140px, 1fr) minmax(170px, 1.15fr) minmax(170px, 1.15fr) 70px 66px;
  gap: 7px;
  align-items: center;
}

.matrix-job-row--head {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.matrix-job-row .control {
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  font-size: 11px;
}

.matrix-job-field {
  display: grid;
  min-width: 0;
}

.matrix-job-field > span {
  display: none;
}

.matrix-job-toggle {
  display: grid;
  justify-items: start;
  gap: 2px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 850;
}

.matrix-job-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.matrix-job-remove,
.matrix-job-add {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 11px;
}

.matrix-job-family__footer {
  border-top: 1px dashed var(--line-soft);
  padding-top: 8px;
}

.matrix-distribution {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 10px;
}

@media (max-width: 1180px) {
  .matrix-job-row {
    grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "toggle zh en"
      "toggle fr weight"
      "toggle remove remove";
    align-items: start;
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 9px;
  }

  .matrix-job-row--head {
    display: none;
  }

  .matrix-job-toggle {
    grid-area: toggle;
    padding-top: 18px;
  }

  .matrix-job-field--zh {
    grid-area: zh;
  }

  .matrix-job-field--en {
    grid-area: en;
  }

  .matrix-job-field--fr {
    grid-area: fr;
  }

  .matrix-job-field--weight {
    grid-area: weight;
  }

  .matrix-job-field > span {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
  }

  .matrix-job-remove {
    grid-area: remove;
    justify-self: end;
    min-width: 110px;
  }
}

@media (max-width: 640px) {
  .matrix-job-library__head,
  .matrix-job-family__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .matrix-job-row {
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas:
      "toggle zh"
      "toggle en"
      "toggle fr"
      "toggle weight"
      "toggle remove";
  }

  .matrix-job-remove {
    width: 100%;
    justify-self: stretch;
  }
}

.matrix-distribution:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.matrix-distribution-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) minmax(70px, 0.9fr) 56px;
  gap: 8px;
  align-items: center;
}

.matrix-distribution-row span,
.matrix-distribution-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.matrix-distribution-row small {
  text-align: right;
}

.matrix-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.matrix-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.matrix-preview-actions {
  display: grid;
  gap: 10px;
}

.matrix-preview-actions .button {
  width: fit-content;
  min-width: 156px;
}

.matrix-candidate-empty {
  display: grid;
  gap: 5px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.matrix-candidate-empty strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.matrix-candidate-empty span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.matrix-candidate-list {
  display: grid;
  gap: 10px;
}

.matrix-candidate-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 12px;
}

.matrix-candidate-card__head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.matrix-candidate-card__head strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
}

.matrix-candidate-card__head small,
.matrix-candidate-card p,
.matrix-candidate-locale {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.matrix-candidate-meta,
.matrix-dimension-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.matrix-candidate-meta span,
.matrix-dimension-chips span {
  border-radius: 999px;
  background: #eef5f1;
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 900;
  padding: 5px 8px;
}

.matrix-dimension-chips span {
  background: #f6f8fb;
  color: var(--text-soft);
}

.matrix-candidate-card blockquote {
  margin: 0;
  border-left: 3px solid var(--primary);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.5;
  padding-left: 10px;
}

.matrix-candidate-actions {
  display: flex;
  justify-content: flex-end;
}

.matrix-candidate-actions .button {
  min-width: 112px;
}

.diagnostic-conclusion {
  display: grid;
  grid-template-columns: minmax(0, 0.44fr) minmax(0, 0.56fr);
  gap: 14px;
  border: 1px solid var(--line-soft);
  border-left-width: 5px;
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 14px;
}

.diagnostic-conclusion--ok {
  border-left-color: var(--primary);
}

.diagnostic-conclusion--watch {
  border-left-color: var(--warn);
}

.diagnostic-conclusion--danger {
  border-left-color: var(--danger);
}

.diagnostic-conclusion__main,
.diagnostic-conclusion__evidence {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.diagnostic-conclusion span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.diagnostic-conclusion strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.25;
}

.diagnostic-conclusion p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
}

.diagnostic-conclusion__action {
  color: var(--text) !important;
}

.diagnostic-conclusion ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.diagnostic-conclusion li {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.summary-grid--diagnostics {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  margin-bottom: 12px;
}

.call-event-list {
  display: grid;
  gap: 10px;
}

.call-event-row {
  display: grid;
  grid-template-columns: minmax(132px, 0.24fr) minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.call-event-row--app {
  border-left-color: #3b82f6;
}

.call-event-row--backend {
  border-left-color: #64748b;
}

.call-event-row--provider {
  border-left-color: #8b5cf6;
}

.call-event-row--ai {
  border-left-color: #14b8a6;
}

.call-event-row--billing {
  border-left-color: #f59e0b;
}

.call-event-time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.4;
}

.call-event-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.call-event-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.call-event-head strong {
  color: var(--text);
  font-size: 13px;
}

.call-event-main p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.call-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-chip {
  display: inline-flex;
  max-width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--text-soft);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}

.meta-chip--muted {
  color: var(--muted);
}

.tag--source {
  border: 0;
  color: #fff;
}

.tag--source-app {
  background: #2563eb;
}

.tag--source-backend {
  background: #475569;
}

.tag--source-provider {
  background: #7c3aed;
}

.tag--source-ai {
  background: #0f766e;
}

.tag--source-billing {
  background: #b45309;
}

.json-details {
  display: grid;
  gap: 8px;
}

.json-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.event-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
}

.event-row strong,
.event-row span {
  display: block;
}

.event-row strong {
  color: var(--text);
  font-size: 12px;
}

.event-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.json-block {
  max-height: 180px;
  overflow: auto;
  margin: 0;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 10px;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.empty-state {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--muted);
  padding: 16px;
  font-size: 13px;
  font-weight: 750;
}

.empty-state--danger {
  border-color: rgba(217, 45, 70, 0.22);
  background: var(--danger-soft);
  color: var(--danger);
}

.empty-state--compact {
  padding: 10px;
  font-size: 12px;
}

.notification-stack {
  position: fixed;
  top: 84px;
  right: 24px;
  z-index: var(--z-toast);
  display: grid;
  gap: 12px;
  width: min(440px, calc(100vw - 48px));
  pointer-events: none;
}

.notification-stack > * {
  pointer-events: auto;
}

.toast {
  display: none;
  width: 100%;
  border: 1px solid rgba(11, 143, 112, 0.22);
  border-radius: 8px;
  background: #f7fffb;
  color: var(--primary);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 850;
}

.toast--danger {
  border-color: rgba(217, 45, 70, 0.25);
  background: var(--danger-soft);
  color: var(--danger);
}

.toast.is-visible {
  display: block;
  animation: notification-enter 160ms ease-out;
}

@keyframes notification-enter {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.async-task-notice {
  display: block;
  width: 100%;
  border: 1px solid rgba(45, 110, 217, 0.25);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.async-task-notice[hidden] {
  display: none;
}

.async-task-notice__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.async-task-notice__head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.async-task-notice__head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.video-task-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: rgba(45, 110, 217, 0.25);
  color: var(--blue);
}

.video-task-trigger[hidden] {
  display: none;
}

.video-task-trigger__summary {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 850;
}

.async-task-notice__list {
  display: grid;
  max-height: min(460px, calc(100vh - 110px));
  overflow-y: auto;
}

.async-task-notice__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
}

.async-task-notice__item + .async-task-notice__item {
  border-top: 1px solid var(--line-soft);
}

.async-task-notice__indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(45, 110, 217, 0.12);
}

.async-task-notice__item.is-running .async-task-notice__indicator {
  animation: async-task-pulse 1.4s ease-in-out infinite;
}

.async-task-notice__item.is-success {
  background: rgba(11, 143, 112, 0.04);
}

.async-task-notice__item.is-success .async-task-notice__indicator {
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(11, 143, 112, 0.12);
}

.async-task-notice__item.is-failed {
  background: var(--danger-soft);
}

.async-task-notice__item.is-failed .async-task-notice__indicator {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(217, 45, 70, 0.12);
}

.async-task-notice__content {
  min-width: 0;
}

.async-task-notice__content strong,
.async-task-notice__content p {
  display: block;
  margin: 0;
}

.async-task-notice__content p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.async-task-notice__actions {
  display: flex;
  gap: 8px;
}

.async-task-notice__time {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

@keyframes async-task-pulse {
  0%, 100% { opacity: 0.65; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.08); }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-modal) + 10);
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.36);
  padding: 24px;
}

.modal-backdrop.is-visible {
  display: flex;
}

.modal {
  width: min(460px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-modal);
}

.modal__body {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding: 18px;
}

.modal__body h2 {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 900;
}

.modal__body p {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
}

.modal__meta {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--muted);
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.modal__input {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 12px;
}

.modal__input[hidden],
.modal__input .inline-alert[hidden] {
  display: none;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: var(--surface-raised);
  padding: 12px 18px;
}

.overlay-node-host[hidden] {
  display: none;
}

body.has-edit-overlay {
  overflow: hidden;
}

body.has-edit-overlay .async-task-notice,
body.has-edit-overlay .video-task-trigger {
  display: none !important;
}

.edit-overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.42);
  padding: 24px;
}

.edit-overlay-backdrop.is-visible {
  display: flex;
}

.edit-overlay {
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-modal);
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  transition: opacity 160ms ease, transform 160ms ease;
}

.edit-overlay-backdrop.is-visible .edit-overlay {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.edit-overlay__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, var(--surface-raised));
  padding: 18px 20px;
}

.edit-overlay__head h2 {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 950;
}

.edit-overlay__head p {
  max-width: 760px;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.edit-overlay__head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.edit-overlay__body {
  overflow: auto;
  padding: 18px;
}

.edit-overlay__body > .admin-panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.edit-overlay__body > .admin-panel > .admin-panel__head {
  display: none;
}

.edit-overlay__body > .admin-panel > .panel__body,
.edit-overlay__body > .admin-panel > .admin-action-footer {
  padding-right: 0;
  padding-left: 0;
}

.edit-overlay__body > .admin-panel > .admin-action-footer {
  position: sticky;
  bottom: -18px;
  z-index: 1;
  margin: 18px -18px -18px;
  padding: 14px 18px;
}

.edit-overlay__body > .admin-panel > .admin-action-footer.admin-action-footer--flow {
  position: static;
  bottom: auto;
  z-index: auto;
  margin: 18px 0 0;
  padding: 14px 0 0;
  background: transparent;
}

.edit-overlay .detail-section + .detail-section,
.edit-overlay .detail-section + .admin-action-box,
.edit-overlay .admin-action-box + .detail-section {
  margin-top: 18px;
}

.edit-overlay .admin-action-box {
  margin-top: 0;
}

@media (max-width: 1180px) {
  .summary-grid,
  .definition-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid,
  .content-grid--wide,
  .matrix-layout,
  .model-layout,
  .admin-workspace--split,
  .admin-workspace--split-wide {
    grid-template-columns: 1fr;
  }

  .toolbar--dense,
  .admin-toolbar--dense,
  .admin-toolbar--commercial {
    gap: 8px;
  }
}

@media (max-width: 820px) {
  :root {
    --admin-page-padding-x: 16px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: 100%;
    max-width: 100vw;
    position: static;
    height: auto;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
    overscroll-behavior-x: contain;
  }

  .sidebar-brand {
    flex: 0 0 auto;
    min-height: 38px;
    margin: 0 4px 0 0;
    padding: 0 12px 0 0;
    border-right: 1px solid var(--line-soft);
    border-bottom: 0;
  }

  .sidebar-brand span {
    display: none;
  }

  .nav-group {
    display: flex;
    gap: 8px;
    padding-top: 0;
  }

  .nav-label {
    display: none;
  }

  .nav-item {
    width: auto;
    flex: 0 0 auto;
    min-height: 38px;
    white-space: nowrap;
  }

  .main {
    padding: 16px;
  }

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

  .panel__head,
  .admin-panel__head {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar__actions,
  .form-footer,
  .admin-action-footer,
  .key-box {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-grid,
  .deployment-grid,
  .definition-grid,
  .form-grid,
  .language-tabs,
  .toolbar,
  .toolbar--dense,
  .toolbar--calls,
  .admin-toolbar,
  .admin-toolbar--dense,
  .admin-toolbar--commercial,
  .task-center__toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .product-entitlement-matrix__notice {
    align-items: stretch;
    flex-direction: column;
  }

  .call-event-row {
    grid-template-columns: 1fr;
  }

  .diagnostic-conclusion {
    grid-template-columns: 1fr;
  }

  .topbar__actions .button,
  .form-footer .button,
  .admin-action-footer .button,
  .toolbar .button,
  .admin-toolbar .button,
  .modal__footer .button,
  .edit-overlay__head-actions .button {
    width: 100%;
  }

  .panel__head .button,
  .admin-panel__head .button,
  .table-wrap .button {
    width: auto;
  }

  .modal__footer {
    flex-direction: column-reverse;
  }

  .edit-overlay-backdrop {
    align-items: stretch;
    padding: 0;
  }

  .edit-overlay {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .edit-overlay__head {
    flex-direction: column;
    padding: 16px;
  }

  .edit-overlay__head-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .edit-overlay__body {
    padding: 14px;
  }

  .edit-overlay__body > .admin-panel > .admin-action-footer {
    bottom: -14px;
    margin: 14px -14px -14px;
    padding: 12px 14px;
  }
}

@media (max-width: 480px) {
  :root {
    --admin-page-padding-x: 12px;
    --table-min-width: 700px;
    --table-compact-min-width: 520px;
  }

  .auth-screen {
    padding: 14px;
  }

  .auth-card {
    padding: 20px;
  }

  .sidebar {
    padding: 10px 12px;
  }

  .nav-item {
    min-height: 36px;
    padding: 0 9px;
    font-size: 13px;
  }

  .nav-key {
    width: 24px;
    height: 21px;
  }

  .main {
    padding-top: 16px;
  }

  h1 {
    font-size: 22px;
  }

  .summary-card strong {
    font-size: 20px;
  }

  .panel__head,
  .panel__body,
  .toolbar {
    padding: 12px;
  }

  th,
  td {
    padding: 10px 12px;
  }

  .detail-readout div,
  .config-readout div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .config-readout dd {
    text-align: left;
  }

  .notification-stack {
    top: 76px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .async-task-notice__item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .async-task-notice__item .async-task-notice__actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal {
    max-height: calc(100vh - 24px);
  }
}

/* Matrix editing and batch review share one saved configuration. */
.character-matrix-panel { overflow: visible; }
.character-matrix-panel .form-section { grid-template-columns: minmax(0, 1fr); }
.character-matrix-panel .settings-column,
.character-matrix-panel .settings-column > *,
.character-matrix-panel .matrix-layout > * { min-width: 0; }
.matrix-config-section, .matrix-comparison { border: 1px solid var(--line-soft); border-radius: 8px; padding: 12px; }
.matrix-config-section > summary, .matrix-comparison > summary { cursor: pointer; font-weight: 750; }
.matrix-config-section[open] > summary, .matrix-comparison[open] > summary { margin-bottom: 12px; }
.matrix-comparison + .matrix-comparison { margin-top: 10px; }
.matrix-comparison-scroll { overflow-x: auto; }
.matrix-comparison table { width: 100%; min-width: 340px; font-size: 12px; }
.matrix-comparison th, .matrix-comparison td { padding: 8px 5px; text-align: right; white-space: nowrap; }
.matrix-comparison th:first-child, .matrix-comparison td:first-child { text-align: left; white-space: normal; }
.matrix-footer-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 820px) {
  .summary-grid--matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .matrix-action-footer { flex-wrap: wrap; gap: 8px; }
}

.admin-pagination { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; margin-top:16px; padding:12px 16px; border:1px solid var(--border, #dce3eb); border-radius:12px; background:var(--panel, #fff); }
[data-list-loading] { padding:8px 12px; color:#596579; }
#view-orders table { table-layout:fixed; min-width:860px; }
#view-orders th:first-child { width:160px; }
#view-orders th:nth-child(3) { width:150px; }
#view-orders th:last-child { width:76px; }
#view-orders td { overflow-wrap:anywhere; white-space:normal; }
#view-orders td:last-child, #view-orders th:last-child { position:sticky; right:0; background:var(--panel, #fff); }
