:root {
  --bg: #f3f6fa;
  --bg-grid: rgba(7, 17, 31, 0.04);
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --surface-blue: #edf7fc;
  --sidebar: #0b1220;
  --sidebar-panel: #111a2e;
  --sidebar-muted: #92a2b6;
  --text: #172033;
  --muted: #64748b;
  --border: #d8e2ee;
  --border-strong: #bdcbdc;
  --primary: #0f766e;
  --primary-hover: #0b5f59;
  --primary-soft: #e4f4f1;
  --telegram: #229ed9;
  --telegram-soft: #e5f5fc;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --danger-soft: #ffebe9;
  --warning: #d97706;
  --warning-soft: #fff4dd;
  --success: #15803d;
  --success-soft: #e7f7eb;
  --accent: var(--primary);
  --accent-soft: var(--primary-soft);
  --text-muted: var(--muted);
  --shadow-sm: 0 1px 2px rgba(7, 17, 31, 0.06);
  --shadow-md: 0 18px 44px rgba(15, 32, 52, 0.1);
  --shadow-lg: 0 26px 70px rgba(7, 17, 31, 0.16);
  --brand-glow: 0 16px 36px rgba(34, 158, 217, 0.25);
  --radius: 16px;
  --radius-sm: 10px;
}

/* Telegram join target library and batch operation */
body > .modal-backdrop.modal-theme-scope > .telegram-join-modal-panel {
  width: min(860px, calc(100vw - 48px));
  height: min(760px, calc(100dvh - 48px));
}

body > .modal-backdrop.modal-theme-scope > .telegram-join-target-modal-panel {
  width: min(640px, calc(100vw - 48px));
  max-height: min(720px, calc(100dvh - 48px));
}

body > .modal-backdrop.modal-theme-scope .telegram-join-modal-body,
body > .modal-backdrop.modal-theme-scope .telegram-join-target-modal-body {
  display: grid;
  align-content: start;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 2px 4px;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-account-bar,
body > .modal-backdrop.modal-theme-scope .telegram-join-operation-head,
body > .modal-backdrop.modal-theme-scope .telegram-join-operation-actions,
body > .modal-backdrop.modal-theme-scope .telegram-join-selection-meta,
body > .modal-backdrop.modal-theme-scope .field-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-account-bar {
  min-height: 58px;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fafafa;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-account-bar > div:first-child,
body > .modal-backdrop.modal-theme-scope .telegram-join-operation-head > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-account-bar span,
body > .modal-backdrop.modal-theme-scope .telegram-join-operation-head span,
body > .modal-backdrop.modal-theme-scope .telegram-join-selection-meta {
  color: #747474;
  font-size: 12px;
  line-height: 18px;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-account-bar strong,
body > .modal-backdrop.modal-theme-scope .telegram-join-operation-head strong {
  overflow: hidden;
  color: #111111;
  font-size: 14px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-account-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-toolbar label,
body > .modal-backdrop.modal-theme-scope .telegram-join-target-fields label {
  min-width: 0;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-selection-meta {
  justify-content: flex-start;
  min-height: 28px;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-selection-meta > span {
  margin-right: auto;
  color: #555555;
  font-weight: 600;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-selection-meta .text-action {
  min-height: 28px;
  padding: 0 6px;
  color: #555555;
  font-size: 12px;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-selection-meta .text-action:not(:disabled):hover {
  color: #000000;
  background: #f2f2f2;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-list {
  display: grid;
  min-height: 150px;
  max-height: 292px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  background: #ffffff;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-list.list-empty,
body > .modal-backdrop.modal-theme-scope .telegram-join-candidate-list.list-empty {
  place-content: center;
  min-height: 132px;
  padding: 24px;
  color: #858585;
  font-size: 13px;
  text-align: center;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 62px;
  border-bottom: 1px solid #eeeeee;
  padding: 8px 10px;
  background: #ffffff;
  transition: background-color 120ms ease;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-row:last-child {
  border-bottom: 0;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-row:hover {
  background: #fafafa;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-row.selected {
  background: #f3f7f6;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-row.disabled {
  opacity: 0.58;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-selector {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-selector input[type="checkbox"] {
  position: relative;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  appearance: none;
  border: 1px solid #b8b8b8;
  border-radius: 4px;
  padding: 0;
  background: #ffffff;
  box-shadow: none;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-selector input[type="checkbox"]:checked {
  border-color: #111111;
  background: #111111;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-selector input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 5px;
  width: 5px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-selector input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.2);
  outline-offset: 2px;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-main,
body > .modal-backdrop.modal-theme-scope .telegram-join-operation-item-main,
body > .modal-backdrop.modal-theme-scope .telegram-join-candidate-row > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-main strong,
body > .modal-backdrop.modal-theme-scope .telegram-join-operation-item-main strong,
body > .modal-backdrop.modal-theme-scope .telegram-join-candidate-row strong {
  overflow: hidden;
  color: #222222;
  font-size: 13px;
  line-height: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-main small,
body > .modal-backdrop.modal-theme-scope .telegram-join-operation-item-main small,
body > .modal-backdrop.modal-theme-scope .telegram-join-candidate-row small {
  overflow: hidden;
  color: #858585;
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-row > .text-action {
  min-height: 30px;
  padding: 0 8px;
  color: #555555;
  background: transparent;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-row > .text-action:not(:disabled):hover {
  color: #000000;
  background: #eeeeee;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-operation {
  display: grid;
  gap: 10px;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 12px;
  background: #fafafa;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-operation.hidden {
  display: none;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-operation-actions {
  flex: 0 0 auto;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6e6e6;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #111111;
  transition: width 220ms ease;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-operation-items {
  display: grid;
  max-height: 210px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-operation-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  border-top: 1px solid #e8e8e8;
  padding: 7px 0;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-operation-item:first-child {
  border-top: 0;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-item-status,
body > .modal-backdrop.modal-theme-scope .telegram-join-operation-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 8px;
  color: #666666;
  background: #eeeeee;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-status-running {
  color: #075985;
  background: #e0f2fe;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-status-success {
  color: #166534;
  background: #dcfce7;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-status-warning {
  color: #92400e;
  background: #fef3c7;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-status-danger {
  color: #b91c1c;
  background: #fee2e2;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 6px;
  padding: 0 8px;
  color: #222222;
  background: #eeeeee;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-open-link:hover {
  color: #000000;
  background: #e2e2e2;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-sync-warning {
  border-top: 1px solid #ead9b6;
  padding-top: 8px;
  color: #92400e;
  font-size: 12px;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-candidate-section,
body > .modal-backdrop.modal-theme-scope .telegram-join-target-fields {
  display: grid;
  gap: 10px;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-candidate-section {
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 12px;
  background: #fafafa;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-candidate-list {
  display: grid;
  max-height: 180px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #e8e8e8;
  border-radius: 9px;
  background: #ffffff;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-candidate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border: 0;
  border-bottom: 1px solid #eeeeee;
  border-radius: 0;
  padding: 7px 10px;
  color: #222222;
  background: #ffffff;
  box-shadow: none;
  text-align: left;
  transform: none;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-candidate-row:last-child {
  border-bottom: 0;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-candidate-row:not(:disabled):hover {
  color: #000000;
  background: #f3f3f3;
  box-shadow: none;
  transform: none;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-candidate-row:disabled {
  color: #999999;
  background: #fafafa;
  opacity: 0.68;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-candidate-row em {
  color: #777777;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-actions .ghost-danger {
  color: #c62828;
  background: #fff0f0;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-actions .ghost-danger:not(:disabled):hover {
  color: #b91c1c;
  background: #ffe2e2;
}

@media (max-width: 720px) {
  body > .modal-backdrop.modal-theme-scope > .telegram-join-modal-panel,
  body > .modal-backdrop.modal-theme-scope > .telegram-join-target-modal-panel {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    height: auto;
    max-height: calc(100dvh - 16px);
  }

  body > .modal-backdrop.modal-theme-scope .telegram-join-toolbar {
    grid-template-columns: 1fr;
  }

  body > .modal-backdrop.modal-theme-scope .telegram-join-toolbar > button {
    width: 100%;
  }

  body > .modal-backdrop.modal-theme-scope .telegram-join-account-bar,
  body > .modal-backdrop.modal-theme-scope .telegram-join-operation-head {
    align-items: flex-start;
  }

  body > .modal-backdrop.modal-theme-scope .telegram-join-selection-meta {
    flex-wrap: wrap;
  }

  body > .modal-backdrop.modal-theme-scope .telegram-join-selection-meta > span {
    flex-basis: 100%;
  }

  body > .modal-backdrop.modal-theme-scope .telegram-join-target-list {
    max-height: 250px;
  }

  body > .modal-backdrop.modal-theme-scope .telegram-join-operation-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body > .modal-backdrop.modal-theme-scope .telegram-join-operation-item .telegram-join-open-link {
    grid-column: 1 / -1;
    justify-self: start;
  }

  body > .modal-backdrop.modal-theme-scope .telegram-join-target-actions .modal-action-spacer {
    display: none;
  }
}

/* Workspace model center */
.ops-console-v3 .model-center-panel {
  overflow: visible;
}

.ops-console-v3 .model-center-defaults {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.ops-console-v3 .model-default-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--zen-border, var(--border));
  border-radius: var(--zen-radius-lg, 12px);
  background: var(--zen-surface-solid, var(--surface));
  box-shadow: var(--zen-shadow-xs, var(--shadow-sm));
}

.ops-console-v3 .model-default-card.configured {
  border-color: rgba(24, 204, 99, 0.32);
}

.ops-console-v3 .model-default-card.missing {
  background: var(--zen-bg-stripe, var(--surface-subtle));
}

.ops-console-v3 .model-default-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ops-console-v3 .model-default-card-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ops-console-v3 .model-default-card-head strong {
  color: var(--zen-text, var(--text));
  font-size: 14px;
  line-height: 20px;
}

.ops-console-v3 .model-default-card-head span,
.ops-console-v3 .model-default-card > small,
.ops-console-v3 .model-center-empty-inline {
  color: var(--zen-text-3, var(--text-muted));
  font-size: 12px;
  line-height: 18px;
}

.ops-console-v3 .model-default-card label,
.ops-console-v3 .model-default-card .enhanced-select {
  width: 100%;
  min-width: 0;
}

.ops-console-v3 .model-center-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 420px) auto;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}

.ops-console-v3 .model-config-search-field {
  width: 100%;
}

.ops-console-v3 .model-center-toolbar #refreshModelCenter {
  min-width: 72px;
}

.ops-console-v3 .model-config-list {
  min-height: 220px;
  border: 1px solid var(--zen-border, var(--border));
  border-radius: var(--zen-radius-lg, 12px);
  background: var(--zen-surface-solid, var(--surface));
  overflow: hidden;
}

.ops-console-v3 .model-config-list.list-empty {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  padding: 44px 20px;
  color: var(--zen-text-3, var(--text-muted));
  text-align: center;
}

.ops-console-v3 .model-config-list.list-empty strong {
  color: var(--zen-text, var(--text));
  font-size: 15px;
}

.ops-console-v3 .model-center-error button {
  margin-top: 8px;
}

.ops-console-v3 .model-config-table {
  min-width: 0;
}

.ops-console-v3 .model-config-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.15fr) minmax(190px, 1.25fr) 108px 150px minmax(130px, .9fr) 210px;
  align-items: center;
  min-width: 0;
  border-bottom: 1px solid var(--zen-border, var(--border));
}

.ops-console-v3 .model-config-row:last-child {
  border-bottom: 0;
}

.ops-console-v3 .model-config-head {
  min-height: 42px;
  color: var(--zen-text-3, var(--text-muted));
  background: var(--zen-bg-stripe, var(--surface-subtle));
  font-size: 12px;
  font-weight: 600;
}

.ops-console-v3 .model-config-head > div,
.ops-console-v3 .model-config-cell {
  min-width: 0;
  padding: 12px 14px;
}

.ops-console-v3 .model-config-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 66px;
  color: var(--zen-text-2, var(--text));
  font-size: 13px;
}

.ops-console-v3 .model-config-row:not(.model-config-head):hover {
  background: var(--zen-hover, var(--surface-subtle));
}

.ops-console-v3 .model-config-row.disabled {
  background: var(--zen-bg-stripe, var(--surface-subtle));
}

.ops-console-v3 .model-config-name,
.ops-console-v3 .model-config-test-state {
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.ops-console-v3 .model-config-name strong {
  max-width: 100%;
  color: var(--zen-text, var(--text));
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .model-config-name span,
.ops-console-v3 .model-config-endpoint span,
.ops-console-v3 .model-config-usage span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .model-config-name span,
.ops-console-v3 .model-config-test-state small,
.ops-console-v3 .model-disabled-label {
  color: var(--zen-text-3, var(--text-muted));
  font-size: 12px;
}

.ops-console-v3 .model-config-test-state small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .model-disabled-label {
  color: var(--zen-danger, var(--danger));
}

.ops-console-v3 .model-config-actions {
  justify-content: flex-end;
  gap: 6px;
}

.ops-console-v3 .model-config-actions button {
  min-width: 56px;
  min-height: 36px;
  padding-inline: 10px;
}

.ops-console-v3 .model-config-actions .model-config-delete:not(.danger) {
  color: var(--zen-danger, var(--danger));
}

body > .modal-backdrop.modal-theme-scope > .model-config-modal-panel {
  width: min(620px, calc(100vw - 32px));
}

body > .modal-backdrop.modal-theme-scope .model-config-modal-body {
  padding-top: 18px;
}

body > .modal-backdrop.modal-theme-scope .model-config-form-grid {
  align-items: end;
}

body > .modal-backdrop.modal-theme-scope .model-config-enabled-row {
  min-height: 44px;
  margin: 0;
}

body > .modal-backdrop.modal-theme-scope #modelConfigTestStatus {
  margin-top: 14px;
}

@media (max-width: 1080px) {
  .ops-console-v3 .model-config-row {
    grid-template-columns: minmax(170px, 1.1fr) minmax(170px, 1.1fr) 100px 140px minmax(120px, .8fr) 146px;
  }

  .ops-console-v3 .model-config-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-console-v3 .model-config-actions .model-config-delete {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .ops-console-v3 .model-center-defaults {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .model-default-card {
    padding: 14px;
  }

  .ops-console-v3 .model-default-card select,
  .ops-console-v3 .model-default-card .enhanced-select-trigger {
    min-height: 44px;
  }

  .ops-console-v3 .model-center-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ops-console-v3 .model-center-toolbar #refreshModelCenter {
    min-width: 64px;
    min-height: 44px;
  }

  .ops-console-v3 .model-config-head {
    display: none;
  }

  .ops-console-v3 .model-config-list {
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  .ops-console-v3 .model-config-table {
    display: grid;
    gap: 10px;
  }

  .ops-console-v3 .model-config-row:not(.model-config-head) {
    display: grid;
    grid-template-columns: 1fr;
    border: 1px solid var(--zen-border, var(--border));
    border-radius: var(--zen-radius-lg, 12px);
    background: var(--zen-surface-solid, var(--surface));
    overflow: hidden;
  }

  .ops-console-v3 .model-config-cell {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    min-height: 44px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--zen-border, var(--border));
  }

  .ops-console-v3 .model-config-cell::before {
    content: attr(data-label);
    color: var(--zen-text-3, var(--text-muted));
    font-size: 12px;
    font-weight: 600;
  }

  .ops-console-v3 .model-config-cell:last-child {
    border-bottom: 0;
  }

  .ops-console-v3 .model-config-name,
  .ops-console-v3 .model-config-test-state {
    align-items: center;
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .ops-console-v3 .model-config-name::before,
  .ops-console-v3 .model-config-test-state::before {
    grid-row: 1 / span 2;
  }

  .ops-console-v3 .model-config-name strong,
  .ops-console-v3 .model-config-name span,
  .ops-console-v3 .model-config-test-state > * {
    grid-column: 2;
  }

  .ops-console-v3 .model-config-endpoint span,
  .ops-console-v3 .model-config-usage span {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ops-console-v3 .model-config-actions {
    display: grid;
    grid-template-columns: 88px repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .ops-console-v3 .model-config-actions::before {
    grid-column: 1;
  }

  .ops-console-v3 .model-config-actions button,
  .ops-console-v3 .model-config-actions .model-config-delete {
    grid-column: auto;
    min-width: 0;
    min-height: 44px;
  }

  body > .modal-backdrop.modal-theme-scope > .model-config-modal-panel {
    width: min(100%, calc(100vw - 20px));
  }

  body > .modal-backdrop.modal-theme-scope .model-config-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Reply effect laboratory */
.reply-lab-v2 {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 24px;
  min-height: 100%;
}

.reply-test-workspace,
.reply-test-scope-card,
.reply-test-pathbar {
  display: none !important;
}

.reply-lab-config,
.reply-lab-results {
  min-width: 0;
  background: #ffffff;
}

.reply-lab-config {
  display: grid;
  align-content: start;
  gap: 16px;
}

.reply-lab-source {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fafafa;
  color: #555555;
  line-height: 1.55;
}

.reply-lab-source strong {
  color: #111111;
  font-size: 14px;
}

.reply-lab-source > span,
.reply-lab-source > small {
  color: #737373;
  font-size: 12px;
}

.reply-lab-source > p {
  margin: 5px 0 0;
  color: #222222;
  white-space: pre-wrap;
}

.reply-lab-answer-prompt textarea {
  min-height: 150px;
  resize: vertical;
}

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

.reply-lab-results {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-left: 1px solid #e8e8e8;
  padding-left: 24px;
}

.reply-lab-result-head,
.reply-lab-candidate > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reply-lab-result-head > div {
  display: grid;
  gap: 3px;
}

.reply-lab-result-head strong {
  font-size: 16px;
  color: #101828;
}

.reply-lab-result-head span:not(.status-chip) {
  color: #667085;
  font-size: 12px;
}

.reply-lab-candidate {
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fff;
  padding: 14px;
}

.reply-lab-candidate.current {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .05);
}

.reply-lab-candidate.is-empty {
  display: none;
}

.reply-lab-candidate p {
  margin: 12px 0 0;
  white-space: pre-wrap;
  color: #344054;
  line-height: 1.6;
}

.reply-lab-candidate textarea {
  width: 100%;
  margin-top: 12px;
  min-height: 150px;
  resize: vertical;
}

.reply-lab-context {
  border-top: 1px solid #eaecf0;
  padding-top: 12px;
}

.reply-lab-context > summary {
  cursor: pointer;
  color: #475467;
  font-size: 13px;
  font-weight: 600;
}

.reply-lab-context .reply-test-timeline,
.reply-lab-context .reply-test-prompt-grid {
  margin-top: 12px;
}

.reply-lab-save-options {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.reply-lab-save-options label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  cursor: pointer;
}

.reply-lab-quick-grid label,
.reply-lab-advanced-body label {
  min-width: 0;
}

.reply-lab-persona-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-left: 3px solid #202020;
  padding: 7px 0 7px 12px;
}

.reply-lab-persona-summary.warning {
  border-left-color: #b54708;
}

.reply-lab-persona-summary > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.reply-lab-persona-summary span,
.reply-lab-persona-summary small {
  color: #737373;
  font-size: 12px;
  line-height: 1.45;
}

.reply-lab-persona-summary strong {
  overflow: hidden;
  color: #111111;
  font-size: 14px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-lab-persona-actions,
.reply-lab-result-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.reply-lab-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.reply-lab-advanced {
  border-top: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
}

.reply-lab-advanced > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  color: #333333;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.reply-lab-advanced > summary::-webkit-details-marker {
  display: none;
}

.reply-lab-advanced > summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #737373;
  font-size: 18px;
  font-weight: 400;
}

.reply-lab-advanced[open] > summary::after {
  content: "−";
}

.reply-lab-advanced > summary small {
  flex: 1 1 auto;
  color: #858585;
  font-size: 12px;
  font-weight: 400;
  text-align: right;
}

.reply-lab-advanced-body {
  display: grid;
  gap: 12px;
  border-top: 1px solid #eeeeee;
  padding: 14px 0;
}

.reply-lab-result-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.reply-lab-candidate textarea[readonly] {
  color: #111111;
  background: #ffffff;
  cursor: text;
}

.reply-lab-apply-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin-top: 12px;
  border-top: 1px solid #e8e8e8;
  padding-top: 12px;
  color: #333333;
  font-size: 13px;
  cursor: pointer;
}

/* Keep native choice controls compact inside the save dialog. */
.reply-lab-save-options label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  color: #262626;
  line-height: 1.4;
}

.reply-lab-save-options label:has(input:checked) {
  border-color: #bdbdbd;
  background: #fafafa;
}

.reply-lab-save-options input[type="radio"],
.reply-lab-apply-row input[type="checkbox"] {
  position: relative;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #a9a9a9;
  background: #ffffff;
  box-shadow: none;
}

.reply-lab-save-options input[type="radio"] {
  border-radius: 50%;
}

.reply-lab-save-options input[type="radio"]:checked {
  border-color: #171717;
  box-shadow: inset 0 0 0 4px #ffffff;
  background: #171717;
}

.reply-lab-apply-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.reply-lab-apply-row input[type="checkbox"] {
  border-radius: 4px;
}

.reply-lab-apply-row input[type="checkbox"]:checked {
  border-color: #171717;
  background: #171717;
}

.reply-lab-apply-row input[type="checkbox"]:checked::after {
  position: absolute;
  top: 3px;
  left: 5px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  content: "";
  transform: rotate(45deg);
}

.reply-lab-save-options input:focus-visible,
.reply-lab-apply-row input:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .reply-lab-v2 {
    grid-template-columns: 1fr;
  }

  .reply-lab-results {
    grid-row: auto;
    border-top: 1px solid #e8e8e8;
    border-left: 0;
    padding-top: 20px;
    padding-left: 0;
  }
}

@media (max-width: 600px) {
  .reply-lab-config,
  .reply-lab-results {
    padding-right: 0;
    padding-left: 0;
  }

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

  .reply-lab-persona-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .reply-lab-quick-grid {
    grid-template-columns: 1fr;
  }

  .reply-lab-persona-actions,
  .reply-lab-result-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .reply-lab-persona-actions button,
  .reply-lab-result-actions button {
    width: 100%;
  }
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  border: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Source Han Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 158, 217, 0.14), transparent 28rem),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    linear-gradient(180deg, var(--bg-grid) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
}

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

button {
  min-height: 38px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  color: #ffffff;
  background: var(--primary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button:not(:disabled):hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.18);
}

button:focus-visible,
.nav-item:focus-visible,
.account-row:focus-visible,
.group-row:focus-visible {
  outline: 3px solid rgba(34, 158, 217, 0.34);
  outline-offset: 2px;
}

button.is-loading {
  position: relative;
  pointer-events: none;
}

button.is-loading::after {
  content: "";
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  vertical-align: -0.12em;
  animation: spin 0.75s linear infinite;
}

button.secondary {
  border-color: var(--border-strong);
  color: var(--primary);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

button.secondary:not(:disabled):hover {
  border-color: var(--primary);
  color: var(--primary-hover);
  background: var(--primary-soft);
}

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

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: #ffffff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input,
select {
  min-height: 38px;
  padding: 0 10px;
}

textarea {
  min-height: 88px;
  padding: 10px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.login-shell {
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 430px);
  gap: 28px;
  width: min(1120px, 100%);
}

.login-hero {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 610px;
  overflow: hidden;
  border: 1px solid rgba(189, 203, 220, 0.7);
  border-radius: 32px;
  padding: 36px;
  color: #ffffff;
  background:
    linear-gradient(140deg, rgba(34, 158, 217, 0.2), transparent 45%),
    radial-gradient(circle at 80% 12%, rgba(15, 118, 110, 0.68), transparent 22rem),
    linear-gradient(145deg, #07111f, var(--sidebar-panel));
  box-shadow: var(--shadow-lg);
}

.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background:
    linear-gradient(90deg, #ffffff 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, #000000, transparent 72%);
}

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

.login-brand {
  border-bottom: 0;
  padding: 0;
}

.login-hero h1 {
  max-width: 660px;
  margin: 10px 0 16px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.login-hero-copy {
  max-width: 540px;
  margin: 0;
  color: #b6c5d9;
  font-size: 16px;
  line-height: 1.8;
}

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

.login-metrics div {
  border: 1px solid rgba(203, 213, 225, 0.18);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
}

.login-metrics strong,
.login-metrics span {
  display: block;
}

.login-metrics strong {
  font-size: 18px;
}

.login-metrics span {
  margin-top: 4px;
  color: #aebdd1;
  font-size: 12px;
}

.login-panel {
  display: grid;
  align-content: center;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
}

.login-panel h1,
.login-panel h2 {
  margin: 0 0 20px;
  color: var(--sidebar);
  font-size: 28px;
  letter-spacing: -0.04em;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

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

.form-error {
  color: var(--danger);
  font-size: 14px;
}

.login-security-note {
  margin-top: 18px;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  padding: 14px;
  color: #7a4305;
  background: var(--warning-soft);
  font-size: 13px;
  line-height: 1.65;
}

.app-shell {
  display: grid;
  grid-template-columns: 274px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 18px;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 4%, rgba(34, 158, 217, 0.26), transparent 17rem),
    linear-gradient(180deg, var(--sidebar), #070d18);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 15px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 35%),
    linear-gradient(145deg, var(--telegram), var(--primary));
  box-shadow: var(--brand-glow);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  transform: rotate(12deg);
}

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

.brand span {
  margin-top: 2px;
  color: var(--sidebar-muted);
  font-size: 12px;
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0.01em;
}

.nav-menu {
  display: grid;
  gap: 5px;
  align-content: start;
  flex: 1 1 auto;
}

.nav-item,
.logout-button {
  justify-content: flex-start;
  width: 100%;
  border-color: transparent;
  color: var(--sidebar-muted);
  background: transparent;
  text-align: left;
  box-shadow: none;
  font-weight: 600;
  border-radius: 13px;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(34, 158, 217, 0.26), rgba(15, 118, 110, 0.26));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: none;
}

.logout-button {
  border-color: rgba(255, 255, 255, 0.16);
}

.sidebar form {
  margin: 0;
}

.main {
  min-width: 0;
  padding: 28px;
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -28px -28px 18px;
  border: 1px solid rgba(217, 226, 238, 0.85);
  border-width: 0 0 1px;
  border-radius: 0;
  padding: 18px 28px;
  background: rgba(243, 246, 250, 0.88);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.account-switcher-bar {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 12px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(34, 158, 217, 0.18), transparent 46%),
    rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar-account-switcher {
  margin-top: auto;
}

.account-switcher-bar strong,
.account-switcher-bar small,
.switcher-label {
  display: block;
}

.switcher-label {
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-switcher-bar strong {
  margin-top: 4px;
  overflow: hidden;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-switcher-bar small {
  margin-top: 5px;
  display: -webkit-box;
  overflow: hidden;
  color: var(--sidebar-muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.account-switch-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 14px;
  padding: 10px;
  color: inherit;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
  text-align: left;
  cursor: pointer;
}

.account-switch-trigger:not(:disabled):hover {
  border-color: rgba(125, 211, 252, 0.52);
  color: #ffffff;
  background: rgba(34, 158, 217, 0.14);
  box-shadow: none;
  transform: none;
}

.account-switch-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  color: #dff7ff;
  background: rgba(125, 211, 252, 0.12);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.account-switch-modal {
  width: min(500px, 100%);
}

.account-switch-search {
  margin: 14px 0 12px;
}

.account-switch-list {
  display: grid;
  gap: 8px;
  max-height: min(420px, 58vh);
  overflow: auto;
}

.account-switch-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  color: var(--text);
  background: #ffffff;
  box-shadow: none;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
}

.account-switch-row::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 10px;
  width: 3px;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.16s ease;
}

button.account-switch-row:not(:disabled):hover,
button.account-switch-row:not(:disabled):focus-visible {
  border-color: rgba(37, 99, 235, 0.28);
  color: var(--text);
  background: #f8fbff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
  transform: none;
}

button.account-switch-row:active {
  transform: none;
}

.account-switch-row.current {
  border-color: rgba(34, 158, 217, 0.34);
  color: var(--text);
  background: linear-gradient(180deg, #f2fbff, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(34, 158, 217, 0.08);
}

button.account-switch-row.current:not(:disabled):hover,
button.account-switch-row.current:not(:disabled):focus-visible {
  border-color: rgba(34, 158, 217, 0.46);
  color: var(--text);
  background: linear-gradient(180deg, #eaf8fe, #ffffff);
}

button.account-switch-row:not(:disabled):hover::before,
button.account-switch-row:not(:disabled):focus-visible::before,
.account-switch-row.current::before {
  opacity: 1;
}

.account-switch-row-main,
.account-switch-row-status {
  display: grid;
  gap: 4px;
}

.account-switch-row-main {
  min-width: 0;
  padding-left: 10px;
}

.account-switch-row-main strong,
.account-switch-row-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-switch-row-main small {
  color: var(--muted);
  font-size: 12px;
}

.account-switch-row-status {
  align-content: center;
  justify-items: end;
  gap: 6px;
  min-width: max-content;
}

.top-space {
  margin-top: 16px;
}

.page-kicker {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-header h1 {
  margin: 0;
  color: var(--sidebar);
  font-size: 28px;
  letter-spacing: -0.05em;
}

.global-feedback {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1200;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  border: 1px solid #bfdbfe;
  border-left: 6px solid #2563eb;
  border-radius: 18px;
  padding: 12px 14px;
  color: #1e3a8a;
  background: linear-gradient(180deg, #eff6ff, #ffffff);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.global-feedback.hidden {
  display: none;
}

.global-feedback.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.global-feedback strong,
.global-feedback span {
  display: block;
}

.global-feedback strong {
  margin-bottom: 3px;
  font-size: 14px;
}

.global-feedback span {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.global-feedback-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: #ffffff;
  background: #2563eb;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.global-feedback.success {
  border-color: #86efac;
  border-left-color: var(--success);
  color: #14532d;
  background: linear-gradient(180deg, #f0fdf4, #ffffff);
}

.global-feedback.success .global-feedback-icon {
  background: var(--success);
}

.global-feedback.error {
  border-color: #fdba74;
  border-left-color: var(--danger);
  color: #7c2d12;
  background: linear-gradient(180deg, #fff7ed, #ffffff);
}

.global-feedback.error .global-feedback-icon {
  background: var(--danger);
}

.global-feedback.warning {
  border-color: #facc15;
  border-left-color: var(--warning);
  color: #713f12;
  background: linear-gradient(180deg, #fefce8, #ffffff);
}

.global-feedback.warning .global-feedback-icon {
  background: var(--warning);
}

.global-feedback.loading .global-feedback-icon {
  animation: feedbackPulse 0.9s ease-in-out infinite;
}

@keyframes feedbackPulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.96);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

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

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

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

.two-column,
.workbench-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.4fr);
  gap: 18px;
}

.workbench-layout {
  align-items: start;
}

.workspace-stack {
  display: grid;
  gap: 18px;
}

.metric-card,
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.metric-card::before {
  position: absolute;
  right: -34px;
  bottom: -38px;
  width: 118px;
  height: 118px;
  border-radius: 999px;
  background: rgba(34, 158, 217, 0.12);
  content: "";
}

.metric-card span {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  position: relative;
  z-index: 1;
  display: block;
  overflow-wrap: anywhere;
  color: var(--sidebar);
  font-size: 32px;
  letter-spacing: -0.05em;
}

.panel {
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid #eaf0f6;
  padding-bottom: 14px;
}

.panel h2 {
  margin: 0;
  color: var(--sidebar);
  font-size: 19px;
  letter-spacing: -0.04em;
}

.panel-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 8px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.panel-subhead h3 {
  margin: 0;
  font-size: 16px;
}

.subsection-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 12px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.progress-step {
  display: grid;
  gap: 6px;
  justify-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 6px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.progress-step span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-weight: 800;
}

.progress-step.done {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.progress-step.done span {
  background: var(--success);
  color: #ffffff;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.prominent-switch {
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 12px;
  background: var(--primary-soft);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.status-chip.listen-on {
  border-color: #86efac;
  color: #166534;
  background: var(--success-soft);
}

.status-chip.strong-on,
.status-chip.strong-off,
.status-chip.strong-warn {
  min-height: 30px;
  border-width: 1px;
  padding: 0 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.status-chip.strong-on {
  border-color: #16a34a;
  color: #14532d;
  background: var(--success-soft);
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.14);
}

.status-chip.strong-off {
  border-color: #cbd5e1;
  color: #475569;
  background: #f1f5f9;
}

.status-chip.strong-warn {
  border-color: #fb923c;
  color: #9a3412;
  background: var(--warning-soft);
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.16);
}

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

.filter-grid {
  display: grid;
  grid-template-columns: 150px 220px minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.filter-actions {
  display: flex;
  gap: 8px;
}

.status-label .status-chip {
  min-height: 38px;
  justify-content: center;
}

.disclosure-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  list-style: none;
}

.disclosure-panel summary::-webkit-details-marker {
  display: none;
}

.disclosure-panel[open] summary {
  margin-bottom: 18px;
}

.policy-advanced-panel {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: var(--surface-subtle);
}

.wide-label {
  display: block;
  margin-top: 14px;
}

.form-grid .wide-label {
  grid-column: 1 / -1;
  margin-top: 0;
}

.settings-block {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-subtle);
}

.global-switch-center {
  background: linear-gradient(180deg, #ffffff, #f3fbfa);
}

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

.global-switch-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  min-height: 146px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.global-switch-card:hover {
  border-color: rgba(27, 132, 122, 0.34);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.global-switch-card .toggle-switch-input {
  margin-top: 2px;
}

.global-switch-card .status-chip {
  grid-column: 1 / -1;
  justify-self: start;
}

.switch-card-main {
  display: grid;
  gap: 6px;
}

.switch-card-main strong {
  color: var(--text);
  font-size: 15px;
}

.switch-card-main span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.global-switch-card.enabled {
  border-color: rgba(27, 132, 122, 0.42);
  background: linear-gradient(180deg, #ffffff, #effaf8);
}

.global-switch-card.danger.enabled {
  border-color: rgba(220, 38, 38, 0.38);
  background: linear-gradient(180deg, #fffafa, #fff1f1);
}

.global-switch-card.disabled {
  opacity: 0.62;
}

.status-chip.success {
  color: var(--success);
  background: var(--success-soft);
}

.status-chip.warning {
  color: var(--warning);
  background: var(--warning-soft);
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 700;
}

.time-range-editor {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(27, 132, 122, 0.18);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fcfb);
}

.style-learning-panel {
  border-color: rgba(34, 158, 217, 0.24);
  background: linear-gradient(180deg, #ffffff, #f2f9fd);
}

.style-learning-panel .block-title strong {
  color: #0f5f85;
}

.learning-candidates {
  margin-top: 14px;
  border: 1px solid rgba(34, 158, 217, 0.2);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.learning-candidate-head,
.learning-candidate-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.learning-candidate-head strong {
  display: block;
  color: var(--text);
}

.learning-candidate-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.learning-candidate-toolbar {
  margin-top: 12px;
}

.learning-candidate-toolbar input {
  flex: 1;
  min-width: 180px;
}

.learning-candidate-toolbar .inline-status {
  min-width: 190px;
  margin-top: 0;
  text-align: center;
}

.learning-candidate-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.learning-candidate-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.learning-candidate-card:hover {
  border-color: rgba(34, 158, 217, 0.36);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.learning-candidate-card.selected {
  border-color: rgba(27, 132, 122, 0.42);
  background: #f2fbf9;
}

.learning-candidate-card input {
  width: 18px;
  min-height: 18px;
}

.learning-candidate-main {
  min-width: 0;
}

.learning-candidate-main strong,
.learning-candidate-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.learning-candidate-main strong {
  color: var(--text);
  font-size: 14px;
}

.learning-candidate-main small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.style-learning-analysis {
  margin-top: 14px;
  border: 1px solid rgba(27, 132, 122, 0.18);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.style-learning-controls {
  display: grid;
  grid-template-columns: minmax(180px, 260px) auto auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

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

.style-learning-result-grid > div {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: var(--surface);
}

.style-learning-result-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.style-learning-result-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 24px;
}

.style-learning-result-grid.success > div {
  border-color: rgba(27, 132, 122, 0.24);
  background: #f3fbf9;
}

.style-learning-result-grid.warning > div {
  border-color: rgba(245, 158, 11, 0.26);
  background: #fffaf0;
}

.style-learning-profile-preview {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  color: var(--text);
  background: #ffffff;
}

.style-learning-profile-preview.empty {
  color: var(--muted);
  background: #f8fafc;
}

.style-learning-profile-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.style-learning-profile-meta strong {
  color: var(--text);
  font-size: 14px;
}

.style-learning-profile-preview pre {
  overflow-x: auto;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  font: inherit;
  line-height: 1.65;
}

.style-profile-editor {
  margin-top: 14px;
}

.style-profile-editor textarea {
  min-height: 240px;
  line-height: 1.65;
}

.style-profile-actions,
.prompt-review-actions {
  margin-top: 12px;
}

.prompt-review-result {
  margin-top: 12px;
  border: 1px solid rgba(27, 132, 122, 0.2);
  border-radius: 14px;
  padding: 12px;
  background: #f6fcfb;
}

.prompt-review-result.empty {
  color: var(--muted);
  background: #f8fafc;
}

.prompt-review-result pre {
  overflow-x: auto;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  font: inherit;
  line-height: 1.7;
}

.time-range-toolbar,
.time-range-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.time-range-toolbar {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.time-range-rows {
  display: grid;
  gap: 10px;
}

.time-range-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto minmax(120px, 1fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: var(--surface);
}

.time-range-row label {
  gap: 4px;
}

.time-range-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.time-range-separator {
  margin-bottom: 11px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.time-range-summary {
  color: var(--text-muted);
  font-size: 13px;
}

.time-range-summary.warning {
  color: var(--warning);
  font-weight: 700;
}

.time-range-empty {
  display: grid;
  gap: 4px;
  border: 1px dashed rgba(21, 94, 117, 0.22);
  border-radius: 14px;
  padding: 14px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.74);
}

.time-range-empty strong {
  color: var(--text);
}

.block-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  color: var(--text-muted);
}

.block-title strong {
  color: var(--text);
}

.switch-label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
}

.switch-label > span {
  margin-bottom: 0;
}

.switch-label > small {
  grid-column: 1 / -1;
}

.switch-label .toggle-switch-input {
  justify-self: end;
}

.action-row,
.switch-row,
.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.action-row,
.switch-row {
  margin-top: 14px;
}

.weekday-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.weekday-toolbar > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.action-row input {
  flex: 1 1 180px;
}

.action-row.compact input {
  flex: 0 0 auto;
}

.switch-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.switch-row input:not(.toggle-switch-input) {
  width: auto;
  min-height: auto;
}

.toggle-switch-input {
  position: relative;
  flex: 0 0 auto;
  width: 46px !important;
  min-width: 46px;
  height: 26px;
  min-height: 26px !important;
  margin: 0;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(180deg, #e2e8f0, #cbd5e1);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.toggle-switch-input::after {
  position: absolute;
  top: calc(50% - 4px);
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22);
  content: "";
  transform: translate3d(0, -50%, 0);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.toggle-switch-input:checked {
  border-color: rgba(15, 118, 110, 0.74);
  background: linear-gradient(135deg, var(--primary), var(--telegram));
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.14), 0 0 0 3px rgba(15, 118, 110, 0.08);
}

.toggle-switch-input:checked::after {
  transform: translate(20px, -50%);
}

.toggle-switch-input:focus-visible {
  outline: none;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.14), 0 0 0 3px rgba(34, 158, 217, 0.18);
}

.toggle-switch-input:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.toggle-switch-input:disabled::after {
  box-shadow: none;
}

.login-step {
  display: grid;
  gap: 14px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.login-step h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.login-step p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.inline-status {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--muted);
  background: var(--surface-subtle);
  font-size: 14px;
}

.compact-status {
  margin-top: 14px;
}

.inline-status.success {
  border-color: #86efac;
  color: #166534;
  background: #f0fdf4;
}

.inline-status.warning {
  border-color: #facc15;
  color: #854d0e;
  background: #fefce8;
}

.steps {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.step-item {
  display: grid;
  gap: 3px;
  border: 1px solid var(--border);
  border-left: 4px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface-subtle);
}

.step-item strong {
  font-size: 14px;
}

.step-item span {
  color: var(--muted);
  font-size: 13px;
}

.step-item.active {
  border-left-color: var(--primary);
  background: var(--primary-soft);
}

.step-item.done {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.compact-summary {
  margin-bottom: 16px;
}

.status-box {
  display: grid;
  gap: 4px;
  margin: 12px 0 16px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 12px;
  padding: 13px 14px;
  background: var(--surface-subtle);
}

.status-box strong {
  font-size: 15px;
}

.status-box span {
  color: var(--muted);
  font-size: 13px;
}

.status-box.running {
  border-left-color: var(--success);
  background: #f0fdf4;
}

.status-box.starting {
  border-left-color: var(--warning);
  background: #fffbeb;
}

.status-box.error {
  border-left-color: var(--danger);
  background: #fef2f2;
}

.status-box.paused {
  border-left-color: #6b7280;
  background: #f3f4f6;
}

.readiness-card {
  display: grid;
  gap: 10px;
  margin: 14px 0 16px;
  border: 1px solid var(--border);
  border-left: 5px solid #94a3b8;
  border-radius: 14px;
  padding: 14px;
  background: #f8fafc;
}

.readiness-card.ready {
  border-left-color: var(--success);
  background: #f0fdf4;
}

.readiness-card.listen-only {
  border-left-color: var(--warning);
  background: #fffbeb;
}

.readiness-card.blocked {
  border-left-color: var(--danger);
  background: #fef2f2;
}

.readiness-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.readiness-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.readiness-card strong {
  font-size: 18px;
}

.readiness-detail {
  color: var(--text);
  font-size: 14px;
}

.readiness-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.readiness-reasons span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 999px;
  padding: 0 9px;
  color: #334155;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.danger-disclosure {
  border-color: #fed7aa;
  background: #fff7ed;
}

.operation-box,
.restart-notice {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  font-size: 14px;
}

.operation-box span {
  color: var(--muted);
  font-size: 13px;
}

.restart-notice {
  border-color: #facc15;
  color: #854d0e;
  background: #fefce8;
}

.hidden {
  display: none !important;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button:disabled:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.header-status-stack {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.refresh-state-chip {
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: #ffffff;
  font-size: 12px;
}

.refresh-state-chip.loading {
  border-color: var(--primary);
  color: var(--primary-hover);
  background: var(--primary-soft);
}

.refresh-state-chip.loading::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
}

.refresh-state-chip.success {
  border-color: #86efac;
  color: #166534;
  background: #f0fdf4;
}

.hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.list-empty,
.events-list,
.records-list {
  margin-top: 16px;
  color: var(--muted);
}

.list-empty {
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  padding: 18px;
  background: #f8fafc;
  text-align: center;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  width: 100%;
  min-height: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  padding: 13px 14px;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  text-align: left;
  box-shadow: none;
  cursor: pointer;
  border-left-width: 5px;
  border-left-color: #cbd5e1;
}

.account-row-listening {
  border-left-color: var(--success);
}

.account-row-pending {
  border-left-color: var(--warning);
}

.account-row-error {
  border-left-color: var(--danger);
}

.account-row-main {
  display: grid;
  gap: 8px;
}

.account-main-line {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.account-row-badges {
  display: inline-flex !important;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.account-main-line strong {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.account-sub-line {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
}

.account-status-line {
  display: block !important;
}

.account-status-grid {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.account-status-grid > span {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 7px;
  background: #ffffff;
}

.delete-modal-panel {
  width: min(680px, 100%);
}

.delete-impact {
  align-items: stretch;
}

.delete-impact span {
  display: block;
  margin-top: 6px;
  color: #7c2d12;
}

.account-row:hover,
.account-row:focus-visible,
.account-row.selected {
  border-color: #8dd8cf;
  background: linear-gradient(180deg, #ffffff, #f4fbfa);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.account-row-listening:hover,
.account-row-listening:focus-visible,
.account-row-listening.selected {
  border-left-color: var(--success);
}

.account-row-pending:hover,
.account-row-pending:focus-visible,
.account-row-pending.selected {
  border-left-color: var(--warning);
}

.account-row-error:hover,
.account-row-error:focus-visible,
.account-row-error.selected {
  border-left-color: var(--danger);
}

.account-row strong,
.account-row small {
  display: block;
}

.account-row span:not(.status-chip) {
  display: block;
}

.account-row .status-chip {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: middle;
}

.account-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.account-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.account-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  gap: 8px;
}

.account-row-actions em {
  margin-right: auto;
}

.policy-dialog-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: auto;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-left: 3px solid #cbd5e1;
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  text-align: left;
  box-shadow: none;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.policy-dialog-row:hover,
.policy-dialog-row:focus-visible,
.policy-dialog-row.selected {
  border-color: #8dd8cf;
  border-left-color: var(--primary);
  color: var(--text);
  background: linear-gradient(180deg, #ffffff, #f4fbfa);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transform: none;
}

.policy-dialog-row span,
.policy-dialog-row strong,
.policy-dialog-row small {
  display: block;
}

.policy-row-actions {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.policy-dialog-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.policy-dialog-row .policy-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  min-height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0 10px;
  color: #475569;
  background: #f8fafc;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.policy-dialog-row .policy-status-chip.enabled {
  border-color: #86efac;
  color: #166534;
  background: #f0fdf4;
}

.policy-dialog-row .policy-status-chip.disabled {
  border-color: #cbd5e1;
  color: #64748b;
  background: #f8fafc;
}

.policy-toggle-button {
  min-height: 30px;
  border-color: #cbd5e1;
  border-radius: 999px;
  padding: 0 12px;
  color: #475569;
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.policy-toggle-button.enabled {
  border-color: #86efac;
  color: #166534;
  background: #f0fdf4;
}

.policy-toggle-button:not(:disabled):hover {
  border-color: var(--primary);
  color: var(--primary-hover);
  background: #ecfeff;
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.12);
  transform: none;
}

.policy-workbench {
  display: grid;
  gap: 16px;
  align-content: start;
}

.policy-workbench-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #d9e8ee;
  border-radius: 18px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(34, 158, 217, 0.12), transparent 48%),
    linear-gradient(180deg, #ffffff, #f8fbfc);
}

.policy-workbench-header h2 {
  margin: 0;
}

.policy-workbench-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

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

.policy-status-card {
  min-height: 82px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 13px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.policy-status-card.wide {
  grid-column: span 2;
}

.policy-status-card span,
.policy-status-card strong {
  display: block;
}

.policy-status-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.policy-status-card strong {
  margin-top: 8px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.policy-empty-state {
  display: grid;
  gap: 6px;
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  padding: 18px;
  color: var(--muted);
  background: #f8fafc;
}

.policy-empty-state strong {
  color: var(--text);
}

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

.policy-config-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.policy-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.policy-card-head strong,
.policy-card-head span {
  display: block;
}

.policy-card-head .status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  line-height: 1;
}

.policy-card-head strong {
  font-size: 18px;
}

.policy-card-head div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.policy-prompt-panel {
  margin-top: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  background: #f8fafc;
}

.reply-preview-card {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
}

.reply-preview-result {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 16px;
  padding: 14px;
  background: #ffffff;
  color: var(--text);
}

.reply-preview-result.empty {
  color: var(--muted);
  background: #f8fafc;
  border-style: dashed;
}

.reply-preview-result.allow {
  border-color: rgba(15, 118, 110, 0.28);
  background: #f3fbf8;
}

.reply-preview-result.skip {
  border-color: rgba(185, 28, 28, 0.22);
  background: #fff7f7;
}

.reply-preview-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.reply-preview-topline strong {
  font-size: 15px;
}

.reply-preview-topline span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.reply-preview-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.reply-preview-badge.allow {
  color: #0f5132;
  background: #dff7ea;
}

.reply-preview-badge.skip {
  color: #8a1f1f;
  background: #ffe2e2;
}

.reply-preview-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reply-preview-check {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  background: #f1f5f9;
  font-size: 12px;
}

.reply-preview-check.pass {
  color: #0f5132;
  background: #e4f8ed;
}

.reply-preview-check.fail {
  color: #842029;
  background: #fde2e2;
}

.reply-preview-context {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.reply-preview-context strong {
  color: var(--text);
}

.reply-preview-prompt {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.reply-preview-prompt summary {
  cursor: pointer;
  color: var(--primary-hover);
  font-weight: 800;
}

.reply-preview-prompt pre {
  max-height: 260px;
  overflow: auto;
  margin: 10px 0 0;
  border-radius: 12px;
  padding: 12px;
  color: #12312f;
  background: #edf7f5;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
}

.policy-save-dock {
  position: sticky;
  bottom: 12px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 18px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.13);
  backdrop-filter: blur(14px);
}

.policy-save-dock.muted {
  border-color: var(--border);
  color: var(--muted);
  background: rgba(248, 250, 252, 0.94);
  box-shadow: none;
}

.policy-save-dock strong,
.policy-save-dock span {
  display: block;
}

.policy-save-dock span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.reply-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.reply-stat-card,
.stat-empty {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

.reply-stat-card strong,
.reply-stat-card span,
.reply-stat-card small {
  display: block;
}

.reply-stat-card span {
  margin-top: 6px;
  color: var(--primary);
  font-weight: 700;
}

.reply-stat-card small,
.stat-empty {
  color: var(--muted);
  font-size: 12px;
}

.compact-filter {
  margin: 12px 0;
}

.runtime-filter-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 14px;
  align-items: end;
  margin: 14px 0 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(135deg, #ffffff, #f8fffd);
  box-shadow: var(--shadow-sm);
}

.runtime-filter-card strong,
.runtime-filter-card span {
  display: block;
}

.runtime-filter-card strong {
  color: var(--text);
  font-size: 15px;
}

.runtime-filter-card > div > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.runtime-filter-control span {
  color: var(--primary);
  font-weight: 800;
}

.runtime-filter-control select {
  border-color: #b7dcd8;
  background:
    linear-gradient(180deg, #ffffff, #fbfefd);
  font-weight: 700;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
}

.tab-button {
  min-height: 36px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
}

.tab-button:hover,
.tab-button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.dialog-filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
  margin: 0 0 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-sm);
}

.dialog-filter-panel label {
  display: grid;
  gap: 6px;
}

.dialog-filter-panel span,
.dialog-filter-panel label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dialog-filter-search input {
  min-width: 0;
}

.dialog-quick-filters {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dialog-quick-filters .small-button.active {
  border-color: var(--primary);
  color: #0b5f59;
  background: #dcfce7;
}

.dialog-selection-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  border: 1px solid #b7dcd8;
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  padding: 10px 12px;
  background: #f0fdfa;
}

.dialog-selection-bar strong {
  color: var(--text);
}

.dialog-selection-bar span {
  flex: 1;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

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

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  background: #f8fafc;
}

tbody tr:hover {
  background: #fbfefd;
}

.inactive-dialog {
  opacity: 0.72;
}

.selected-table-row {
  background: var(--primary-soft);
}

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

td strong,
td small {
  display: block;
}

td small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.small-button {
  min-height: 30px;
  margin-right: 6px;
  padding: 0 10px;
  font-size: 12px;
}

.dialog-select-cell {
  width: 42px;
  text-align: center;
}

.dialog-checkbox {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  border-left-width: 1px;
  padding: 0;
  accent-color: var(--primary);
}

.leave-dialogs-modal {
  width: min(680px, 100%);
}

.leave-dialogs-modal .summary-list {
  max-height: 260px;
  overflow: auto;
}

.account-row .small-button,
.runtime-card .small-button {
  border-color: #cbd5e1;
  color: #0f766e;
  background: #ffffff;
}

.account-row .small-button:not(:disabled):hover,
.runtime-card .small-button:not(:disabled):hover {
  border-color: #0f766e;
  color: #0b5f59;
  background: #ecfeff;
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.12);
}

.summary-list {
  display: grid;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
}

.summary-list div {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface-subtle);
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  border: 1px solid #fed7aa;
  border-left: 4px solid var(--danger);
  border-radius: 14px;
  padding: 14px;
  background: #fff7ed;
}

.danger-zone div {
  display: grid;
  gap: 4px;
}

.danger-zone span {
  color: var(--muted);
  font-size: 13px;
}

.todo-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.check-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.check-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
}

.check-item strong,
.check-item small {
  display: block;
}

.check-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.check-item.pass {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.check-item.warning,
.check-item.info {
  border-left-color: #d97706;
  background: #fffbeb;
}

.check-item.fail {
  border-left-color: var(--danger);
  background: #fef2f2;
}

.todo-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
  font-size: 14px;
}

.todo-item.success {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.todo-item.warning {
  border-left-color: #d97706;
  background: #fffbeb;
}

.todo-item.error {
  border-left-color: var(--danger);
  background: #fef2f2;
}

.group-row,
.event-row,
.record-row {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  padding: 12px;
  background: #ffffff;
}

.group-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.group-title,
.event-message {
  color: var(--text);
  font-weight: 600;
}

.group-meta,
.event-meta,
.record-meta {
  color: var(--muted);
  font-size: 12px;
}

.record-row {
  gap: 10px;
}

.empty-guide {
  display: grid;
  gap: 8px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  padding: 16px;
  color: var(--muted);
  background: #f8fafc;
}

.empty-guide strong {
  color: var(--text);
}

.record-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: var(--surface-subtle);
}

.record-block.reply {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.record-block span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.record-block p {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
}

.record-detail {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #ffffff;
}

.record-detail summary {
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
}

.record-detail pre {
  overflow-x: auto;
  margin: 10px 0 0;
  color: var(--text);
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.runtime-overview {
  display: grid;
  gap: 12px;
  margin: 14px 0 18px;
}

.runtime-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  border: 1px solid var(--border);
  border-left: 4px solid #94a3b8;
  border-radius: 12px;
  padding: 13px 14px;
  background: #ffffff;
}

.runtime-card.running {
  border-left-color: var(--success);
}

.runtime-card.starting {
  border-left-color: var(--warning);
}

.runtime-card.error {
  border-left-color: var(--danger);
}

.runtime-card strong,
.runtime-card small {
  display: block;
}

.runtime-card small {
  margin-top: 4px;
  color: var(--muted);
}

.copy-policy-box {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface-subtle);
}

.copy-policy-box span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: transparent;
}

.modal-backdrop::before {
  content: "";
  position: fixed;
  inset: 0;
  background: transparent;
  backdrop-filter: none;
  transition: background 0.16s ease, backdrop-filter 0.16s ease;
}

.modal-backdrop.active-modal::before {
  background: rgba(11, 18, 32, 0.56);
  backdrop-filter: blur(7px);
}

.modal-backdrop:not(.active-modal)::before {
  background: transparent;
  backdrop-filter: none;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.account-modal-panel {
  width: min(920px, 100%);
}

.account-modal-mode-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
  margin: -4px 0 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  background: #f8fafc;
}

.account-modal-mode-strip span {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.account-modal-mode-strip strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.ops-console-v3[data-account-profile-mode="create"] #accountProfileModal [data-account-edit-only] {
  display: none;
}

.modal-section {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #ffffff;
}

.compact-head {
  margin-bottom: 0;
}

.compact-head h3 {
  margin: 0;
  font-size: 16px;
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-modal-actions {
  align-items: center;
  justify-content: space-between;
}

.account-footer-status {
  min-width: 0;
  max-width: 55%;
}

.account-footer-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.modal-head {
  position: sticky;
  top: -18px;
  z-index: 2;
  margin: -18px -18px 14px;
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.modal-head .page-kicker {
  margin: 0;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.modal-head h2 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.modal-close-button {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0;
  background: #ffffff;
  color: var(--muted);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

.modal-close-button:not(:disabled):hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-hover);
}

.modal-actions {
  position: sticky;
  bottom: -18px;
  z-index: 2;
  justify-content: flex-end;
  margin: 16px -18px -18px;
  border-top: 1px solid var(--border);
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.scheduled-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scheduled-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(420px, 1.28fr);
  gap: 18px;
  align-items: start;
}

.scheduled-main-stack {
  display: grid;
  gap: 18px;
}

.scheduled-dialogs-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.scheduled-dialog-card {
  display: grid;
  width: 100%;
  min-height: auto;
  gap: 6px;
  border: 1px solid var(--border);
  border-left: 4px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 13px;
  color: var(--text);
  background: #ffffff;
  text-align: left;
  box-shadow: none;
}

.scheduled-dialog-card:hover,
.scheduled-dialog-card:focus-visible,
.scheduled-dialog-card.selected {
  border-color: #8dd8cf;
  border-left-color: var(--primary);
  color: var(--text);
  background: linear-gradient(180deg, #ffffff, #f4fbfa);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transform: none;
}

button.scheduled-dialog-card:not(:disabled):hover,
button.scheduled-dialog-card:not(:disabled):focus-visible {
  border-color: #8dd8cf;
  border-left-color: var(--primary);
  color: var(--text);
  background: linear-gradient(180deg, #ffffff, #f4fbfa);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transform: none;
}

.scheduled-dialog-title {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.scheduled-dialog-meta,
.scheduled-dialog-next,
.panel-note {
  color: var(--muted);
  font-size: 12px;
}

.scheduled-dialog-next {
  line-height: 1.45;
}

.scheduled-task-list {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.scheduled-task-list.list-empty {
  display: block;
  overflow-x: visible;
  border: 1px dashed var(--border-strong);
  background: #f8fafc;
}

.scheduled-dialog-picker {
  gap: 8px;
}

.scheduled-dialog-picker input[type="search"] {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.scheduled-dialog-picker select {
  margin-top: 0;
}

.panel-note {
  margin: 4px 0 0;
}

.dialog-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.text-action {
  min-height: 28px;
  border: 0;
  border-radius: 8px;
  padding: 0 8px;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.text-action:not(:disabled):hover {
  background: var(--primary-soft);
  color: var(--primary-hover);
}

.danger-text {
  color: var(--danger);
}

.danger-text:not(:disabled):hover {
  background: #fff1f2;
  color: var(--danger);
}

.dialog-row-actions .list-action-button,
.account-row-actions .list-action-button,
.scheduled-actions .list-action-button,
td .list-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid #cfe4e0;
  border-radius: 999px;
  padding: 0 11px;
  color: #0f766e;
  background: #ffffff;
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.list-action-button:not(:disabled):hover {
  border-color: #9fd8d1;
  color: #075e57;
  background: #e7f7ed;
  box-shadow: none;
  transform: none;
}

.list-action-button.danger-text {
  border-color: #f5c9c3;
  color: #b42318;
  background: #ffffff;
}

.list-action-button.danger-text:not(:disabled):hover {
  border-color: #f0aaa0;
  color: #9f1c12;
  background: #fff0ed;
  box-shadow: none;
  transform: none;
}

.policy-modal-panel {
  width: min(1120px, calc(100vw - 40px));
}

.policy-modal-body .policy-workbench {
  border: 0;
  box-shadow: none;
  padding: 0;
}

.policy-workbench-home:empty {
  display: none;
}

.dialog-scheduled-modal {
  width: min(860px, calc(100vw - 40px));
}

.dialog-scheduled-modal .scheduled-task-list {
  margin-top: 14px;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main {
    padding: 16px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-switcher-bar {
    grid-template-columns: 1fr;
  }

  .account-switch-trigger,
  .account-switch-row {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .metrics-grid,
  .form-grid,
  .login-grid,
  .two-column,
  .workbench-layout,
  .scheduled-layout,
  .global-switch-grid {
    grid-template-columns: 1fr;
  }

  .policy-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid,
  .runtime-card,
  .progress-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    background-size: 22px 22px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    gap: 10px;
    padding: 12px;
  }

  .brand {
    padding: 4px 4px 10px;
  }

  .nav-menu {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .nav-item,
  .logout-button {
    flex: 0 0 auto;
    width: auto;
    min-height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 0 14px;
    white-space: nowrap;
  }

  .logout-button {
    margin-top: 0;
  }

  .sidebar-account-switcher {
    margin-top: 0;
  }

  .account-switcher-bar {
    gap: 10px;
    border-radius: 14px;
  }

  .main {
    padding: 12px;
  }

  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  button,
  input,
  select {
    min-height: 44px;
  }

  textarea {
    min-height: 120px;
  }

  .content-section.active {
    display: grid;
    gap: 12px;
  }

  .page-header,
  .account-switcher-bar,
  .panel,
  .metric-card {
    border-radius: 14px;
    padding: 14px;
  }

  .page-header {
    gap: 10px;
    margin-bottom: 10px;
  }

  .page-header h1 {
    font-size: 22px;
  }

  .status-chip {
    min-height: 30px;
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  .metrics-grid,
  .form-grid,
  .filter-grid,
  .dialog-filter-panel,
  .two-column,
  .workbench-layout,
  .scheduled-layout,
  .policy-status-grid,
  .login-grid {
    grid-template-columns: 1fr;
  }

  .policy-workbench-header,
  .policy-workbench-actions,
  .policy-card-head,
  .policy-save-dock {
    align-items: stretch;
    flex-direction: column;
  }

  .policy-status-card.wide {
    grid-column: auto;
  }

  .policy-save-dock {
    bottom: 8px;
  }

  .policy-save-dock button {
    width: 100%;
  }

  .metrics-grid {
    gap: 10px;
  }

  .time-range-editor {
    padding: 12px;
  }

  .time-range-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .time-range-index,
  .time-range-separator {
    margin-bottom: 0;
  }

  .time-range-row button {
    width: 100%;
  }

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

  .account-main-line,
  .panel-head,
  .panel-subhead,
  .subsection-title,
  .modal-head,
  .modal-actions,
  .account-row-actions,
  .action-row,
  .button-group {
    align-items: stretch;
    flex-direction: column;
  }

  .account-row-actions em {
    margin-right: 0;
  }

  .account-row-actions button,
  .modal-actions button,
  .action-row button,
  .button-group button,
  .quick-actions button {
    width: 100%;
  }

  .quick-actions,
  .steps,
  .copy-policy-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .step-item {
    min-width: 0;
  }

  .switch-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .account-status-grid,
  .account-sub-line {
    gap: 6px;
  }

  .account-row,
  .policy-dialog-row,
  .scheduled-dialog-card {
    padding: 12px;
  }

  .account-status-grid > span {
    width: 100%;
    justify-content: space-between;
  }

  .policy-dialog-row {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .policy-row-actions {
    justify-content: space-between;
    width: 100%;
  }

  .policy-toggle-button {
    min-width: 82px;
  }

  .scheduled-actions,
  .filter-actions,
  .dialog-selection-bar,
  .dialog-quick-filters {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .dialog-selection-bar span {
    flex: initial;
  }

  .dialog-quick-filters button,
  .dialog-selection-bar button {
    width: 100%;
  }

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

  .text-action {
    justify-content: center;
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--border);
    background: #ffffff;
  }

  .learning-candidate-head,
  .learning-candidate-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .learning-candidate-toolbar .inline-status {
    min-width: 0;
    width: 100%;
  }

  .learning-candidate-list {
    grid-template-columns: 1fr;
  }

  .style-learning-controls,
  .style-learning-result-grid {
    grid-template-columns: 1fr;
  }

  .style-learning-profile-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .runtime-filter-card {
    grid-template-columns: 1fr;
  }

  .table-wrap,
  .scheduled-task-list {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .event-row,
  .record-row,
  .group-row {
    overflow-wrap: anywhere;
  }

  table {
    min-width: 760px;
  }

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

  .modal-panel {
    width: 100%;
    max-height: none;
    min-height: 100vh;
    border-radius: 0;
    padding: 16px;
  }

  .modal-head {
    top: -16px;
    margin: -16px -16px 12px;
    padding: 10px 14px;
  }

  .modal-head h2 {
    font-size: 18px;
  }

  .modal-actions {
    position: sticky;
    bottom: 0;
    margin: 16px -16px -16px;
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
  }
}

@media (max-width: 640px) {
  .nav-menu {
    grid-template-columns: 1fr;
  }

  .panel,
  .metric-card {
    padding: 16px;
  }

  .panel-head,
  .button-group,
  .action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button-group button,
  .action-row button {
    width: 100%;
  }
}

/* 群航视觉重构 v2 */
:root {
  --ops-bg: #eef3f7;
  --ops-bg-deep: #dbe6ee;
  --ops-surface: #ffffff;
  --ops-surface-raised: #fbfdff;
  --ops-surface-muted: #f4f7fa;
  --ops-ink: #111827;
  --ops-ink-soft: #334155;
  --ops-muted: #64748b;
  --ops-line: #d7e1ea;
  --ops-line-strong: #b8c7d6;
  --ops-accent: #0d766d;
  --ops-accent-strong: #075e57;
  --ops-accent-soft: #dff4f0;
  --ops-blue: #229ed9;
  --ops-blue-soft: #e4f4fb;
  --ops-danger: #c2410c;
  --ops-danger-soft: #fff0e7;
  --ops-warning: #b45309;
  --ops-warning-soft: #fff7df;
  --ops-success: #166534;
  --ops-success-soft: #e7f7ed;
  --ops-radius-lg: 22px;
  --ops-radius-md: 16px;
  --ops-radius-sm: 12px;
  --ops-shadow-card: 0 1px 1px rgba(15, 23, 42, 0.04), 0 18px 45px rgba(15, 23, 42, 0.08);
  --ops-shadow-float: 0 24px 80px rgba(15, 23, 42, 0.18);
}

body {
  background:
    radial-gradient(circle at 8% -8%, rgba(34, 158, 217, 0.16), transparent 28rem),
    radial-gradient(circle at 110% 0%, rgba(13, 118, 109, 0.12), transparent 30rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.42) 0 25%, transparent 25% 100%),
    var(--ops-bg);
  background-size: auto, auto, 52px 52px, auto;
  color: var(--ops-ink);
}

button,
input,
select,
textarea {
  letter-spacing: 0;
}

button {
  min-height: 40px;
  border-radius: 12px;
  border-color: var(--ops-accent);
  background: linear-gradient(180deg, #119083, var(--ops-accent));
  box-shadow: 0 10px 22px rgba(13, 118, 109, 0.14);
}

button:not(:disabled):hover {
  background: linear-gradient(180deg, var(--ops-accent), var(--ops-accent-strong));
  box-shadow: 0 14px 28px rgba(13, 118, 109, 0.18);
  transform: translateY(-1px);
}

button.secondary {
  border-color: var(--ops-line);
  color: var(--ops-accent-strong);
  background: linear-gradient(180deg, #ffffff, #f5faf9);
  box-shadow: none;
}

button.secondary:not(:disabled):hover {
  border-color: rgba(13, 118, 109, 0.34);
  color: var(--ops-accent-strong);
  background: var(--ops-accent-soft);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

button.danger {
  border-color: var(--ops-danger);
  background: linear-gradient(180deg, #e76523, var(--ops-danger));
}

input,
select,
textarea {
  border-color: var(--ops-line);
  border-radius: 12px;
  background: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ops-accent);
  box-shadow: 0 0 0 4px rgba(13, 118, 109, 0.12);
}

.ops-console-shell {
  grid-template-columns: 282px minmax(0, 1fr);
}

.ops-console-shell .sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 18% 4%, rgba(34, 158, 217, 0.24), transparent 15rem),
    linear-gradient(180deg, #0c1726 0%, #07101d 52%, #050b13 100%);
}

.ops-console-shell .brand {
  padding-bottom: 18px;
}

.ops-console-shell .brand-mark {
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 42%),
    linear-gradient(145deg, var(--ops-blue), var(--ops-accent));
}

.ops-console-shell .nav-menu {
  gap: 6px;
}

.ops-console-shell .nav-item,
.ops-console-shell .logout-button {
  min-height: 40px;
  border-radius: 12px;
  color: #9fb0c4;
  font-size: 14px;
}

.ops-console-shell .nav-item:hover,
.ops-console-shell .nav-item.active {
  background:
    linear-gradient(90deg, rgba(34, 158, 217, 0.22), rgba(13, 118, 109, 0.16)),
    rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.ops-console-shell .account-switcher-bar {
  border-radius: 18px;
  border-color: rgba(148, 163, 184, 0.22);
  background:
    linear-gradient(135deg, rgba(34, 158, 217, 0.14), rgba(13, 118, 109, 0.08)),
    rgba(255, 255, 255, 0.05);
}

.ops-console-shell .main {
  padding: 30px;
}

.ops-console-shell .page-header {
  margin: -30px -30px 20px;
  border-color: rgba(184, 199, 214, 0.72);
  padding: 18px 30px;
  background: rgba(238, 243, 247, 0.86);
}

.ops-console-shell .page-kicker {
  color: var(--ops-accent);
}

.ops-console-shell .page-header h1,
.ops-console-shell .panel h2,
.ops-console-shell .login-panel h2 {
  color: var(--ops-ink);
}

.ops-console-shell .content-section.active {
  animation: opsSectionEnter 0.18s ease-out both;
}

@keyframes opsSectionEnter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ops-console-shell .metric-card,
.ops-console-shell .panel {
  border-color: rgba(184, 199, 214, 0.72);
  border-radius: var(--ops-radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 253, 255, 0.92));
  box-shadow: var(--ops-shadow-card);
}

.ops-console-shell .metric-card {
  min-height: 132px;
  padding: 22px;
}

.ops-console-shell .metric-card::before {
  right: -24px;
  bottom: -42px;
  width: 120px;
  height: 120px;
  background:
    radial-gradient(circle, rgba(34, 158, 217, 0.18), transparent 68%);
}

.ops-console-shell .metric-card span,
.ops-console-shell label span,
.ops-console-shell .hint,
.ops-console-shell .panel-note {
  color: var(--ops-muted);
}

.ops-console-shell .metric-card strong {
  color: var(--ops-ink);
  font-size: 34px;
}

.ops-console-shell .panel {
  padding: 22px;
}

.ops-console-shell .panel-head {
  border-bottom-color: rgba(215, 225, 234, 0.82);
}

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

.overview-action-panel .panel-head {
  margin-bottom: 12px;
}

.ops-console-shell .status-chip {
  border-color: var(--ops-line);
  background: #ffffff;
  color: var(--ops-ink-soft);
}

.ops-console-shell .status-chip.strong-on,
.ops-console-shell .status-chip.listen-on {
  border-color: rgba(22, 101, 52, 0.26);
  color: var(--ops-success);
  background: var(--ops-success-soft);
}

.ops-console-shell .status-chip.strong-warn {
  border-color: rgba(180, 83, 9, 0.28);
  color: var(--ops-warning);
  background: var(--ops-warning-soft);
}

.ops-console-shell .status-chip.strong-off {
  color: var(--ops-muted);
  background: var(--ops-surface-muted);
}

.ops-console-shell .summary-list div,
.ops-console-shell .list-empty,
.ops-console-shell .event-row,
.ops-console-shell .record-row,
.ops-console-shell .group-row,
.ops-console-shell .scheduled-dialog-card,
.ops-console-shell .policy-dialog-row,
.ops-console-shell .account-row,
.ops-console-shell .dialog-filter-panel,
.ops-console-shell .settings-block,
.ops-console-shell .policy-config-card {
  border-color: rgba(184, 199, 214, 0.72);
  border-radius: var(--ops-radius-md);
  background: rgba(255, 255, 255, 0.82);
}

.ops-console-shell .scheduled-dialog-card:hover,
.ops-console-shell .scheduled-dialog-card:focus-visible,
.ops-console-shell .scheduled-dialog-card.selected,
.ops-console-shell .policy-dialog-row:hover,
.ops-console-shell .policy-dialog-row:focus-visible,
.ops-console-shell .policy-dialog-row.selected,
.ops-console-shell .account-row:hover,
.ops-console-shell .group-row:hover {
  border-color: rgba(13, 118, 109, 0.32);
  background: linear-gradient(180deg, #ffffff, #f3faf8);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.ops-console-shell .global-feedback {
  border-radius: 18px;
  box-shadow: var(--ops-shadow-float);
}

.ops-console-shell .modal-backdrop.active-modal::before {
  background: rgba(8, 15, 27, 0.56);
}

.ops-console-shell .modal-panel {
  border: 1px solid rgba(184, 199, 214, 0.78);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  box-shadow: var(--ops-shadow-float);
}

.ops-console-shell .modal-head {
  background: rgba(255, 255, 255, 0.92);
}

.ops-console-shell .modal-close-button {
  border-color: var(--ops-line);
  color: var(--ops-ink-soft);
  background: #ffffff;
}

.ops-console-shell .toggle-switch-input {
  border-color: var(--ops-line-strong);
}

.ops-console-shell .toggle-switch-input:checked {
  border-color: var(--ops-accent);
  background: var(--ops-accent);
}

.ops-login-shell {
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 158, 217, 0.16), transparent 28rem),
    radial-gradient(circle at 100% 20%, rgba(13, 118, 109, 0.16), transparent 30rem),
    var(--ops-bg);
}

.ops-login-shell .login-hero {
  border-color: rgba(148, 163, 184, 0.24);
  background:
    radial-gradient(circle at 74% 0%, rgba(34, 158, 217, 0.28), transparent 24rem),
    linear-gradient(145deg, #07111f, #0c1726 62%, #07101d);
}

.ops-login-shell .login-hero-copy {
  max-width: 420px;
  color: #bfd0e2;
}

.ops-login-shell .login-panel {
  border-color: rgba(184, 199, 214, 0.72);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
}

@media (max-width: 980px) {
  .ops-console-shell {
    grid-template-columns: 1fr;
  }

  .overview-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ops-login-shell {
    display: block;
    min-height: 100vh;
    padding: 16px 0;
  }

  .ops-login-shell .login-layout {
    grid-template-columns: 1fr;
    gap: 12px;
    width: calc(100vw - 48px);
    max-width: 430px;
    margin: 0 auto;
  }

  .ops-login-shell .login-layout > * {
    min-width: 0;
  }

  .ops-login-shell .login-hero {
    min-height: auto;
    align-content: start;
    gap: 10px;
    border-radius: 22px;
    padding: 16px;
    overflow-wrap: anywhere;
  }

  .ops-login-shell .login-hero h1 {
    margin: 4px 0 6px;
    font-size: 24px;
    letter-spacing: -0.03em;
  }

  .ops-login-shell .login-hero-copy {
    font-size: 13px;
    line-height: 1.55;
  }

  .ops-login-shell .login-metrics {
    display: none;
  }

  .ops-login-shell .login-panel {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    border-radius: 22px;
    padding: 20px;
    overflow-wrap: anywhere;
  }

  .ops-login-shell .login-security-note {
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.55;
  }

  .small-button {
    min-height: 44px;
    padding: 0 12px;
    font-size: 14px;
  }

  .modal-close-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .ops-console-shell .main {
    padding: 12px;
  }

  .ops-console-shell .global-feedback {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }

  .ops-console-shell .sidebar {
    border-radius: 0 0 18px 18px;
  }

  .ops-console-shell .page-header {
    margin: 0 0 12px;
    padding: 14px;
  }

  .ops-console-shell .metric-card,
  .ops-console-shell .panel {
    border-radius: 16px;
    padding: 16px;
  }

  .overview-entry-grid {
    grid-template-columns: 1fr;
  }
}

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

/* 群航视觉重构 v3 */
:root {
  --v3-bg: #edf3f6;
  --v3-bg-grid: rgba(16, 42, 67, 0.055);
  --v3-sidebar: #07111f;
  --v3-sidebar-2: #0d1d2c;
  --v3-surface: #ffffff;
  --v3-surface-soft: #f6fafb;
  --v3-surface-strong: #e7eff3;
  --v3-ink: #0f172a;
  --v3-ink-2: #334155;
  --v3-muted: #64748b;
  --v3-line: #d6e2ea;
  --v3-line-strong: #b7c8d5;
  --v3-accent: #0f766e;
  --v3-accent-2: #155e75;
  --v3-accent-soft: #e2f4f1;
  --v3-blue: #229ed9;
  --v3-blue-soft: #e4f5fc;
  --v3-danger: #b42318;
  --v3-danger-soft: #fff0ed;
  --v3-warning: #b45309;
  --v3-warning-soft: #fff7df;
  --v3-success: #166534;
  --v3-success-soft: #e7f7ed;
  --v3-focus: rgba(34, 158, 217, 0.34);
  --v3-radius-xl: 28px;
  --v3-radius-lg: 20px;
  --v3-radius-md: 14px;
  --v3-radius-sm: 10px;
  --v3-shadow-panel: 0 1px 1px rgba(15, 23, 42, 0.04), 0 22px 48px rgba(15, 23, 42, 0.08);
  --v3-shadow-float: 0 28px 90px rgba(15, 23, 42, 0.22);
  --v3-motion: 0.18s ease;
  --v3-motion-fast: 0.14s ease;
  --v3-sidebar-feedback: 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes sidebarIconSettle {
  from {
    opacity: 0.62;
    transform: translateX(-4px) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes sidebarCopySettle {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.ops-console-v3,
.ops-login-v3 {
  color: var(--v3-ink);
  font-family: "Source Han Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.ops-console-v3,
.ops-login-v3,
.ops-console-v3 *,
.ops-login-v3 * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ops-console-v3::-webkit-scrollbar,
.ops-login-v3::-webkit-scrollbar,
.ops-console-v3 *::-webkit-scrollbar,
.ops-login-v3 *::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.ops-console-v3 {
  --v3-sidebar-width: 288px;
  grid-template-columns: var(--v3-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 158, 217, 0.14), transparent 30rem),
    radial-gradient(circle at 100% 8%, rgba(15, 118, 110, 0.1), transparent 34rem),
    linear-gradient(135deg, var(--v3-bg-grid) 0 1px, transparent 1px 22px),
    var(--v3-bg);
  transition: none;
}

.ops-console-v3.sidebar-collapsed {
  --v3-sidebar-width: 84px;
}

.ops-console-v3 *,
.ops-login-v3 * {
  min-width: 0;
}

.ops-console-v3 button,
.ops-login-v3 button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--v3-radius-md);
  padding: 0 16px;
  color: #ffffff;
  background: linear-gradient(180deg, #149286, var(--v3-accent));
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.16);
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  line-height: 1.2;
  touch-action: manipulation;
  transition:
    background var(--v3-motion),
    border-color var(--v3-motion),
    box-shadow var(--v3-motion),
    color var(--v3-motion),
    opacity var(--v3-motion),
    transform var(--v3-motion);
}

.ops-console-v3 button:not(:disabled):hover,
.ops-login-v3 button:not(:disabled):hover {
  background: linear-gradient(180deg, #0f766e, #0b5f59);
  box-shadow: 0 16px 30px rgba(15, 118, 110, 0.18);
  transform: translateY(-1px);
}

.ops-console-v3 button:active,
.ops-login-v3 button:active {
  transform: translateY(0) scale(0.99);
}

.ops-console-v3 button:disabled,
.ops-login-v3 button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 button.secondary,
.ops-login-v3 button.secondary {
  border-color: var(--v3-line);
  color: var(--v3-accent);
  background: linear-gradient(180deg, #ffffff, var(--v3-surface-soft));
  box-shadow: none;
}

.ops-console-v3 button.secondary:not(:disabled):hover,
.ops-login-v3 button.secondary:not(:disabled):hover {
  border-color: rgba(15, 118, 110, 0.36);
  color: #075e57;
  background: var(--v3-accent-soft);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.ops-console-v3 button.danger {
  border-color: rgba(180, 35, 24, 0.2);
  background: linear-gradient(180deg, #d92d20, var(--v3-danger));
  box-shadow: 0 12px 24px rgba(180, 35, 24, 0.16);
}

.ops-console-v3 button:focus-visible,
.ops-console-v3 .nav-item:focus-visible,
.ops-console-v3 .account-row:focus-visible,
.ops-console-v3 .group-row:focus-visible,
.ops-console-v3 .policy-dialog-row:focus-visible,
.ops-console-v3 .scheduled-dialog-card:focus-visible,
.ops-login-v3 button:focus-visible {
  outline: 3px solid var(--v3-focus);
  outline-offset: 3px;
}

.ops-console-v3 input,
.ops-console-v3 select,
.ops-console-v3 textarea,
.ops-login-v3 input {
  border-color: var(--v3-line);
  border-radius: var(--v3-radius-md);
  color: var(--v3-ink);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
}

.ops-console-v3 input:focus,
.ops-console-v3 select:focus,
.ops-console-v3 textarea:focus,
.ops-login-v3 input:focus {
  border-color: var(--v3-accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.ops-console-v3 label span,
.ops-login-v3 label span {
  color: var(--v3-muted);
  font-weight: 700;
}

.ops-console-v3 .sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 14px 14px;
  background:
    radial-gradient(circle at 18% 6%, rgba(34, 158, 217, 0.26), transparent 16rem),
    linear-gradient(180deg, var(--v3-sidebar-2), var(--v3-sidebar) 54%, #050a12);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05);
  contain: layout style;
  will-change: transform;
  transition: none;
}

.ops-console-v3 .nav-symbols {
  display: none;
}

.ops-console-v3 .brand {
  position: relative;
  gap: 12px;
  padding: 6px 8px 20px;
}

.ops-console-v3 .brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 44%),
    linear-gradient(145deg, var(--v3-blue), var(--v3-accent));
  box-shadow: 0 18px 34px rgba(34, 158, 217, 0.28);
  font-size: 12px;
  letter-spacing: -0.08em;
  transition:
    box-shadow var(--v3-sidebar-feedback),
    transform var(--v3-sidebar-feedback);
}

.ops-console-v3 .brand strong {
  color: #ffffff;
  letter-spacing: 0;
}

.ops-console-v3 .brand span {
  color: #9db2c7;
}

.ops-console-v3 .brand-copy {
  min-width: 0;
  max-width: 178px;
}

.ops-console-v3 .brand-copy,
.ops-console-v3 .nav-label,
.ops-console-v3 .nav-group-title,
.ops-console-v3 .account-switcher-detail,
.ops-console-v3 .account-switch-trigger {
  opacity: 1;
  transform: translateX(0);
  transition:
    opacity var(--v3-motion-fast),
    transform var(--v3-motion-fast),
    visibility 0s linear 0s;
  will-change: opacity, transform;
}

.ops-console-v3 .sidebar-toggle {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  margin-left: auto;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0;
  color: #c7d7e8;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  transition:
    background var(--v3-sidebar-feedback),
    border-color var(--v3-sidebar-feedback),
    color var(--v3-sidebar-feedback),
    transform var(--v3-sidebar-feedback);
}

.ops-console-v3 .sidebar-toggle:not(:disabled):hover {
  border-color: rgba(125, 211, 252, 0.46);
  color: #ffffff;
  background: rgba(34, 158, 217, 0.18);
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .nav-menu {
  display: grid;
  flex: 1 1 auto;
  gap: 7px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 6px;
}

.ops-console-v3 .nav-group {
  display: grid;
  gap: 5px;
}

.ops-console-v3 .nav-group + .nav-group {
  margin-top: 10px;
}

.ops-console-v3 .nav-group-title {
  padding: 9px 12px 4px;
  color: #6f86a2;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.ops-console-v3 .nav-item,
.ops-console-v3 .logout-button {
  position: relative;
  justify-content: flex-start;
  min-height: 42px;
  border-radius: 14px;
  padding: 0 12px;
  color: #aab9ca;
  background: transparent;
  box-shadow: none;
  font-weight: 800;
  gap: 10px;
  transform-origin: center;
  transition:
    background var(--v3-motion-fast),
    box-shadow var(--v3-motion-fast),
    color var(--v3-motion-fast),
    transform var(--v3-sidebar-feedback);
}

.ops-console-v3 .nav-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  line-height: 1;
}

.ops-console-v3 .nav-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.ops-console-v3 .nav-label {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .nav-item:hover,
.ops-console-v3 .nav-item.active {
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(34, 158, 217, 0.22), rgba(15, 118, 110, 0.14)),
    rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.11);
  transform: none;
}

.ops-console-v3 .nav-item.active::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 999px;
  background: var(--v3-blue);
  content: "";
}

.ops-console-v3 .account-switcher-bar {
  display: grid;
  flex: 0 0 auto;
  gap: 8px;
  border-color: rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
}

.ops-console-v3 .account-switcher-detail {
  display: grid;
  gap: 2px;
}

.ops-console-v3 .switcher-label {
  color: #7f95ad;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.ops-console-v3 .account-switcher-bar strong {
  margin-top: 0;
  font-size: 13px;
  line-height: 1.25;
}

.ops-console-v3 .account-switcher-bar small {
  margin-top: 0;
  -webkit-line-clamp: 1;
  color: #7f95ad;
  font-size: 11px;
  line-height: 1.35;
}

.ops-console-v3 .account-switch-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border-color: rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 0;
  color: #e6f3ff;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.ops-console-v3 .account-switch-trigger:hover {
  border-color: rgba(125, 211, 252, 0.42);
  color: #ffffff;
  background: rgba(34, 158, 217, 0.12);
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .account-switch-action {
  min-height: 28px;
  color: #b8cce0;
  background: rgba(125, 211, 252, 0.1);
}

.ops-console-v3 .sidebar-account-switcher {
  flex: 0 0 auto;
  margin-top: 0;
}

.ops-console-v3 .account-switch-modal {
  width: min(520px, 100%);
  max-height: min(620px, calc(100dvh - 48px));
  border-radius: 24px;
}

.ops-console-v3 .account-switch-search {
  margin: 12px 0 12px;
}

.ops-console-v3 .account-switch-list {
  gap: 8px;
  max-height: min(430px, 58vh);
}

.ops-console-v3 .account-switch-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border-color: rgba(183, 200, 213, 0.72);
  border-radius: 16px;
  color: var(--v3-ink);
  background: #ffffff;
  box-shadow: none;
  overflow: hidden;
  transform: none;
}

.ops-console-v3 .account-switch-row::before {
  background: linear-gradient(180deg, var(--v3-blue), var(--v3-accent));
}

.ops-console-v3 button.account-switch-row:not(:disabled):hover,
.ops-console-v3 button.account-switch-row:not(:disabled):focus-visible {
  border-color: rgba(15, 118, 110, 0.34);
  color: var(--v3-ink);
  background: linear-gradient(180deg, #ffffff, #f3faf8);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
  transform: none;
}

.ops-console-v3 .account-switch-row:hover {
  border-color: rgba(15, 118, 110, 0.34);
  color: var(--v3-ink);
  background: linear-gradient(180deg, #ffffff, #f3faf8);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
  transform: none;
}

.ops-console-v3 .account-switch-row.current {
  border-color: rgba(34, 158, 217, 0.4);
  color: var(--v3-ink);
  background: linear-gradient(180deg, #eef9fd, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(34, 158, 217, 0.1);
}

.ops-console-v3 button.account-switch-row.current:not(:disabled):hover,
.ops-console-v3 button.account-switch-row.current:not(:disabled):focus-visible {
  border-color: rgba(34, 158, 217, 0.52);
  background: linear-gradient(180deg, #e8f7fd, #ffffff);
}

.ops-console-v3 button.account-switch-row:active {
  transform: none;
}

.ops-console-v3 .account-switch-row-main {
  min-width: 0;
  padding-left: 10px;
}

.ops-console-v3 .account-switch-row-main small {
  color: var(--v3-muted);
}

.ops-console-v3 .account-switch-row-status {
  align-content: center;
  gap: 6px;
  min-width: max-content;
}

.ops-console-v3 .sidebar form {
  flex: 0 0 auto;
  margin: 0;
}

.ops-console-v3 .logout-button {
  width: 100%;
  justify-content: center;
}

.ops-console-v3 .account-compact-button {
  display: none;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border-color: rgba(125, 211, 252, 0.34);
  border-radius: 16px;
  padding: 0;
  color: #ffffff;
  background: linear-gradient(145deg, var(--v3-blue), var(--v3-accent));
  box-shadow: 0 12px 22px rgba(34, 158, 217, 0.18);
}

.ops-console-v3 .account-compact-button span {
  font-weight: 900;
}

.ops-console-v3 .mobile-menu-toggle {
  display: none;
}

.ops-console-v3 .sidebar-backdrop {
  display: none;
}

.ops-console-v3:not(.sidebar-collapsed) .brand-copy,
.ops-console-v3:not(.sidebar-collapsed) .nav-label,
.ops-console-v3:not(.sidebar-collapsed) .nav-group-title,
.ops-console-v3:not(.sidebar-collapsed) .account-switcher-detail,
.ops-console-v3:not(.sidebar-collapsed) .account-switch-trigger {
  animation: sidebarCopySettle var(--v3-sidebar-feedback) both;
}

.ops-console-v3.sidebar-collapsed .sidebar {
  padding: 18px 14px 14px;
}

.ops-console-v3.sidebar-collapsed .brand {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 6px;
  padding: 0 0 18px;
}

.ops-console-v3.sidebar-collapsed .brand-copy,
.ops-console-v3.sidebar-collapsed .nav-label,
.ops-console-v3.sidebar-collapsed .nav-group-title,
.ops-console-v3.sidebar-collapsed .account-switcher-detail,
.ops-console-v3.sidebar-collapsed .account-switch-trigger {
  max-width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-6px);
  visibility: hidden;
  white-space: nowrap;
  transition:
    opacity var(--v3-motion-fast),
    transform var(--v3-motion-fast),
    visibility 0s linear var(--v3-motion-fast);
}

.ops-console-v3.sidebar-collapsed .nav-group-title {
  padding: 0;
}

.ops-console-v3.sidebar-collapsed .brand-copy {
  display: none;
}

.ops-console-v3.sidebar-collapsed .nav-label,
.ops-console-v3.sidebar-collapsed .nav-group-title,
.ops-console-v3.sidebar-collapsed .account-switcher-detail,
.ops-console-v3.sidebar-collapsed .account-switch-trigger {
  display: none;
}

.ops-console-v3.sidebar-collapsed .sidebar-account-switcher + form .logout-button {
  display: none;
}

.ops-console-v3.sidebar-collapsed .brand-mark {
  width: 42px;
  height: 42px;
  animation: sidebarIconSettle var(--v3-sidebar-feedback) both;
}

.ops-console-v3.sidebar-collapsed .sidebar-toggle {
  position: static;
  margin: 6px auto 0;
  z-index: 2;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  animation: sidebarIconSettle var(--v3-sidebar-feedback) both;
}

.ops-console-v3.sidebar-collapsed .nav-menu,
.ops-console-v3.sidebar-collapsed .nav-group {
  justify-items: center;
}

.ops-console-v3.sidebar-collapsed .nav-group + .nav-group {
  margin-top: 14px;
}

.ops-console-v3.sidebar-collapsed .nav-item {
  display: grid;
  place-items: center;
  justify-content: center;
  width: 48px;
  min-width: 48px;
  padding: 0;
  gap: 0;
  animation: sidebarIconSettle var(--v3-sidebar-feedback) both;
}

.ops-console-v3.sidebar-collapsed .nav-icon {
  margin: 0;
}

.ops-console-v3.sidebar-collapsed .nav-item.active::before {
  left: -7px;
}

.ops-console-v3.sidebar-collapsed .account-switcher-bar {
  display: grid;
  place-items: center;
  border-color: transparent;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.ops-console-v3.sidebar-collapsed .account-compact-button {
  display: inline-grid;
  animation: sidebarIconSettle var(--v3-sidebar-feedback) both;
}

.ops-console-v3 .main {
  padding: 28px;
}

.ops-console-v3 .page-header {
  position: sticky;
  top: 0;
  z-index: 18;
  margin: -28px -28px 22px;
  border: 0;
  border-bottom: 1px solid rgba(183, 200, 213, 0.72);
  padding: 18px 28px;
  background: rgba(237, 243, 246, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
}

.ops-console-v3 .page-kicker {
  color: var(--v3-accent);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.ops-console-v3 .page-header h1 {
  color: var(--v3-ink);
  font-size: 30px;
  letter-spacing: -0.04em;
}

.ops-console-v3 .header-status-stack {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.ops-console-v3 .metrics-grid {
  gap: 16px;
}

.ops-console-v3 .metric-card,
.ops-console-v3 .panel {
  border: 1px solid rgba(183, 200, 213, 0.72);
  border-radius: var(--v3-radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 253, 0.95));
  box-shadow: var(--v3-shadow-panel);
}

.ops-console-v3 .metric-card {
  min-height: 134px;
  padding: 22px;
}

.ops-console-v3 .metric-card::before {
  right: -26px;
  bottom: -46px;
  width: 128px;
  height: 128px;
  background: radial-gradient(circle, rgba(34, 158, 217, 0.16), transparent 70%);
}

.ops-console-v3 .metric-card span,
.ops-console-v3 .hint,
.ops-console-v3 .panel-note,
.ops-console-v3 .scheduled-dialog-meta,
.ops-console-v3 .scheduled-dialog-next {
  color: var(--v3-muted);
}

.ops-console-v3 .metric-card strong {
  color: var(--v3-ink);
  font-size: 36px;
  letter-spacing: -0.05em;
}

.ops-console-v3 .panel {
  padding: 22px;
}

.ops-console-v3 .panel-head,
.ops-console-v3 .panel-subhead,
.ops-console-v3 .subsection-title {
  border-color: var(--v3-line);
}

.ops-console-v3 .panel h2,
.ops-console-v3 .panel-subhead h3,
.ops-console-v3 .subsection-title strong {
  color: var(--v3-ink);
}

.ops-console-v3 .overview-entry-grid {
  gap: 12px;
}

.ops-console-v3 .status-chip,
.ops-console-v3 .refresh-state-chip,
.ops-console-v3 .inline-status,
.ops-console-v3 .compact-status,
.ops-console-v3 .policy-status-chip,
.ops-console-v3 .reply-preview-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-color: var(--v3-line);
  border-radius: 999px;
  color: var(--v3-ink-2);
  background: #ffffff;
  line-height: 1.2;
  text-align: center;
}

.ops-console-v3 .status-chip.strong-on,
.ops-console-v3 .status-chip.listen-on {
  border-color: rgba(22, 101, 52, 0.26);
  color: var(--v3-success);
  background: var(--v3-success-soft);
}

.ops-console-v3 .status-chip.strong-warn {
  border-color: rgba(180, 83, 9, 0.28);
  color: var(--v3-warning);
  background: var(--v3-warning-soft);
}

.ops-console-v3 .status-chip.strong-off {
  color: var(--v3-muted);
  background: var(--v3-surface-strong);
}

.ops-console-v3 .summary-list div,
.ops-console-v3 .list-empty,
.ops-console-v3 .event-row,
.ops-console-v3 .record-row,
.ops-console-v3 .group-row,
.ops-console-v3 .account-row,
.ops-console-v3 .policy-dialog-row,
.ops-console-v3 .scheduled-dialog-card,
.ops-console-v3 .settings-block,
.ops-console-v3 .policy-config-card,
.ops-console-v3 .dialog-filter-panel {
  border-color: rgba(183, 200, 213, 0.72);
  border-radius: var(--v3-radius-lg);
  background: rgba(255, 255, 255, 0.88);
}

.ops-console-v3 .account-row:hover,
.ops-console-v3 .group-row:hover,
.ops-console-v3 .policy-dialog-row:hover,
.ops-console-v3 .policy-dialog-row.selected,
.ops-console-v3 .scheduled-dialog-card:hover,
.ops-console-v3 .scheduled-dialog-card.selected {
  border-color: rgba(15, 118, 110, 0.34);
  background: linear-gradient(180deg, #ffffff, #f2fbf9);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  transform: none;
}

.ops-console-v3 .account-row,
.ops-console-v3 .group-row,
.ops-console-v3 .policy-dialog-row,
.ops-console-v3 .scheduled-dialog-card {
  cursor: pointer;
}

.ops-console-v3 .small-button,
.ops-console-v3 .text-action,
.ops-console-v3 .policy-toggle-button,
.ops-console-v3 .tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 13px;
  line-height: 1.2;
  text-align: center;
}

.ops-console-v3 .dialog-row-actions .list-action-button,
.ops-console-v3 .account-row-actions .list-action-button,
.ops-console-v3 .scheduled-actions .list-action-button,
.ops-console-v3 td .list-action-button {
  min-height: 32px;
  border-color: rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  padding: 0 11px;
  color: #0f766e;
  background: #ffffff;
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
  transform: none;
}

.ops-console-v3 .text-action:not(:disabled):hover {
  color: #075e57;
  background: var(--v3-accent-soft);
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .list-action-button:not(:disabled):hover {
  border-color: rgba(15, 118, 110, 0.34);
  color: #075e57;
  background: #e7f7ed;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .danger-text:not(:disabled):hover {
  color: var(--v3-danger);
  background: var(--v3-danger-soft);
}

.ops-console-v3 .list-action-button.danger-text {
  border-color: rgba(180, 35, 24, 0.18);
  color: var(--v3-danger);
  background: #ffffff;
}

.ops-console-v3 .list-action-button.danger-text:not(:disabled):hover {
  border-color: rgba(180, 35, 24, 0.3);
  color: #9f1c12;
  background: var(--v3-danger-soft);
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .policy-toggle-button:not(:disabled):hover {
  border-color: rgba(15, 118, 110, 0.36);
  color: #075e57;
  background: var(--v3-accent-soft);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transform: none;
}

.ops-console-v3 .tab-button:hover,
.ops-console-v3 .tab-button[aria-selected="true"] {
  border-bottom-color: var(--v3-accent);
  color: #075e57;
  background: var(--v3-accent-soft);
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .dialog-quick-filters .small-button.active {
  border-color: rgba(15, 118, 110, 0.36);
  color: #075e57;
  background: var(--v3-accent-soft);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08);
  transform: none;
}

.ops-console-v3 .status-chip,
.ops-console-v3 .refresh-state-chip,
.ops-console-v3 .inline-status,
.ops-console-v3 .compact-status,
.ops-console-v3 .policy-status-chip,
.ops-console-v3 .reply-preview-badge {
  cursor: default;
}

.ops-console-v3 .brand-mark,
.ops-console-v3 .global-feedback-icon,
.ops-console-v3 .modal-close-button {
  display: inline-grid;
  place-items: center;
  line-height: 1;
  text-align: center;
}

.ops-console-v3 .table-wrap,
.ops-console-v3 .scheduled-task-list {
  overflow-x: auto;
  border-radius: var(--v3-radius-lg);
}

.ops-console-v3 table {
  color: var(--v3-ink);
}

.ops-console-v3 th {
  color: var(--v3-ink-2);
  background: var(--v3-surface-soft);
}

.ops-console-v3 tbody tr:hover {
  background: #f6fbfa;
}

.ops-console-v3 .global-feedback {
  right: 22px;
  top: 20px;
  border-radius: var(--v3-radius-lg);
  box-shadow: var(--v3-shadow-float);
}

.ops-console-v3 .global-feedback-icon {
  border-radius: 12px;
}

.ops-console-v3 .modal-backdrop::before {
  transition: background 0.12s ease;
}

.ops-console-v3 .modal-backdrop.active-modal::before {
  background: rgba(5, 10, 18, 0.52);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.ops-console-v3 .modal-panel {
  contain: layout paint;
  overscroll-behavior: contain;
  border: 1px solid rgba(183, 200, 213, 0.82);
  border-radius: 26px;
  background:
    linear-gradient(180deg, #ffffff, #f7fbfc);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.18);
  transform: translateZ(0);
  -webkit-overflow-scrolling: touch;
}

.ops-console-v3 .modal-head,
.ops-console-v3 .modal-actions {
  border-color: var(--v3-line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.ops-console-v3 .modal-close-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  border-color: var(--v3-line);
  color: var(--v3-ink-2);
  background: #ffffff;
}

.ops-console-v3 .modal-close-button:not(:disabled):hover {
  border-color: rgba(15, 118, 110, 0.36);
  color: #075e57;
  background: var(--v3-accent-soft);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transform: none;
}

.ops-console-v3 .toggle-switch-input {
  border-color: var(--v3-line-strong);
}

.ops-console-v3 .toggle-switch-input::after {
  top: 50%;
  transform: translate3d(0, -50%, 0);
}

.ops-console-v3 .toggle-switch-input:checked {
  border-color: var(--v3-accent);
  background: linear-gradient(135deg, var(--v3-accent), var(--v3-blue));
}

.ops-console-v3 .toggle-switch-input:checked::after {
  transform: translate(20px, -50%);
}

.ops-login-v3 {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  overflow-x: hidden;
  padding: 28px;
  background:
    radial-gradient(circle at 12% 8%, rgba(34, 158, 217, 0.16), transparent 30rem),
    radial-gradient(circle at 92% 20%, rgba(15, 118, 110, 0.13), transparent 34rem),
    var(--v3-bg);
}

.ops-login-v3 .login-layout {
  width: min(calc(100% - 24px), 1120px);
  grid-template-columns: minmax(0, 1.14fr) minmax(360px, 430px);
  gap: 28px;
}

.ops-login-v3 .login-layout > * {
  max-width: 100%;
}

.ops-login-v3 .login-hero {
  min-height: 560px;
  border-color: rgba(183, 200, 213, 0.28);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(34, 158, 217, 0.18), transparent 44%),
    radial-gradient(circle at 82% 12%, rgba(15, 118, 110, 0.52), transparent 24rem),
    linear-gradient(145deg, #081322, #0d2030 58%, #07101d);
}

.ops-login-v3 .login-hero h1 {
  max-width: 640px;
  font-size: clamp(40px, 5vw, 62px);
}

.ops-login-v3 .login-hero-copy {
  color: #c7d7e8;
}

.ops-login-v3 .login-panel {
  border-color: rgba(183, 200, 213, 0.78);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--v3-shadow-panel);
}

.ops-login-v3 .login-security-note {
  border-color: #fed7aa;
  border-radius: 16px;
}

@media (max-width: 900px) {
  .ops-console-v3 {
    display: block;
    grid-template-columns: 1fr;
  }

  .ops-console-v3.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 64;
    width: min(304px, calc(100vw - 42px));
    height: 100dvh;
    overflow-y: auto;
    border-radius: 0 24px 24px 0;
    padding: 18px;
    transform: translateX(-104%);
    transition: transform var(--v3-motion);
  }

  .ops-console-v3.sidebar-mobile-open .sidebar {
    transform: translateX(0);
  }

  .ops-console-v3 .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    min-height: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: rgba(5, 10, 18, 0.52);
    box-shadow: none;
  }

  .ops-console-v3.sidebar-mobile-open .sidebar-backdrop {
    display: block;
  }

  .ops-console-v3 .mobile-menu-toggle {
    display: inline-flex;
    width: fit-content;
    gap: 8px;
    padding: 0 13px;
  }

  .ops-console-v3 .sidebar-toggle {
    display: none;
  }

  .ops-console-v3 .nav-menu {
    display: grid;
    flex: none;
    gap: 7px;
    min-height: auto;
    overflow: visible;
    padding-bottom: 0;
  }

  .ops-console-v3 .nav-item,
  .ops-console-v3 .logout-button {
    justify-content: flex-start;
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 0 12px;
    white-space: nowrap;
  }

  .ops-console-v3.sidebar-collapsed .brand {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    padding: 6px 8px 20px;
  }

  .ops-console-v3.sidebar-collapsed .brand-copy,
  .ops-console-v3.sidebar-collapsed .nav-label,
  .ops-console-v3.sidebar-collapsed .nav-group-title,
  .ops-console-v3.sidebar-collapsed .account-switcher-detail,
  .ops-console-v3.sidebar-collapsed .account-switch-trigger,
  .ops-console-v3.sidebar-collapsed .sidebar-account-switcher + form .logout-button {
    position: static;
    width: auto;
    height: auto;
    max-width: none;
    overflow: visible;
    clip: auto;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    visibility: visible;
    white-space: normal;
  }

  .ops-console-v3.sidebar-collapsed .brand-copy,
  .ops-console-v3.sidebar-collapsed .nav-label,
  .ops-console-v3.sidebar-collapsed .nav-group-title,
  .ops-console-v3.sidebar-collapsed .account-switcher-detail {
    display: block;
  }

  .ops-console-v3.sidebar-collapsed .account-switch-trigger {
    display: grid;
  }

  .ops-console-v3.sidebar-collapsed .nav-group-title {
    padding: 9px 12px 4px;
  }

  .ops-console-v3.sidebar-collapsed .sidebar-account-switcher + form .logout-button {
    display: inline-flex;
  }

  .ops-console-v3.sidebar-collapsed .nav-menu,
  .ops-console-v3.sidebar-collapsed .nav-group {
    justify-items: stretch;
  }

  .ops-console-v3.sidebar-collapsed .nav-item {
    display: inline-flex;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    padding: 0 12px;
  }

  .ops-console-v3.sidebar-collapsed .account-switcher-bar {
    display: grid;
    place-items: stretch;
    border-color: rgba(148, 163, 184, 0.14);
    padding: 8px;
    background: rgba(255, 255, 255, 0.035);
    box-shadow: none;
  }

  .ops-console-v3.sidebar-collapsed .account-compact-button {
    display: none;
  }

  .ops-console-v3 .nav-item.active::before {
    display: none;
  }

  .ops-console-v3 .account-switcher-bar {
    margin-top: 0;
  }

  .ops-console-v3 .main {
    padding: 14px;
  }

  .ops-console-v3 .page-header {
    margin: 0 0 14px;
    border-radius: var(--v3-radius-lg);
    padding: 14px;
  }

  .ops-console-v3 .metrics-grid,
  .ops-console-v3 .workbench-layout,
  .ops-console-v3 .two-column,
  .ops-console-v3 .scheduled-layout,
  .ops-console-v3 .form-grid,
  .ops-console-v3 .filter-grid,
  .ops-console-v3 .runtime-card {
    grid-template-columns: 1fr;
  }

  .ops-login-v3 {
    padding: 16px 0;
  }

  .ops-login-v3 .login-layout {
    width: min(calc(100vw - 32px), 460px);
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ops-login-v3 .login-hero {
    min-height: auto;
    border-radius: 24px;
    padding: 18px;
  }

  .ops-login-v3 .login-hero h1 {
    font-size: 26px;
    letter-spacing: -0.03em;
  }

  .ops-login-v3 .login-panel {
    border-radius: 24px;
    padding: 22px;
  }
}

@media (max-width: 640px) {
  .ops-console-v3 .brand {
    padding-bottom: 12px;
  }

  .ops-console-v3 .brand-mark {
    width: 40px;
    height: 40px;
  }

  .ops-console-v3 .page-header {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }

  .ops-console-v3 .header-status-stack {
    width: 100%;
    grid-template-columns: 1fr;
    justify-items: start;
    align-items: start;
  }

  .ops-console-v3 .refresh-state-chip,
  .ops-console-v3 #saveState {
    justify-self: start;
    max-width: 100%;
  }

  .ops-console-v3 .page-header h1 {
    font-size: 24px;
  }

  .ops-console-v3 .metric-card,
  .ops-console-v3 .panel {
    border-radius: 18px;
    padding: 16px;
  }

  .ops-console-v3 .metric-card {
    min-height: 116px;
  }

  .ops-console-v3 .metric-card strong {
    font-size: 30px;
  }

  .ops-console-v3 .panel-head,
  .ops-console-v3 .button-group,
  .ops-console-v3 .action-row,
  .ops-console-v3 .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ops-console-v3 .button-group button,
  .ops-console-v3 .action-row button,
  .ops-console-v3 .modal-actions button,
  .ops-console-v3 .quick-actions button {
    width: 100%;
  }

  .ops-console-v3 .global-feedback {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .ops-console-v3 .modal-backdrop {
    align-items: stretch;
    padding: 0;
  }

  .ops-console-v3 .modal-panel {
    width: 100%;
    min-height: 100dvh;
    max-height: none;
    border-radius: 0;
    padding: 16px;
  }

  .ops-console-v3 .modal-close-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .ops-login-v3 .login-layout {
    width: min(calc(100vw - 28px), 430px);
  }

  .ops-login-v3 .login-security-note {
    font-size: 12px;
    line-height: 1.55;
  }
}

/* ZenMux code-derived unified layer */
:root {
  --zen-black: #000000;
  --zen-white: #ffffff;
  --zen-bg: #f2f2f2;
  --zen-bg-soft: #f5f5f5;
  --zen-bg-stripe: #fafafa;
  --zen-surface: rgba(255, 255, 255, 0.92);
  --zen-surface-solid: #ffffff;
  --zen-hover: #f2f2f2;
  --zen-active: #e6e6e6;
  --zen-border: #e6e6e6;
  --zen-border-2: #e5e7eb;
  --zen-control-border: #d9d9d9;
  --zen-text: #333333;
  --zen-text-2: #666666;
  --zen-text-3: #858585;
  --zen-disabled: #999999;
  --zen-success: #18cc63;
  --zen-success-bg: rgba(24, 204, 99, 0.1);
  --zen-warning: #ff941a;
  --zen-warning-bg: rgba(255, 148, 26, 0.1);
  --zen-danger: #fa6062;
  --zen-danger-bg: rgba(250, 96, 98, 0.11);
  --zen-blue: #3692fb;
  --zen-radius-xs: 4px;
  --zen-radius-sm: 6px;
  --zen-radius-md: 8px;
  --zen-radius-lg: 12px;
  --zen-radius-xl: 16px;
  --zen-radius-2xl: 20px;
  --zen-shadow-xs: 0 1px 4px rgba(0, 0, 0, 0.05);
  --zen-shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.05);
  --zen-shadow-lg: 0 24px 52px rgba(0, 0, 0, 0.12);
  --zen-motion: 0.16s ease;
}

body {
  color: var(--zen-text);
  background: var(--zen-bg);
}

.ops-console-v3,
.ops-login-v3 {
  color: var(--zen-text);
  font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
}

.ops-console-v3 {
  --v3-sidebar-width: 256px;
  grid-template-columns: var(--v3-sidebar-width) minmax(0, 1fr);
  background:
    radial-gradient(circle at 6% -8%, rgba(255, 255, 255, 0.9), transparent 24rem),
    linear-gradient(180deg, #f7f7f7 0%, var(--zen-bg) 100%);
}

.ops-console-v3.sidebar-collapsed {
  --v3-sidebar-width: 76px;
}

.ops-console-v3 button,
.ops-login-v3 button {
  min-height: 40px;
  border: 1px solid var(--zen-black);
  border-radius: var(--zen-radius-md);
  padding: 0 16px;
  color: var(--zen-white);
  background: var(--zen-black);
  box-shadow: none;
  font-weight: 700;
  line-height: 1.2;
  transform: none;
  transition:
    background var(--zen-motion),
    border-color var(--zen-motion),
    color var(--zen-motion),
    opacity var(--zen-motion),
    box-shadow var(--zen-motion);
}

.ops-console-v3 button:not(:disabled):hover,
.ops-login-v3 button:not(:disabled):hover {
  border-color: var(--zen-text);
  color: var(--zen-white);
  background: var(--zen-text);
  box-shadow: none;
  transform: none;
}

.ops-console-v3 button:active,
.ops-login-v3 button:active {
  transform: none;
}

.ops-console-v3 button:disabled,
.ops-login-v3 button:disabled {
  opacity: 0.45;
  color: var(--zen-disabled);
  cursor: not-allowed;
  box-shadow: none;
}

.ops-console-v3 button.secondary,
.ops-login-v3 button.secondary {
  border-color: transparent;
  color: var(--zen-black);
  background: var(--zen-bg);
  box-shadow: none;
}

.ops-console-v3 button.secondary:not(:disabled):hover,
.ops-login-v3 button.secondary:not(:disabled):hover {
  border-color: transparent;
  color: var(--zen-black);
  background: var(--zen-active);
  box-shadow: none;
}

.ops-console-v3 button.danger,
.ops-console-v3 .danger {
  border-color: var(--zen-danger);
  color: var(--zen-white);
  background: var(--zen-danger);
  box-shadow: none;
}

.ops-console-v3 button.danger:not(:disabled):hover,
.ops-console-v3 .danger:not(:disabled):hover {
  border-color: #e84f51;
  color: var(--zen-white);
  background: #e84f51;
  box-shadow: none;
}

.ops-console-v3 button:focus-visible,
.ops-console-v3 .nav-item:focus-visible,
.ops-console-v3 .account-row:focus-visible,
.ops-console-v3 .group-row:focus-visible,
.ops-console-v3 .policy-dialog-row:focus-visible,
.ops-console-v3 .scheduled-dialog-card:focus-visible,
.ops-login-v3 button:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.22);
  outline-offset: 2px;
}

.ops-console-v3 input,
.ops-console-v3 select,
.ops-console-v3 textarea,
.ops-login-v3 input {
  min-height: 40px;
  border: 1px solid var(--zen-control-border);
  border-radius: var(--zen-radius-sm);
  color: var(--zen-text);
  background: var(--zen-white);
  box-shadow: none;
  transition:
    border-color var(--zen-motion),
    box-shadow var(--zen-motion),
    background var(--zen-motion);
}

.ops-console-v3 input:hover,
.ops-console-v3 select:hover,
.ops-console-v3 textarea:hover,
.ops-login-v3 input:hover {
  border-color: var(--zen-text-2);
}

.ops-console-v3 input:focus,
.ops-console-v3 select:focus,
.ops-console-v3 textarea:focus,
.ops-login-v3 input:focus {
  border-color: var(--zen-black);
  box-shadow: none;
}

.ops-console-v3 label span,
.ops-login-v3 label span {
  color: var(--zen-text-2);
  font-size: 13px;
  font-weight: 500;
}

.ops-console-v3 .sidebar {
  gap: 14px;
  border-right: 1px solid var(--zen-border);
  padding: 18px 12px 14px;
  color: var(--zen-text);
  background: rgba(250, 250, 250, 0.96);
  box-shadow: none;
}

.ops-console-v3 .brand {
  gap: 10px;
  border-bottom: 0;
  padding: 4px 6px 14px;
}

.ops-console-v3 .brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid var(--zen-black);
  border-radius: var(--zen-radius-lg);
  color: var(--zen-white);
  background: var(--zen-black);
  box-shadow: none;
  font-size: 11px;
  letter-spacing: -0.04em;
}

.ops-console-v3 .brand-mark::after {
  display: none;
}

.ops-console-v3 .brand strong {
  color: var(--zen-black);
  font-size: 16px;
  font-weight: 700;
}

.ops-console-v3 .brand span {
  color: var(--zen-text-3);
  font-size: 12px;
}

.ops-console-v3 .sidebar-toggle {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border-color: transparent;
  border-radius: var(--zen-radius-md);
  color: var(--zen-text-2);
  background: var(--zen-bg);
  box-shadow: none;
}

.ops-console-v3 .sidebar-toggle:not(:disabled):hover {
  border-color: transparent;
  color: var(--zen-black);
  background: var(--zen-active);
}

.ops-console-v3 .nav-menu {
  gap: 4px;
  padding-bottom: 8px;
}

.ops-console-v3 .nav-group {
  gap: 2px;
}

.ops-console-v3 .nav-group + .nav-group {
  margin-top: 10px;
}

.ops-console-v3 .nav-group-title {
  padding: 8px 10px 4px;
  color: var(--zen-text-3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.ops-console-v3 .nav-item,
.ops-console-v3 .logout-button {
  min-height: 40px;
  border: 0;
  border-radius: var(--zen-radius-md);
  padding: 0 12px;
  color: var(--zen-text-2);
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
  gap: 9px;
}

.ops-console-v3 .nav-item:hover,
.ops-console-v3 .logout-button:hover {
  color: var(--zen-black);
  background: var(--zen-hover);
  box-shadow: none;
}

.ops-console-v3 .nav-item.active {
  border: 0.5px solid var(--zen-border);
  color: var(--zen-black);
  background: var(--zen-white);
  box-shadow: var(--zen-shadow-xs);
  font-weight: 700;
}

.ops-console-v3 .nav-item.active::before {
  display: none;
}

.ops-console-v3 .nav-icon,
.ops-console-v3.sidebar-collapsed .nav-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0;
}

.ops-console-v3 .nav-icon svg {
  width: 18px;
  height: 18px;
}

.ops-console-v3 .account-switcher-bar {
  gap: 8px;
  border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius-lg);
  padding: 8px;
  color: var(--zen-text);
  background: var(--zen-white);
  box-shadow: none;
}

.ops-console-v3 .switcher-label {
  color: var(--zen-text-3);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.ops-console-v3 .account-switcher-bar strong {
  color: var(--zen-black);
  font-size: 13px;
  font-weight: 700;
}

.ops-console-v3 .account-switcher-bar small {
  color: var(--zen-text-3);
}

.ops-console-v3 .account-switch-trigger {
  min-height: 42px;
  border: 0;
  border-radius: var(--zen-radius-md);
  padding: 8px;
  color: var(--zen-text);
  background: transparent;
  box-shadow: none;
}

.ops-console-v3 .account-switch-trigger:hover {
  color: var(--zen-black);
  background: var(--zen-hover);
}

.ops-console-v3 .account-switch-action {
  min-height: 26px;
  border-radius: 999px;
  color: var(--zen-text-2);
  background: var(--zen-bg);
  font-weight: 500;
}

.ops-console-v3 .account-compact-button {
  border-color: var(--zen-black);
  color: var(--zen-white);
  background: var(--zen-black);
  box-shadow: none;
}

.ops-console-v3.sidebar-collapsed .sidebar {
  padding: 16px 10px 12px;
}

.ops-console-v3.sidebar-collapsed .brand {
  gap: 8px;
}

.ops-console-v3.sidebar-collapsed .brand-mark {
  width: 40px;
  height: 40px;
}

.ops-console-v3.sidebar-collapsed .sidebar-toggle {
  margin-top: 4px;
}

.ops-console-v3.sidebar-collapsed .nav-item {
  width: 44px;
  min-width: 44px;
  border-radius: var(--zen-radius-md);
}

.ops-console-v3.sidebar-collapsed .account-switcher-bar {
  border: 0;
  background: transparent;
}

.ops-console-v3 .main {
  padding: 24px;
}

.ops-console-v3 .page-header {
  margin: -24px -24px 20px;
  border: 0;
  border-bottom: 1px solid var(--zen-border);
  padding: 18px 24px;
  background: rgba(242, 242, 242, 0.92);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.ops-console-v3 .page-kicker {
  color: var(--zen-text-3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.ops-console-v3 .page-header h1 {
  color: var(--zen-black);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.ops-console-v3 .metric-card,
.ops-console-v3 .panel,
.ops-console-v3 .settings-block,
.ops-console-v3 .policy-config-card,
.ops-console-v3 .dialog-filter-panel,
.ops-console-v3 .summary-list div,
.ops-console-v3 .list-empty,
.ops-console-v3 .event-row,
.ops-console-v3 .record-row,
.ops-console-v3 .group-row,
.ops-console-v3 .account-row,
.ops-console-v3 .policy-dialog-row,
.ops-console-v3 .scheduled-dialog-card,
.ops-console-v3 .runtime-card,
.ops-console-v3 .readiness-card,
.ops-console-v3 .status-box,
.ops-console-v3 .operation-box,
.ops-console-v3 .restart-notice {
  border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius-lg);
  color: var(--zen-text);
  background: var(--zen-surface-solid);
  box-shadow: none;
}

.ops-console-v3 .metric-card,
.ops-console-v3 .panel {
  border-radius: var(--zen-radius-xl);
  background: var(--zen-surface);
}

.ops-console-v3 .panel {
  padding: 20px;
}

.ops-console-v3 .metric-card {
  min-height: 126px;
  padding: 20px;
}

.ops-console-v3 .metric-card::before {
  display: none;
}

.ops-console-v3 .metric-card span,
.ops-console-v3 .hint,
.ops-console-v3 .panel-note,
.ops-console-v3 .scheduled-dialog-meta,
.ops-console-v3 .scheduled-dialog-next,
.ops-console-v3 td small {
  color: var(--zen-text-3);
}

.ops-console-v3 .metric-card strong {
  color: var(--zen-black);
  font-size: 34px;
  font-weight: 700;
}

.ops-console-v3 .panel-head,
.ops-console-v3 .panel-subhead,
.ops-console-v3 .subsection-title {
  border-color: var(--zen-border);
}

.ops-console-v3 .panel h2,
.ops-console-v3 .panel-subhead h3,
.ops-console-v3 .subsection-title strong {
  color: var(--zen-black);
  font-weight: 700;
}

.ops-console-v3 .account-row:hover,
.ops-console-v3 .group-row:hover,
.ops-console-v3 .policy-dialog-row:hover,
.ops-console-v3 .policy-dialog-row.selected,
.ops-console-v3 .scheduled-dialog-card:hover,
.ops-console-v3 .scheduled-dialog-card.selected,
.ops-console-v3 .account-row.selected {
  border-color: var(--zen-control-border);
  color: var(--zen-text);
  background: var(--zen-bg-stripe);
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .account-row.selected,
.ops-console-v3 .policy-dialog-row.selected,
.ops-console-v3 .scheduled-dialog-card.selected {
  border-color: var(--zen-black);
  background: var(--zen-white);
}

.ops-console-v3 .account-status-grid > span {
  border-color: var(--zen-border);
  background: var(--zen-bg-stripe);
}

.ops-console-v3 .status-chip,
.ops-console-v3 .refresh-state-chip,
.ops-console-v3 .inline-status,
.ops-console-v3 .compact-status,
.ops-console-v3 .policy-status-chip,
.ops-console-v3 .reply-preview-badge,
.ops-console-v3 .message-tag-9bY_Q9Ks {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius-xs);
  padding: 2px 7px;
  color: var(--zen-text-2);
  background: var(--zen-bg-stripe);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  text-align: center;
  white-space: nowrap;
}

.ops-console-v3 .inline-status,
.ops-console-v3 .compact-status {
  min-height: 28px;
  border-radius: var(--zen-radius-md);
  padding: 5px 9px;
}

.ops-console-v3 .status-chip.strong-on,
.ops-console-v3 .status-chip.listen-on,
.ops-console-v3 .status-chip.success,
.ops-console-v3 .inline-status.success,
.ops-console-v3 .compact-status.success,
.ops-console-v3 .policy-status-chip.enabled {
  border-color: rgba(24, 204, 99, 0.18);
  color: var(--zen-success);
  background: var(--zen-success-bg);
}

.ops-console-v3 .status-chip.strong-warn,
.ops-console-v3 .status-chip.warning,
.ops-console-v3 .inline-status.warning,
.ops-console-v3 .compact-status.warning {
  border-color: rgba(255, 148, 26, 0.2);
  color: var(--zen-warning);
  background: var(--zen-warning-bg);
}

.ops-console-v3 .status-chip.strong-off,
.ops-console-v3 .policy-status-chip.disabled {
  border-color: var(--zen-border);
  color: var(--zen-text-3);
  background: var(--zen-bg);
}

.ops-console-v3 .status-box.running,
.ops-console-v3 .readiness-card.ready {
  border-color: rgba(24, 204, 99, 0.24);
  background: linear-gradient(180deg, #ffffff, rgba(24, 204, 99, 0.05));
}

.ops-console-v3 .status-box.starting,
.ops-console-v3 .status-box.paused,
.ops-console-v3 .readiness-card.listen-only {
  border-color: rgba(255, 148, 26, 0.24);
  background: linear-gradient(180deg, #ffffff, rgba(255, 148, 26, 0.05));
}

.ops-console-v3 .status-box.error,
.ops-console-v3 .readiness-card.blocked {
  border-color: rgba(250, 96, 98, 0.24);
  background: linear-gradient(180deg, #ffffff, rgba(250, 96, 98, 0.05));
}

.ops-console-v3 .small-button,
.ops-console-v3 .text-action,
.ops-console-v3 .policy-toggle-button,
.ops-console-v3 .tab-button,
.ops-console-v3 .list-action-button {
  min-height: 32px;
  border: 0;
  border-radius: var(--zen-radius-md);
  padding: 0 10px;
  color: var(--zen-text-2);
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
}

.ops-console-v3 .dialog-row-actions .list-action-button,
.ops-console-v3 .account-row-actions .list-action-button,
.ops-console-v3 .scheduled-actions .list-action-button,
.ops-console-v3 td .list-action-button {
  min-height: 32px;
  border: 0;
  border-radius: var(--zen-radius-md);
  padding: 0 10px;
  color: var(--zen-text-2);
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
}

.ops-console-v3 .text-action:not(:disabled):hover,
.ops-console-v3 .policy-toggle-button:not(:disabled):hover,
.ops-console-v3 .list-action-button:not(:disabled):hover,
.ops-console-v3 td .list-action-button:not(:disabled):hover,
.ops-console-v3 .tab-button:hover,
.ops-console-v3 .tab-button[aria-selected="true"] {
  border-color: transparent;
  color: var(--zen-black);
  background: var(--zen-hover);
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .list-action-button.danger-text,
.ops-console-v3 .danger-text {
  color: var(--zen-danger);
  background: transparent;
}

.ops-console-v3 .list-action-button.danger-text:not(:disabled):hover,
.ops-console-v3 .danger-text:not(:disabled):hover {
  color: var(--zen-danger);
  background: var(--zen-danger-bg);
}

.ops-console-v3 .policy-toggle-button.enabled,
.ops-console-v3 .dialog-quick-filters .small-button.active {
  color: var(--zen-success);
  background: var(--zen-success-bg);
}

.ops-console-v3 .table-wrap,
.ops-console-v3 .scheduled-task-list {
  border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius-lg);
  background: var(--zen-white);
  box-shadow: none;
}

.ops-console-v3 table {
  color: var(--zen-text);
  font-size: 13px;
}

.ops-console-v3 th,
.ops-console-v3 td {
  height: 56px;
  border-bottom-color: var(--zen-border);
  padding: 10px 16px;
  vertical-align: middle;
}

.ops-console-v3 th {
  color: var(--zen-text);
  background: var(--zen-bg-stripe);
  font-size: 13px;
  font-weight: 700;
}

.ops-console-v3 td {
  color: var(--zen-text-2);
}

.ops-console-v3 tbody tr:hover {
  background: var(--zen-bg-stripe);
}

.ops-console-v3 .selected-table-row {
  background: var(--zen-bg);
}

.ops-console-v3 .dialog-checkbox {
  accent-color: var(--zen-black);
}

.ops-console-v3 .dialog-filter-panel {
  padding: 14px;
  background: var(--zen-white);
}

.ops-console-v3 .dialog-quick-filters,
.ops-console-v3 .dialog-row-actions,
.ops-console-v3 .scheduled-actions,
.ops-console-v3 .account-row-actions,
.ops-console-v3 .policy-row-actions {
  gap: 6px;
}

.ops-console-v3 .switch-row label,
.ops-console-v3 .switch-label,
.ops-console-v3 .toggle-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--zen-text);
  line-height: 1.4;
}

.ops-console-v3 .toggle-switch-input {
  width: 42px !important;
  min-width: 42px;
  height: 24px;
  min-height: 24px !important;
  border: 1px solid var(--zen-control-border);
  border-radius: 999px;
  background: var(--zen-active);
  box-shadow: none;
}

.ops-console-v3 .toggle-switch-input::after {
  top: 50%;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--zen-white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
  transform: translateY(-50%);
}

.ops-console-v3 .toggle-switch-input:checked {
  border-color: var(--zen-black);
  background: var(--zen-black);
  box-shadow: none;
}

.ops-console-v3 .toggle-switch-input:checked::after {
  transform: translate(18px, -50%);
}

.ops-console-v3 .toggle-switch-input:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.18);
  outline-offset: 2px;
  box-shadow: none;
}

.ops-console-v3 .modal-backdrop {
  padding: 24px;
}

.ops-console-v3 .modal-backdrop::before {
  background: transparent;
  backdrop-filter: none;
  transition: background var(--zen-motion);
}

.ops-console-v3 .modal-backdrop.active-modal::before {
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: none;
}

.ops-console-v3 .modal-panel {
  contain: layout paint;
  border: 1px solid var(--zen-border);
  border-radius: 24px;
  background: var(--zen-white);
  box-shadow: var(--zen-shadow-lg);
  transform: translateZ(0);
}

.ops-console-v3 .modal-head {
  top: -18px;
  border-bottom: 1px solid var(--zen-border);
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.96);
}

.ops-console-v3 .modal-head .page-kicker {
  color: var(--zen-text-3);
  font-size: 11px;
}

.ops-console-v3 .modal-head h2 {
  color: var(--zen-black);
  font-size: 18px;
  font-weight: 700;
}

.ops-console-v3 .modal-section {
  border-color: var(--zen-border);
  border-radius: var(--zen-radius-lg);
  background: var(--zen-white);
}

.ops-console-v3 .modal-actions {
  border-color: var(--zen-border);
  background: rgba(255, 255, 255, 0.96);
}

.ops-console-v3 .modal-close-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border: 0;
  border-radius: var(--zen-radius-md);
  color: var(--zen-text-2);
  background: var(--zen-bg);
  box-shadow: none;
  font-size: 18px;
  font-weight: 500;
}

.ops-console-v3 .modal-close-button:not(:disabled):hover {
  color: var(--zen-black);
  background: var(--zen-active);
  box-shadow: none;
}

.ops-console-v3 .account-switch-modal {
  width: min(520px, 100%);
}

.ops-console-v3 .account-switch-list {
  gap: 6px;
}

.ops-console-v3 .account-switch-row {
  min-height: 62px;
  border-color: var(--zen-border);
  border-radius: var(--zen-radius-lg);
  color: var(--zen-text);
  background: var(--zen-white);
  box-shadow: none;
}

.ops-console-v3 .account-switch-row::before {
  background: var(--zen-black);
}

.ops-console-v3 button.account-switch-row:not(:disabled):hover,
.ops-console-v3 button.account-switch-row:not(:disabled):focus-visible {
  border-color: var(--zen-control-border);
  color: var(--zen-text);
  background: var(--zen-bg-stripe);
  box-shadow: none;
}

.ops-console-v3 .account-switch-row.current,
.ops-console-v3 button.account-switch-row.current:not(:disabled):hover {
  border-color: var(--zen-black);
  color: var(--zen-text);
  background: var(--zen-white);
  box-shadow: none;
}

.ops-console-v3 .global-feedback {
  top: 20px;
  right: 20px;
  border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius-xl);
  color: var(--zen-text);
  background: var(--zen-white);
  box-shadow: var(--zen-shadow-sm);
}

.ops-console-v3 .global-feedback-icon {
  border-radius: var(--zen-radius-md);
  color: var(--zen-white);
  background: var(--zen-black);
}

.ops-console-v3 .global-feedback.success .global-feedback-icon {
  background: var(--zen-success);
}

.ops-console-v3 .global-feedback.warning .global-feedback-icon,
.ops-console-v3 .global-feedback.loading .global-feedback-icon {
  background: var(--zen-warning);
}

.ops-console-v3 .global-feedback.error .global-feedback-icon {
  background: var(--zen-danger);
}

.ops-console-v3 .time-range-row,
.ops-console-v3 .learning-candidate-card,
.ops-console-v3 .reply-stat-card,
.ops-console-v3 .record-block,
.ops-console-v3 .reply-preview-result,
.ops-console-v3 .style-learning-profile-preview,
.ops-console-v3 .prompt-review-result {
  border-color: var(--zen-border);
  border-radius: var(--zen-radius-lg);
  background: var(--zen-white);
  box-shadow: none;
}

.ops-login-v3 {
  background:
    radial-gradient(circle at 15% 8%, rgba(255, 255, 255, 0.9), transparent 26rem),
    var(--zen-bg);
}

.ops-login-v3 .login-layout {
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 420px);
}

.ops-login-v3 .login-hero,
.ops-login-v3 .login-panel {
  border: 1px solid var(--zen-border);
  border-radius: 24px;
  background: var(--zen-white);
  box-shadow: var(--zen-shadow-sm);
}

.ops-login-v3 .login-hero {
  color: var(--zen-text);
  min-height: 420px;
}

.ops-login-v3 .login-hero::before {
  display: none;
}

.ops-login-v3 .login-hero h1,
.ops-login-v3 .login-panel h2,
.ops-login-v3 .login-brand strong {
  color: var(--zen-black);
}

.ops-login-v3 .login-hero-copy,
.ops-login-v3 .login-brand span,
.ops-login-v3 .eyebrow {
  color: var(--zen-text-3);
}

.ops-login-v3 .brand-mark {
  border: 1px solid var(--zen-black);
  color: var(--zen-white);
  background: var(--zen-black);
  box-shadow: none;
}

.ops-login-v3 .brand-mark::after {
  display: none;
}

.ops-login-v3 .login-security-note {
  border-color: var(--zen-border);
  color: var(--zen-text-2);
  background: var(--zen-bg-stripe);
}

@media (max-width: 900px) {
  .ops-console-v3 {
    display: block;
  }

  .ops-console-v3 .sidebar {
    width: min(304px, calc(100vw - 42px));
    border-right: 1px solid var(--zen-border);
    border-radius: 0 20px 20px 0;
    background: var(--zen-white);
  }

  .ops-console-v3 .sidebar-backdrop {
    background: rgba(0, 0, 0, 0.46);
  }

  .ops-console-v3 .mobile-menu-toggle {
    gap: 8px;
  }

  .ops-console-v3 .main {
    padding: 14px;
  }

  .ops-console-v3 .page-header {
    margin: 0 0 14px;
    border: 1px solid var(--zen-border);
    border-radius: var(--zen-radius-xl);
    padding: 14px;
    background: var(--zen-white);
  }

  .ops-console-v3 .metrics-grid,
  .ops-console-v3 .workbench-layout,
  .ops-console-v3 .two-column,
  .ops-console-v3 .scheduled-layout,
  .ops-console-v3 .form-grid,
  .ops-console-v3 .filter-grid,
  .ops-console-v3 .runtime-card,
  .ops-console-v3 .policy-status-grid {
    grid-template-columns: 1fr;
  }

  .ops-login-v3 .login-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ops-console-v3 .page-header {
    gap: 10px;
  }

  .ops-console-v3 .page-header h1 {
    font-size: 24px;
  }

  .ops-console-v3 .metric-card,
  .ops-console-v3 .panel {
    border-radius: var(--zen-radius-xl);
    padding: 16px;
  }

  .ops-console-v3 .metric-card {
    min-height: 112px;
  }

  .ops-console-v3 .metric-card strong {
    font-size: 30px;
  }

  .ops-console-v3 .modal-backdrop {
    padding: 0;
  }

  .ops-console-v3 .modal-panel {
    width: 100%;
    min-height: 100dvh;
    max-height: none;
    border-radius: 0;
    padding: 16px;
  }

  .ops-console-v3 .modal-head {
    margin: -16px -16px 14px;
    top: -16px;
    padding: 10px 14px;
  }

  .ops-console-v3 .modal-close-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .ops-console-v3 th,
  .ops-console-v3 td {
    padding: 10px 12px;
  }

  .ops-login-v3 {
    padding: 14px 0;
  }

  .ops-login-v3 .login-layout {
    width: min(calc(100vw - 28px), 430px);
  }

  .ops-login-v3 .login-hero {
    min-height: auto;
  }
}

/* Mobile detail polish layer */
@media (max-width: 900px) {
  body {
    overflow-x: hidden;
  }

  .ops-console-v3 {
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .ops-console-v3 .sidebar {
    width: min(292px, calc(100vw - 48px));
    height: 100dvh;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 12px calc(env(safe-area-inset-bottom, 0px) + 14px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .ops-console-v3 .sidebar-backdrop {
    cursor: default;
  }

  .ops-console-v3 .brand {
    padding-bottom: 12px;
  }

  .ops-console-v3 .nav-menu {
    gap: 3px;
    overflow-y: auto;
  }

  .ops-console-v3 .nav-item,
  .ops-console-v3 .logout-button {
    min-height: 44px;
    padding: 0 12px;
  }

  .ops-console-v3 .account-switcher-bar {
    position: sticky;
    bottom: 54px;
    margin-top: 10px;
  }

  .ops-console-v3 .main {
    width: 100%;
    padding: 12px;
  }

  .ops-console-v3 .content-section.active {
    display: grid;
    gap: 12px;
  }

  .ops-console-v3 .page-header {
    position: sticky;
    top: 8px;
    z-index: 24;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin: 0 0 12px;
    padding: 10px;
  }

  .ops-console-v3 .page-header > div:not(.header-status-stack) {
    min-width: 0;
  }

  .ops-console-v3 .mobile-menu-toggle {
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
  }

  .ops-console-v3 .header-status-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
  }

  .ops-console-v3 .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .ops-console-v3 .metric-card {
    min-height: 98px;
    padding: 14px;
  }

  .ops-console-v3 .metric-card strong {
    font-size: 28px;
  }

  .ops-console-v3 .panel,
  .ops-console-v3 .settings-block,
  .ops-console-v3 .policy-config-card,
  .ops-console-v3 .dialog-filter-panel,
  .ops-console-v3 .runtime-filter-card {
    padding: 14px;
  }

  .ops-console-v3 .workspace-stack,
  .ops-console-v3 .scheduled-main-stack,
  .ops-console-v3 .runtime-overview,
  .ops-console-v3 .records-list,
  .ops-console-v3 .events-list {
    gap: 12px;
  }

  .ops-console-v3 .panel-head,
  .ops-console-v3 .panel-subhead,
  .ops-console-v3 .subsection-title,
  .ops-console-v3 .policy-workbench-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .ops-console-v3 .panel h2,
  .ops-console-v3 .policy-workbench-header h2 {
    font-size: 18px;
  }

  .ops-console-v3 .overview-entry-grid,
  .ops-console-v3 .quick-actions,
  .ops-console-v3 .action-row,
  .ops-console-v3 .scheduled-actions,
  .ops-console-v3 .policy-workbench-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .ops-console-v3 .overview-entry-grid button,
  .ops-console-v3 .quick-actions button,
  .ops-console-v3 .action-row button,
  .ops-console-v3 .scheduled-actions button,
  .ops-console-v3 .policy-workbench-actions button {
    width: 100%;
    min-height: 44px;
    padding: 0 10px;
  }

  .ops-console-v3 .form-grid,
  .ops-console-v3 .filter-grid,
  .ops-console-v3 .dialog-filter-panel,
  .ops-console-v3 .runtime-filter-card {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 input,
  .ops-console-v3 select,
  .ops-console-v3 textarea,
  .ops-login-v3 input {
    min-height: 44px;
    font-size: 16px;
  }

  .ops-console-v3 .tabs,
  .ops-console-v3 .dialog-quick-filters,
  .ops-console-v3 .header-status-stack {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .ops-console-v3 .tabs::-webkit-scrollbar,
  .ops-console-v3 .dialog-quick-filters::-webkit-scrollbar,
  .ops-console-v3 .header-status-stack::-webkit-scrollbar {
    display: none;
  }

  .ops-console-v3 .tab-button,
  .ops-console-v3 .dialog-quick-filters .small-button {
    flex: 0 0 auto;
    min-height: 40px;
  }

  .ops-console-v3 .table-wrap,
  .ops-console-v3 .scheduled-task-list {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .ops-console-v3 .table-wrap table,
  .ops-console-v3 .scheduled-task-list table {
    min-width: 760px;
  }

  .ops-console-v3 .account-row,
  .ops-console-v3 .policy-dialog-row,
  .ops-console-v3 .scheduled-dialog-card,
  .ops-console-v3 .record-row,
  .ops-console-v3 .runtime-card,
  .ops-console-v3 .reply-stat-card,
  .ops-console-v3 .learning-candidate-card {
    padding: 12px;
  }

  .ops-console-v3 .account-main-line,
  .ops-console-v3 .readiness-card-head,
  .ops-console-v3 .record-meta,
  .ops-console-v3 .dialog-selection-bar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .ops-console-v3 .account-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .ops-console-v3 .dialog-row-actions,
  .ops-console-v3 .account-row-actions,
  .ops-console-v3 .policy-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .ops-console-v3 .dialog-row-actions .list-action-button,
  .ops-console-v3 .account-row-actions .list-action-button,
  .ops-console-v3 .policy-row-actions .list-action-button,
  .ops-console-v3 td .list-action-button {
    min-height: 38px;
    padding: 0 10px;
  }

  .ops-console-v3 .status-chip,
  .ops-console-v3 .refresh-state-chip,
  .ops-console-v3 .policy-status-chip {
    min-height: 24px;
    padding: 3px 7px;
    line-height: 16px;
  }

  .ops-console-v3 .modal-backdrop {
    padding: 12px;
    overscroll-behavior: contain;
  }

  .ops-console-v3 .modal-panel {
    max-height: calc(100dvh - 24px);
    overscroll-behavior: contain;
  }

  .ops-console-v3 .global-feedback {
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    gap: 8px;
    padding: 10px 12px;
    border-left-width: 0;
    border-radius: 14px;
  }

  .ops-console-v3 .global-feedback-icon {
    width: 26px;
    height: 26px;
  }

  .ops-login-v3 {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100dvh;
    padding: 16px;
  }

  .ops-login-v3 .login-layout {
    width: 100%;
    max-width: 430px;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px;
  }

  .ops-login-v3 .login-hero {
    display: none;
  }

  .ops-login-v3 .login-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-radius: 20px;
    padding: 22px;
  }

  .ops-login-v3 .login-form > button[type="submit"] {
    width: 100%;
  }

  .ops-login-v3 button {
    min-height: 46px;
  }
}

@media (max-width: 640px) {
  .ops-console-v3 .main {
    padding: 10px 10px calc(env(safe-area-inset-bottom, 0px) + 16px);
  }

  .ops-console-v3 .page-header {
    top: 6px;
    grid-template-columns: auto minmax(0, 1fr);
    border-radius: 14px;
    padding: 8px;
  }

  .ops-console-v3 .page-header h1 {
    overflow: hidden;
    font-size: 22px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ops-console-v3 .page-kicker {
    margin-bottom: 2px;
    font-size: 10px;
    letter-spacing: 0.06em;
  }

  .ops-console-v3 .header-status-stack {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding-bottom: 1px;
  }

  .ops-console-v3 .mobile-menu-toggle span:last-child {
    display: none;
  }

  .ops-console-v3 .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-console-v3 .metric-card {
    min-height: 88px;
    border-radius: 14px;
    padding: 12px;
  }

  .ops-console-v3 .metric-card span {
    margin-bottom: 4px;
    font-size: 12px;
  }

  .ops-console-v3 .metric-card strong {
    font-size: 26px;
  }

  .ops-console-v3 .panel,
  .ops-console-v3 .settings-block,
  .ops-console-v3 .policy-config-card,
  .ops-console-v3 .dialog-filter-panel,
  .ops-console-v3 .runtime-filter-card {
    border-radius: 14px;
    padding: 12px;
  }

  .ops-console-v3 .overview-entry-grid,
  .ops-console-v3 .quick-actions,
  .ops-console-v3 .action-row,
  .ops-console-v3 .scheduled-actions,
  .ops-console-v3 .policy-workbench-actions,
  .ops-console-v3 .modal-actions {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .dialog-selection-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .account-status-grid {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .reply-stats-grid,
  .ops-console-v3 .style-learning-result-grid {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .modal-backdrop {
    display: block;
    padding: 0;
    overflow: hidden;
  }

  .ops-console-v3 .modal-panel {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px calc(env(safe-area-inset-bottom, 0px) + 76px);
    overflow-y: auto;
  }

  .ops-console-v3 .modal-head {
    top: calc(-12px - env(safe-area-inset-top, 0px));
    min-height: 50px;
    margin: calc(-12px - env(safe-area-inset-top, 0px)) -12px 12px;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 10px 8px 12px;
  }

  .ops-console-v3 .modal-head .page-kicker {
    display: none;
  }

  .ops-console-v3 .modal-head h2 {
    font-size: 17px;
    line-height: 1.25;
  }

  .ops-console-v3 .modal-close-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
  }

  .ops-console-v3 .modal-section {
    border-radius: 14px;
    padding: 12px;
  }

  .ops-console-v3 .modal-actions {
    bottom: calc(-76px - env(safe-area-inset-bottom, 0px));
    display: grid;
    gap: 8px;
    margin: 12px -12px calc(-76px - env(safe-area-inset-bottom, 0px));
    padding: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 10px);
  }

  .ops-console-v3 .modal-actions button {
    width: 100%;
    min-height: 44px;
  }

  .ops-console-v3 .account-switch-modal .modal-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-console-v3 .account-switch-row {
    grid-template-columns: 1fr;
    min-height: 58px;
    gap: 8px;
  }

  .ops-console-v3 .account-switch-row-status {
    justify-items: start;
  }

  .ops-login-v3 {
    align-items: start;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 14px calc(env(safe-area-inset-bottom, 0px) + 14px);
  }

  .ops-login-v3 .login-panel {
    width: calc(100vw - 28px);
    margin-top: 8px;
    padding: 20px;
  }
}

.ops-console-v3 .policy-card-head strong,
.ops-console-v3 .block-title strong,
.ops-console-v3 .learning-candidate-head strong,
.ops-console-v3 .switch-card-main strong {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

/* Account switch modal contrast and layering */
.ops-console-v3 .modal-backdrop {
  z-index: 3400;
}

.ops-console-v3 .account-switch-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: min(620px, calc(100dvh - 48px));
}

.ops-console-v3 .account-switch-list {
  gap: 8px;
  max-height: min(430px, 54dvh);
  padding-right: 2px;
}

.ops-console-v3 .account-switch-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  border-color: #d9dddd;
  color: var(--zen-text);
  background: #ffffff;
  box-shadow: none;
}

.ops-console-v3 button.account-switch-row:not(:disabled):hover,
.ops-console-v3 button.account-switch-row:not(:disabled):focus-visible {
  border-color: #9aa2a6;
  color: var(--zen-text);
  background: #f7f8f8;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.ops-console-v3 .account-switch-row.current,
.ops-console-v3 button.account-switch-row.current:not(:disabled):hover,
.ops-console-v3 button.account-switch-row.current:not(:disabled):focus-visible {
  border-color: var(--zen-black);
  color: var(--zen-text);
  background: #f7f8f8;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.ops-console-v3 .account-switch-row-main {
  min-width: 0;
  padding-left: 12px;
}

.ops-console-v3 .account-switch-row-main strong,
.ops-console-v3 .account-switch-row-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .account-switch-row-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 132px;
}

/* Global switch contrast fix */
.ops-console-v3 .global-switch-center {
  background: #ffffff;
}

.ops-console-v3 .global-switch-card {
  border-color: #d9dddd;
  color: var(--zen-text);
  background: #ffffff;
  box-shadow: none;
}

.ops-console-v3 .global-switch-card:hover {
  border-color: #9aa2a6;
  color: var(--zen-text);
  background: #f6f7f8;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  transform: none;
}

.ops-console-v3 .global-switch-card.enabled {
  border-color: var(--zen-black);
  color: var(--zen-text);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.ops-console-v3 .global-switch-card.danger.enabled {
  border-color: var(--zen-danger);
  color: var(--zen-text);
  background: #fff8f8;
  box-shadow: inset 0 0 0 1px rgba(250, 96, 98, 0.2);
}

.ops-console-v3 .global-switch-card.disabled {
  opacity: 1;
  background: #fafafa;
}

/* Global switch center card polish */
.ops-console-v3 .global-switch-center {
  border-color: var(--zen-border);
  background: #ffffff;
}

.ops-console-v3 .global-switch-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.ops-console-v3 .global-switch-card {
  position: relative;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  border: 1px solid #d9dddd;
  border-radius: var(--zen-radius-lg);
  padding: 14px 14px 14px 16px;
  color: var(--zen-text);
  background: #ffffff;
  box-shadow: none;
  overflow: hidden;
}

.ops-console-v3 .global-switch-card::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 8px;
  width: 3px;
  border-radius: 999px;
  background: #cfd4d7;
  content: "";
}

.ops-console-v3 .global-switch-card:hover {
  border-color: #9aa2a6;
  color: var(--zen-text);
  background: #f7f8f8;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  transform: none;
}

.ops-console-v3 .global-switch-card.enabled {
  border-color: rgba(24, 204, 99, 0.34);
  color: var(--zen-text);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(24, 204, 99, 0.14);
}

.ops-console-v3 .global-switch-card.enabled::before {
  background: var(--zen-success);
}

.ops-console-v3 .global-switch-card.danger.enabled {
  border-color: rgba(250, 96, 98, 0.38);
  color: var(--zen-text);
  background: #fff8f8;
  box-shadow: inset 0 0 0 1px rgba(250, 96, 98, 0.18);
}

.ops-console-v3 .global-switch-card.danger.enabled::before {
  background: var(--zen-danger);
}

.ops-console-v3 .global-switch-card.danger:not(.enabled) {
  border-color: rgba(239, 68, 68, 0.26);
  color: var(--zen-text);
  background: #fff7f7;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.08);
}

.ops-console-v3 .global-switch-card.danger:not(.enabled)::before {
  background: #ef4444;
}

.ops-console-v3 .global-switch-card.danger:not(.enabled):hover {
  border-color: rgba(239, 68, 68, 0.38);
  color: var(--zen-text);
  background: #fff3f3;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.12);
}

.ops-console-v3 .global-switch-card.danger:not(.enabled) .switch-card-main strong {
  color: var(--zen-black);
}

.ops-console-v3 .global-switch-card.danger:not(.enabled) .title-help-button {
  border-color: rgba(239, 68, 68, 0.28);
  color: #9f3434;
  background: #ffffff;
}

.ops-console-v3 .global-switch-card.disabled {
  border-color: var(--zen-border);
  color: var(--zen-text-2);
  background: #fafafa;
  cursor: not-allowed;
}

.ops-console-v3 .global-switch-card.disabled::before {
  background: #d9dddd;
}

.ops-console-v3 .global-switch-card .toggle-switch-input {
  align-self: center;
  margin: 0;
}

.ops-console-v3 .global-switch-card .switch-card-main {
  min-width: 0;
  gap: 0;
}

.ops-console-v3 .global-switch-card .switch-card-main strong {
  color: var(--zen-black);
  font-size: 14px;
  line-height: 1.45;
}

.ops-console-v3 .global-switch-card.disabled .switch-card-main strong {
  color: var(--zen-text);
}

.ops-console-v3 .global-switch-card .status-chip {
  grid-column: auto;
  justify-self: end;
  min-height: 24px;
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .ops-console-v3 .global-switch-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ops-console-v3 .account-switch-modal {
    width: 100vw;
    max-height: 100dvh;
  }

  .ops-console-v3 .account-switch-list {
    max-height: none;
  }

  .ops-console-v3 .account-switch-row {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .account-switch-row-status {
    justify-content: flex-start;
    min-width: 0;
  }
}

/* Runtime filter card visual consistency fix */
.ops-console-v3 .runtime-filter-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  align-items: end;
  gap: 14px;
  margin: 14px 0 16px;
  border: 1px solid var(--zen-border);
  border-left: 1px solid var(--zen-border);
  border-radius: var(--zen-radius-xl);
  padding: 14px;
  color: var(--zen-text);
  background: #ffffff;
  box-shadow: none;
}

.ops-console-v3 .runtime-filter-card strong {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--zen-black);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.ops-console-v3 .runtime-filter-control {
  display: grid;
  gap: 6px;
}

.ops-console-v3 .runtime-filter-control span {
  margin: 0;
  color: var(--zen-text-2);
  font-size: 12px;
  font-weight: 600;
}

.ops-console-v3 .runtime-filter-control select {
  border-color: var(--zen-border);
  color: var(--zen-text);
  background: #ffffff;
  box-shadow: none;
  font-weight: 500;
}

.ops-console-v3 .runtime-filter-control select:focus {
  border-color: var(--zen-black);
}

/* Runtime center compact layout */
.ops-console-v3 [data-section-panel="logs"] .panel {
  display: grid;
  gap: 12px;
}

.ops-console-v3 .runtime-status-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-height: 42px;
  border: 1px solid var(--zen-border);
  border-radius: 14px;
  padding: 8px 12px;
  color: var(--zen-text);
  background: #ffffff;
}

.ops-console-v3 .runtime-status-strip strong {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  color: #4a4a4a;
  background: #f3f3f3;
  font-size: 13px;
  font-weight: 750;
}

.ops-console-v3 .runtime-status-strip span,
.ops-console-v3 .runtime-status-strip em {
  color: var(--zen-text-2);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.ops-console-v3 .runtime-status-strip.running strong {
  color: #096b3a;
  background: #e9f8ef;
}

.ops-console-v3 .runtime-status-strip.starting strong {
  color: #7a4a00;
  background: #fff4dd;
}

.ops-console-v3 .runtime-status-strip.error strong {
  color: #9b1c1c;
  background: #fff0f0;
}

.ops-console-v3 .runtime-status-strip em {
  border-radius: 999px;
  padding: 2px 8px;
  color: #7a4a00;
  background: #fff4dd;
}

.ops-console-v3 .runtime-overview {
  gap: 8px;
  margin: 0;
}

.ops-console-v3 .runtime-overview .runtime-card {
  border: 1px solid var(--zen-border);
  border-left: 1px solid var(--zen-border);
  border-radius: 14px;
  padding: 9px 12px;
  background: #fafafa;
}

.ops-console-v3 .runtime-overview .runtime-card strong,
.ops-console-v3 .runtime-overview .runtime-card small {
  display: inline;
}

.ops-console-v3 .runtime-overview .runtime-card small {
  margin: 0 0 0 10px;
  color: var(--zen-text-2);
}

.ops-console-v3 .runtime-mode-tabs {
  margin: 2px 0 0;
}

.ops-console-v3 .runtime-filter-toolbar {
  grid-template-columns: auto minmax(220px, 320px);
  align-items: center;
  margin: 0;
  border-radius: 14px;
  padding: 10px 12px;
  background: #fafafa;
}

.ops-console-v3 .runtime-filter-title {
  display: flex;
  align-items: center;
}

.ops-console-v3 .runtime-filter-toolbar .runtime-filter-control {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  align-items: center;
  gap: 8px;
}

.ops-console-v3 .runtime-filter-toolbar .runtime-filter-control span {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .ops-console-v3 .runtime-filter-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .ops-console-v3 .runtime-filter-toolbar .runtime-filter-control {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .runtime-overview .runtime-card strong,
  .ops-console-v3 .runtime-overview .runtime-card small {
    display: block;
  }

  .ops-console-v3 .runtime-overview .runtime-card small {
    margin: 4px 0 0;
  }

  .persona-editor-panel {
    grid-template-rows: auto auto auto;
    min-height: 0;
  }

  .persona-editor-panel #globalSystemPrompt {
    min-height: 180px;
  }

  .persona-editor-panel #globalStylePrompt {
    min-height: 130px;
  }
}

@media (max-width: 640px) {
  .ops-console-v3 .runtime-filter-card {
    border-radius: 14px;
    padding: 12px;
  }
}

/* Sidebar account switch hover contrast fix */
.ops-console-v3 .sidebar-account-switcher .account-switch-trigger {
  color: var(--zen-text);
}

.ops-console-v3 .sidebar-account-switcher .account-switch-trigger:hover,
.ops-console-v3 .sidebar-account-switcher .account-switch-trigger:focus-visible {
  border-color: #d9dddd;
  color: var(--zen-text);
  background: #f7f8f8;
  box-shadow: none;
}

.ops-console-v3 .sidebar-account-switcher .account-switch-trigger:hover strong,
.ops-console-v3 .sidebar-account-switcher .account-switch-trigger:focus-visible strong {
  color: var(--zen-black);
}

.ops-console-v3 .sidebar-account-switcher .account-switch-trigger:hover small,
.ops-console-v3 .sidebar-account-switcher .account-switch-trigger:focus-visible small {
  color: var(--zen-text-2);
}

.ops-console-v3 .sidebar-account-switcher .account-switch-trigger:hover .account-switch-action,
.ops-console-v3 .sidebar-account-switcher .account-switch-trigger:focus-visible .account-switch-action {
  color: var(--zen-black);
  background: #ffffff;
}

/* ZenMux component code reference polish */
.ops-console-v3 input[type="search"],
.ops-console-v3 select {
  min-height: 40px;
  border: 1px solid var(--zen-control-border);
  border-radius: var(--zen-radius-sm);
  padding: 0 36px 0 12px;
  padding-right: 36px;
  color: var(--zen-text);
  background-color: #ffffff;
  box-shadow: none;
  font-size: 14px;
  line-height: 40px;
}

.ops-console-v3 select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23666666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

.ops-console-v3 input[type="search"] {
  appearance: none;
  line-height: normal;
}

.ops-console-v3 input[type="search"]::-webkit-search-cancel-button {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background:
    linear-gradient(45deg, transparent 44%, #666666 45%, #666666 55%, transparent 56%),
    linear-gradient(-45deg, transparent 44%, #666666 45%, #666666 55%, transparent 56%),
    #f2f2f2;
  cursor: pointer;
}

.ops-console-v3 input[type="search"]:hover,
.ops-console-v3 select:hover {
  border-color: var(--zen-text-2);
}

.ops-console-v3 input[type="search"]:focus,
.ops-console-v3 select:focus {
  border-color: var(--zen-black);
  box-shadow: none;
}

@media (min-width: 641px) {
  .ops-console-v3 .modal-panel {
    border: 0.4px solid #d6d6d6;
    border-radius: 20px;
    padding: 24px;
    background: #ffffff;
    box-shadow: 0 100px 100px rgba(0, 0, 0, 0.05);
  }

  .ops-console-v3 .modal-head {
    position: static;
    top: auto;
    min-height: auto;
    margin: 0 0 16px;
    border-bottom: 0;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .ops-console-v3 .modal-head .page-kicker {
    margin-bottom: 4px;
    color: var(--zen-text-3);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
  }

  .ops-console-v3 .modal-head h2 {
    margin: 0;
    color: var(--zen-black);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
  }

  .ops-console-v3 .modal-close-button {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    border: 0;
    border-radius: var(--zen-radius-md);
    color: var(--zen-text-2);
    background: var(--zen-bg);
    font-size: 18px;
  }

  .ops-console-v3 .modal-close-button:not(:disabled):hover {
    color: var(--zen-black);
    background: var(--zen-active);
    transform: none;
  }

  .ops-console-v3 .modal-actions {
    position: sticky;
    right: auto;
    bottom: -24px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 20px -24px -24px;
    border-top: 1px solid var(--zen-border);
    padding: 14px 24px 18px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: none;
  }

  .ops-console-v3 .modal-actions button {
    min-width: 96px;
  }
}

.ops-console-v3 .tabs {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius-lg);
  padding: 4px;
  background: var(--zen-bg-soft);
}

.ops-console-v3 .tab-button {
  min-height: 36px;
  border: 0;
  border-radius: var(--zen-radius-md);
  padding: 0 14px;
  color: var(--zen-text-2);
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
}

.ops-console-v3 .tab-button:hover,
.ops-console-v3 .tab-button[aria-selected="true"] {
  color: var(--zen-black);
  background: var(--zen-white);
  box-shadow: var(--zen-shadow-xs);
  transform: none;
}

.ops-console-v3 .tab-button[aria-selected="true"] {
  font-weight: 700;
}

.ops-console-v3 .dialog-quick-filters .small-button,
.ops-console-v3 .time-range-toolbar .small-button,
.ops-console-v3 .weekday-toolbar .small-button {
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: var(--zen-radius-md);
  color: var(--zen-text-2);
  background: var(--zen-bg-soft);
}

.ops-console-v3 .dialog-quick-filters .small-button:hover,
.ops-console-v3 .time-range-toolbar .small-button:hover,
.ops-console-v3 .weekday-toolbar .small-button:hover,
.ops-console-v3 .dialog-quick-filters .small-button.active {
  border-color: var(--zen-border);
  color: var(--zen-black);
  background: var(--zen-white);
  box-shadow: var(--zen-shadow-xs);
}

.ops-console-v3 .time-range-editor {
  display: grid;
  gap: 12px;
  border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius-xl);
  padding: 14px;
  background: #ffffff;
  box-shadow: none;
}

.ops-console-v3 .time-range-toolbar {
  gap: 6px;
  border-bottom: 0;
  padding-bottom: 0;
}

.ops-console-v3 .time-range-rows {
  gap: 8px;
}

.ops-console-v3 .time-range-row {
  grid-template-columns: auto minmax(120px, 1fr) auto minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: end;
  border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius-lg);
  padding: 10px;
  background: var(--zen-bg-stripe);
  box-shadow: none;
}

.ops-console-v3 .time-range-index {
  width: 28px;
  height: 28px;
  border: 1px solid var(--zen-border);
  color: var(--zen-text-2);
  background: var(--zen-white);
  font-size: 12px;
}

.ops-console-v3 .time-range-separator,
.ops-console-v3 .time-range-summary {
  color: var(--zen-text-3);
}

.ops-console-v3 .time-range-empty {
  border-color: var(--zen-border);
  color: var(--zen-text-3);
  background: var(--zen-bg-stripe);
}

.ops-console-v3 .switch-row .scheduledWeekday {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
  border: 1px solid var(--zen-control-border);
  border-radius: 999px;
  padding: 0;
  background: #ffffff;
}

.ops-console-v3 .switch-row .scheduledWeekday:checked {
  border-color: var(--zen-black);
  background: var(--zen-black);
  box-shadow: inset 0 0 0 3px #ffffff;
}

.ops-console-v3 .switch-row label:has(.scheduledWeekday) {
  min-height: 34px;
  border: 1px solid var(--zen-border);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--zen-text-2);
  background: var(--zen-white);
  font-size: 13px;
  cursor: pointer;
}

.ops-console-v3 .switch-row label:has(.scheduledWeekday:hover),
.ops-console-v3 .switch-row label:has(.scheduledWeekday:focus-visible) {
  border-color: var(--zen-control-border);
  color: var(--zen-black);
  background: var(--zen-bg-stripe);
}

.ops-console-v3 .switch-row label:has(.scheduledWeekday:checked) {
  border-color: var(--zen-black);
  color: var(--zen-black);
  background: var(--zen-white);
  box-shadow: var(--zen-shadow-xs);
}

.ops-console-v3 .scheduled-dialog-picker {
  display: grid;
  gap: 8px;
  border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius-xl);
  padding: 12px;
  background: var(--zen-bg-stripe);
}

.ops-console-v3 .scheduled-dialog-picker > span {
  margin-bottom: 0;
  color: var(--zen-text-2);
  font-size: 13px;
  font-weight: 600;
}

.ops-console-v3 .scheduled-dialog-picker input[type="search"] {
  border-radius: var(--zen-radius-md);
  background-color: #ffffff;
}

.ops-console-v3 .scheduled-dialog-picker select {
  margin-top: 0;
  border-radius: var(--zen-radius-md);
  background-color: #ffffff;
}

.ops-console-v3 table th,
.ops-console-v3 table td,
.ops-console-v3 .scheduled-task-list th,
.ops-console-v3 .scheduled-task-list td {
  height: 48px;
  padding: 10px 16px;
  font-size: 13px;
}

.ops-console-v3 table td,
.ops-console-v3 .scheduled-task-list td {
  color: var(--zen-text-2);
}

@media (max-width: 760px) {
  .ops-console-v3 .tabs {
    display: flex;
    width: 100%;
  }

  .ops-console-v3 .tab-button {
    flex: 1 0 auto;
  }

  .ops-console-v3 .time-range-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .ops-console-v3 .time-range-row label {
    grid-column: span 2;
  }

  .ops-console-v3 .time-range-separator {
    display: none;
  }
}

@media (max-width: 640px) {
  .ops-console-v3 .modal-panel {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px calc(env(safe-area-inset-bottom, 0px) + 76px);
    box-shadow: none;
  }

  .ops-console-v3 .modal-actions {
    bottom: calc(-76px - env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 12px -12px calc(-76px - env(safe-area-inset-bottom, 0px));
    padding: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 10px);
  }

  .ops-console-v3 input[type="search"],
  .ops-console-v3 select {
    min-height: 44px;
    font-size: 16px;
    line-height: 44px;
  }

  .ops-console-v3 .scheduled-dialog-picker,
  .ops-console-v3 .time-range-editor {
    border-radius: var(--zen-radius-lg);
    padding: 12px;
  }
}

/* ZenMux interactive hover surface polish */
.ops-console-v3 .account-row:hover,
.ops-console-v3 .group-row:hover,
.ops-console-v3 .policy-dialog-row:hover,
.ops-console-v3 .scheduled-dialog-card:hover,
.ops-console-v3 .account-switch-row:hover,
.ops-console-v3 .learning-candidate-card:hover {
  border-color: #d6d6d6;
  color: var(--zen-text);
  background: #f7f7f7;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transform: none;
}

.ops-console-v3 .account-row.selected,
.ops-console-v3 .policy-dialog-row.selected,
.ops-console-v3 .scheduled-dialog-card.selected,
.ops-console-v3 .learning-candidate-card.selected {
  border-color: #000000;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.ops-console-v3 tbody tr:hover,
.ops-console-v3 .record-row:hover,
.ops-console-v3 .event-row:hover,
.ops-console-v3 .operation-box:hover,
.ops-console-v3 .reply-preview-result:hover {
  background: #f7f7f7;
  box-shadow: none;
}

.ops-console-v3 .small-button:not(:disabled):hover,
.ops-console-v3 .text-action:not(:disabled):hover,
.ops-console-v3 .policy-toggle-button:not(:disabled):hover,
.ops-console-v3 .list-action-button:not(:disabled):hover {
  border-color: #e6e6e6;
  color: #000000;
  background: #f2f2f2;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .list-action-button.danger-text:not(:disabled):hover,
.ops-console-v3 .danger-text:not(:disabled):hover {
  border-color: rgba(250, 96, 98, 0.2);
  color: #9f1c12;
  background: #fff0ed;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .modal-actions button.secondary:not(:disabled):hover,
.ops-console-v3 .weekday-toolbar .small-button:not(:disabled):hover,
.ops-console-v3 .time-range-toolbar .small-button:not(:disabled):hover,
.ops-console-v3 .dialog-quick-filters .small-button:not(:disabled):hover {
  border-color: #d6d6d6;
  color: #000000;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transform: none;
}

.ops-console-v3 input:not([type="checkbox"]):focus,
.ops-console-v3 select:focus,
.ops-console-v3 textarea:focus {
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.ops-console-v3 button:active {
  transform: scale(0.98);
}

.ops-console-v3 .account-row:active,
.ops-console-v3 .group-row:active,
.ops-console-v3 .policy-dialog-row:active,
.ops-console-v3 .scheduled-dialog-card:active,
.ops-console-v3 .learning-candidate-card:active {
  transform: scale(0.995);
}

@media (prefers-reduced-motion: reduce) {
  .ops-console-v3 button:active,
  .ops-console-v3 .account-row:active,
  .ops-console-v3 .group-row:active,
  .ops-console-v3 .policy-dialog-row:active,
  .ops-console-v3 .scheduled-dialog-card:active,
  .ops-console-v3 .learning-candidate-card:active {
    transform: none;
  }
}

/* ZenMux Ant form control mapping polish */
.ops-console-v3 .form-grid label,
.ops-console-v3 .filter-grid label,
.ops-console-v3 .wide-label,
.ops-console-v3 .runtime-filter-control,
.ops-console-v3 .scheduled-dialog-picker {
  display: grid;
  gap: 6px;
  align-content: start;
}

.ops-console-v3 .form-grid label > span,
.ops-console-v3 .filter-grid label > span,
.ops-console-v3 .wide-label > span,
.ops-console-v3 .runtime-filter-control > span,
.ops-console-v3 .scheduled-dialog-picker > span {
  margin: 0;
  color: #666666;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.ops-console-v3 .form-grid input:not([type="checkbox"]):not([type="radio"]),
.ops-console-v3 .form-grid select,
.ops-console-v3 .filter-grid input:not([type="checkbox"]):not([type="radio"]),
.ops-console-v3 .filter-grid select,
.ops-console-v3 .runtime-filter-control select,
.ops-console-v3 .scheduled-dialog-picker input[type="search"],
.ops-console-v3 .scheduled-dialog-picker select {
  min-height: 40px;
  border: 1px solid #d6d6d6;
  border-radius: 8px;
  padding: 0 12px;
  color: #1f1f1f;
  background-color: #ffffff;
  box-shadow: none;
  font-size: 14px;
  line-height: 40px;
}

.ops-console-v3 .form-grid select,
.ops-console-v3 .filter-grid select,
.ops-console-v3 .runtime-filter-control select,
.ops-console-v3 .scheduled-dialog-picker select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23666666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

.ops-console-v3 .form-grid select:hover,
.ops-console-v3 .filter-grid select:hover,
.ops-console-v3 .runtime-filter-control select:hover,
.ops-console-v3 .scheduled-dialog-picker select:hover,
.ops-console-v3 .form-grid input:not([type="checkbox"]):not([type="radio"]):hover,
.ops-console-v3 .filter-grid input:not([type="checkbox"]):not([type="radio"]):hover,
.ops-console-v3 .scheduled-dialog-picker input[type="search"]:hover {
  border-color: #858585;
  background-color: #ffffff;
}

.ops-console-v3 .form-grid select:focus,
.ops-console-v3 .filter-grid select:focus,
.ops-console-v3 .runtime-filter-control select:focus,
.ops-console-v3 .scheduled-dialog-picker select:focus,
.ops-console-v3 .form-grid input:not([type="checkbox"]):not([type="radio"]):focus,
.ops-console-v3 .filter-grid input:not([type="checkbox"]):not([type="radio"]):focus,
.ops-console-v3 .scheduled-dialog-picker input[type="search"]:focus {
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
  outline: none;
}

.ops-console-v3 select[multiple] {
  min-height: 132px;
  padding: 6px;
  padding-right: 6px;
  background-image: none;
  line-height: 1.45;
}

.ops-console-v3 select[multiple] option {
  border-radius: 8px;
  padding: 8px 10px;
  color: #1f1f1f;
  font-weight: 400;
}

.ops-console-v3 select[multiple] option:checked {
  color: #000000;
  background: #f2f2f2;
}

.ops-console-v3 input[type="search"]::-webkit-search-cancel-button {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background:
    linear-gradient(45deg, transparent 44%, #666666 45%, #666666 55%, transparent 56%),
    linear-gradient(-45deg, transparent 44%, #666666 45%, #666666 55%, transparent 56%),
    #f2f2f2;
  cursor: pointer;
}

.ops-console-v3 .scheduled-dialog-picker {
  border-color: #e6e6e6;
  border-radius: 12px;
  padding: 12px;
  background: #fafafa;
}

.ops-console-v3 .runtime-filter-control select {
  width: 100%;
}

@media (max-width: 640px) {
  .ops-console-v3 .form-grid input:not([type="checkbox"]):not([type="radio"]),
  .ops-console-v3 .form-grid select,
  .ops-console-v3 .filter-grid input:not([type="checkbox"]):not([type="radio"]),
  .ops-console-v3 .filter-grid select,
  .ops-console-v3 .runtime-filter-control select,
  .ops-console-v3 .scheduled-dialog-picker input[type="search"],
  .ops-console-v3 .scheduled-dialog-picker select {
    min-height: 44px;
    font-size: 16px;
    line-height: 44px;
  }

  .ops-console-v3 .scheduled-dialog-picker {
    border-radius: 12px;
    padding: 10px;
  }
}

/* ZenMux custom select dropdown polish */
.ops-console-v3 .enhanced-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.ops-console-v3 .enhanced-select-native {
  position: absolute !important;
  inset: 0 auto auto 0;
  width: 1px !important;
  min-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.ops-console-v3 .enhanced-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  border: 1px solid #d6d6d6;
  border-radius: 8px;
  padding: 0 12px;
  color: #1f1f1f;
  background: #ffffff;
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  transform: none;
}

.ops-console-v3 .enhanced-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .enhanced-select-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  background: currentColor;
  opacity: 0.62;
  mask: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}

.ops-console-v3 .enhanced-select-button:not(:disabled):hover,
.ops-console-v3 .enhanced-select.open .enhanced-select-button {
  border-color: #858585;
  color: #000000;
  background: #ffffff;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .enhanced-select-button:focus-visible {
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
  outline: none;
}

.ops-console-v3 .enhanced-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 260;
  display: none;
  max-height: min(280px, 48vh);
  overflow: auto;
  border: 1px solid #d6d6d6;
  border-radius: 12px;
  padding: 4px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
}

.ops-console-v3 .enhanced-select.open .enhanced-select-menu {
  display: grid;
  gap: 2px;
}

.ops-console-v3 .enhanced-select-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  color: #1f1f1f;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  transform: none;
}

.ops-console-v3 .enhanced-select-option:hover,
.ops-console-v3 .enhanced-select-option:focus-visible {
  color: #000000;
  background: #f2f2f2;
  box-shadow: none;
  outline: none;
  transform: none;
}

.ops-console-v3 .enhanced-select-option[aria-selected="true"] {
  color: #000000;
  background: #eeeeee;
  font-weight: 600;
}

.ops-console-v3 .enhanced-select.disabled .enhanced-select-button,
.ops-console-v3 .enhanced-select-button:disabled {
  color: #9a9a9a;
  background: #f5f5f5;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .ops-console-v3 .enhanced-select-button {
    min-height: 44px;
    font-size: 16px;
  }

  .ops-console-v3 .enhanced-select-menu {
    max-height: min(320px, 52vh);
  }

  .ops-console-v3 .enhanced-select-option {
    min-height: 40px;
    font-size: 15px;
  }
}

/* Select alignment regression fix */
.ops-console-v3 .enhanced-select-button {
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  grid-auto-rows: 1fr;
  align-items: center;
  column-gap: 10px;
  padding: 0 12px;
  appearance: none;
  -webkit-appearance: none;
  line-height: 1;
}

.ops-console-v3 .enhanced-select-value {
  display: flex;
  align-items: center;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  line-height: 1;
}

.ops-console-v3 .enhanced-select-option {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  min-height: 36px;
  height: 36px;
  padding: 0 10px;
  line-height: 1;
}

.ops-console-v3 .dialog-filter-panel .enhanced-select-button,
.ops-console-v3 .filter-grid .enhanced-select-button,
.ops-console-v3 .runtime-filter-control .enhanced-select-button {
  height: 40px;
  min-height: 40px;
}

.ops-console-v3 .enhanced-select-icon,
.ops-console-v3 .dialog-filter-panel .enhanced-select-icon,
.ops-console-v3 .filter-grid .enhanced-select-icon,
.ops-console-v3 .runtime-filter-control .enhanced-select-icon {
  display: block;
  width: 16px;
  height: 16px;
  place-self: center;
  align-self: center;
  justify-self: center;
  line-height: 0;
  transform: none;
}

@media (max-width: 640px) {
  .ops-console-v3 .enhanced-select-button {
    height: 44px;
    min-height: 44px;
  }

  .ops-console-v3 .enhanced-select-option {
    min-height: 40px;
  }
}

/* Header refresh action and loading polish */
.ops-console-v3 .page-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.ops-console-v3 .page-title-block {
  display: grid;
  gap: 0;
  min-width: 0;
}

.ops-console-v3 .page-title-row {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  min-width: 0;
}

.ops-console-v3 .page-kicker {
  display: none;
}

.ops-console-v3 .page-header h1 {
  margin: 0;
  line-height: 1.12;
}

.ops-console-v3 .header-status-stack {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.ops-console-v3 .header-refresh-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: #666666;
  background: transparent;
  box-shadow: none;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  transition:
    color 0.16s ease,
    background-color 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.16s ease;
}

.ops-console-v3 .header-refresh-button:hover:not(:disabled) {
  color: #111111;
  background: #e9e9e9;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .header-refresh-button:disabled {
  color: var(--zen-text-2);
  cursor: wait;
  opacity: 1;
}

.ops-console-v3 .header-refresh-icon {
  display: block;
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13 7.4A5 5 0 1 1 11.54 3.86M13 2.5V6H9.5' stroke='black' stroke-width='1.45' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}

.ops-console-v3 .header-refresh-button.is-loading .header-refresh-icon {
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  background: transparent;
  mask: none;
  animation: spin 0.72s linear infinite;
}

.ops-console-v3 .header-refresh-button.is-loading::after {
  display: none;
}

.ops-console-v3 .refresh-state-chip.loading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ops-console-v3 .refresh-state-chip.loading::before {
  width: 10px;
  height: 10px;
  margin-right: 0;
  border-width: 2px;
  animation-duration: 0.72s;
}

@media (max-width: 760px) {
  .ops-console-v3 .page-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ops-console-v3 .header-refresh-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: -6px 0;
  }

  .ops-console-v3 .header-status-stack {
    grid-column: 1 / -1;
    justify-content: space-between;
    width: 100%;
  }
}

@media (max-width: 520px) {
  .ops-console-v3 .refresh-state-chip {
    display: none;
  }

  .ops-console-v3 .header-status-stack {
    justify-content: flex-end;
  }
}

/* Final control alignment polish: select controls */
.ops-console-v3 .enhanced-select-button {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
  border-color: #d6d6d6;
  border-radius: 8px;
  padding: 0 12px;
  color: #1f1f1f;
  background: #ffffff;
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
}

.ops-console-v3 .enhanced-select-value {
  display: inline-flex !important;
  align-items: center !important;
  flex: 1 1 auto;
  align-self: stretch;
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  line-height: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .enhanced-select-icon {
  display: inline-block !important;
  flex: 0 0 16px;
  align-self: center !important;
  width: 16px;
  height: 16px;
  margin: 0;
  background: currentColor;
  line-height: 0;
  opacity: 0.62;
  transform: none;
}

.ops-console-v3 .enhanced-select-option {
  display: flex !important;
  align-items: center !important;
  min-height: 36px;
  height: 36px;
  box-sizing: border-box;
  padding: 0 10px;
  font-size: 13px;
  line-height: normal;
}

@media (max-width: 640px) {
  .ops-console-v3 .enhanced-select-button {
    height: 44px;
    min-height: 44px;
    font-size: 16px;
  }

  .ops-console-v3 .enhanced-select-option {
    min-height: 40px;
    height: 40px;
    font-size: 15px;
  }
}

/* Unified title help tooltip final layer */
.ops-console-v3 .title-help-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  box-sizing: border-box;
  margin-left: 4px;
  border: 0;
  border-radius: 6px;
  padding: 0;
  color: #858585;
  background: transparent;
  box-shadow: none;
  font-size: 0;
  line-height: 0;
  vertical-align: middle;
  cursor: help;
  touch-action: manipulation;
  transform: none;
}

.ops-console-v3 .title-help-button:not(:disabled):hover,
.ops-console-v3 .title-help-button:focus-visible {
  color: #333333;
  background: #f2f2f2;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .title-help-button::before {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  display: block !important;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin: 0;
  border: 0 !important;
  background: currentColor;
  content: "" !important;
  opacity: 1 !important;
  pointer-events: none !important;
  transform: none !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 12.25A5.25 5.25 0 1 0 7 1.75a5.25 5.25 0 0 0 0 10.5Z' stroke='black' stroke-width='1.25'/%3E%3Cpath d='M7 6.35v3.25M7 4.35h.01' stroke='black' stroke-width='1.35' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 12.25A5.25 5.25 0 1 0 7 1.75a5.25 5.25 0 0 0 0 10.5Z' stroke='black' stroke-width='1.25'/%3E%3Cpath d='M7 6.35v3.25M7 4.35h.01' stroke='black' stroke-width='1.35' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
}

.ops-console-v3 .title-help-button::after {
  position: absolute;
  right: auto;
  bottom: calc(100% + 9px);
  left: 50%;
  z-index: 280;
  display: block !important;
  width: max-content;
  max-width: min(300px, calc(100vw - 32px));
  border: 0;
  border-radius: 10px;
  padding: 9px 11px;
  color: #ffffff;
  background: #1f1f1f;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  content: attr(data-help) !important;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.58;
  letter-spacing: 0;
  opacity: 0 !important;
  pointer-events: none !important;
  text-align: left;
  transform: translate(-50%, 5px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  white-space: normal;
}

@media (hover: hover) and (pointer: fine) {
  .ops-console-v3 .title-help-button:hover::after,
  .ops-console-v3 .title-help-button:focus-visible::after {
    opacity: 1 !important;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 640px) {
  .ops-console-v3 .title-help-button {
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
    margin-left: 2px;
  }
}

@media (hover: none), (pointer: coarse) {
  .ops-console-v3 .title-help-button::after {
    display: none !important;
  }
}

/* ZenMux management table and hint polish */
.ops-console-v3 .title-help-button::after {
  border-radius: 8px !important;
  padding: 8px 12px !important;
  font-size: 14px !important;
  line-height: 1.45;
  z-index: 1400;
}

.ops-console-v3 .page-header {
  overflow: visible;
  z-index: 1300;
}

.ops-console-v3 .page-header .title-help-button::after,
.ops-console-v3 .page-title-row .title-help-button::after {
  display: block !important;
  top: calc(100% + 10px);
  bottom: auto;
  transform: translate(-50%, -4px);
}

@media (hover: hover) and (pointer: fine) {
  .ops-console-v3 .page-header .title-help-button:hover::after,
  .ops-console-v3 .page-header .title-help-button:focus-visible::after,
  .ops-console-v3 .page-title-row .title-help-button:hover::after,
  .ops-console-v3 .page-title-row .title-help-button:focus-visible::after {
    transform: translate(-50%, 0);
  }
}

.ops-console-v3 .table-wrap,
.ops-console-v3 .scheduled-task-list {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none;
}

.ops-console-v3 .table-wrap table,
.ops-console-v3 .scheduled-task-list table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #333333;
  font-size: 13px;
}

.ops-console-v3 .table-wrap thead,
.ops-console-v3 .scheduled-task-list thead {
  width: 100%;
}

.ops-console-v3 .table-wrap th,
.ops-console-v3 .table-wrap td,
.ops-console-v3 .scheduled-task-list th,
.ops-console-v3 .scheduled-task-list td {
  height: 48px;
  border-bottom: 1px solid #e6e6e6;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 18px;
  vertical-align: middle;
}

.ops-console-v3 .table-wrap thead th,
.ops-console-v3 .scheduled-task-list thead th {
  white-space: nowrap;
}

.ops-console-v3 .table-wrap th,
.ops-console-v3 .scheduled-task-list th {
  color: #333333;
  background: #fafafa;
  font-weight: 700;
}

.ops-console-v3 .table-wrap td,
.ops-console-v3 .scheduled-task-list td {
  color: #666666;
  background: #ffffff;
}

.ops-console-v3 .table-wrap tbody tr:hover,
.ops-console-v3 .scheduled-task-list tbody tr:hover {
  background: #f5f5f5;
}

.ops-console-v3 .table-wrap tbody tr:hover > td,
.ops-console-v3 .scheduled-task-list tbody tr:hover > td {
  background: #f5f5f5;
}

.ops-console-v3 .table-wrap .selected-table-row > td,
.ops-console-v3 .scheduled-task-list .selected-table-row > td {
  background: #f2f2f2;
}

.ops-console-v3 .table-wrap tbody tr:last-child td,
.ops-console-v3 .scheduled-task-list tbody tr:last-child td {
  border-bottom: 0;
}

.ops-console-v3 .table-wrap tbody tr:last-child td:first-child,
.ops-console-v3 .scheduled-task-list tbody tr:last-child td:first-child {
  border-bottom-left-radius: 8px;
}

.ops-console-v3 .table-wrap tbody tr:last-child td:last-child,
.ops-console-v3 .scheduled-task-list tbody tr:last-child td:last-child {
  border-bottom-right-radius: 8px;
}

.ops-console-v3 .table-wrap thead tr:first-child th:first-child,
.ops-console-v3 .scheduled-task-list thead tr:first-child th:first-child {
  border-top-left-radius: 11px;
}

.ops-console-v3 .table-wrap thead tr:first-child th:last-child,
.ops-console-v3 .scheduled-task-list thead tr:first-child th:last-child {
  border-top-right-radius: 11px;
}

.ops-console-v3 .table-wrap td:last-child,
.ops-console-v3 .scheduled-task-list td:last-child {
  text-align: center;
}

.ops-console-v3 .table-wrap .dialog-row-actions,
.ops-console-v3 .table-wrap .account-row-actions,
.ops-console-v3 .scheduled-task-list .scheduled-actions {
  justify-content: center;
}

.ops-console-v3 .table-wrap .list-action-button,
.ops-console-v3 .scheduled-task-list .list-action-button {
  min-width: 32px;
  min-height: 32px;
  border-radius: 8px;
  padding: 0 9px;
  color: #333333;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.ops-console-v3 .table-wrap .list-action-button:not(:disabled):hover,
.ops-console-v3 .scheduled-task-list .list-action-button:not(:disabled):hover {
  color: #000000;
  background: #f2f2f2;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .zenmux-popover-surface {
  width: 267px;
  border: 0.4px solid #d6d6d6;
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 100px 100px rgba(0, 0, 0, 0.05);
}

/* Final button vertical alignment contract */
.ops-console-v3 button,
.ops-console-v3 .small-button,
.ops-console-v3 button.secondary.small-button,
.ops-console-v3 button.danger.small-button,
.ops-console-v3 .dialog-quick-filters .small-button,
.ops-console-v3 .weekday-toolbar .small-button,
.ops-console-v3 .time-range-toolbar .small-button,
.ops-console-v3 .modal-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
  vertical-align: middle;
}

.ops-console-v3 .small-button,
.ops-console-v3 button.secondary.small-button,
.ops-console-v3 button.danger.small-button {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
}

/* ZenMux cost dropdown original contract */
.ops-console-v3 .enhanced-select-button {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
  border: 1px solid #d6d6d6;
  border-radius: 8px;
  padding: 0 12px;
  color: #333333;
  background: #ffffff;
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-align: left;
  transform: none;
}

.ops-console-v3 .enhanced-select-value {
  display: flex !important;
  align-items: center !important;
  flex: 1 1 auto;
  align-self: stretch;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .enhanced-select-icon {
  display: block !important;
  flex: 0 0 16px;
  align-self: center !important;
  width: 16px;
  height: 16px;
  margin: 0;
  line-height: 0;
  transform: none;
}

.ops-console-v3 .enhanced-select-menu {
  top: calc(100% + 6px);
  border: 1px solid #d6d6d6;
  border-radius: 12px;
  padding: 4px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

.ops-console-v3 .enhanced-select-menu::-webkit-scrollbar {
  width: 6px;
  background: transparent;
}

.ops-console-v3 .enhanced-select-menu::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.15);
}

.ops-console-v3 .enhanced-select-option {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start;
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
  border-radius: 8px;
  padding: 0 12px;
  color: #333333;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
}

.ops-console-v3 .enhanced-select-option:hover,
.ops-console-v3 .enhanced-select-option:focus-visible {
  color: #000000;
  background-color: #f5f5f5;
  box-shadow: none;
  outline: none;
  transform: none;
}

.ops-console-v3 .enhanced-select-option[aria-selected="true"] {
  color: #000000;
  background-color: #f0f0f0;
  font-weight: 600;
}

/* Custom date picker contract */
.ops-console-v3 .custom-date-picker {
  position: relative;
  width: 100%;
  min-width: 0;
}

.ops-console-v3 .custom-date-button {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
  border: 1px solid #d6d6d6;
  border-radius: 8px;
  padding: 0 12px;
  color: #1f1f1f;
  background: #ffffff;
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
  text-align: left;
  transform: none;
}

.ops-console-v3 .custom-date-button:not(:disabled):hover,
.ops-console-v3 .custom-date-picker.open .custom-date-button {
  border-color: #858585;
  color: #000000;
  background: #ffffff;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .custom-date-button:focus-visible {
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
  outline: none;
}

.ops-console-v3 .custom-date-value {
  display: inline-flex;
  align-items: center;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .custom-date-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  background: currentColor;
  opacity: 0.62;
  mask: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='4' width='10' height='9' rx='1.5' stroke='black' stroke-width='1.4'/%3E%3Cpath d='M5 2.8V5M11 2.8V5M3.5 7H12.5' stroke='black' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}

.ops-console-v3 .custom-date-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 270;
  display: none;
  width: 100%;
  min-width: 240px;
  border: 1px solid #d6d6d6;
  border-radius: 12px;
  padding: 10px;
  color: #1f1f1f;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
}

.ops-console-v3 .custom-date-picker.open .custom-date-menu {
  display: grid;
  gap: 8px;
}

.ops-console-v3 .custom-date-head,
.ops-console-v3 .custom-date-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ops-console-v3 .custom-date-head strong {
  color: #111111;
  font-size: 13px;
  font-weight: 700;
}

.ops-console-v3 .custom-date-nav,
.ops-console-v3 .custom-date-link {
  min-height: 28px;
  border: 0;
  border-radius: 8px;
  padding: 0 8px;
  color: #333333;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
  transform: none;
}

.ops-console-v3 .custom-date-nav:not(:disabled):hover,
.ops-console-v3 .custom-date-link:not(:disabled):hover {
  color: #000000;
  background: #f5f5f5;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .custom-date-weekdays,
.ops-console-v3 .custom-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.ops-console-v3 .custom-date-weekdays span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  color: #666666;
  font-size: 12px;
  font-weight: 600;
}

.ops-console-v3 .custom-date-day {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 28px;
  height: 28px;
  min-height: 28px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: #1f1f1f;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  transform: none;
}

.ops-console-v3 .custom-date-day.muted {
  color: #a3a3a3;
}

.ops-console-v3 .custom-date-day[data-today="true"] {
  box-shadow: inset 0 0 0 1px #d6d6d6;
}

.ops-console-v3 .custom-date-day:hover,
.ops-console-v3 .custom-date-day:focus-visible {
  color: #000000;
  background: #f5f5f5;
  box-shadow: none;
  outline: none;
  transform: none;
}

.ops-console-v3 .custom-date-day[aria-selected="true"] {
  color: #000000;
  background: #f0f0f0;
  box-shadow: none;
  font-weight: 700;
}

/* Custom time picker contract */
.ops-console-v3 .custom-time-picker {
  position: relative;
  width: 100%;
  min-width: 0;
}

.ops-console-v3 .custom-time-button {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
  border: 1px solid #d6d6d6;
  border-radius: 8px;
  padding: 0 12px;
  color: #1f1f1f;
  background: #ffffff;
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
  text-align: left;
  transform: none;
}

.ops-console-v3 .custom-time-button:not(:disabled):hover,
.ops-console-v3 .custom-time-picker.open .custom-time-button {
  border-color: #858585;
  color: #000000;
  background: #ffffff;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .custom-time-button:focus-visible {
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
  outline: none;
}

.ops-console-v3 .custom-time-value {
  display: inline-flex;
  align-items: center;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .custom-time-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  background: currentColor;
  opacity: 0.62;
  mask: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='5' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M8 5.3V8L10 9.2' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}

.ops-console-v3 .custom-time-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 270;
  display: none;
  width: 100%;
  min-width: 132px;
  max-height: min(260px, 42vh);
  overflow: auto;
  border: 1px solid #d6d6d6;
  border-radius: 12px;
  padding: 4px;
  color: #1f1f1f;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
}

.ops-console-v3 .custom-time-picker.open .custom-time-menu {
  display: grid;
  gap: 2px;
}

.ops-console-v3 .custom-time-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: #333333;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  text-align: left;
  transform: none;
}

.ops-console-v3 .custom-time-option:hover,
.ops-console-v3 .custom-time-option:focus-visible {
  color: #000000;
  background: #f5f5f5;
  box-shadow: none;
  outline: none;
  transform: none;
}

.ops-console-v3 .custom-time-option[aria-selected="true"] {
  color: #000000;
  background: #f0f0f0;
  font-weight: 600;
}

@media (max-width: 640px) {
  .ops-console-v3 .custom-date-button {
    height: 44px;
    min-height: 44px;
    font-size: 16px;
  }

  .ops-console-v3 .custom-date-menu,
  .ops-console-v3 .custom-time-menu {
    width: 100%;
    min-width: min(280px, calc(100vw - 40px));
  }
}

@media (max-width: 640px) {
  .ops-console-v3 .enhanced-select-button {
    height: 44px;
    min-height: 44px;
    font-size: 16px;
  }

  .ops-console-v3 .enhanced-select-option {
    height: 40px;
    min-height: 40px;
    font-size: 15px;
  }
}

/* ZenMux cost tab switcher contract */
.ops-console-v3 .tabs {
  display: flex;
  align-items: flex-end;
  width: 100%;
  max-width: 100%;
  gap: 28px;
  margin: 0 0 16px;
  border: 0;
  border-bottom: 1px solid #e6e6e6;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow-x: auto;
  overflow-y: hidden;
}

.ops-console-v3 .tab-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 40px;
  min-height: 40px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0;
  color: #666666;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  transform: none;
}

.ops-console-v3 .tab-button:hover {
  color: #000000;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .tab-button[aria-selected="true"] {
  color: #000000;
  border-bottom-color: transparent;
  font-weight: 700;
}

.ops-console-v3 .tab-button:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.12);
  outline-offset: 3px;
}

.ops-console-v3 .tab-button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: #000000;
  content: "";
  opacity: 0;
  pointer-events: none;
  transition:
    width 0.16s ease,
    opacity 0.16s ease;
}

.ops-console-v3 .tab-button[aria-selected="true"]::after {
  width: 100%;
  opacity: 1;
}

@media (max-width: 640px) {
  .ops-console-v3 .tabs {
    gap: 22px;
    margin-bottom: 14px;
  }

  .ops-console-v3 .tab-button {
    height: 44px;
    min-height: 44px;
    font-size: 15px;
  }
}

/* Final title help anti-clipping contract */
.ops-console-v3 .panel,
.ops-console-v3 .panel-head,
.ops-console-v3 .subsection-title {
  overflow: visible;
}

.ops-console-v3 .title-help-button::after {
  display: none !important;
}

.help-tooltip-layer {
  position: fixed;
  z-index: 5000;
  display: block;
  width: max-content;
  max-width: min(360px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  color: #ffffff;
  background: #1f1f1f;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition:
    opacity 0.14s ease,
    transform 0.14s ease;
  white-space: normal;
}

.help-tooltip-layer.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Final ZenMux dialog operations palette */
.ops-console-v3 [data-section-panel="dialogs"] .panel,
.ops-console-v3 [data-section-panel="dialogs"] .dialog-filter-panel,
.ops-console-v3 [data-section-panel="dialogs"] .dialog-selection-bar,
.ops-console-v3 [data-section-panel="dialogs"] .table-wrap {
  border-color: #e6e6e6;
  color: #333333;
  background: #ffffff;
  box-shadow: none;
}

.ops-console-v3 [data-section-panel="dialogs"] .panel-head {
  border-bottom-color: #e6e6e6;
}

.ops-console-v3 [data-section-panel="dialogs"] .panel-head h2,
.ops-console-v3 [data-section-panel="dialogs"] table strong {
  color: #333333;
}

.ops-console-v3 [data-section-panel="dialogs"] .status-chip,
.ops-console-v3 [data-section-panel="dialogs"] table small,
.ops-console-v3 [data-section-panel="dialogs"] td {
  color: #666666;
}

.ops-console-v3 [data-section-panel="dialogs"] th {
  border-bottom-color: #e6e6e6;
  color: #333333;
  background: #fafafa;
}

.ops-console-v3 [data-section-panel="dialogs"] tbody tr {
  background: #ffffff;
}

.ops-console-v3 [data-section-panel="dialogs"] tbody tr:hover,
.ops-console-v3 [data-section-panel="dialogs"] .selected-table-row {
  color: #333333;
  background: #f7f7f7;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 [data-section-panel="dialogs"] input,
.ops-console-v3 [data-section-panel="dialogs"] select {
  height: 40px;
  border-color: #d9d9d9;
  border-radius: 8px;
  color: #333333;
  background: #ffffff;
  box-shadow: none;
}

.ops-console-v3 [data-section-panel="dialogs"] input:focus,
.ops-console-v3 [data-section-panel="dialogs"] select:focus {
  border-color: #333333;
  box-shadow: none;
}

.ops-console-v3 [data-section-panel="dialogs"] .dialog-row-actions .list-action-button,
.ops-console-v3 [data-section-panel="dialogs"] .dialog-quick-filters .small-button,
.ops-console-v3 [data-section-panel="dialogs"] .dialog-selection-bar .small-button {
  min-height: 32px;
  border-color: transparent;
  border-radius: 8px;
  color: #333333;
  background: #f5f5f5;
  box-shadow: none;
  font-weight: 600;
}

.ops-console-v3 [data-section-panel="dialogs"] .dialog-row-actions .list-action-button:not(:disabled):hover,
.ops-console-v3 [data-section-panel="dialogs"] .dialog-quick-filters .small-button:not(:disabled):hover,
.ops-console-v3 [data-section-panel="dialogs"] .dialog-selection-bar .small-button:not(:disabled):hover {
  border-color: transparent;
  color: #000000;
  background: #e6e6e6;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 [data-section-panel="dialogs"] .dialog-row-actions .danger-text,
.ops-console-v3 [data-section-panel="dialogs"] .dialog-selection-bar .danger {
  color: #fa6062;
  background: rgba(250, 96, 98, 0.11);
}

.ops-console-v3 [data-section-panel="dialogs"] .dialog-row-actions .danger-text:not(:disabled):hover,
.ops-console-v3 [data-section-panel="dialogs"] .dialog-selection-bar .danger:not(:disabled):hover {
  color: #ffffff;
  background: #fa6062;
}

.ops-console-v3 [data-section-panel="dialogs"] .table-wrap th:last-child,
.ops-console-v3 [data-section-panel="dialogs"] .table-wrap td:last-child {
  min-width: 224px;
  white-space: nowrap;
}

.ops-console-v3 [data-section-panel="dialogs"] .table-wrap .dialog-row-actions {
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
  width: auto;
  min-width: max-content;
}

.ops-console-v3 [data-section-panel="dialogs"] .table-wrap .dialog-row-actions .list-action-button {
  flex: 0 0 auto;
  width: auto;
  min-height: 32px;
}

.ops-console-v3 .policy-modal-panel,
.ops-console-v3 .scheduled-task-modal,
.ops-console-v3 .dialog-scheduled-modal,
body > .modal-backdrop .policy-modal-panel,
body > .modal-backdrop .scheduled-task-modal,
body > .modal-backdrop .dialog-scheduled-modal {
  border: 0;
  border-radius: 24px;
  color: #333333;
  background: #ffffff;
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.12);
}

.ops-console-v3 .policy-modal-panel .modal-head,
.ops-console-v3 .scheduled-task-modal .modal-head,
.ops-console-v3 .dialog-scheduled-modal .modal-head,
body > .modal-backdrop .policy-modal-panel .modal-head,
body > .modal-backdrop .scheduled-task-modal .modal-head,
body > .modal-backdrop .dialog-scheduled-modal .modal-head {
  margin-bottom: 16px;
  border-bottom: 0;
  padding-right: 48px;
}

.ops-console-v3 .policy-modal-panel .modal-head h2,
.ops-console-v3 .scheduled-task-modal .modal-head h2,
.ops-console-v3 .dialog-scheduled-modal .modal-head h2,
body > .modal-backdrop .policy-modal-panel .modal-head h2,
body > .modal-backdrop .scheduled-task-modal .modal-head h2,
body > .modal-backdrop .dialog-scheduled-modal .modal-head h2 {
  color: #000000;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ops-console-v3 .policy-modal-panel .page-kicker,
.ops-console-v3 .scheduled-task-modal .page-kicker,
.ops-console-v3 .dialog-scheduled-modal .page-kicker,
body > .modal-backdrop .policy-modal-panel .page-kicker,
body > .modal-backdrop .scheduled-task-modal .page-kicker,
body > .modal-backdrop .dialog-scheduled-modal .page-kicker {
  color: #858585;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.ops-console-v3 .policy-modal-body,
.ops-console-v3 .scheduled-task-modal .form-grid,
.ops-console-v3 .scheduled-task-modal .wide-label,
.ops-console-v3 .dialog-scheduled-modal .scheduled-task-list,
body > .modal-backdrop .policy-modal-body,
body > .modal-backdrop .scheduled-task-modal .form-grid,
body > .modal-backdrop .scheduled-task-modal .wide-label,
body > .modal-backdrop .dialog-scheduled-modal .scheduled-task-list {
  color: #333333;
}

.ops-console-v3 .scheduled-task-modal input,
.ops-console-v3 .scheduled-task-modal select,
.ops-console-v3 .scheduled-task-modal textarea,
body > .modal-backdrop .scheduled-task-modal input,
body > .modal-backdrop .scheduled-task-modal select,
body > .modal-backdrop .scheduled-task-modal textarea {
  border-color: #d9d9d9;
  border-radius: 8px;
  color: #333333;
  background: #ffffff;
  box-shadow: none;
}

.ops-console-v3 .scheduled-task-modal input:focus,
.ops-console-v3 .scheduled-task-modal select:focus,
.ops-console-v3 .scheduled-task-modal textarea:focus,
body > .modal-backdrop .scheduled-task-modal input:focus,
body > .modal-backdrop .scheduled-task-modal select:focus,
body > .modal-backdrop .scheduled-task-modal textarea:focus {
  border-color: #333333;
  box-shadow: none;
}

.ops-console-v3 .modal-actions,
body > .modal-backdrop .modal-actions {
  border-top: 0;
  background: #ffffff;
}

.ops-console-v3 .modal-actions button,
body > .modal-backdrop .modal-actions button {
  min-height: 40px;
  border-color: #000000;
  border-radius: 6px;
  color: #ffffff;
  background: #000000;
  box-shadow: none;
  font-weight: 700;
}

.ops-console-v3 .modal-actions button:not(:disabled):hover,
body > .modal-backdrop .modal-actions button:not(:disabled):hover {
  border-color: #333333;
  color: #ffffff;
  background: #333333;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .modal-actions button.secondary,
body > .modal-backdrop .modal-actions button.secondary {
  border-color: transparent;
  color: #000000;
  background: #f2f2f2;
}

.ops-console-v3 .modal-actions button.secondary:not(:disabled):hover,
body > .modal-backdrop .modal-actions button.secondary:not(:disabled):hover {
  border-color: transparent;
  color: #000000;
  background: #e6e6e6;
}

.ops-console-v3 .modal-actions button.danger,
body > .modal-backdrop .modal-actions button.danger {
  border-color: #fa6062;
  color: #ffffff;
  background: #fa6062;
}

/* Final tab hover surface contract */
.ops-console-v3 .tabs {
  border: 0 !important;
  border-bottom: 1px solid #e6e6e6 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

.ops-console-v3 .tab-button:not(:disabled):hover,
.ops-console-v3 .tab-button:not(:disabled):focus-visible {
  color: #000000;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.ops-console-v3 .tab-button:not(:disabled):active {
  color: #000000;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.ops-console-v3 .tab-button[aria-selected="true"] {
  color: #000000;
  border-bottom-color: transparent !important;
  font-weight: 700;
}

.ops-console-v3 .tab-button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: #000000;
  content: "";
  opacity: 0;
  pointer-events: none;
  transition:
    width 0.16s ease,
    opacity 0.16s ease;
}

.ops-console-v3 .tab-button[aria-selected="true"]::after {
  width: 100%;
  opacity: 1;
}

.ops-console-v3 .group-row:not(:disabled):hover,
.ops-console-v3 .policy-dialog-row:not(:disabled):hover {
  color: #333333 !important;
  background: #f7f7f7 !important;
  background-color: #f7f7f7 !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Final popup controls and tab state contract */
.ops-console-v3 button.enhanced-select-option:not(:disabled):hover,
.ops-console-v3 button.enhanced-select-option:not(:disabled):focus-visible,
.ops-console-v3 button.custom-time-option:not(:disabled):hover,
.ops-console-v3 button.custom-time-option:not(:disabled):focus-visible,
.ops-console-v3 button.custom-date-day:not(:disabled):hover,
.ops-console-v3 button.custom-date-day:not(:disabled):focus-visible,
.ops-console-v3 button.custom-date-nav:not(:disabled):hover,
.ops-console-v3 button.custom-date-link:not(:disabled):hover {
  border-color: transparent !important;
  color: #111111 !important;
  background: #f5f5f5 !important;
  background-color: #f5f5f5 !important;
  box-shadow: none !important;
  transform: none !important;
}

.ops-console-v3 button.enhanced-select-option[aria-selected="true"],
.ops-console-v3 button.custom-time-option[aria-selected="true"],
.ops-console-v3 button.custom-date-day[aria-selected="true"] {
  border-color: transparent !important;
  color: #111111 !important;
  background: #f0f0f0 !important;
  background-color: #f0f0f0 !important;
  box-shadow: none !important;
  font-weight: 600;
  transform: none !important;
}

.ops-console-v3 .tab-button:not([aria-selected="true"]) {
  color: #666666 !important;
  border-bottom-color: transparent !important;
  font-weight: 500 !important;
}

.ops-console-v3 .tab-button:not([aria-selected="true"]):not(:disabled):hover,
.ops-console-v3 .tab-button:not([aria-selected="true"]):not(:disabled):focus-visible {
  color: #333333 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  font-weight: 500 !important;
  transform: none !important;
}

.ops-console-v3 .tab-button:not([aria-selected="true"])::after {
  width: 0 !important;
  opacity: 0 !important;
}

.ops-console-v3 .tab-button[aria-selected="true"] {
  color: #000000 !important;
  border-bottom-color: transparent !important;
  font-weight: 700 !important;
}

/* Final brand logo asset contract */
.brand-mark,
.ops-console-v3 .brand-mark,
.ops-login-v3 .brand-mark {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: transparent;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  letter-spacing: 0;
}

.brand-mark::after,
.ops-console-v3 .brand-mark::after,
.ops-login-v3 .brand-mark::after {
  display: none !important;
}

.brand-mark img,
.ops-console-v3 .brand-mark img,
.ops-login-v3 .brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.ops-console-v3 .brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
}

.ops-login-v3 .brand-mark {
  width: 48px;
  height: 48px;
  border-color: var(--zen-border);
  border-radius: 16px;
  box-shadow: none;
}

.ops-console-v3.sidebar-collapsed .brand-mark {
  margin-inline: auto;
}

/* Final ZenMux side sheet contract */
body.reply-test-drawer-open {
  overflow: hidden;
}

.ai-reply-test-backdrop {
  position: fixed;
  z-index: 2990;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.46);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  cursor: default;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.ops-console-v3 button.ai-reply-test-backdrop {
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  color: transparent !important;
  background: rgba(0, 0, 0, 0.46) !important;
  box-shadow: none !important;
  transform: none !important;
}

.ops-console-v3 button.ai-reply-test-backdrop:not(:disabled):hover,
.ops-console-v3 button.ai-reply-test-backdrop.open:not(:disabled):hover,
.ops-console-v3 button.ai-reply-test-backdrop:focus-visible {
  border: 0 !important;
  color: transparent !important;
  background: rgba(0, 0, 0, 0.46) !important;
  box-shadow: none !important;
  outline: none !important;
  transform: none !important;
}

.ai-reply-test-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ai-reply-test-drawer {
  position: fixed;
  z-index: 3000;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(960px, 50vw);
  height: 100dvh;
  border-left: 1px solid #e6e6e6;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  overscroll-behavior: contain;
  transform: translate3d(100%, 0, 0);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.ai-reply-test-drawer.open {
  transform: translate3d(0, 0, 0);
}

.ai-reply-test-panel {
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr) auto;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: contain;
  background: #ffffff;
}

.ai-reply-test-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  border-bottom: 1px solid #e6e6e6;
  padding: 0 24px;
  background: #ffffff;
}

.ai-reply-test-head .page-kicker {
  display: none;
}

.ai-reply-test-head h2 {
  margin: 0;
  color: #111111;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}

.ai-reply-test-head .icon-button,
.ai-reply-test-head button.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  border: 0 !important;
  border-radius: 8px;
  padding: 0 !important;
  color: #666666;
  background: transparent;
  box-shadow: none;
  font-size: 20px;
  line-height: 1;
}

.ai-reply-test-head .icon-button:not(:disabled):hover,
.ai-reply-test-head button.icon-button:not(:disabled):hover {
  color: #111111;
  background: #f2f2f2;
  box-shadow: none;
  transform: none;
}

.ai-reply-test-body {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 24px;
  background: #ffffff;
}

.ai-reply-test-body::-webkit-scrollbar {
  display: none;
}

.reply-test-source,
.reply-test-context,
.reply-preview-prompt,
.danger-summary {
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 14px;
  color: #333333;
  background: #fafafa;
  box-shadow: none;
}

.reply-test-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #e6e6e6;
  padding: 12px 24px;
  background: #ffffff;
}

@media (max-width: 900px) {
  .ai-reply-test-drawer {
    top: 0;
    bottom: 0;
    width: 100vw;
    height: 100dvh;
    border-left: 0;
    border-radius: 0;
    transform: translate3d(100%, 0, 0);
  }

  .ai-reply-test-drawer.open {
    transform: translate3d(0, 0, 0);
  }

  .ai-reply-test-panel {
    grid-template-rows: 52px minmax(0, 1fr) auto;
    height: 100dvh;
  }

  .ai-reply-test-head {
    min-height: 52px;
    padding: 0 16px;
  }

  .ai-reply-test-head .icon-button,
  .ai-reply-test-head button.icon-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 10px;
  }

  .ai-reply-test-body {
    padding: 16px;
  }

  .reply-test-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

/* Final separated tab interaction contract */
.ops-console-v3 .tabs {
  border: 0 !important;
  border-bottom: 1px solid #e6e6e6 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

.ops-console-v3 .tab-button {
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  color: #666666 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  font-weight: 500 !important;
  transform: none !important;
}

.ops-console-v3 .tab-button::after {
  width: 0 !important;
  opacity: 0 !important;
}

.ops-console-v3 .tab-button:not([aria-selected="true"]):not(.active):not(:disabled):hover,
.ops-console-v3 .tab-button:not([aria-selected="true"]):not(.active):not(:disabled):focus-visible {
  border-bottom-color: transparent !important;
  color: #333333 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  font-weight: 500 !important;
  transform: none !important;
}

.ops-console-v3 .tab-button:not([aria-selected="true"]):not(.active):not(:disabled):hover::after,
.ops-console-v3 .tab-button:not([aria-selected="true"]):not(.active):not(:disabled):focus-visible::after {
  width: 0 !important;
  opacity: 0 !important;
}

.ops-console-v3 .tab-button[aria-selected="true"],
.ops-console-v3 .tab-button.active {
  border-bottom-color: transparent !important;
  color: #000000 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  font-weight: 700 !important;
  transform: none !important;
}

.ops-console-v3 .tab-button[aria-selected="true"]::after,
.ops-console-v3 .tab-button.active::after {
  width: 100% !important;
  opacity: 1 !important;
  background: #000000 !important;
}

/* Account lifecycle workbench contract */
.ops-console-v3 [data-section-panel="accounts"] .workbench-layout {
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.ops-console-v3 [data-section-panel="accounts"] .account-directory-panel,
.ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-panel,
.ops-console-v3 [data-section-panel="accounts"] .account-runtime-panel {
  border-color: #e6e6e6;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: none;
}

.ops-console-v3 [data-section-panel="accounts"] .account-directory-panel .panel-head,
.ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-panel .panel-head,
.ops-console-v3 [data-section-panel="accounts"] .account-runtime-panel .panel-head {
  padding-bottom: 12px;
  border-bottom: 1px solid #eeeeee;
}

.ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  margin-top: 16px;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 18px;
  overflow: hidden;
  background: #fafafa;
  color: #111111;
}

.ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #d8d8d8;
}

.ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-hero.success::before {
  background: var(--success);
}

.ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-hero.warning::before {
  background: var(--warning);
}

.ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-hero.error::before {
  background: var(--danger);
}

.ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-hero.running::before {
  background: #111111;
}

.ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-kicker {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  border: 1px solid #e6e6e6;
  border-radius: 999px;
  padding: 0 9px;
  color: #666666;
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-hero h3 {
  margin: 0;
  color: #111111;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-hero p {
  max-width: 720px;
  margin: 0;
  color: #555555;
  font-size: 14px;
  line-height: 1.6;
}

.ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-meta span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid #e6e6e6;
  border-radius: 999px;
  padding: 0 10px;
  color: #555555;
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  min-width: 150px;
}

.ops-console-v3 [data-section-panel="accounts"] .account-primary-action {
  min-height: 40px;
  border-color: #111111;
  border-radius: 10px;
  color: #ffffff;
  background: #111111;
  box-shadow: none;
  font-weight: 750;
}

.ops-console-v3 [data-section-panel="accounts"] .account-primary-action:not(:disabled):hover {
  border-color: #000000;
  color: #ffffff;
  background: #000000;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 [data-section-panel="accounts"] .account-ability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.ops-console-v3 [data-section-panel="accounts"] .account-ability-card {
  min-height: 126px;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 14px;
  background: #ffffff;
  color: #111111;
}

.ops-console-v3 [data-section-panel="accounts"] .account-ability-card.success {
  border-color: #d7eadc;
  background: #fbfefc;
}

.ops-console-v3 [data-section-panel="accounts"] .account-ability-card.warning {
  border-color: #f0ddbd;
  background: #fffdf8;
}

.ops-console-v3 [data-section-panel="accounts"] .account-ability-card.error {
  border-color: #f0c9c9;
  background: #fffafa;
}

.ops-console-v3 [data-section-panel="accounts"] .account-ability-card-inner {
  display: grid;
  gap: 7px;
}

.ops-console-v3 [data-section-panel="accounts"] .account-ability-label {
  color: #777777;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
}

.ops-console-v3 [data-section-panel="accounts"] .account-ability-card strong {
  color: #111111;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.25;
}

.ops-console-v3 [data-section-panel="accounts"] .account-ability-card small,
.ops-console-v3 [data-section-panel="accounts"] .account-ability-card em {
  color: #666666;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row {
  position: relative;
  border: 1px solid #e6e6e6;
  border-left-width: 1px;
  border-radius: 12px;
  padding: 13px 14px 13px 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: none;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #d8d8d8;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row-listening::before {
  background: var(--success);
}

.ops-console-v3 [data-section-panel="accounts"] .account-row-pending::before {
  background: var(--warning);
}

.ops-console-v3 [data-section-panel="accounts"] .account-row-error::before {
  background: var(--danger);
}

.ops-console-v3 [data-section-panel="accounts"] .account-row:hover,
.ops-console-v3 [data-section-panel="accounts"] .account-row:focus-visible {
  border-color: #d8d8d8;
  color: #111111;
  background: #f7f7f7;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row.selected {
  border-color: #111111;
  color: #111111;
  background: #f5f5f5;
  box-shadow: none;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row-actions {
  border-top-color: #eeeeee;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row-actions .list-action-button {
  min-width: 52px;
  min-height: 32px;
  border-radius: 8px;
  padding: 0 10px;
  color: #333333;
  background: #ffffff;
  box-shadow: none;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row-actions .list-action-button:not(:disabled):hover {
  border-color: #d8d8d8;
  color: #111111;
  background: #f5f5f5;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row-actions .list-action-button.danger-text {
  color: var(--zen-danger);
  background: #ffffff;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row-actions .list-action-button.danger-text:not(:disabled):hover {
  border-color: transparent;
  color: var(--zen-danger);
  background: var(--zen-danger-bg);
  box-shadow: none;
  transform: none;
}

.ops-console-v3 [data-section-panel="accounts"] .danger-outline {
  border-color: #f0c9c9;
  color: var(--danger);
  background: #ffffff;
  box-shadow: none;
}

.ops-console-v3 [data-section-panel="accounts"] .danger-outline:not(:disabled):hover {
  border-color: var(--danger);
  color: #ffffff;
  background: var(--danger);
  box-shadow: none;
}

@media (max-width: 1020px) {
  .ops-console-v3 [data-section-panel="accounts"] .workbench-layout,
  .ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-hero,
  .ops-console-v3 [data-section-panel="accounts"] .account-ability-grid {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-actions {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-hero {
    padding: 16px 14px;
  }

  .ops-console-v3 [data-section-panel="accounts"] .account-lifecycle-hero h3 {
    font-size: 20px;
  }

  .ops-console-v3 [data-section-panel="accounts"] .account-main-line,
  .ops-console-v3 [data-section-panel="accounts"] .account-row-actions {
    align-items: stretch;
  }

  .ops-console-v3 [data-section-panel="accounts"] .account-row-actions .list-action-button {
    width: 100%;
  }
}

/* ZenMux modal action contract */
.ops-console-v3 [data-section-panel="accounts"] .workbench-layout {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
}

.ops-console-v3 [data-section-panel="accounts"] .workspace-stack {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 14px;
}

.ops-console-v3 [data-section-panel="accounts"] .account-directory-panel {
  overflow: hidden;
}

.ops-console-v3 [data-section-panel="accounts"] #accountsList:not(.list-empty) {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius-xl);
  background: #ffffff;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto);
  align-items: center;
  gap: 14px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--zen-border);
  border-radius: 0;
  padding: 14px 16px;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row:last-child {
  border-bottom: 0;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row::before {
  width: 3px;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row.selected {
  background: #f7f7f7;
  box-shadow: inset 0 0 0 1px #111111;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row-main {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: 6px 16px;
  align-items: center;
}

.ops-console-v3 [data-section-panel="accounts"] .account-main-line,
.ops-console-v3 [data-section-panel="accounts"] .account-sub-line {
  min-width: 0;
}

.ops-console-v3 [data-section-panel="accounts"] .account-sub-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--zen-muted);
  font-size: 12px;
}

.ops-console-v3 [data-section-panel="accounts"] .account-status-line {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
}

.ops-console-v3 [data-section-panel="accounts"] .account-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(116px, 1fr));
  gap: 8px;
}

.ops-console-v3 [data-section-panel="accounts"] .account-status-grid > span {
  justify-content: space-between;
  min-width: 0;
  min-height: 30px;
  border-radius: 9px;
  padding: 0 8px;
  background: #fafafa;
  color: var(--zen-muted);
}

.ops-console-v3 [data-section-panel="accounts"] .account-row-actions {
  justify-content: flex-end;
  border-top: 0;
  padding-top: 0;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row-actions em {
  max-width: 150px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 [data-section-panel="accounts"] .account-ability-grid,
.ops-console-v3 [data-section-panel="accounts"] #replyReadinessCard,
.ops-console-v3 [data-section-panel="accounts"] #accountHealthSummary {
  display: none;
}

@media (max-width: 1180px) {
  .ops-console-v3 [data-section-panel="accounts"] .workspace-stack,
  .ops-console-v3 [data-section-panel="accounts"] .account-row {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 [data-section-panel="accounts"] .account-row-main {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ops-console-v3 [data-section-panel="accounts"] .account-status-line {
    grid-column: auto;
    grid-row: auto;
  }

  .ops-console-v3 [data-section-panel="accounts"] .account-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-console-v3 [data-section-panel="accounts"] .account-row-actions {
    justify-content: flex-start;
  }

  .ops-console-v3 [data-section-panel="accounts"] .account-row-actions em {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .ops-console-v3 [data-section-panel="accounts"] .account-status-grid {
    grid-template-columns: 1fr;
  }
}

.ops-console-v3 .modal-backdrop {
  z-index: 2400;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
}

.ops-console-v3 .modal-backdrop::before {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background 0.16s ease;
}

.ops-console-v3 .modal-backdrop.active-modal::before {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.ops-console-v3 .modal-panel {
  width: min(760px, 100%);
  max-height: min(760px, calc(100dvh - 48px));
  overflow-y: auto;
  contain: layout paint;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 24px;
  padding: 20px 28px;
  background: #ffffff;
  box-shadow: 0 100px 100px rgba(0, 0, 0, 0.05);
  transform: translateZ(0);
  -webkit-overflow-scrolling: touch;
}

.ops-console-v3 .account-modal-panel {
  width: min(920px, 100%);
}

.ops-console-v3 .account-modal-mode-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  justify-content: space-between;
  margin: -8px 0 18px;
  border: 1px solid #eeeeee;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fafafa;
}

.ops-console-v3 .account-modal-mode-strip span {
  color: #000000;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ops-console-v3 .account-modal-mode-strip strong {
  color: #666666;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.ops-console-v3 .account-modal-section {
  margin-top: 12px;
  border-color: #eeeeee;
  border-radius: 14px;
  padding: 16px;
  background: #ffffff;
}

.ops-console-v3 .account-switch-modal {
  width: min(560px, 100%);
}

.ops-console-v3 .policy-modal-panel,
.ops-console-v3 .scheduled-task-modal {
  width: min(860px, 100%);
}

.ops-console-v3 .dialog-scheduled-modal,
.ops-console-v3 .delete-modal-panel,
.ops-console-v3 .leave-dialogs-modal {
  width: min(680px, 100%);
}

.ops-console-v3 .modal-head {
  position: static;
  top: auto;
  min-height: auto;
  margin: 0 0 20px;
  border-bottom: 0;
  padding: 0 48px 0 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.ops-console-v3 .modal-head .page-kicker {
  margin: 0 0 4px;
  color: #8a8a8a;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.ops-console-v3 .modal-head h2 {
  margin: 0;
  color: #000000;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.ops-console-v3 .modal-close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  color: #5f5f5f;
  background: #f2f2f2;
  box-shadow: none;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  transform: none;
}

.ops-console-v3 .modal-close-button:not(:disabled):hover {
  color: #000000;
  background: #e6e6e6;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .modal-actions {
  position: sticky;
  right: auto;
  bottom: -20px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 20px -28px -20px;
  border-top: 0;
  padding: 14px 28px 18px;
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.ops-console-v3 .account-modal-actions {
  justify-content: space-between;
}

.ops-console-v3 .account-footer-status {
  max-width: min(520px, 52%);
  border: 0;
  padding: 0;
  color: #666666;
  background: transparent;
  text-align: left;
}

.ops-console-v3 .account-footer-status.warning {
  color: #9a5b00;
}

.ops-console-v3 .account-footer-status.success {
  color: #0f766e;
}

.ops-console-v3 .account-footer-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.ops-console-v3 .modal-actions button {
  height: 40px;
  min-height: 40px;
  min-width: 96px;
  border-radius: 6px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .modal-actions button.secondary {
  border-color: transparent;
  color: #000000;
  background: #f2f2f2;
}

.ops-console-v3 .modal-actions button.secondary:not(:disabled):hover {
  border-color: transparent;
  color: #000000;
  background: #e6e6e6;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .modal-actions button.danger {
  border-color: transparent;
  color: #ffffff;
  background: #fa6062;
}

.ops-console-v3 .modal-actions button.danger:not(:disabled):hover {
  border-color: transparent;
  color: #ffffff;
  background: #fa787a;
  box-shadow: none;
  transform: none;
}

@media (max-width: 767px) {
  .ops-console-v3 .modal-backdrop {
    align-items: start;
    padding: 8px;
  }

  .ops-console-v3 .modal-panel,
  .ops-console-v3 .account-modal-panel,
  .ops-console-v3 .account-switch-modal,
  .ops-console-v3 .policy-modal-panel,
  .ops-console-v3 .scheduled-task-modal,
  .ops-console-v3 .dialog-scheduled-modal,
  .ops-console-v3 .delete-modal-panel,
  .ops-console-v3 .leave-dialogs-modal {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 20px;
    padding: 18px 16px;
  }

  .ops-console-v3 .modal-head {
    margin-bottom: 16px;
  }

  .ops-console-v3 .modal-head h2 {
    font-size: 22px;
    letter-spacing: -0.02em;
  }

  .ops-console-v3 .modal-actions {
    bottom: -18px;
    flex-direction: column-reverse;
    align-items: stretch;
    margin: 18px -16px -18px;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .ops-console-v3 .account-modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ops-console-v3 .account-footer-status {
    max-width: none;
    width: 100%;
  }

  .ops-console-v3 .account-footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    margin-left: 0;
  }

  .ops-console-v3 .modal-actions button {
    width: 100%;
    height: 44px;
    min-height: 44px;
  }
}

/* Final expression library workflow contract */
.ops-console-v3 .style-learning-panel {
  border: 0;
  padding: 0;
  background: transparent;
}

.ops-console-v3 .style-learning-workflow {
  display: grid;
  gap: 14px;
}

.ops-console-v3 .style-learning-stage {
  display: grid;
  gap: 14px;
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  padding: 18px;
  background: #ffffff;
}

.ops-console-v3 .style-learning-stage-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.ops-console-v3 .style-learning-stage-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #ffffff;
  background: #111111;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
}

.ops-console-v3 .style-learning-stage-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ops-console-v3 .style-learning-stage-head strong {
  color: #111111;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.35;
}

.ops-console-v3 .style-learning-stage-head small {
  color: #777777;
  font-size: 12px;
  line-height: 1.5;
}

.ops-console-v3 .style-learning-switch-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 0;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 13px 14px;
  background: #fafafa;
  cursor: pointer;
}

.ops-console-v3 .style-learning-switch-card > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ops-console-v3 .style-learning-switch-card strong {
  color: #111111;
  font-size: 14px;
  font-weight: 700;
}

.ops-console-v3 .style-learning-switch-card small {
  color: #777777;
  font-size: 12px;
  line-height: 1.45;
}

.ops-console-v3 .style-learning-source-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: stretch;
}

.ops-console-v3 .learning-object-summary {
  display: grid;
  gap: 10px;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

.ops-console-v3 .learning-object-summary-head,
.ops-console-v3 .learning-candidate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.ops-console-v3 .learning-object-summary-head > span:first-child {
  color: #333333;
  font-size: 13px;
  font-weight: 700;
}

.ops-console-v3 .learning-selected-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.ops-console-v3 .learning-selected-summary.empty {
  align-items: center;
  color: #888888;
  font-size: 12px;
}

.ops-console-v3 .learning-selected-chip {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  min-height: 28px;
  border: 1px solid #dedede;
  border-radius: 999px;
  padding: 0 4px 0 10px;
  color: #333333;
  background: #f7f7f7;
  font-size: 12px;
}

.ops-console-v3 .learning-selected-chip > span {
  overflow: hidden;
  max-width: 220px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .learning-selected-chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  color: #777777;
  background: transparent;
  box-shadow: none;
  font-size: 16px;
  line-height: 1;
}

.ops-console-v3 .learning-selected-chip button:not(:disabled):hover {
  color: #111111;
  background: #e7e7e7;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .learning-candidate-picker {
  display: grid;
  gap: 10px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 12px;
  background: #fafafa;
}

.ops-console-v3 .learning-candidate-picker.hidden {
  display: none;
}

.ops-console-v3 .style-learning-panel .learning-candidate-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 0;
}

.ops-console-v3 .style-learning-panel .learning-candidate-toolbar .inline-status {
  min-width: 0;
  white-space: nowrap;
}

.ops-console-v3 .style-learning-panel .learning-candidate-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 260px;
  margin-top: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ops-console-v3 .style-learning-panel .learning-candidate-card {
  min-height: 52px;
  border-color: #e6e6e6;
  border-radius: 9px;
  padding: 8px 10px;
  background: #ffffff;
  box-shadow: none;
}

.ops-console-v3 .style-learning-panel .learning-candidate-card:hover {
  border-color: #cfcfcf;
  background: #f5f5f5;
  box-shadow: none;
}

.ops-console-v3 .style-learning-panel .learning-candidate-card.selected {
  border-color: #111111;
  background: #f3f3f3;
}

.ops-console-v3 .advanced-learning-rules,
.ops-console-v3 .style-learning-review-panel {
  margin: 0;
  border-color: #ececec;
  background: #fafafa;
}

.ops-console-v3 .style-learning-controls {
  grid-template-columns: minmax(180px, 260px) auto auto;
  margin-top: 0;
}

.ops-console-v3 .style-learning-result-grid {
  margin-top: 0;
}

.ops-console-v3 .style-learning-result-grid > div {
  border-color: #ececec;
  border-radius: 12px;
  background: #fafafa;
}

.ops-console-v3 .style-learning-profile-preview {
  max-height: 320px;
  overflow-y: auto;
  border-color: #ececec;
  border-radius: 12px;
  background: #fafafa;
}

.ops-console-v3 .style-profile-editor textarea {
  min-height: 220px;
}

.ops-console-v3 .style-learning-review-panel > button {
  margin-top: 12px;
}

@media (max-width: 820px) {
  .ops-console-v3 .style-learning-source-grid,
  .ops-console-v3 .style-learning-panel .learning-candidate-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ops-console-v3 .style-learning-stage {
    padding: 14px;
  }

  .ops-console-v3 .style-learning-stage-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ops-console-v3 .style-learning-stage-head > .status-chip {
    grid-column: 2;
    justify-self: start;
  }

  .ops-console-v3 .style-learning-controls,
  .ops-console-v3 .style-learning-panel .learning-candidate-toolbar {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .style-learning-controls button {
    width: 100%;
  }

  .ops-console-v3 .learning-candidate-head {
    align-items: flex-start;
  }

  .ops-console-v3 .learning-candidate-actions {
    justify-content: flex-start;
  }
}

/* Mobile account switch bottom sheet contract */
@media (max-width: 767px) {
  .ops-console-v3 #accountSwitchModal.modal-backdrop {
    align-items: end;
    justify-items: center;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: contain;
  }

  .ops-console-v3 #accountSwitchModal .account-switch-modal {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    width: 100vw;
    max-width: 100vw;
    max-height: min(86dvh, 680px);
    min-height: min(560px, 78dvh);
    border-radius: 24px 24px 0 0;
    padding: 14px 14px 0;
    overflow: hidden;
    box-shadow: 0 -28px 80px rgba(0, 0, 0, 0.16);
  }

  .ops-console-v3 #accountSwitchModal .account-switch-modal::before {
    content: "";
    justify-self: center;
    width: 40px;
    height: 4px;
    margin: 0 0 12px;
    border-radius: 999px;
    background: #d8d8d8;
  }

  .ops-console-v3 #accountSwitchModal .modal-head {
    margin: 0 0 12px;
  }

  .ops-console-v3 #accountSwitchModal .modal-head .page-kicker {
    display: none;
  }

  .ops-console-v3 #accountSwitchModal .modal-head h2 {
    font-size: 22px;
    line-height: 1.2;
  }

  .ops-console-v3 #accountSwitchModal .account-switch-search {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0 0 12px;
    padding-bottom: 10px;
    background: #ffffff;
  }

  .ops-console-v3 #accountSwitchModal .account-switch-search label {
    display: grid;
    gap: 6px;
  }

  .ops-console-v3 #accountSwitchModal .account-switch-search span {
    margin-bottom: 0;
    color: #666666;
    font-size: 13px;
    font-weight: 600;
  }

  .ops-console-v3 #accountSwitchModal .account-switch-search input {
    height: 44px;
    min-height: 44px;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 16px;
  }

  .ops-console-v3 #accountSwitchModal .account-switch-list {
    min-height: 180px;
    max-height: none;
    overflow-y: auto;
    padding: 2px 2px 12px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .ops-console-v3 #accountSwitchModal .account-switch-row {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 10px;
    min-height: 76px;
    border-radius: 16px;
    padding: 12px 12px 12px 14px;
  }

  .ops-console-v3 #accountSwitchModal .account-switch-row-main {
    padding-left: 10px;
  }

  .ops-console-v3 #accountSwitchModal .account-switch-row-main strong {
    font-size: 15px;
    line-height: 1.25;
  }

  .ops-console-v3 #accountSwitchModal .account-switch-row-main small {
    font-size: 12px;
    line-height: 1.35;
  }

  .ops-console-v3 #accountSwitchModal .account-switch-row-status {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    min-width: 0;
    padding-left: 10px;
  }

  .ops-console-v3 #accountSwitchModal .modal-actions {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0;
    border-top: 1px solid #eeeeee;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
  }

  .ops-console-v3 #accountSwitchModal .modal-actions button {
    width: 100%;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    border-radius: 10px;
    font-size: 15px;
  }
}

/* Final global feedback safe-area contract */
.ops-console-v3 .global-feedback {
  top: auto;
  right: calc(env(safe-area-inset-right, 0px) + 18px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  left: auto;
  z-index: 2200;
  width: min(420px, calc(100vw - 32px));
  max-height: min(40dvh, 220px);
  overflow: hidden;
  border: 1px solid #e6e6e6;
  border-left: 0;
  border-radius: 14px;
  padding: 10px 12px;
  color: #111111;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.14);
  pointer-events: none;
  transform: translate3d(0, 10px, 0);
}

.ops-console-v3 .global-feedback.visible {
  pointer-events: none;
  transform: translate3d(0, 0, 0);
}

@media (max-width: 640px) {
  .ops-console-v3 .global-feedback {
    right: 12px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    left: 12px;
    width: auto;
    max-width: none;
    max-height: min(38dvh, 180px);
  }
}

/* Final compact login page contract */
.ops-login-v3 .login-layout {
  width: min(calc(100% - 24px), 420px);
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0;
  align-items: center;
}

.ops-login-v3 .login-hero {
  display: none;
}

.ops-login-v3 .login-hero .eyebrow,
.ops-login-v3 .login-hero-copy,
.ops-login-v3 .login-panel > .eyebrow,
.ops-login-v3 .login-security-note {
  display: none;
}

.ops-login-v3 .login-panel {
  align-content: center;
  min-height: auto;
  padding: 30px;
}

.ops-login-v3 .login-panel h2 {
  margin: 0 0 20px;
  font-size: 24px;
  line-height: 1.2;
}

.ops-login-v3 .login-panel-brand {
  margin-bottom: 22px;
  border-bottom: 0;
  padding: 0;
}

.ops-login-v3 .login-panel-brand .brand-mark {
  flex: 0 0 auto;
}

.ops-login-v3 .login-panel-brand strong {
  font-size: 15px;
  line-height: 1.25;
}

.ops-login-v3 .login-panel-brand span {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.3;
}

.ops-login-v3 .login-password-field {
  position: relative;
  display: block;
}

.ops-login-v3 .login-password-field input {
  padding-right: 52px;
}

.ops-login-v3 .password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  width: 36px;
  min-height: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: #666666;
  background: transparent;
  box-shadow: none;
  font-size: 0;
  line-height: 1;
  transform: translate3d(0, -50%, 0);
}

.ops-login-v3 .password-visibility-toggle::before {
  width: 18px;
  height: 18px;
  background: currentColor;
  content: "";
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.25 9s2.25-4.125 6.75-4.125S15.75 9 15.75 9 13.5 13.125 9 13.125 2.25 9 2.25 9Z' stroke='black' stroke-width='1.45' stroke-linejoin='round'/%3E%3Cpath d='M9 10.875A1.875 1.875 0 1 0 9 7.125a1.875 1.875 0 0 0 0 3.75Z' stroke='black' stroke-width='1.45'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.25 9s2.25-4.125 6.75-4.125S15.75 9 15.75 9 13.5 13.125 9 13.125 2.25 9 2.25 9Z' stroke='black' stroke-width='1.45' stroke-linejoin='round'/%3E%3Cpath d='M9 10.875A1.875 1.875 0 1 0 9 7.125a1.875 1.875 0 0 0 0 3.75Z' stroke='black' stroke-width='1.45'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

.ops-login-v3 .password-visibility-toggle[aria-pressed="true"]::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.25 9s2.25-4.125 6.75-4.125S15.75 9 15.75 9 13.5 13.125 9 13.125 2.25 9 2.25 9Z' stroke='black' stroke-width='1.45' stroke-linejoin='round'/%3E%3Cpath d='M3.75 14.25 14.25 3.75' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.25 9s2.25-4.125 6.75-4.125S15.75 9 15.75 9 13.5 13.125 9 13.125 2.25 9 2.25 9Z' stroke='black' stroke-width='1.45' stroke-linejoin='round'/%3E%3Cpath d='M3.75 14.25 14.25 3.75' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

.ops-login-v3 .password-visibility-toggle:not(:disabled):hover {
  color: #111111;
  background: #f2f2f2;
  box-shadow: none;
  transform: translate3d(0, -50%, 0);
}

@media (max-width: 900px) {
  .ops-login-v3 .login-layout {
    width: min(calc(100% - 24px), 420px);
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 520px) {
  .ops-login-v3.login-shell {
    padding: 16px;
  }

  .ops-login-v3 .login-layout {
    width: 100%;
  }

  .ops-login-v3 .login-panel {
    border-radius: 22px;
    padding: 24px;
  }
}

/* AI reply test drawer contract */
body.reply-test-drawer-open {
  overflow: hidden;
}

.runtime-mode-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid #e6e6e6;
  margin: 16px 0 14px;
}

.runtime-mode-tab {
  position: relative;
  min-height: 40px;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0;
  color: #666666 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 14px;
  font-weight: 500;
}

.runtime-mode-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: #000000;
  content: "";
  opacity: 0;
}

.runtime-mode-tab:not(:disabled):hover {
  color: #333333 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.runtime-mode-tab.active,
.runtime-mode-tab[aria-selected="true"] {
  color: #000000 !important;
  font-weight: 700;
}

.runtime-mode-tab.active::after,
.runtime-mode-tab[aria-selected="true"]::after {
  opacity: 1;
}

.speaking-mode-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid #e6e6e6;
  margin: 16px 0 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.speaking-mode-tabs::-webkit-scrollbar {
  display: none;
}

.speaking-tab {
  position: relative;
  flex: 0 0 auto;
  min-height: 40px;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0;
  color: #666666 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.speaking-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: #000000;
  content: "";
  opacity: 0;
}

.speaking-tab:not(:disabled):hover {
  color: #333333 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.speaking-tab.active,
.speaking-tab[aria-selected="true"] {
  color: #000000 !important;
  font-weight: 700;
}

.speaking-tab.active::after,
.speaking-tab[aria-selected="true"]::after {
  opacity: 1;
}

.persona-editor-panel {
  display: grid;
  grid-template-rows: auto minmax(220px, 1.25fr) minmax(150px, 0.85fr);
  min-height: min(560px, calc(100dvh - 340px));
  gap: 14px;
}

.persona-editor-panel .wide-label {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.persona-editor-panel textarea {
  flex: 1 1 auto;
  min-height: 150px;
  resize: vertical;
}

.persona-editor-panel #globalSystemPrompt {
  min-height: 220px;
}

.persona-editor-panel #globalStylePrompt {
  min-height: 150px;
}

.cadence-editor-panel {
  display: grid;
  gap: 16px;
}

.cadence-control-section {
  display: grid;
  gap: 14px;
  border: 1px solid var(--zen-border, var(--border));
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
}

.cadence-section-head {
  display: grid;
  gap: 4px;
}

.cadence-section-head strong {
  color: var(--zen-black, var(--text));
  font-size: 15px;
}

.cadence-section-head span,
.cadence-future-note {
  color: var(--zen-text-2, var(--muted));
  font-size: 13px;
  line-height: 1.65;
}

.cadence-future-note {
  border: 1px dashed var(--zen-border, var(--border));
  border-radius: 14px;
  padding: 12px 14px;
  background: #fafafa;
}

.speaking-panel.hidden {
  display: none;
}

.scheduled-mode-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid #e6e6e6;
  margin: 0 0 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.scheduled-mode-tabs::-webkit-scrollbar {
  display: none;
}

.scheduled-tab {
  position: relative;
  flex: 0 0 auto;
  min-height: 40px;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0;
  color: #666666 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.scheduled-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: #000000;
  content: "";
  opacity: 0;
}

.scheduled-tab:not(:disabled):hover {
  color: #333333 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.scheduled-tab.active,
.scheduled-tab[aria-selected="true"] {
  color: #000000 !important;
  font-weight: 700;
}

.scheduled-tab.active::after,
.scheduled-tab[aria-selected="true"]::after {
  opacity: 1;
}

.scheduled-panel.hidden {
  display: none;
}

.message-events-list {
  display: grid;
  gap: 8px;
}

.message-event-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

.message-event-row:hover {
  border-color: #d9d9d9;
  background: #f7f7f7;
}

.message-event-main {
  min-width: 0;
}

.ai-reply-test-backdrop {
  position: fixed;
  z-index: 1790;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  cursor: default;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.ops-console-v3 button.ai-reply-test-backdrop {
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  color: transparent !important;
  background: rgba(0, 0, 0, 0.2) !important;
  box-shadow: none !important;
  transform: none !important;
}

.ops-console-v3 button.ai-reply-test-backdrop:not(:disabled):hover,
.ops-console-v3 button.ai-reply-test-backdrop.open:not(:disabled):hover,
.ops-console-v3 button.ai-reply-test-backdrop:focus-visible {
  border: 0 !important;
  color: transparent !important;
  background: rgba(0, 0, 0, 0.2) !important;
  box-shadow: none !important;
  outline: none !important;
  transform: none !important;
}

.ai-reply-test-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ai-reply-test-drawer {
  position: fixed;
  z-index: 1800;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(760px, calc(100vw - 32px));
  height: 100dvh;
  border-left: 1px solid #e6e6e6;
  background: #ffffff;
  box-shadow: -24px 0 52px rgba(0, 0, 0, 0.12);
  overscroll-behavior: contain;
  transform: translate3d(105%, 0, 0);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.ai-reply-test-drawer.open {
  transform: translate3d(0, 0, 0);
}

.ai-reply-test-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: auto;
}

.ai-reply-test-head {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  border-bottom: 1px solid #e6e6e6;
  padding: 12px 18px;
  background: #ffffff;
}

.ai-reply-test-body {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
  background: #ffffff;
}

.ai-reply-test-head h2 {
  margin: 2px 0 0;
  color: #000000;
  font-size: 20px;
  line-height: 1.25;
}

.reply-test-source,
.reply-test-context,
.danger-summary {
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 12px;
  color: #333333;
  background: #fafafa;
  line-height: 1.65;
}

.reply-test-source p {
  margin: 8px 0;
  color: #111111;
}

.reply-test-source small {
  color: #858585;
}

.reply-test-editor-grid {
  display: grid;
  gap: 12px;
}

.reply-test-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #e6e6e6;
  padding: 12px 18px;
  background: #ffffff;
}

.confirm-send-check {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .message-event-row {
    grid-template-columns: 1fr;
  }

  .ai-reply-test-drawer {
    width: 100vw;
    height: min(92dvh, 100dvh);
    top: auto;
    border-left: 0;
    border-radius: 20px 20px 0 0;
    transform: translate3d(0, 105%, 0);
  }

  .ai-reply-test-drawer.open {
    transform: translate3d(0, 0, 0);
  }

  .ai-reply-test-panel {
    min-height: 0;
  }

  .ai-reply-test-head {
    min-height: 60px;
    padding: 10px 14px;
  }

  .ai-reply-test-body {
    padding: 14px;
  }

  .reply-test-actions {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

/* Final ZenMux side sheet contract */
body.reply-test-drawer-open {
  overflow: hidden;
}

.ai-reply-test-backdrop {
  position: fixed;
  z-index: 2990;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.46);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  cursor: default;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.ops-console-v3 button.ai-reply-test-backdrop {
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  color: transparent !important;
  background: rgba(0, 0, 0, 0.46) !important;
  box-shadow: none !important;
  transform: none !important;
}

.ops-console-v3 button.ai-reply-test-backdrop:not(:disabled):hover,
.ops-console-v3 button.ai-reply-test-backdrop.open:not(:disabled):hover,
.ops-console-v3 button.ai-reply-test-backdrop:focus-visible {
  border: 0 !important;
  color: transparent !important;
  background: rgba(0, 0, 0, 0.46) !important;
  box-shadow: none !important;
  outline: none !important;
  transform: none !important;
}

.ai-reply-test-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ai-reply-test-drawer {
  position: fixed;
  z-index: 3000;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(960px, 50vw);
  height: 100dvh;
  border-left: 1px solid #e6e6e6;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  overscroll-behavior: contain;
  transform: translate3d(100%, 0, 0);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.ai-reply-test-drawer.open {
  transform: translate3d(0, 0, 0);
}

.ai-reply-test-panel {
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr) auto;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: contain;
  background: #ffffff;
}

.ai-reply-test-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  border-bottom: 1px solid #e6e6e6;
  padding: 0 24px;
  background: #ffffff;
}

.ai-reply-test-head .page-kicker {
  display: none;
}

.ai-reply-test-head h2 {
  margin: 0;
  color: #111111;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}

.ai-reply-test-head .icon-button,
.ai-reply-test-head button.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  border: 0 !important;
  border-radius: 8px;
  padding: 0 !important;
  color: #666666;
  background: transparent;
  box-shadow: none;
  font-size: 20px;
  line-height: 1;
}

.ai-reply-test-head .icon-button:not(:disabled):hover,
.ai-reply-test-head button.icon-button:not(:disabled):hover {
  color: #111111;
  background: #f2f2f2;
  box-shadow: none;
  transform: none;
}

.ai-reply-test-body {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 24px;
  background: #ffffff;
}

.ai-reply-test-body::-webkit-scrollbar {
  display: none;
}

.reply-test-source,
.reply-test-context,
.reply-preview-prompt,
.danger-summary {
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 14px;
  color: #333333;
  background: #fafafa;
  box-shadow: none;
}

.reply-test-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #e6e6e6;
  padding: 12px 24px;
  background: #ffffff;
}

@media (max-width: 900px) {
  .ai-reply-test-drawer {
    top: 0;
    bottom: 0;
    width: 100vw;
    height: 100dvh;
    border-left: 0;
    border-radius: 0;
    transform: translate3d(100%, 0, 0);
  }

  .ai-reply-test-drawer.open {
    transform: translate3d(0, 0, 0);
  }

  .ai-reply-test-panel {
    grid-template-rows: 52px minmax(0, 1fr) auto;
    height: 100dvh;
  }

  .ai-reply-test-head {
    min-height: 52px;
    padding: 0 16px;
  }

  .ai-reply-test-head .icon-button,
  .ai-reply-test-head button.icon-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 10px;
  }

  .ai-reply-test-body {
    padding: 16px;
  }

  .reply-test-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

/* Final runtime empty state contract */
.ops-console-v3 .runtime-empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 28px 16px;
  color: #666666;
}

.ops-console-v3 .runtime-empty-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(420px, 100%);
  border: 0;
  border-radius: 0;
  padding: 30px 24px;
  color: #333333;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.ops-console-v3 .runtime-empty-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  color: #000000;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.12em;
}

.ops-console-v3 .runtime-empty-card strong {
  color: #000000;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.ops-console-v3 .runtime-empty-card p {
  max-width: 340px;
  margin: 0;
  color: #666666;
  font-size: 14px;
  line-height: 1.7;
}

.ops-console-v3 .runtime-empty-card small {
  color: #858585;
  font-size: 12px;
  line-height: 1.5;
}

.ops-console-v3 .runtime-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.ops-console-v3 .runtime-empty-actions button {
  min-height: 36px;
}

@media (max-width: 640px) {
  .ops-console-v3 .runtime-empty-state {
    min-height: 220px;
    padding: 18px 0;
  }

  .ops-console-v3 .runtime-empty-card {
    align-items: center;
    width: 100%;
    padding: 24px 18px;
  }

  .ops-console-v3 .runtime-empty-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
}

/* Final canonical loading contract */
@keyframes tgaiSkeletonSweep {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

.ops-console-v3 .is-refresh-loading {
  position: relative;
}

.ops-console-v3 .is-refresh-loading > :not(.page-list-loading) {
  display: none !important;
}

.ops-console-v3 .modal-body.has-loading-error > :not([data-loading-error]) {
  display: none !important;
}

.ops-console-v3 .is-refresh-empty-host {
  color: transparent;
}

.ops-console-v3 .page-list-loading {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  place-items: center;
  align-content: center;
  justify-items: center;
  gap: 14px;
  grid-column: 1 / -1;
  width: 100%;
  min-height: clamp(160px, 28vh, 320px);
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 0;
  opacity: 1;
  pointer-events: none;
  transition: opacity 100ms ease;
}

.ops-console-v3 .page-list-loading-spinner {
  grid-row: 1;
  grid-column: 1;
  display: block;
  width: 38px;
  height: 38px;
  border: 0 !important;
  outline: 0;
  background: transparent url("brand/tgai-logo.svg") center / contain no-repeat;
  box-shadow: none !important;
  opacity: 0.95;
}

.ops-console-v3 .page-list-loading-track {
  grid-row: 2;
  grid-column: 1;
  position: relative;
  display: block;
  width: min(200px, 48vw);
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e5e5;
}

.ops-console-v3 .page-list-loading-track span {
  position: absolute;
  inset: 0;
  width: 100%;
  border-radius: inherit;
  background: #111111;
  transform: scaleX(0.06);
  transform-origin: left center;
  transition: transform 850ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ops-console-v3 .page-list-loading.is-progressing .page-list-loading-track span {
  transform: scaleX(0.86);
}

.ops-console-v3 .page-list-loading.is-completing .page-list-loading-track span {
  transform: scaleX(1);
  transition-duration: 120ms;
}

.ops-console-v3 .page-list-loading.is-leaving {
  opacity: 0;
}

.ops-console-v3 .page-list-loading-text,
.ops-console-v3 .is-refresh-empty-host > .page-list-loading .page-list-loading-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%);
  padding: 0 !important;
  margin: -1px !important;
  white-space: nowrap !important;
  color: transparent !important;
}

.ops-console-v3 .table-wrap > .page-list-loading,
.ops-console-v3 .records-list > .page-list-loading,
.ops-console-v3 .events-list > .page-list-loading,
.ops-console-v3 .message-events-list > .page-list-loading,
.ops-console-v3 .scheduled-task-list > .page-list-loading,
.ops-console-v3 .learning-candidate-list > .page-list-loading,
.ops-console-v3 .list-empty > .page-list-loading {
  margin: 0;
  padding: 0;
}

.ops-console-v3 .table-wrap.is-refresh-loading > .page-list-loading {
  position: static;
  top: auto;
  z-index: auto;
  margin: 0;
  padding: 0;
  background: transparent;
}

.ops-console-v3 .is-refresh-empty-host > .page-list-loading,
.ops-console-v3 .is-refresh-loading.loading-compact > .page-list-loading,
.ops-console-v3 .page-list-loading[data-loading-variant="compact"] {
  min-height: 96px;
}

.ops-console-v3 .page-list-loading[data-loading-variant="compact"] .page-list-loading-spinner {
  width: 30px;
  height: 30px;
  opacity: 0.82;
}

.ops-console-v3 .page-list-loading[data-loading-variant="compact"] .page-list-loading-track {
  width: min(160px, 44vw);
}

.ops-console-v3 .is-refresh-loading.loading-modal-body > .page-list-loading,
.ops-console-v3 .page-list-loading[data-loading-variant="modal-body"] {
  min-height: clamp(180px, 38vh, 420px);
}

.ops-console-v3 button.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ops-console-v3 button.is-loading::after,
.ops-login-v3 button.is-loading::after,
body > .modal-backdrop button.is-loading::after,
body > .ai-persona-action-popover button.is-loading::after {
  display: none;
}

.ops-console-v3 .button-loading-label {
  display: inline-block;
  color: var(--button-loading-foreground, inherit);
  line-height: 1;
}

.ops-console-v3 .loading-inline-spinner,
.ops-console-v3 .header-refresh-button.is-loading .header-refresh-icon,
.ops-console-v3 .global-feedback.loading .global-feedback-icon,
.ops-console-v3 .refresh-state-chip.loading::before {
  box-sizing: border-box;
  display: inline-block;
  flex: 0 0 auto;
  border-style: solid;
  border-color: rgba(17, 24, 39, 0.16);
  border-top-color: #111111;
  border-radius: 999px;
  background: transparent;
  color: transparent;
  box-shadow: none;
  animation: spin 0.75s linear infinite;
}

.ops-console-v3 .loading-inline-spinner {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

.ops-console-v3 button .loading-inline-spinner,
body > .modal-backdrop button .loading-inline-spinner,
body > .ai-persona-action-popover button .loading-inline-spinner {
  box-sizing: border-box;
  display: inline-block;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  color: var(--button-loading-foreground, inherit);
  background: transparent;
  box-shadow: none;
  animation: spin 0.75s linear infinite;
}

.ops-console-v3 .header-refresh-button.is-loading .header-refresh-icon,
.ops-console-v3 .refresh-state-chip.loading::before {
  width: 14px;
  height: 14px;
  margin-right: 0;
  border-width: 1.5px;
  mask: none;
}

.ops-console-v3 .global-feedback.loading .global-feedback-icon {
  width: 24px;
  height: 24px;
  border-width: 2px;
  font-size: 0;
}

.ops-console-v3 .refresh-state-chip.loading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ops-console-v3 .refresh-state-chip.loading::before {
  content: "";
}

.ops-console-v3 .style-learning-result-grid.loading > div {
  border-color: #eeeeee;
  background: #fbfbfb;
}

.ops-console-v3 .style-learning-skeleton {
  display: block;
  width: min(92px, 100%);
  height: 24px;
  margin-top: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f5f5f5 0%, #ededed 50%, #f5f5f5 100%);
  background-size: 200% 100%;
  color: transparent;
  animation: tgaiSkeletonSweep 1.2s ease-in-out infinite;
}

@media (max-width: 640px) {
  .ops-console-v3 .page-list-loading,
  .ops-console-v3 .is-refresh-empty-host > .page-list-loading {
    min-height: clamp(132px, 24vh, 240px);
  }

  .ops-console-v3 .page-list-loading-track {
    width: min(180px, calc(100vw - 72px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ops-console-v3 .page-list-loading,
  .ops-console-v3 .page-list-loading-track span,
  .ops-console-v3 .loading-inline-spinner,
  .ops-console-v3 .header-refresh-button.is-loading .header-refresh-icon,
  .ops-console-v3 .global-feedback.loading .global-feedback-icon,
  .ops-console-v3 .refresh-state-chip.loading::before,
  .ops-console-v3 .style-learning-skeleton {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* Final mobile safe-area and layer contract */
.ops-login-v3 .login-password-field {
  position: relative;
  display: grid;
  align-items: center;
  margin-bottom: 0;
  color: inherit;
}

.ops-login-v3 .login-password-field input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding-right: 64px;
  line-height: 1.2;
}

.ops-login-v3 .password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  padding: 0;
  touch-action: manipulation;
  transform: translate3d(0, -50%, 0);
}

.ops-console-v3 .modal-backdrop {
  z-index: 2400;
}

@media (max-width: 900px) {
  .ops-console-v3 .sidebar {
    z-index: 2300;
    overflow: hidden;
  }

  .ops-console-v3 .sidebar-backdrop {
    z-index: 2290;
  }

  .ops-console-v3 .page-header {
    z-index: 1200;
  }
}

@media (max-width: 520px) {
  .ops-login-v3 .login-panel {
    padding: 20px;
  }
}

/* Final account selected row emphasis contract */
.ops-console-v3 [data-section-panel="accounts"] .account-row.selected {
  border-color: #000000;
  color: #000000;
  background: linear-gradient(90deg, #f2f2f2 0, #ffffff 56%);
  box-shadow: inset 0 0 0 1px #000000, 0 8px 18px rgba(0, 0, 0, 0.08);
  transform: none;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row.selected:hover,
.ops-console-v3 [data-section-panel="accounts"] .account-row.selected:focus-visible {
  border-color: #000000;
  color: #000000;
  background: linear-gradient(90deg, #eeeeee 0, #ffffff 56%);
  box-shadow: inset 0 0 0 1px #000000, 0 10px 22px rgba(0, 0, 0, 0.1);
  transform: none;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row.selected::before {
  width: 6px;
  background: #000000;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row.selected .account-main-line strong {
  color: #000000;
  font-weight: 850;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row.selected .account-row-badges .status-chip.strong-on {
  border-color: #000000;
  color: #ffffff;
  background: #000000;
}

.ops-console-v3 [data-section-panel="accounts"] .account-row.selected .account-status-grid > span {
  border-color: #d0d0d0;
  background: #ffffff;
}

/* Final modal rounded scroll clipping contract */
.ops-console-v3 .modal-panel {
  overflow-x: hidden;
  background-clip: padding-box;
  clip-path: inset(0 round 24px);
  isolation: isolate;
}

.ops-console-v3 .modal-actions {
  border-radius: 0 0 24px 24px;
}

.ops-console-v3 #accountSwitchModal .account-switch-modal {
  clip-path: inset(0 round 24px 24px 0 0);
}

@media (max-width: 767px) {
  .ops-console-v3 .modal-panel {
    border-radius: 20px;
    clip-path: inset(0 round 20px);
  }

  .ops-console-v3 .modal-actions {
    border-radius: 0 0 20px 20px;
  }

  .ops-console-v3 #accountSwitchModal .account-switch-modal {
    border-radius: 24px 24px 0 0;
    clip-path: inset(0 round 24px 24px 0 0);
  }

  .ops-console-v3 #accountSwitchModal .modal-actions {
    border-radius: 0;
  }
}

/* Final modal visible footer contract */
.ops-console-v3 .modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}

.ops-console-v3 .modal-panel {
  display: flex;
  flex-direction: column;
}

.ops-console-v3 .modal-actions {
  bottom: 0;
  flex-shrink: 0;
  margin: 20px -28px 0;
}

.ops-console-v3 .account-modal-panel {
  height: calc(100vh - 48px);
  height: min(720px, calc(100dvh - 48px));
  max-height: 720px;
  overflow: hidden;
}

.ops-console-v3 .account-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 20px;
  scrollbar-width: none;
}

.ops-console-v3 .account-modal-scroll::-webkit-scrollbar {
  display: none;
}

.ops-console-v3 .account-modal-actions {
  position: static;
  margin: 0 -28px -20px;
}

.ops-console-v3 #accountProfileModal .account-modal-panel {
  height: min(720px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  overflow: hidden;
}

.ops-console-v3 #accountProfileModal .account-modal-scroll {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

.ops-console-v3 #accountProfileModal .account-modal-actions {
  flex: 0 0 auto;
  position: static;
}

@media (max-width: 767px) {
  .ops-console-v3 .modal-actions {
    margin: 18px -16px 0;
  }

  .ops-console-v3 .account-modal-scroll {
    padding-bottom: 18px;
  }

  .ops-console-v3 .account-modal-actions {
    margin: 0 -16px -18px;
  }
}

.ops-console-v3 .speech-library-items {
  display: grid;
  gap: 10px;
}

.ops-console-v3 .speech-library-item small {
  color: var(--muted);
}

.ops-console-v3 .speech-library-editor {
  display: grid;
  gap: 14px;
}

.ops-console-v3 .speech-library-modal-panel {
  width: min(860px, 100%);
  height: min(760px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  overflow: hidden;
}

.ops-console-v3 .speech-library-modal-scroll {
  display: grid;
  flex: 1 1 auto;
  gap: 14px;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 2px 2px 8px;
}

body > .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3400;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}

body > .modal-backdrop .modal-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  background-clip: padding-box;
  clip-path: inset(0 round 24px);
  isolation: isolate;
}

body > .modal-backdrop .modal-head {
  padding-right: 48px;
}

body > .modal-backdrop .modal-close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  color: #5f5f5f;
  background: #f2f2f2;
  box-shadow: none;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  transform: none;
}

body > .modal-backdrop .modal-close-button:not(:disabled):hover {
  color: #000000;
  background: #e6e6e6;
  box-shadow: none;
  transform: none;
}

body > .modal-backdrop .modal-actions {
  flex: 0 0 auto;
  position: static;
  bottom: auto;
  flex-shrink: 0;
  margin: 20px -28px 0;
  border-radius: 0 0 24px 24px;
}

body > .modal-backdrop .speech-library-modal-panel {
  width: min(860px, 100%);
  height: min(760px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  overflow: hidden;
}

body > .modal-backdrop .speech-library-modal-scroll {
  display: grid;
  flex: 1 1 0;
  gap: 14px;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 2px 2px 8px;
}

.ops-console-v3 .speech-library-phase2-panel,
.ops-console-v3 .speech-library-sources {
  display: grid;
  gap: 10px;
}

.ops-console-v3 .speech-library-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.ops-console-v3 .speech-library-source-row > span:first-child {
  display: grid;
  gap: 3px;
}

.ops-console-v3 .speech-library-item {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.ops-console-v3 .speech-library-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Final ZenMux dialog modal contract */
body > .modal-backdrop .policy-modal-panel,
body > .modal-backdrop .scheduled-task-modal,
body > .modal-backdrop .dialog-scheduled-modal {
  width: min(860px, 100%);
  max-height: min(760px, calc(100dvh - 48px));
  border: 0;
  border-radius: 24px;
  padding: 20px 28px;
  color: #333333;
  background: #ffffff;
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.12);
}

body > .modal-backdrop .dialog-scheduled-modal {
  width: min(680px, 100%);
}

body > .modal-backdrop .policy-modal-panel .modal-head,
body > .modal-backdrop .scheduled-task-modal .modal-head,
body > .modal-backdrop .dialog-scheduled-modal .modal-head {
  margin: 0 0 20px;
  border: 0;
  padding: 0 48px 0 0;
  background: transparent;
}

body > .modal-backdrop .policy-modal-panel .modal-head h2,
body > .modal-backdrop .scheduled-task-modal .modal-head h2,
body > .modal-backdrop .dialog-scheduled-modal .modal-head h2 {
  margin: 0;
  color: #000000;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}

body > .modal-backdrop .policy-modal-panel .page-kicker,
body > .modal-backdrop .scheduled-task-modal .page-kicker,
body > .modal-backdrop .dialog-scheduled-modal .page-kicker {
  margin: 0 0 4px;
  color: #858585;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}

body > .modal-backdrop .policy-modal-panel .modal-actions,
body > .modal-backdrop .scheduled-task-modal .modal-actions,
body > .modal-backdrop .dialog-scheduled-modal .modal-actions {
  position: sticky;
  bottom: -20px;
  justify-content: flex-end;
  gap: 8px;
  margin: 20px -28px -20px;
  border: 0;
  border-radius: 0 0 24px 24px;
  padding: 14px 28px 18px;
  background: #ffffff;
  box-shadow: none;
}

body > .modal-backdrop .policy-modal-panel .modal-actions button,
body > .modal-backdrop .scheduled-task-modal .modal-actions button,
body > .modal-backdrop .dialog-scheduled-modal .modal-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  min-width: 96px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  color: #ffffff;
  background: #000000;
  box-shadow: none;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  transform: none;
}

body > .modal-backdrop .policy-modal-panel .modal-actions button:not(:disabled):hover,
body > .modal-backdrop .scheduled-task-modal .modal-actions button:not(:disabled):hover,
body > .modal-backdrop .dialog-scheduled-modal .modal-actions button:not(:disabled):hover {
  color: #ffffff;
  background: #333333;
  box-shadow: none;
  transform: none;
}

body > .modal-backdrop .policy-modal-panel .modal-actions button.secondary,
body > .modal-backdrop .scheduled-task-modal .modal-actions button.secondary,
body > .modal-backdrop .dialog-scheduled-modal .modal-actions button.secondary {
  color: #000000;
  background: #f2f2f2;
}

body > .modal-backdrop .policy-modal-panel .modal-actions button.secondary:not(:disabled):hover,
body > .modal-backdrop .scheduled-task-modal .modal-actions button.secondary:not(:disabled):hover,
body > .modal-backdrop .dialog-scheduled-modal .modal-actions button.secondary:not(:disabled):hover {
  color: #000000;
  background: #e6e6e6;
}

body > .modal-backdrop .policy-modal-panel .modal-actions button.danger,
body > .modal-backdrop .scheduled-task-modal .modal-actions button.danger,
body > .modal-backdrop .dialog-scheduled-modal .modal-actions button.danger {
  color: #ffffff;
  background: #fa6062;
}

body > .modal-backdrop .policy-modal-panel .modal-actions button.danger:not(:disabled):hover,
body > .modal-backdrop .scheduled-task-modal .modal-actions button.danger:not(:disabled):hover,
body > .modal-backdrop .dialog-scheduled-modal .modal-actions button.danger:not(:disabled):hover {
  color: #ffffff;
  background: #fa787a;
}

@media (max-width: 767px) {
  body > .modal-backdrop .policy-modal-panel,
  body > .modal-backdrop .scheduled-task-modal,
  body > .modal-backdrop .dialog-scheduled-modal {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 20px;
    padding: 18px 16px;
  }

  body > .modal-backdrop .policy-modal-panel .modal-head h2,
  body > .modal-backdrop .scheduled-task-modal .modal-head h2,
  body > .modal-backdrop .dialog-scheduled-modal .modal-head h2 {
    font-size: 20px;
  }

  body > .modal-backdrop .policy-modal-panel .modal-actions,
  body > .modal-backdrop .scheduled-task-modal .modal-actions,
  body > .modal-backdrop .dialog-scheduled-modal .modal-actions {
    bottom: -18px;
    flex-direction: column-reverse;
    align-items: stretch;
    margin: 18px -16px -18px;
    border-radius: 0 0 20px 20px;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  body > .modal-backdrop .policy-modal-panel .modal-actions button,
  body > .modal-backdrop .scheduled-task-modal .modal-actions button,
  body > .modal-backdrop .dialog-scheduled-modal .modal-actions button {
    width: 100%;
    height: 44px;
    min-height: 44px;
  }
}

/* Final independent policy modal contract */
body > .modal-backdrop .policy-modal-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body > .modal-backdrop .policy-modal-effectiveness {
  display: grid;
  gap: 6px;
  flex: 0 0 auto;
  margin: 0 0 14px;
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  padding: 12px 14px;
  color: #333333;
  background: #f7f7f7;
}

body > .modal-backdrop .policy-modal-effectiveness.ready {
  border-color: #d8d8d8;
  background: #f2f2f2;
}

body > .modal-backdrop .policy-modal-effectiveness.blocked {
  border-color: #e1e1e1;
  background: #fafafa;
}

body > .modal-backdrop .policy-modal-effectiveness strong {
  color: #000000;
  font-size: 15px;
  line-height: 1.3;
}

body > .modal-backdrop .policy-modal-effectiveness span,
body > .modal-backdrop .policy-modal-blockers span {
  color: #666666;
  font-size: 13px;
  line-height: 1.5;
}

body > .modal-backdrop .policy-modal-blockers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body > .modal-backdrop .policy-modal-blockers span {
  border-radius: 999px;
  padding: 4px 8px;
  background: #ffffff;
}

body > .modal-backdrop .policy-modal-form {
  display: grid;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 2px 8px;
}

body > .modal-backdrop .policy-modal-card {
  display: grid;
  gap: 12px;
  border: 1px solid #e6e6e6;
  border-radius: 18px;
  padding: 14px;
  background: #ffffff;
}

body > .modal-backdrop .policy-modal-card .policy-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body > .modal-backdrop .policy-modal-card .policy-card-head strong {
  color: #000000;
  font-size: 15px;
  line-height: 1.3;
}

body > .modal-backdrop .policy-modal-card .form-grid {
  gap: 12px;
}

body > .modal-backdrop .policy-modal-card input,
body > .modal-backdrop .policy-modal-card select,
body > .modal-backdrop .policy-modal-card textarea {
  min-height: 40px;
  border-color: #e1e1e1;
  border-radius: 10px;
  background: #ffffff;
}

body > .modal-backdrop .policy-modal-card textarea {
  min-height: 76px;
}

body > .modal-backdrop .policy-modal-card input:focus,
body > .modal-backdrop .policy-modal-card select:focus,
body > .modal-backdrop .policy-modal-card textarea:focus {
  border-color: #000000;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
}

body > .modal-backdrop .enhanced-select-button {
  display: flex;
  align-items: center;
  min-height: 40px;
  border-color: #e1e1e1;
  border-radius: 10px;
  color: #333333;
  background: #ffffff;
  box-shadow: none;
}

body > .modal-backdrop .enhanced-select-button:not(:disabled):hover,
body > .modal-backdrop .enhanced-select.open .enhanced-select-button {
  border-color: #d6d6d6;
  color: #000000;
  background: #ffffff;
  box-shadow: none;
  transform: none;
}

body > .modal-backdrop .enhanced-select-menu {
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
}

body > .modal-backdrop .enhanced-select-option {
  display: flex;
  align-items: center;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  color: #333333;
  background: transparent;
  box-shadow: none;
}

body > .modal-backdrop button.enhanced-select-option:not(:disabled):hover,
body > .modal-backdrop button.enhanced-select-option:not(:disabled):focus-visible {
  color: #000000;
  background: #f5f5f5;
  box-shadow: none;
  transform: none;
}

body > .modal-backdrop button.enhanced-select-option[aria-selected="true"] {
  color: #000000;
  background: #f0f0f0;
  box-shadow: none;
  font-weight: 600;
}

body > .modal-backdrop .policy-modal-card .switch-label {
  min-height: 40px;
  align-items: center;
}

body > .modal-backdrop .time-range-toolbar,
body > .modal-backdrop .time-range-actions,
body > .modal-backdrop .policy-modal-card .action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body > .modal-backdrop .time-range-toolbar button,
body > .modal-backdrop .time-range-actions button,
body > .modal-backdrop .policy-modal-card .action-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: #000000;
  background: #f2f2f2;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

body > .modal-backdrop .time-range-toolbar button:not(:disabled):hover,
body > .modal-backdrop .time-range-actions button:not(:disabled):hover,
body > .modal-backdrop .policy-modal-card .action-row button:not(:disabled):hover {
  color: #000000;
  background: #e6e6e6;
  transform: none;
}

body > .modal-backdrop .policy-modal-actions {
  flex: 0 0 auto;
}

body > .modal-backdrop .policy-modal-actions .inline-status {
  margin-right: auto;
}

@media (max-width: 767px) {
  body > .modal-backdrop .policy-modal-effectiveness {
    margin-bottom: 12px;
  }

  body > .modal-backdrop .policy-modal-card {
    border-radius: 16px;
    padding: 12px;
  }

  body > .modal-backdrop .policy-modal-card .form-grid {
    grid-template-columns: 1fr;
  }

  body > .modal-backdrop .policy-modal-actions .inline-status {
    margin-right: 0;
    text-align: center;
  }
}

/* Final ZenMux neutral theme contract */
:root {
  --primary: #000000;
  --primary-hover: #333333;
  --primary-soft: #f2f2f2;
  --telegram: #333333;
  --telegram-soft: #f5f5f5;
  --accent: #000000;
  --accent-soft: #f2f2f2;
  --brand-glow: 0 16px 36px rgba(0, 0, 0, 0.12);
  --v3-bg: #f7f7f7;
  --v3-bg-grid: rgba(0, 0, 0, 0.035);
  --v3-surface: #ffffff;
  --v3-surface-soft: #f5f5f5;
  --v3-surface-strong: #e6e6e6;
  --v3-line: #e6e6e6;
  --v3-line-strong: #d6d6d6;
  --v3-accent: #000000;
  --v3-accent-2: #333333;
  --v3-accent-soft: #f2f2f2;
  --v3-blue: #333333;
  --v3-blue-soft: #f5f5f5;
  --v3-focus: rgba(0, 0, 0, 0.16);
  --ops-blue: #333333;
}

body {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px),
    #f7f7f7;
}

.ops-console-v3 {
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.035) 0 1px, transparent 1px 22px),
    #f7f7f7;
}

.ops-console-v3 button,
.ops-login-v3 button {
  border-color: #000000;
  color: #ffffff;
  background: #000000;
  box-shadow: none;
}

.ops-console-v3 button:not(:disabled):hover,
.ops-login-v3 button:not(:disabled):hover {
  border-color: #333333;
  color: #ffffff;
  background: #333333;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 button.secondary,
.ops-login-v3 button.secondary {
  border-color: transparent;
  color: #000000;
  background: #f2f2f2;
  box-shadow: none;
}

.ops-console-v3 button.secondary:not(:disabled):hover,
.ops-login-v3 button.secondary:not(:disabled):hover {
  border-color: transparent;
  color: #000000;
  background: #e6e6e6;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 button:focus-visible,
.ops-console-v3 .nav-item:focus-visible,
.ops-console-v3 .account-row:focus-visible,
.ops-console-v3 .group-row:focus-visible,
.ops-console-v3 .policy-dialog-row:focus-visible,
.ops-console-v3 .scheduled-dialog-card:focus-visible,
.ops-login-v3 button:focus-visible {
  outline: 3px solid rgba(0, 0, 0, 0.16);
  outline-offset: 3px;
}

.ops-console-v3 input:focus,
.ops-console-v3 select:focus,
.ops-console-v3 textarea:focus,
.ops-login-v3 input:focus {
  border-color: #000000;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
}

.ops-console-v3 .selected-table-row,
.ops-console-v3 .account-row.selected,
.ops-console-v3 .policy-dialog-row.selected,
.ops-console-v3 .scheduled-dialog-card.selected {
  border-color: #111111;
  background: #f5f5f5;
  box-shadow: none;
}

/* Final ZenMux sidebar neutral contract */
.ops-console-v3 .sidebar {
  border-right: 1px solid #e6e6e6;
  color: #333333;
  background: #ffffff;
  box-shadow: none;
}

.ops-console-v3 .brand-mark {
  background: #f2f2f2;
  box-shadow: none;
}

.ops-console-v3 .brand strong,
.ops-console-v3 .nav-item.active {
  color: #000000;
}

.ops-console-v3 .brand span,
.ops-console-v3 .nav-group-title,
.ops-console-v3 .nav-item,
.ops-console-v3 .logout-button {
  color: #666666;
}

.ops-console-v3 .sidebar-toggle:not(:disabled):hover {
  border-color: transparent;
  color: #000000;
  background: #e6e6e6;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .nav-item:hover,
.ops-console-v3 .nav-item.active {
  background: #f2f2f2;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .nav-item.active::before {
  background: #000000;
}

.ops-console-v3 .account-switcher-bar,
.ops-console-v3 .sidebar form {
  border-top-color: #e6e6e6;
}

.ops-console-v3 .account-compact-button,
.ops-console-v3 .account-switch-trigger,
.ops-console-v3 .logout-button {
  color: #333333;
  background: #f5f5f5;
}

.ops-console-v3 .account-compact-button:not(:disabled):hover,
.ops-console-v3 .account-switch-trigger:not(:disabled):hover,
.ops-console-v3 .logout-button:not(:disabled):hover {
  color: #000000;
  background: #e6e6e6;
  box-shadow: none;
  transform: none;
}

/* Final modal title and close icon alignment contract */
.ops-console-v3 .modal-head,
body > .modal-backdrop .modal-head {
  display: flex;
  align-items: center;
  min-height: 36px;
  margin-bottom: 18px;
  padding-right: 48px;
}

.ops-console-v3 .modal-head .page-kicker,
body > .modal-backdrop .modal-head .page-kicker {
  display: none;
}

.ops-console-v3 .modal-head h2,
body > .modal-backdrop .modal-head h2 {
  margin: 0;
  color: #000000;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.ops-console-v3 .modal-close-button,
body > .modal-backdrop .modal-close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  color: transparent;
  background: #f2f2f2;
  box-shadow: none;
  font-size: 0;
  line-height: 0;
  transform: none;
}

.ops-console-v3 .modal-close-button::before,
.ops-console-v3 .modal-close-button::after,
body > .modal-backdrop .modal-close-button::before,
body > .modal-backdrop .modal-close-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1.8px;
  border-radius: 999px;
  background: #5f5f5f;
  transform-origin: center;
}

.ops-console-v3 .modal-close-button::before,
body > .modal-backdrop .modal-close-button::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.ops-console-v3 .modal-close-button::after,
body > .modal-backdrop .modal-close-button::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.ops-console-v3 .modal-close-button:not(:disabled):hover,
body > .modal-backdrop .modal-close-button:not(:disabled):hover {
  color: transparent;
  background: #e6e6e6;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .modal-close-button:not(:disabled):hover::before,
.ops-console-v3 .modal-close-button:not(:disabled):hover::after,
body > .modal-backdrop .modal-close-button:not(:disabled):hover::before,
body > .modal-backdrop .modal-close-button:not(:disabled):hover::after {
  background: #000000;
}

/* Final policy modal ZenMux layout contract */
body > .modal-backdrop .policy-modal-panel {
  width: min(780px, 100%);
}

body > .modal-backdrop .policy-switch-card {
  gap: 8px;
  border-color: #e6e6e6;
  background: #ffffff;
}

body > .modal-backdrop .policy-switch-card .policy-card-head {
  margin-bottom: 0;
}

body > .modal-backdrop .policy-top-switch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 16px;
  min-height: 48px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

body > .modal-backdrop .policy-top-switch > strong,
body > .modal-backdrop .policy-top-switch > span {
  color: #000000;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

body > .modal-backdrop .policy-top-switch > small {
  grid-column: 1;
  color: #777777;
  font-size: 12px;
  line-height: 1.4;
}

body > .modal-backdrop .policy-top-switch > input {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
}

body > .modal-backdrop .policy-switch-hidden {
  position: absolute;
  width: 1px !important;
  min-width: 1px;
  height: 1px !important;
  min-height: 1px !important;
  opacity: 0;
  pointer-events: none;
}

body > .modal-backdrop .policy-switch-control {
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  width: 44px;
  min-width: 44px;
  height: 24px;
  min-height: 24px;
  border: 1px solid #d6d6d6;
  border-radius: 999px;
  padding: 0;
  background: #f2f2f2;
  box-shadow: none;
  transform: none;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

body > .modal-backdrop .policy-switch-control::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transform: translate(0, -50%);
  transition: transform 0.16s ease;
}

body > .modal-backdrop .policy-switch-control:not(:disabled):hover {
  border-color: #b8b8b8;
  background: #eaeaea;
  box-shadow: none;
  transform: none;
}

body > .modal-backdrop .policy-switch-control[aria-checked="true"] {
  border-color: #000000;
  background: #000000;
}

body > .modal-backdrop .policy-switch-control[aria-checked="true"]::after {
  transform: translate(20px, -50%);
}

body > .modal-backdrop .policy-switch-control[aria-checked="true"]:not(:disabled):hover {
  border-color: #000000;
  background: #000000;
}

body > .modal-backdrop .policy-switch-knob {
  display: none;
}

body > .modal-backdrop .policy-trigger-card {
  gap: 10px;
}

body > .modal-backdrop .policy-trigger-segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  border: 1px solid #e1e1e1;
  border-radius: 10px;
  padding: 4px;
  background: #f7f7f7;
}

body > .modal-backdrop .policy-trigger-segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  color: #000000;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  transform: none;
}

body > .modal-backdrop .policy-trigger-segment:not(:disabled):hover {
  color: #000000;
  background: #ececec;
  box-shadow: none;
  transform: none;
}

body > .modal-backdrop .policy-trigger-segment.active,
body > .modal-backdrop .policy-trigger-segment.active:not(:disabled):hover {
  color: #ffffff;
  background: #000000;
  box-shadow: none;
  transform: none;
}

body > .modal-backdrop .policy-mode-segmented {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body > .modal-backdrop .conversation-policy-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body > .modal-backdrop .compact-policy-switch {
  min-height: 44px;
  border-top: 1px solid #eeeeee;
  padding-top: 12px;
}

body > .modal-backdrop .conversation-policy-advanced {
  margin-top: 2px;
}

body > .modal-backdrop .conversation-policy-advanced > div {
  padding-top: 12px;
}

body > .modal-backdrop .conversation-corpus-modal-body {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 14px;
}

body > .modal-backdrop .conversation-corpus-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.45fr) minmax(130px, 0.45fr) auto;
  align-items: end;
  gap: 10px;
}

body > .modal-backdrop .conversation-corpus-toolbar label {
  display: grid;
  gap: 7px;
}

body > .modal-backdrop .conversation-corpus-toolbar button {
  min-height: 40px;
}

.conversation-corpus-list,
.conversation-session-list,
.conversation-session-part-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line, #e8e8e8);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.conversation-corpus-row,
.conversation-session-row,
.conversation-session-part-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  border-bottom: 1px solid var(--line, #eeeeee);
  padding: 12px 14px;
}

.conversation-corpus-row:last-child,
.conversation-session-row:last-child,
.conversation-session-part-row:last-child {
  border-bottom: 0;
}

.conversation-corpus-row > div,
.conversation-session-main,
.conversation-session-part-row > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.conversation-corpus-row strong,
.conversation-session-title strong,
.conversation-session-part-row strong {
  color: var(--text, #111111);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.conversation-corpus-row span,
.conversation-session-main > span,
.conversation-session-main > small,
.conversation-session-part-row span,
.conversation-session-part-row small {
  color: var(--muted, #6b6b6b);
  font-size: 12px;
  line-height: 1.45;
}

.conversation-corpus-add-card {
  margin-top: 2px;
}

.conversation-session-detail-panel #conversationSessionDetailSummary > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.conversation-session-detail-panel #conversationSessionDetailSummary span {
  color: var(--muted, #6b6b6b);
}

.conversation-session-detail-panel #conversationSessionDetailSummary strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.runtime-conversations-panel {
  display: grid;
  gap: 14px;
}

.runtime-conversation-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.runtime-conversation-toolbar > div,
.runtime-conversation-toolbar label {
  display: grid;
  gap: 5px;
}

.runtime-conversation-toolbar > div span,
.runtime-conversation-toolbar label span {
  color: var(--muted, #6b6b6b);
  font-size: 12px;
}

.runtime-conversation-toolbar select {
  min-width: 150px;
}

.conversation-session-title,
.conversation-session-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.conversation-session-actions {
  flex: 0 0 auto;
}

@media (max-width: 767px) {
  body > .modal-backdrop .conversation-policy-grid,
  body > .modal-backdrop .conversation-corpus-toolbar {
    grid-template-columns: 1fr;
  }

  .runtime-conversation-toolbar,
  .conversation-session-row,
  .conversation-corpus-row {
    align-items: stretch;
    flex-direction: column;
  }

  .runtime-conversation-toolbar select,
  .conversation-session-actions {
    width: 100%;
  }

  .conversation-session-actions > button {
    flex: 1 1 0;
  }
}

body > .modal-backdrop .policy-trigger-card .wide-label {
  display: grid;
  gap: 8px;
}

body > .modal-backdrop .policy-time-input {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  min-height: 40px;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  padding: 0 11px;
  color: #000000;
  background: #ffffff;
  box-shadow: none;
  font-size: 14px;
  font-weight: 550;
  line-height: 40px;
  letter-spacing: 0.02em;
  text-align: center;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

body > .modal-backdrop .policy-time-input:hover {
  border-color: #bdbdbd;
}

body > .modal-backdrop .policy-time-input:focus {
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

body > .modal-backdrop .policy-modal-panel .status-chip,
body > .modal-backdrop .policy-modal-panel .compact-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border: 1px solid #e6e6e6;
  border-radius: 999px;
  padding: 0 9px;
  color: #666666;
  background: #f7f7f7;
  box-shadow: none;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
}

/* Final policy modal prompt card contract */
body > .modal-backdrop .policy-prompt-stack {
  display: grid;
  gap: 12px;
}

body > .modal-backdrop .policy-context-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

body > .modal-backdrop .compact-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body > .modal-backdrop .policy-prompt-panel {
  margin-top: 12px;
}

body > .modal-backdrop .compact-modal-actions,
body > .modal-backdrop .policy-modal-panel .compact-modal-actions {
  position: static;
  bottom: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  margin: 12px -28px -20px;
  border-top: 1px solid #e6e6e6;
  border-radius: 0 0 24px 24px;
  padding: 10px 28px 12px;
  background: #ffffff;
  box-shadow: none;
}

body > .modal-backdrop .compact-modal-actions .inline-status {
  margin-right: auto;
}

body > .modal-backdrop .compact-modal-actions button,
body > .modal-backdrop .policy-modal-panel .compact-modal-actions button {
  height: 38px;
  min-height: 38px;
  min-width: 92px;
  border-radius: 7px;
  font-size: 15px;
  line-height: 1;
}

@media (max-width: 767px) {
  body > .modal-backdrop .compact-form-grid {
    grid-template-columns: 1fr;
  }

  body > .modal-backdrop .policy-trigger-segmented {
    grid-template-columns: 1fr;
  }

  body > .modal-backdrop .policy-trigger-segment {
    height: 38px;
    min-height: 38px;
  }

  body > .modal-backdrop .compact-modal-actions,
  body > .modal-backdrop .policy-modal-panel .compact-modal-actions {
    margin: 12px -16px -18px;
    padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

/* Final expression library modal override */
.ops-console-v3 .style-learning-profile-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 13px 14px;
  background: #fafafa;
}

.ops-console-v3 .style-learning-profile-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ops-console-v3 .style-learning-profile-summary strong {
  color: #111111;
  font-size: 14px;
  font-weight: 700;
}

.ops-console-v3 .style-learning-profile-summary span {
  color: #777777;
  font-size: 12px;
  line-height: 1.45;
}

.ops-console-v3 .style-learning-profile-summary.empty {
  border-style: dashed;
}

body > .modal-backdrop .speech-library-candidate-modal,
body > .modal-backdrop .style-learning-profile-modal {
  display: flex;
  flex-direction: column;
  width: min(780px, 100%);
  height: min(720px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  overflow: hidden;
}

body > .modal-backdrop .style-learning-profile-modal {
  width: min(860px, 100%);
}

body > .modal-backdrop .speech-library-candidate-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

body > .modal-backdrop .speech-library-candidate-modal .learning-candidate-head {
  margin-bottom: 12px;
}

body > .modal-backdrop .speech-library-candidate-modal .learning-candidate-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 10px;
}

body > .modal-backdrop .speech-library-candidate-modal .learning-candidate-toolbar .inline-status {
  min-width: 0;
  white-space: nowrap;
}

body > .modal-backdrop .speech-library-candidate-modal .learning-candidate-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 260px;
  margin: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body > .modal-backdrop .speech-library-candidate-modal .learning-candidate-card {
  min-height: 52px;
  border-color: #e6e6e6;
  border-radius: 9px;
  padding: 8px 10px;
  background: #ffffff;
  box-shadow: none;
}

body > .modal-backdrop .speech-library-candidate-modal .learning-candidate-card:hover {
  border-color: #cfcfcf;
  background: #f5f5f5;
  box-shadow: none;
}

body > .modal-backdrop .speech-library-candidate-modal .learning-candidate-card.selected {
  border-color: #111111;
  background: #f3f3f3;
}

body > .modal-backdrop .speech-library-candidate-modal .advanced-learning-rules {
  margin-top: 14px;
}

body > .modal-backdrop .style-learning-profile-modal .style-learning-profile-preview {
  max-height: 260px;
  overflow-y: auto;
  border-color: #ececec;
  border-radius: 12px;
  background: #fafafa;
}

body > .modal-backdrop .style-learning-profile-modal .style-profile-editor {
  margin-top: 14px;
}

body > .modal-backdrop .style-learning-profile-modal .style-profile-editor textarea {
  min-height: 240px;
}

body > .modal-backdrop .style-learning-profile-modal .style-learning-review-panel {
  margin-top: 14px;
}

@media (max-width: 767px) {
  .ops-console-v3 .style-learning-profile-summary,
  body > .modal-backdrop .speech-library-candidate-modal .learning-candidate-toolbar,
  body > .modal-backdrop .speech-library-candidate-modal .learning-candidate-list {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .style-learning-profile-summary button {
    width: 100%;
  }

  body > .modal-backdrop .speech-library-candidate-modal,
  body > .modal-backdrop .style-learning-profile-modal {
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
  }
}

/* Final modal portal theme contract */
body > .modal-backdrop.modal-theme-scope {
  grid-template-columns: none;
  min-height: 0;
  box-sizing: border-box;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  color: #333333;
  background: transparent;
}

body > .modal-backdrop.modal-theme-scope::before {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body > .modal-backdrop.modal-theme-scope.active-modal::before {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body > .modal-backdrop.modal-theme-scope > .modal-panel {
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  max-height: min(760px, calc(100dvh - 48px));
  border: 0;
  border-radius: 24px;
  padding: 20px 28px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.12);
}

body > .modal-backdrop.modal-theme-scope > .modal-panel > .modal-actions {
  position: static;
  bottom: auto;
  display: flex;
  grid-template-columns: none;
  flex: 0 0 auto;
  margin: 20px -28px -20px;
  border-radius: 0 0 24px 24px;
  padding: 14px 28px 18px;
}

body > .modal-backdrop.modal-theme-scope > .modal-panel > .compact-modal-actions {
  margin: 12px -28px -20px;
  padding: 10px 28px 12px;
}

body > .modal-backdrop.modal-theme-scope .modal-scroll-body,
body > .modal-backdrop.modal-theme-scope .policy-modal-form,
body > .modal-backdrop.modal-theme-scope .speech-library-modal-scroll,
body > .modal-backdrop.modal-theme-scope .speech-library-candidate-scroll,
body > .modal-backdrop.modal-theme-scope .account-modal-scroll,
body > .modal-backdrop.modal-theme-scope .scheduled-task-modal-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body > .modal-backdrop.modal-theme-scope .scheduled-task-modal {
  display: flex;
  flex-direction: column;
  height: min(760px, calc(100dvh - 48px));
}

body > .modal-backdrop.modal-theme-scope .scheduled-task-modal-scroll {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 14px;
  padding: 2px 2px 8px;
}

body > .modal-backdrop.modal-theme-scope .scheduled-task-modal-scroll > .form-grid,
body > .modal-backdrop.modal-theme-scope .scheduled-task-modal-scroll > .wide-label,
body > .modal-backdrop.modal-theme-scope .scheduled-task-modal-scroll > .weekday-toolbar,
body > .modal-backdrop.modal-theme-scope .scheduled-task-modal-scroll > .switch-row,
body > .modal-backdrop.modal-theme-scope .scheduled-task-modal-scroll > .inline-status {
  margin: 0;
}

body > .modal-backdrop .speech-library-candidate-modal,
body > .modal-backdrop.modal-theme-scope .speech-library-candidate-modal {
  height: auto;
  max-height: min(720px, calc(100dvh - 48px));
}

body > .modal-backdrop.modal-theme-scope .speech-library-candidate-modal .speech-library-candidate-scroll {
  flex: 0 1 auto;
  max-height: min(560px, calc(100dvh - 190px));
}

@media (max-width: 767px) {
  body > .modal-backdrop.modal-theme-scope {
    align-items: start;
    justify-items: center;
    padding: 8px;
  }

  body > .modal-backdrop.modal-theme-scope > .modal-panel {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    max-height: calc(100dvh - 16px);
    border-radius: 20px;
    padding: 18px 16px;
  }

  body > .modal-backdrop.modal-theme-scope > .account-modal-panel,
  body > .modal-backdrop.modal-theme-scope > .policy-modal-panel,
  body > .modal-backdrop.modal-theme-scope > .scheduled-task-modal,
  body > .modal-backdrop.modal-theme-scope > .style-learning-profile-modal,
  body > .modal-backdrop.modal-theme-scope > .speech-library-modal-panel {
    height: 100%;
    min-height: 0;
    max-height: 100%;
  }

  body > .modal-backdrop.modal-theme-scope > .modal-panel > .modal-actions {
    bottom: auto;
    flex-direction: column-reverse;
    align-items: stretch;
    margin: 18px -16px -18px;
    border-radius: 0 0 20px 20px;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  body > .modal-backdrop.modal-theme-scope > .modal-panel > .compact-modal-actions {
    flex-direction: column;
    margin: 12px -16px -18px;
    padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  body > .modal-backdrop.modal-theme-scope > .modal-panel > .compact-modal-actions .inline-status {
    width: 100%;
    margin: 0;
    text-align: center;
  }

  body > .modal-backdrop.modal-theme-scope > .account-modal-panel > .account-modal-actions {
    flex-direction: column;
  }

  body > .modal-backdrop.modal-theme-scope > .account-modal-panel > .account-modal-actions .account-footer-status {
    max-width: none;
    width: 100%;
  }

  body > .modal-backdrop.modal-theme-scope > .account-modal-panel > .account-modal-actions .account-footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    margin-left: 0;
  }

  body > .modal-backdrop .speech-library-candidate-modal,
  body > .modal-backdrop.modal-theme-scope .speech-library-candidate-modal {
    height: auto;
    max-height: calc(100dvh - 16px);
  }

  body > .modal-backdrop.modal-theme-scope .speech-library-candidate-modal .speech-library-candidate-scroll {
    max-height: calc(100dvh - 184px);
  }
}

/* Speech library workspace */
.ops-console-v3 .speech-library-workspace-panel {
  display: grid;
  gap: 14px;
}

.ops-console-v3 .speech-library-item-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1.15fr) minmax(120px, 0.62fr) minmax(90px, 0.42fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 12px;
  background: #fafafa;
}

.ops-console-v3 .speech-library-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 36px;
  white-space: nowrap;
}

.ops-console-v3 .speech-library-toolbar-actions .title-help-button {
  flex: 0 0 auto;
}

.ops-console-v3 .speech-library-filter-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ops-console-v3 .speech-library-filter-field > span {
  color: #666666;
  font-size: 12px;
  font-weight: 500;
}

.ops-console-v3 .speech-library-filter-field input,
.ops-console-v3 .speech-library-filter-field select,
.ops-console-v3 .speech-library-filter-field .enhanced-select {
  width: 100%;
}

.ops-console-v3 .speech-library-items {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  background: #ffffff;
}

.ops-console-v3 .speech-library-items.list-empty {
  min-height: 220px;
  place-items: center;
  border-style: dashed;
  padding: 24px;
  color: #858585;
  text-align: center;
}

.ops-console-v3 .speech-library-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  border: 0;
  border-top: 1px solid #eeeeee;
  border-radius: 0;
  padding: 11px 14px;
  background: #ffffff;
}

.ops-console-v3 .speech-library-item:first-child {
  border-top: 0;
}

.ops-console-v3 .speech-library-item:hover {
  background: #fafafa;
}

.ops-console-v3 .speech-library-item-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ops-console-v3 .speech-library-item-main > span {
  overflow-wrap: anywhere;
  color: #222222;
  line-height: 1.55;
}

.ops-console-v3 .speech-library-item-actions {
  justify-content: flex-end;
  gap: 6px;
}

.ops-console-v3 .speech-library-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  color: #707070;
  font-size: 13px;
}

.ops-console-v3 .speech-library-pagination.hidden {
  display: none;
}

.ops-console-v3 .speech-library-items-loading {
  min-height: 220px;
  place-items: center;
}

.ops-console-v3 .speech-library-inline-loading {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: #777777;
  font-size: 13px;
}

/* Speech library editor */
body > .modal-backdrop.modal-theme-scope > .speech-library-modal-panel {
  width: min(820px, 100%);
  height: min(760px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
}

body > .modal-backdrop.modal-theme-scope .speech-library-editor {
  gap: 14px;
}

body > .modal-backdrop.modal-theme-scope .speech-library-form-section {
  display: grid;
  gap: 12px;
  border: 1px solid #e9e9e9;
  border-radius: 12px;
  padding: 14px;
  background: #ffffff;
}

body > .modal-backdrop.modal-theme-scope .speech-library-form-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
}

body > .modal-backdrop.modal-theme-scope .speech-library-form-section-head > strong {
  color: #222222;
  font-size: 14px;
  font-weight: 600;
}

body > .modal-backdrop.modal-theme-scope .speech-library-switch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body > .modal-backdrop.modal-theme-scope .speech-library-switch-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  border: 1px solid #e9e9e9;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fafafa;
}

body > .modal-backdrop.modal-theme-scope .speech-library-switch-card > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body > .modal-backdrop.modal-theme-scope .speech-library-switch-card small {
  color: #777777;
  font-size: 12px;
  line-height: 1.45;
}

body > .modal-backdrop.modal-theme-scope .speech-library-dialog-picker-wrap {
  position: relative;
}

body > .modal-backdrop.modal-theme-scope .speech-library-dialog-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  padding: 9px 12px;
  color: #222222;
  background: #ffffff;
  box-shadow: none;
  text-align: left;
}

body > .modal-backdrop.modal-theme-scope .speech-library-dialog-trigger:not(:disabled):hover {
  border-color: #bdbdbd;
  color: #111111;
  background: #f8f8f8;
  box-shadow: none;
  transform: none;
}

body > .modal-backdrop.modal-theme-scope .speech-library-dialog-trigger > span:first-child {
  display: grid;
  gap: 3px;
}

body > .modal-backdrop.modal-theme-scope .speech-library-dialog-trigger small {
  color: #777777;
  font-size: 12px;
}

body > .modal-backdrop.modal-theme-scope .speech-library-dialog-chevron {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #555555;
  border-bottom: 1.5px solid #555555;
  transform: rotate(45deg);
}

body > .modal-backdrop.modal-theme-scope .speech-library-dialog-picker-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  display: grid;
  gap: 8px;
  max-height: 330px;
  border: 1px solid #dddddd;
  border-radius: 12px;
  padding: 10px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.14);
}

body > .modal-backdrop.modal-theme-scope .speech-library-dialog-picker-panel.hidden {
  display: none;
}

body > .modal-backdrop.modal-theme-scope .speech-library-dialog-options {
  display: grid;
  gap: 4px;
  max-height: 245px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body > .modal-backdrop.modal-theme-scope .speech-library-dialog-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  color: #333333;
  background: #ffffff;
  box-shadow: none;
  text-align: left;
}

body > .modal-backdrop.modal-theme-scope .speech-library-dialog-option > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body > .modal-backdrop.modal-theme-scope .speech-library-dialog-option small {
  color: #777777;
  font-size: 12px;
}

body > .modal-backdrop.modal-theme-scope .speech-library-dialog-option:not(:disabled):hover {
  color: #222222;
  background: #f4f4f4;
  box-shadow: none;
  transform: none;
}

body > .modal-backdrop.modal-theme-scope .speech-library-dialog-option.selected {
  color: #111111;
  background: #ededed;
}

body > .modal-backdrop.modal-theme-scope .speech-library-sources {
  gap: 6px;
}

body > .modal-backdrop.modal-theme-scope .speech-library-source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 58px;
  border-color: #e8e8e8;
  border-radius: 9px;
  padding: 8px 10px;
  background: #fafafa;
}

body > .modal-backdrop.modal-theme-scope .speech-library-filter-section {
  margin: 0;
  border-color: #e9e9e9;
  border-radius: 12px;
  background: #fafafa;
}

body > .modal-backdrop.modal-theme-scope .speech-library-filter-section[open] {
  padding-bottom: 14px;
}

body > .modal-backdrop.modal-theme-scope .speech-library-filter-section > .wide-label,
body > .modal-backdrop.modal-theme-scope .speech-library-filter-section > .form-grid {
  margin: 12px 14px 0;
}

body > .modal-backdrop.modal-theme-scope .speech-library-backfill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #e9e9e9;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fafafa;
}

body > .modal-backdrop.modal-theme-scope .speech-library-backfill-row > div:first-child {
  display: grid;
  gap: 3px;
}

body > .modal-backdrop.modal-theme-scope .speech-library-backfill-row small {
  color: #777777;
  font-size: 12px;
}

body > .modal-backdrop.modal-theme-scope .speech-library-candidate-modal {
  width: min(760px, 100%);
}

body > .modal-backdrop.modal-theme-scope .speech-library-candidate-modal .learning-candidate-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body > .modal-backdrop.modal-theme-scope .speech-library-candidate-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 62px;
  border-color: #e6e6e6;
  border-radius: 9px;
  padding: 8px 10px;
  background: #ffffff;
  box-shadow: none;
}

body > .modal-backdrop.modal-theme-scope .speech-library-candidate-card:hover {
  border-color: #cfcfcf;
  background: #f5f5f5;
  box-shadow: none;
}

body > .modal-backdrop.modal-theme-scope .speech-library-candidate-card.selected {
  border-color: #111111;
  background: #f0f0f0;
}

body > .modal-backdrop.modal-theme-scope .speech-library-manual-source {
  margin-top: 14px;
}

@media (max-width: 980px) {
  .ops-console-v3 .speech-library-item-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-console-v3 .speech-library-toolbar-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  body > .modal-backdrop.modal-theme-scope > .speech-library-modal-panel {
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .ops-console-v3 .speech-library-item-toolbar {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .speech-library-toolbar-actions {
    display: grid;
    grid-column: 1;
    grid-template-columns: 36px repeat(2, minmax(0, 1fr));
  }

  .ops-console-v3 .speech-library-toolbar-actions > button:not(.title-help-button) {
    width: 100%;
  }

  .ops-console-v3 .speech-library-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px;
  }

  .ops-console-v3 .speech-library-item-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ops-console-v3 .speech-library-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .ops-console-v3 .speech-library-pagination .button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  body > .modal-backdrop.modal-theme-scope .speech-library-switch-grid,
  body > .modal-backdrop.modal-theme-scope .speech-library-candidate-modal .learning-candidate-list {
    grid-template-columns: 1fr;
  }

  body > .modal-backdrop.modal-theme-scope .speech-library-form-section {
    padding: 12px;
  }

  body > .modal-backdrop.modal-theme-scope .speech-library-form-section-head,
  body > .modal-backdrop.modal-theme-scope .speech-library-backfill-row {
    align-items: stretch;
    flex-direction: column;
  }

  body > .modal-backdrop.modal-theme-scope .speech-library-form-section-head button,
  body > .modal-backdrop.modal-theme-scope .speech-library-backfill-row .button-group,
  body > .modal-backdrop.modal-theme-scope .speech-library-backfill-row button {
    width: 100%;
  }

  body > .modal-backdrop.modal-theme-scope .speech-library-source-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body > .modal-backdrop.modal-theme-scope .speech-library-source-row .button-group {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* Final AI reply laboratory contract */
.ops-console-v3 .reply-test-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.ops-console-v3 #replyTestLaboratoryPanel {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.ops-console-v3 .reply-test-mode-tab {
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-subtle);
  box-shadow: none;
  font-weight: 600;
}

.ops-console-v3 .reply-test-mode-tab:not(:disabled):hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-blue);
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .reply-test-mode-tab.active,
.ops-console-v3 .reply-test-mode-tab[aria-selected="true"] {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 8px rgba(23, 32, 51, 0.08);
}

.ops-console-v3 .reply-test-mode-tab:disabled {
  color: var(--muted);
  background: var(--surface-subtle);
  opacity: 0.58;
  cursor: wait;
}

.ops-console-v3 .reply-test-mode-tab:focus-visible,
.ops-console-v3 .reply-test-experiment-panel summary:focus-visible,
.ops-console-v3 .reply-preview-prompt summary:focus-visible,
.ops-console-v3 .reply-test-editor-grid textarea:focus-visible,
.ops-console-v3 .reply-test-generated textarea:focus-visible {
  outline: 2px solid var(--border-strong);
  outline-offset: 2px;
}

.ops-console-v3 .reply-test-timeline {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ops-console-v3 .reply-test-timeline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface);
}

.ops-console-v3 .reply-test-timeline-row.outgoing {
  background: var(--surface-blue);
}

.ops-console-v3 .reply-test-timeline-time,
.ops-console-v3 .reply-test-effective-config span,
.ops-console-v3 .reply-test-diagnostics span {
  color: var(--muted);
  font-size: 12px;
}

.ops-console-v3 .reply-test-timeline-text {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ops-console-v3 .reply-test-timeline-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 10px;
  min-width: 0;
}

.ops-console-v3 .reply-test-timeline-meta strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ops-console-v3 .reply-test-timeline-time {
  flex: 0 0 auto;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ops-console-v3 .reply-test-timeline-text > span {
  min-width: 0;
  color: var(--text);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.ops-console-v3 .reply-test-timeline-row > .status-chip {
  align-self: start;
}

.ops-console-v3 .reply-test-diagnostic-grid,
.ops-console-v3 .reply-test-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.ops-console-v3 .reply-test-effective-config,
.ops-console-v3 .reply-test-diagnostics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-subtle);
}

.ops-console-v3 .reply-test-effective-config > div,
.ops-console-v3 .reply-test-diagnostics > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ops-console-v3 .reply-test-effective-config strong,
.ops-console-v3 .reply-test-diagnostics strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.ops-console-v3 .reply-preview-checks {
  display: flex;
  align-content: start;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.ops-console-v3 .reply-preview-checks.list-empty,
.ops-console-v3 .reply-test-timeline.list-empty,
.ops-console-v3 .reply-test-effective-config.list-empty,
.ops-console-v3 .reply-test-diagnostics.list-empty {
  display: block;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
  color: var(--muted);
  background: var(--surface-subtle);
}

.ops-console-v3 .reply-preview-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--text);
  background: var(--surface);
  overflow-wrap: anywhere;
}

.ops-console-v3 .reply-preview-check.pass {
  background: var(--success-soft);
}

.ops-console-v3 .reply-preview-check.fail,
.ops-console-v3 .reply-preview-check.error {
  background: var(--danger-soft);
}

.ops-console-v3 .reply-test-experiment-panel,
.ops-console-v3 .reply-preview-prompt {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.ops-console-v3 .reply-test-experiment-panel summary,
.ops-console-v3 .reply-preview-prompt summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  cursor: pointer;
}

.ops-console-v3 .reply-test-editor-grid,
.ops-console-v3 .reply-test-prompt-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 0 12px 12px;
}

.ops-console-v3 .reply-test-editor-grid textarea,
.ops-console-v3 .reply-test-generated textarea {
  min-height: 92px;
  resize: vertical;
}

.ops-console-v3 .reply-test-prompt-grid pre {
  max-height: 220px;
  margin: 6px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ops-console-v3 .reply-test-generated {
  min-width: 0;
}

@media (max-width: 720px) {
  .ops-console-v3 .reply-test-mode-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-console-v3 .reply-test-mode-tab {
    min-height: 44px;
  }

  .ops-console-v3 .reply-test-diagnostic-grid,
  .ops-console-v3 .reply-test-result-grid,
  .ops-console-v3 .reply-test-effective-config,
  .ops-console-v3 .reply-test-diagnostics {
    grid-template-columns: 1fr;
  }
}

/* Modal design system v2 */
:root {
  --modal-radius: 16px;
  --modal-header-height: 64px;
  --modal-footer-height: 64px;
  --modal-space-x: 24px;
  --modal-space-y: 18px;
  --modal-border: #e7e7e7;
  --modal-muted: #737373;
  --modal-surface-soft: #fafafa;
  --modal-shadow: 0 24px 64px rgba(0, 0, 0, 0.16);
}

body.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body > .modal-backdrop.modal-theme-scope {
  position: fixed;
  inset: 0;
  z-index: 3400;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 24px;
  overflow: hidden;
  background: transparent;
}

body > .modal-backdrop.modal-theme-scope::before {
  position: absolute;
  inset: 0;
  content: "";
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background-color 0.14s ease;
}

body > .modal-backdrop.modal-theme-scope.active-modal::before {
  background: rgba(0, 0, 0, 0.46);
}

body > .modal-backdrop.modal-theme-scope:not(.active-modal)::before {
  background: rgba(0, 0, 0, 0.16);
}

body > .modal-backdrop.modal-theme-scope.hidden {
  display: none;
}

body > .modal-backdrop.modal-theme-scope > .modal-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(680px, 100%);
  max-height: calc(100dvh - 48px);
  min-height: 0;
  border: 1px solid var(--modal-border);
  border-radius: var(--modal-radius);
  padding: 0;
  overflow: hidden;
  color: #262626;
  background: #ffffff;
  background-clip: padding-box;
  box-shadow: var(--modal-shadow);
  clip-path: inset(0 round var(--modal-radius));
  contain: layout paint;
  isolation: isolate;
  transform: translateZ(0);
}

body > .modal-backdrop.modal-theme-scope > .modal-size-sm {
  width: min(520px, 100%);
}

body > .modal-backdrop.modal-theme-scope > .modal-size-md {
  width: min(680px, 100%);
}

body > .modal-backdrop.modal-theme-scope > .modal-size-lg {
  width: min(820px, 100%);
}

body > .modal-backdrop.modal-theme-scope > .modal-size-xl {
  width: min(920px, 100%);
}

body > .modal-backdrop.modal-theme-scope > .modal-layout-long {
  height: min(760px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
}

body > .modal-backdrop.modal-theme-scope > .modal-shell > .modal-head,
body > .modal-backdrop.modal-theme-scope .modal-head {
  position: relative;
  top: auto;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  flex: 0 0 var(--modal-header-height);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--modal-header-height);
  margin: 0;
  border-bottom: 1px solid var(--modal-border);
  padding: 0 var(--modal-space-x);
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body > .modal-backdrop.modal-theme-scope > .modal-shell > .modal-head > div,
body > .modal-backdrop.modal-theme-scope .modal-head > div {
  flex: 1 1 auto;
  min-width: 0;
}

body > .modal-backdrop.modal-theme-scope > .modal-shell > .modal-head h2,
body > .modal-backdrop.modal-theme-scope .modal-head h2 {
  margin: 0;
  overflow: hidden;
  color: #171717;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body > .modal-backdrop.modal-theme-scope .modal-close-button {
  position: relative;
  top: auto;
  right: auto;
  z-index: 1;
  display: inline-flex !important;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  margin: 0 0 0 auto;
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: transparent;
  background: transparent;
  box-shadow: none;
  font-size: 0;
  line-height: 0;
  transform: none;
}

body > .modal-backdrop.modal-theme-scope .modal-close-button::before,
body > .modal-backdrop.modal-theme-scope .modal-close-button::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1.5px;
  border-radius: 999px;
  content: "";
  background: #737373;
  transform-origin: center;
}

body > .modal-backdrop.modal-theme-scope .modal-close-button::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

body > .modal-backdrop.modal-theme-scope .modal-close-button::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

body > .modal-backdrop.modal-theme-scope .modal-close-button:not(:disabled):hover {
  color: transparent;
  background: #f2f2f2;
  box-shadow: none;
  transform: none;
}

body > .modal-backdrop.modal-theme-scope .modal-close-button:not(:disabled):hover::before,
body > .modal-backdrop.modal-theme-scope .modal-close-button:not(:disabled):hover::after {
  background: #171717;
}

body > .modal-backdrop.modal-theme-scope .modal-close-button:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 2px;
}

body > .modal-backdrop.modal-theme-scope > .modal-shell > .modal-body,
body > .modal-backdrop.modal-theme-scope .modal-body {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  max-height: none;
  padding: var(--modal-space-y) var(--modal-space-x) 22px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

body > .modal-backdrop.modal-theme-scope > .modal-shell > .modal-body::-webkit-scrollbar,
body > .modal-backdrop.modal-theme-scope .modal-body::-webkit-scrollbar {
  display: none;
}

body > .modal-backdrop.modal-theme-scope > .modal-shell > .modal-body > *,
body > .modal-backdrop.modal-theme-scope .modal-body > * {
  min-width: 0;
}

body > .modal-backdrop.modal-theme-scope .policy-modal-body,
body > .modal-backdrop.modal-theme-scope .account-modal-scroll,
body > .modal-backdrop.modal-theme-scope .scheduled-task-modal-scroll,
body > .modal-backdrop.modal-theme-scope .speech-library-candidate-scroll,
body > .modal-backdrop.modal-theme-scope .speech-library-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: var(--modal-space-y) var(--modal-space-x) 22px;
  overflow-x: hidden;
  overflow-y: auto;
}

body > .modal-backdrop.modal-theme-scope .policy-modal-form {
  display: grid;
  flex: none;
  gap: 12px;
  min-height: 0;
  padding: 0;
  overflow: visible;
}

body > .modal-backdrop.modal-theme-scope > .modal-shell > .modal-actions,
body > .modal-backdrop.modal-theme-scope .modal-actions {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: var(--modal-footer-height);
  margin: 0;
  border-top: 1px solid var(--modal-border);
  border-radius: 0;
  padding: 11px var(--modal-space-x);
  background: #ffffff;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body > .modal-backdrop.modal-theme-scope .modal-action-group,
body > .modal-backdrop.modal-theme-scope .account-footer-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

body > .modal-backdrop.modal-theme-scope .modal-footer-status,
body > .modal-backdrop.modal-theme-scope .modal-actions > .inline-status,
body > .modal-backdrop.modal-theme-scope .account-footer-status {
  max-width: min(460px, 58%);
  margin: 0 auto 0 0;
  border: 0;
  padding: 0;
  color: var(--modal-muted);
  background: transparent;
  text-align: left;
}

body > .modal-backdrop.modal-theme-scope .modal-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  min-width: 88px;
  border: 1px solid #171717;
  border-radius: 8px;
  padding: 0 16px;
  color: #ffffff;
  background: #171717;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transform: none;
}

body > .modal-backdrop.modal-theme-scope .modal-actions button:not(:disabled):hover {
  border-color: #333333;
  color: #ffffff;
  background: #333333;
  box-shadow: none;
  transform: none;
}

body > .modal-backdrop.modal-theme-scope .modal-actions button.secondary {
  border-color: #e5e5e5;
  color: #262626;
  background: #f5f5f5;
}

body > .modal-backdrop.modal-theme-scope .modal-actions button.secondary:not(:disabled):hover {
  border-color: #dedede;
  color: #171717;
  background: #ebebeb;
}

body > .modal-backdrop.modal-theme-scope .modal-actions button.danger {
  border-color: #e5484d;
  color: #ffffff;
  background: #e5484d;
}

body > .modal-backdrop.modal-theme-scope .modal-actions button.danger:not(:disabled):hover {
  border-color: #d43f44;
  color: #ffffff;
  background: #d43f44;
}

body > .modal-backdrop.modal-theme-scope .modal-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body > .modal-backdrop.modal-theme-scope .modal-form-section {
  display: grid;
  gap: 14px;
  border-bottom: 1px solid var(--modal-border);
  padding: 0 0 18px;
  background: transparent;
}

body > .modal-backdrop.modal-theme-scope .modal-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
}

body > .modal-backdrop.modal-theme-scope .modal-section-head > strong {
  color: #262626;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

body > .modal-backdrop.modal-theme-scope .modal-switch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body > .modal-backdrop.modal-theme-scope .modal-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  border: 1px solid var(--modal-border);
  border-radius: 10px;
  padding: 11px 12px;
  background: var(--modal-surface-soft);
  cursor: pointer;
}

body > .modal-backdrop.modal-theme-scope .modal-switch-row:hover {
  border-color: #d7d7d7;
  background: #f6f6f6;
}

body > .modal-backdrop.modal-theme-scope .modal-switch-row > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body > .modal-backdrop.modal-theme-scope .modal-switch-row strong {
  color: #262626;
  font-size: 14px;
  font-weight: 650;
}

body > .modal-backdrop.modal-theme-scope .modal-switch-row small {
  color: var(--modal-muted);
  font-size: 12px;
  line-height: 1.45;
}

body > .modal-backdrop.modal-theme-scope .modal-select-wrap {
  position: relative;
}

body > .modal-backdrop.modal-theme-scope .modal-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  border: 1px solid #dcdcdc;
  border-radius: 9px;
  padding: 9px 12px;
  color: #262626;
  background: #ffffff;
  box-shadow: none;
  text-align: left;
}

body > .modal-backdrop.modal-theme-scope .modal-select-trigger:not(:disabled):hover,
body > .modal-backdrop.modal-theme-scope .modal-select-trigger[aria-expanded="true"] {
  border-color: #bfbfbf;
  color: #171717;
  background: #ffffff;
  box-shadow: none;
  transform: none;
}

body > .modal-backdrop.modal-theme-scope .modal-select-trigger > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body > .modal-backdrop.modal-theme-scope .modal-select-trigger small {
  color: var(--modal-muted);
  font-size: 12px;
}

body > .modal-backdrop.modal-theme-scope .modal-select-chevron {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin: -4px 3px 0 0;
  border-right: 1.5px solid #737373;
  border-bottom: 1.5px solid #737373;
  transform: rotate(45deg);
}

body > .modal-backdrop.modal-theme-scope .modal-select-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  display: grid;
  gap: 8px;
  max-height: min(330px, 48dvh);
  border: 1px solid #dedede;
  border-radius: 10px;
  padding: 10px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
}

body > .modal-backdrop.modal-theme-scope .modal-select-popover.hidden {
  display: none;
}

body > .modal-backdrop.modal-theme-scope .modal-select-options {
  display: grid;
  gap: 3px;
  max-height: 245px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

body > .modal-backdrop.modal-theme-scope .modal-select-options::-webkit-scrollbar {
  display: none;
}

body > .modal-backdrop.modal-theme-scope .modal-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  color: #333333;
  background: #ffffff;
  box-shadow: none;
  text-align: left;
}

body > .modal-backdrop.modal-theme-scope .modal-select-option:not(:disabled):hover {
  color: #171717;
  background: #f5f5f5;
  box-shadow: none;
  transform: none;
}

body > .modal-backdrop.modal-theme-scope .modal-select-option.selected {
  color: #171717;
  background: #eeeeee;
}

body > .modal-backdrop.modal-theme-scope .modal-select-option > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body > .modal-backdrop.modal-theme-scope .modal-select-option small {
  color: var(--modal-muted);
  font-size: 12px;
}

body > .modal-backdrop.modal-theme-scope .modal-disclosure {
  margin: 0;
  border: 1px solid var(--modal-border);
  border-radius: 10px;
  background: var(--modal-surface-soft);
}

body > .modal-backdrop.modal-theme-scope .modal-disclosure[open] {
  padding-bottom: 14px;
}

body > .modal-backdrop.modal-theme-scope .modal-disclosure > .wide-label,
body > .modal-backdrop.modal-theme-scope .modal-disclosure > .form-grid {
  margin: 12px 14px 0;
}

body > .modal-backdrop.modal-theme-scope .modal-inline-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--modal-border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--modal-surface-soft);
}

body > .modal-backdrop.modal-theme-scope .modal-inline-action > div:first-child {
  display: grid;
  gap: 3px;
}

body > .modal-backdrop.modal-theme-scope .modal-inline-action small {
  color: var(--modal-muted);
  font-size: 12px;
}

body > .modal-backdrop.modal-theme-scope .speech-library-editor {
  display: grid;
  gap: 18px;
}

body > .modal-backdrop.modal-theme-scope .speech-library-source-row {
  border-color: var(--modal-border);
  border-radius: 9px;
  background: var(--modal-surface-soft);
}

body > .modal-backdrop.modal-theme-scope .account-modal-mode-strip {
  margin: 0;
}

body > .modal-backdrop.modal-theme-scope .account-switch-body {
  gap: 12px;
}

body > .modal-backdrop.modal-theme-scope .account-switch-search {
  margin: 0;
}

body > .modal-backdrop.modal-theme-scope .account-switch-list {
  max-height: min(430px, 54dvh);
}

@media (max-width: 767px) {
  :root {
    --modal-radius: 14px;
    --modal-header-height: 56px;
    --modal-footer-height: 62px;
    --modal-space-x: 16px;
    --modal-space-y: 16px;
  }

  body > .modal-backdrop.modal-theme-scope {
    align-items: start;
    justify-items: center;
    padding: 8px;
  }

  body > .modal-backdrop.modal-theme-scope > .modal-shell {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 16px);
  }

  body > .modal-backdrop.modal-theme-scope > .modal-layout-long {
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
  }

  body > .modal-backdrop.modal-theme-scope > .modal-shell > .modal-head h2,
  body > .modal-backdrop.modal-theme-scope .modal-head h2 {
    font-size: 18px;
  }

  body > .modal-backdrop.modal-theme-scope .modal-close-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    margin-right: -8px;
  }

  body > .modal-backdrop.modal-theme-scope > .modal-shell > .modal-actions,
  body > .modal-backdrop.modal-theme-scope .modal-actions {
    flex-wrap: wrap;
    min-height: var(--modal-footer-height);
    padding-top: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  body > .modal-backdrop.modal-theme-scope .modal-footer-status,
  body > .modal-backdrop.modal-theme-scope .modal-actions > .inline-status,
  body > .modal-backdrop.modal-theme-scope .account-footer-status {
    max-width: none;
    width: 100%;
  }

  body > .modal-backdrop.modal-theme-scope .modal-action-group,
  body > .modal-backdrop.modal-theme-scope .account-footer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-left: 0;
  }

  body > .modal-backdrop.modal-theme-scope .modal-actions > button,
  body > .modal-backdrop.modal-theme-scope .modal-action-group > button,
  body > .modal-backdrop.modal-theme-scope .account-footer-actions > button {
    width: 100%;
    height: 44px;
    min-height: 44px;
  }

  body > .modal-backdrop.modal-theme-scope .modal-actions > button:only-child {
    width: 100%;
  }

  body > .modal-backdrop.modal-theme-scope .modal-switch-grid,
  body > .modal-backdrop.modal-theme-scope .speech-library-candidate-modal .learning-candidate-list {
    grid-template-columns: 1fr;
  }

  body > .modal-backdrop.modal-theme-scope .modal-section-head,
  body > .modal-backdrop.modal-theme-scope .modal-inline-action {
    align-items: stretch;
    flex-direction: column;
  }

  body > .modal-backdrop.modal-theme-scope .modal-section-head button,
  body > .modal-backdrop.modal-theme-scope .modal-inline-action .button-group,
  body > .modal-backdrop.modal-theme-scope .modal-inline-action button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body > .modal-backdrop.modal-theme-scope::before,
  body > .modal-backdrop.modal-theme-scope .modal-close-button,
  body > .modal-backdrop.modal-theme-scope .modal-select-trigger {
    transition: none;
  }
}

/* Final mobile login centering contract */
@media (max-width: 900px) {
  .ops-login-v3.login-shell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 100dvh;
    padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    overflow-y: auto;
  }

  .ops-login-v3 .login-layout {
    flex: 0 0 auto;
    width: min(100%, 420px);
    margin-block: auto;
    margin-inline: auto;
  }

  .ops-login-v3 .password-visibility-toggle {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    transform: translate3d(0, -50%, 0);
  }
}

/* Unified AI reply debugger */
.ai-reply-test-drawer {
  width: min(1180px, 86vw);
}

.reply-test-scope-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fafafa;
}

.reply-test-scope-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.reply-test-scope-copy strong {
  color: #111111;
  font-size: 14px;
}

.reply-test-scope-copy span {
  color: #737373;
  font-size: 12px;
  line-height: 1.45;
}

.reply-test-runtime-bypass {
  flex: 0 0 auto;
  min-height: 36px;
  border: 0;
  padding: 0;
  background: transparent;
}

.reply-test-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 16px;
  align-items: start;
}

.reply-test-config-column,
.reply-test-result-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.reply-test-result-column {
  position: sticky;
  top: 0;
}

.reply-test-config-section,
.reply-test-result-card {
  overflow: hidden;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  color: #333333;
  background: #ffffff;
  box-shadow: none;
}

.reply-test-config-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 10px 14px;
  list-style: none;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.14s ease;
}

.reply-test-config-section > summary::-webkit-details-marker {
  display: none;
}

.reply-test-config-section > summary:hover {
  background: #f7f7f7;
}

.reply-test-config-section[open] > summary {
  border-bottom: 1px solid #eeeeee;
  background: #fafafa;
}

.reply-test-config-section > summary > span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.reply-test-config-section > summary strong {
  color: #111111;
  font-size: 14px;
}

.reply-test-config-section > summary small {
  color: #858585;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.reply-test-section-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}

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

.reply-test-form-grid.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reply-test-form-grid .wide-label,
.reply-test-editor-grid .wide-label {
  grid-column: 1 / -1;
}

.reply-test-inline-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: center;
  gap: 12px;
}

.reply-test-inline-field > span {
  margin: 0;
}

.reply-test-inline-advanced {
  overflow: hidden;
  border: 1px solid #eeeeee;
  border-radius: 10px;
  background: #fafafa;
}

.reply-test-inline-advanced > summary {
  padding: 10px 12px;
  color: #555555;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.reply-test-inline-advanced[open] > summary {
  border-bottom: 1px solid #eeeeee;
}

.reply-test-inline-advanced > .reply-test-form-grid {
  padding: 12px;
}

.reply-test-switch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.reply-test-runtime-switches {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reply-test-switch-grid .switch-label {
  min-height: 42px;
  border: 1px solid #eeeeee;
  border-radius: 10px;
  padding: 0 10px;
  background: #fafafa;
}

.reply-test-source {
  display: grid;
  gap: 6px;
  border-color: #e6e6e6;
  background: #ffffff;
}

.reply-test-source p {
  margin: 0;
  color: #111111;
  font-size: 14px;
  line-height: 1.6;
}

.reply-test-source small {
  color: #858585;
}

.reply-test-result-card {
  padding: 14px;
}

.reply-test-result-primary {
  border-color: #d9d9d9;
  background: #fafafa;
}

.reply-test-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.reply-test-result-head > div {
  display: grid;
  gap: 2px;
}

.reply-test-result-head strong {
  color: #111111;
  font-size: 14px;
}

.reply-test-result-head span:not(.status-chip) {
  color: #737373;
  font-size: 12px;
}

.reply-test-result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.reply-test-result-actions button {
  min-height: 34px;
  padding: 0 12px;
}

.reply-test-trace {
  display: grid;
  gap: 0;
}

.reply-test-trace-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
  border-bottom: 1px solid #eeeeee;
  padding: 9px 0;
}

.reply-test-trace-row:last-child {
  border-bottom: 0;
}

.reply-test-trace-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: #666666;
  background: #f2f2f2;
  font-size: 11px;
  font-weight: 700;
}

.reply-test-trace-row > div {
  display: grid;
  gap: 2px;
}

.reply-test-trace-row strong {
  color: #222222;
  font-size: 13px;
}

.reply-test-trace-row > div span {
  color: #737373;
  font-size: 12px;
  line-height: 1.45;
}

.reply-test-trace-row em {
  border-radius: 999px;
  padding: 2px 7px;
  color: #666666;
  background: #f2f2f2;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.reply-test-trace-row.pass .reply-test-trace-index,
.reply-test-trace-row.pass em {
  color: #146c3a;
  background: #eaf7ef;
}

.reply-test-trace-row.fail .reply-test-trace-index,
.reply-test-trace-row.fail em {
  color: #a31d1d;
  background: #fff0f0;
}

.reply-test-trace-row.skipped .reply-test-trace-index,
.reply-test-trace-row.skipped em {
  color: #7a4a00;
  background: #fff4dd;
}

.reply-test-fixed-rules {
  display: grid;
  gap: 7px;
  border-top: 1px solid #eeeeee;
  padding-top: 12px;
}

.reply-test-fixed-rules span {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: #666666;
  font-size: 12px;
  line-height: 1.45;
}

.reply-test-fixed-rules i {
  color: #111111;
  font-style: normal;
}

.reply-test-result-card.reply-preview-prompt {
  background: #ffffff;
}

.reply-test-result-card.reply-preview-prompt > summary {
  color: #111111;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.reply-test-save-group {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid #eeeeee;
  padding: 10px 0;
}

.reply-test-save-group:last-child {
  border-bottom: 0;
}

.reply-test-save-group strong {
  color: #111111;
}

.reply-test-save-group span {
  color: #666666;
  line-height: 1.5;
}

.reply-test-actions {
  align-items: center;
}

.reply-test-actions > span {
  flex: 1 1 auto;
  min-width: 0;
  color: #737373;
  font-size: 12px;
}

@media (max-width: 1180px) {
  .ai-reply-test-drawer {
    width: min(1040px, 92vw);
  }

  .reply-test-workspace {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .reply-test-form-grid.compact-grid,
  .reply-test-runtime-switches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .ai-reply-test-drawer {
    width: 100vw;
  }

  .reply-test-scope-card {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .reply-test-runtime-bypass {
    justify-content: space-between;
  }

  .reply-test-workspace {
    grid-template-columns: 1fr;
  }

  .reply-test-result-column {
    position: static;
  }

  .reply-test-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reply-test-actions > span {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .reply-test-form-grid,
  .reply-test-form-grid.compact-grid,
  .reply-test-switch-grid,
  .reply-test-runtime-switches {
    grid-template-columns: 1fr;
  }

  .reply-test-inline-field {
    grid-template-columns: 1fr;
  }

  .reply-test-result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .reply-test-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reply-test-result-actions button,
  .reply-test-actions button {
    width: 100%;
  }

  .reply-test-actions #generateReplyTestDraft {
    grid-column: 1 / -1;
  }
}

/* Final mobile login alignment correction */
@media (max-width: 900px) {
  .ops-login-v3.login-shell {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  .ops-login-v3 .login-layout {
    margin: 0;
  }

  .ops-login-v3 .login-panel {
    margin-top: 0;
  }

  .ops-login-v3 .login-form .password-visibility-toggle {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }
}

@media (max-width: 900px) and (max-height: 520px) {
  .ops-login-v3.login-shell {
    align-items: flex-start;
  }
}

/* Automatic redemption workspace */
.redemption-main-stack {
  display: grid;
  gap: 14px;
}

.redemption-task-list,
.redemption-run-list {
  min-width: 0;
}

.redemption-task-row,
.redemption-run-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border-top: 1px solid #ededed;
  padding: 16px 18px;
  background: #ffffff;
  transition: background-color 0.14s ease;
}

.redemption-task-row:first-child,
.redemption-run-row:first-child {
  border-top: 0;
}

.redemption-task-row:hover,
.redemption-run-row:hover {
  background: #fafafa;
}

.redemption-task-main,
.redemption-run-row > div:first-child {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.redemption-task-title,
.redemption-run-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.redemption-task-title > strong,
.redemption-run-head > strong {
  color: #171717;
  font-size: 14px;
  font-weight: 650;
}

.redemption-task-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: #737373;
  font-size: 12px;
  line-height: 1.45;
}

.redemption-task-meta span {
  position: relative;
}

.redemption-task-meta span + span::before {
  position: absolute;
  top: 50%;
  left: -9px;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: #bdbdbd;
  content: "";
  transform: translate(0, -50%);
}

.redemption-task-path {
  width: fit-content;
  max-width: 100%;
  border-radius: 7px;
  padding: 5px 8px;
  overflow: hidden;
  color: #525252;
  background: #f5f5f5;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.redemption-task-result {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.redemption-task-result > span:last-child {
  overflow: hidden;
  color: #737373;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.redemption-task-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 290px;
}

.redemption-task-actions .list-action-button {
  min-height: 32px;
  padding: 0 10px;
}

.redemption-run-row p {
  margin: 0;
  color: #525252;
  font-size: 13px;
  line-height: 1.5;
}

.redemption-dialog-picker {
  display: grid;
  grid-template-columns: 1fr;
}

.redemption-dialog-picker input[type="search"] {
  margin-bottom: 0;
}

.redemption-task-modal-body {
  gap: 18px;
}

.redemption-core-grid {
  gap: 14px;
}

.redemption-field-label,
.redemption-capability-title {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.redemption-field-label .field-help-button,
.redemption-capability-title .field-help-button {
  flex: 0 0 auto;
}

.redemption-weekdays {
  margin-top: 12px;
}

.redemption-switch-grid {
  margin-top: 12px;
}

.redemption-method-layout {
  display: grid;
  gap: 16px;
}

.redemption-method-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.redemption-method-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 22px;
  padding: 0 2px;
}

.redemption-method-group-head > span,
.redemption-method-group-head > small {
  color: #737373;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.redemption-method-group-head > small {
  font-weight: 400;
}

.redemption-capability-list {
  display: grid;
  gap: 10px;
}

.redemption-trigger-options {
  gap: 0;
}

.redemption-trigger-options > .redemption-capability-card {
  position: relative;
  border-radius: 0;
}

.redemption-trigger-options > .redemption-capability-card.is-enabled {
  z-index: 1;
}

.redemption-trigger-options > .redemption-capability-card:first-child {
  border-radius: 10px 10px 0 0;
}

.redemption-trigger-options > .redemption-capability-card:last-child {
  border-radius: 0 0 10px 10px;
}

.redemption-trigger-options > .redemption-capability-card + .redemption-capability-card {
  margin-top: -1px;
}

.redemption-trigger-options > #redemptionScheduleCard > .redemption-nested-capability-list {
  margin-top: 0;
  border-top: 1px solid #ededed;
  padding: 12px 13px 13px;
  background: #fafafa;
}

.redemption-capability-card {
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #ffffff;
}

.redemption-action-card {
  border-color: #d9d9d9;
  background: #fafafa;
}

.redemption-action-card > .redemption-capability-toggle {
  min-height: 58px;
}

.redemption-capability-card.is-enabled,
.redemption-nested-capability.is-enabled {
  border-color: #cfcfcf;
}

.redemption-capability-card.is-enabled > .redemption-capability-toggle,
.redemption-nested-capability.is-enabled > .redemption-capability-toggle {
  background: #fafafa;
}

.redemption-capability-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 18px;
  min-height: 54px;
  padding: 10px 13px;
  transition: background 160ms ease;
}

.redemption-capability-toggle:hover {
  background: #fafafa;
}

.redemption-capability-title {
  align-self: stretch;
  min-height: 32px;
  min-width: 0;
}

.redemption-capability-toggle strong {
  display: block;
  margin: 0;
  color: #262626;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.redemption-capability-toggle .toggle-switch-input {
  align-self: center;
  flex: 0 0 auto;
  margin: 0;
}

.redemption-toggle-control {
  display: flex;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: 0;
  cursor: pointer;
}

.redemption-capability-config {
  border-top: 1px solid #ededed;
  padding: 13px;
  background: #fafafa;
}

.redemption-capability-config.hidden {
  display: none;
}

.redemption-capability-config .form-grid {
  margin: 0;
}

.redemption-capability-config > .wide-label {
  margin: 0;
}

.redemption-capability-config textarea {
  min-height: 92px;
}

.redemption-capability-config .redemption-time-ranges-input {
  min-height: 64px;
}

.redemption-webhook-test-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}

.redemption-webhook-test-row .inline-status {
  min-width: 0;
  margin: 0;
}

.redemption-nested-capability-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  border-top: 1px solid #e6e6e6;
  padding-top: 14px;
}

.redemption-nested-capability {
  overflow: hidden;
  border: 1px solid #e3e3e3;
  border-radius: 9px;
  background: #ffffff;
}

.redemption-nested-capability .redemption-capability-toggle {
  min-height: 58px;
  padding: 10px 12px;
}

.redemption-nested-capability-config {
  border-top: 1px solid #ededed;
  padding: 12px;
  background: #fafafa;
}

.redemption-nested-capability-config.hidden {
  display: none;
}

.redemption-three-column-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.redemption-capability-card.dependency-disabled .redemption-capability-toggle,
.redemption-nested-capability.dependency-disabled .redemption-capability-toggle {
  background: #fafafa;
  cursor: not-allowed;
}

.redemption-capability-card.dependency-disabled .redemption-capability-title,
.redemption-nested-capability.dependency-disabled .redemption-capability-title {
  opacity: 0.58;
}

.redemption-advanced-panel {
  overflow: hidden;
}

body > .modal-backdrop.modal-theme-scope .redemption-advanced-panel,
body > .modal-backdrop.modal-theme-scope .redemption-advanced-panel[open] {
  padding-bottom: 0;
}

body > .modal-backdrop.modal-theme-scope .redemption-advanced-panel > summary {
  min-height: 48px;
  margin: 0;
  padding: 0 14px;
  color: #404040;
  font-size: 14px;
  font-weight: 600;
}

body > .modal-backdrop.modal-theme-scope .redemption-advanced-panel > summary::after {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #737373;
  border-bottom: 1.5px solid #737373;
  content: "";
  transform: rotate(45deg) translate(-2px, 2px);
  transition: transform 140ms ease;
}

body > .modal-backdrop.modal-theme-scope .redemption-advanced-panel[open] > summary {
  border-bottom: 1px solid var(--modal-border);
}

body > .modal-backdrop.modal-theme-scope .redemption-advanced-panel[open] > summary::after {
  transform: rotate(225deg) translate(-2px, 2px);
}

.redemption-advanced-body {
  display: grid;
  gap: 18px;
  padding: 14px;
  background: #ffffff;
}

.redemption-advanced-group {
  display: grid;
  gap: 12px;
  border-bottom: 1px solid #ededed;
  padding-bottom: 18px;
}

.redemption-advanced-group:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.redemption-draft-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fafafa;
}

.redemption-draft-summary.is-ready {
  border-color: #d4d4d4;
  background: #ffffff;
}

.redemption-draft-summary-label {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  color: #737373;
  font-size: 12px;
  white-space: nowrap;
}

.redemption-draft-summary-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.redemption-draft-summary-main > strong {
  overflow: hidden;
  color: #262626;
  font-size: 13px;
  font-weight: 600;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.redemption-draft-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.redemption-draft-summary-chips > span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 0 7px;
  color: #525252;
  background: #ffffff;
  font-size: 11px;
  line-height: 1;
}

.redemption-draft-summary-chips > span.warning {
  border-color: #f0d5a8;
  color: #8a5a10;
  background: #fffaf0;
}

.redemption-result-summary {
  display: grid;
  gap: 10px;
  border: 1px solid #e7e7e7;
  border-radius: 12px;
  padding: 14px;
  background: #fafafa;
}

.redemption-result-summary > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.redemption-result-summary span:first-child {
  color: #737373;
  font-size: 12px;
}

.redemption-result-summary strong,
.redemption-result-summary p {
  margin: 0;
  min-width: 0;
  color: #262626;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.redemption-run-inventory {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  margin-top: 7px;
  color: #525252;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.redemption-run-inventory > span {
  color: #737373;
  white-space: nowrap;
}

.redemption-result-summary .redemption-inventory-value {
  min-width: 0;
  margin: 0;
  color: #262626;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.redemption-detected-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.ops-console-v3 .redemption-detected-button {
  display: grid;
  justify-items: start;
  gap: 3px;
  min-height: 54px;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  padding: 9px 11px;
  color: #262626;
  background: #ffffff;
  box-shadow: none;
  text-align: left;
}

.ops-console-v3 .redemption-detected-button:not(:disabled):hover {
  border-color: #bdbdbd;
  color: #171717;
  background: #f7f7f7;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .redemption-detected-button.selected,
.ops-console-v3 .redemption-detected-button.selected:not(:disabled):hover {
  border-color: #171717;
  color: #171717;
  background: #f2f2f2;
  box-shadow: 0 0 0 1px #171717 inset;
}

.redemption-detected-button span {
  font-size: 13px;
  font-weight: 600;
}

.redemption-detected-button small {
  color: #858585;
  font-size: 11px;
  font-weight: 400;
}

.ops-console-v3 .redemption-detected-button:disabled {
  opacity: 0.56;
  color: #737373;
  background: #fafafa;
  cursor: not-allowed;
}

.auction-enable-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 62px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 11px 13px;
  background: #ffffff;
}

.auction-enable-row.enabled {
  border-color: #bdbdbd;
  background: #fafafa;
}

.auction-enable-row > .auction-enable-copy {
  display: flex;
  align-self: stretch;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}

.auction-enable-row strong {
  display: block;
  margin: 0;
  color: #262626;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.auction-enable-row small {
  display: block;
  margin: 0;
  color: #737373;
  font-size: 12px;
  line-height: 1.45;
}

.auction-enable-row > .toggle-switch-input {
  align-self: center;
  margin: 0;
}

body > .modal-backdrop.modal-theme-scope .auction-task-modal .form-grid > label > span:first-child {
  display: flex;
  align-items: center;
  min-height: 24px;
}

body > .modal-backdrop.modal-theme-scope .auction-datetime-input {
  display: block;
  height: 40px;
  min-height: 40px;
  padding: 0 12px;
  color-scheme: light;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
}

body > .modal-backdrop.modal-theme-scope .auction-datetime-input::-webkit-datetime-edit {
  min-width: 0;
  padding: 0;
  line-height: normal;
}

body > .modal-backdrop.modal-theme-scope .auction-datetime-input::-webkit-calendar-picker-indicator {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  opacity: 0.62;
  cursor: pointer;
}

.auction-command-control,
.redemption-command-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.auction-command-control > button,
.redemption-command-control > button {
  min-width: 110px;
}

.redemption-inspection-status {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid #e5e5e5;
  border-radius: 9px;
  padding: 10px 12px;
  color: #525252;
  background: #fafafa;
  font-size: 12px;
}

.redemption-inspection-status.hidden {
  display: none;
}

.redemption-inspection-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #ffffff;
  background: #262626;
  font-size: 12px;
  font-weight: 700;
}

.redemption-inspection-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.redemption-inspection-copy strong {
  color: #171717;
  font-size: 13px;
}

.redemption-inspection-copy small {
  overflow: hidden;
  color: #737373;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.redemption-product-candidate-panel {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  border-top: 1px solid #ededed;
  padding-top: 14px;
}

.redemption-product-candidate-panel.hidden {
  display: none;
}

.redemption-product-candidate-head {
  margin: 0;
}

.redemption-product-candidates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 236px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1px;
}

.ops-console-v3 .redemption-product-candidate {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid #e3e3e3;
  border-radius: 9px;
  padding: 9px 11px;
  color: #262626;
  background: #ffffff;
  box-shadow: none;
  text-align: left;
}

.ops-console-v3 .redemption-product-candidate:hover {
  border-color: #a3a3a3;
  color: #171717;
  background: #fafafa;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .redemption-product-candidate.selected,
.ops-console-v3 .redemption-product-candidate.selected:hover {
  border-color: #171717;
  color: #171717;
  background: #f7f7f7;
  box-shadow: 0 0 0 1px #171717 inset;
}

.redemption-product-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1.5px solid #a3a3a3;
  border-radius: 50%;
  background: #ffffff;
}

.redemption-product-candidate.selected .redemption-product-select {
  border: 5px solid #171717;
}

.redemption-product-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.redemption-product-candidate strong,
.redemption-product-candidate small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.redemption-product-candidate strong {
  font-size: 13px;
}

.redemption-product-candidate small,
.redemption-product-candidate-meta {
  color: #737373;
  font-size: 11px;
}

.redemption-product-candidate-meta {
  grid-column: 2;
  line-height: 1.4;
}

.auction-product-section {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  border-top: 1px solid #ededed;
  padding-top: 14px;
}

.auction-product-options {
  display: grid;
  gap: 8px;
}

.ops-console-v3 .auction-product-card {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  border: 1px solid #e3e3e3;
  border-radius: 9px;
  padding: 10px 12px;
  color: #262626;
  background: #ffffff;
  box-shadow: none;
  text-align: left;
  transform: none;
}

.ops-console-v3 .auction-product-card:hover {
  border-color: #bdbdbd;
  color: #171717;
  background: #fafafa;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .auction-product-card.is-self-leading:not(.selected) {
  border-color: #bbdcc7;
  background: #f8fcf9;
}

.ops-console-v3 .auction-product-card.selected,
.ops-console-v3 .auction-product-card.selected:hover {
  border-color: #171717;
  color: #171717;
  background: #f7f7f7;
  box-shadow: 0 0 0 1px #171717 inset;
}

.auction-product-select {
  position: relative;
  width: 16px;
  height: 16px;
  border: 1.5px solid #a3a3a3;
  border-radius: 50%;
  background: #ffffff;
}

.auction-product-card.selected .auction-product-select {
  border-color: #171717;
}

.auction-product-card.selected .auction-product-select::after {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #171717;
  content: "";
}

.auction-product-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.auction-product-copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auction-product-copy small {
  color: #737373;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
}

.auction-product-self-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 5px;
  border: 1px solid #bbdcc7;
  border-radius: 999px;
  padding: 0 7px;
  color: #216e3a;
  background: #eef9f1;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  vertical-align: middle;
}

.auction-event-list {
  display: grid;
  margin-top: 10px;
  border: 1px solid #e7e7e7;
  border-radius: 10px;
  overflow: hidden;
}

.auction-event-row {
  display: grid;
  gap: 4px;
  border-top: 1px solid #ededed;
  padding: 10px 12px;
  background: #ffffff;
}

.auction-event-row:first-child {
  border-top: 0;
}

.auction-event-row > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auction-event-row strong {
  color: #262626;
  font-size: 13px;
  font-weight: 550;
}

.auction-event-row small {
  color: #858585;
  font-size: 11px;
}

@media (max-width: 900px) {
  .redemption-task-row,
  .redemption-run-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 14px;
    padding: 15px 16px;
  }

  .redemption-task-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .redemption-task-actions .list-action-button,
  .redemption-run-row > .list-action-button {
    width: 100%;
    min-height: 40px;
  }
}

@media (max-width: 560px) {
  .redemption-three-column-grid {
    grid-template-columns: 1fr;
  }

  .redemption-capability-toggle {
    min-height: 66px;
    padding: 11px 12px;
  }

  .redemption-capability-config {
    padding: 12px;
  }

  .redemption-webhook-test-row {
    align-items: stretch;
    flex-direction: column;
  }

  .redemption-nested-capability-list {
    margin-top: 12px;
    padding-top: 12px;
  }

  .redemption-task-meta {
    display: grid;
    gap: 4px;
  }

  .redemption-task-meta span + span::before {
    display: none;
  }

  .redemption-task-path,
  .redemption-task-result > span:last-child {
    white-space: normal;
  }

  .redemption-detected-buttons {
    grid-template-columns: 1fr;
  }

  .redemption-result-summary > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .auction-command-control,
  .redemption-command-control {
    grid-template-columns: 1fr;
  }

  .auction-command-control > button,
  .redemption-command-control > button {
    width: 100%;
  }

  .redemption-draft-summary {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .redemption-draft-summary-main > strong {
    white-space: normal;
  }

  .redemption-product-candidates {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .redemption-product-candidate {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .redemption-product-candidate-meta {
    grid-column: 2;
  }

  .auction-product-copy strong {
    white-space: normal;
  }
}

/* Searchable single-select fields used by modal entity pickers. */
.entity-picker-field,
.searchable-entity-picker {
  min-width: 0;
  width: 100%;
}

.searchable-entity-picker {
  position: relative;
}

.searchable-entity-input-shell {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.ops-console-v3 .searchable-entity-input-shell input[type="search"] {
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 0 40px 0 12px;
  border-color: #d9d9d9;
  border-radius: 8px;
  color: #262626;
  background: #ffffff;
  line-height: normal;
}

.ops-console-v3 .searchable-entity-input-shell input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

.ops-console-v3 .searchable-entity-input-shell input[type="search"]:hover {
  border-color: #bfbfbf;
}

.ops-console-v3 .searchable-entity-input-shell input[type="search"]:focus {
  border-color: #8c8c8c;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}

.ops-console-v3 .searchable-entity-input-shell input[type="search"].has-selection {
  color: #171717;
  font-weight: 500;
}

.searchable-entity-chevron {
  position: absolute;
  top: 0;
  right: 15px;
  bottom: 0;
  width: 7px;
  height: 7px;
  margin-block: auto;
  border-right: 1.5px solid #737373;
  border-bottom: 1.5px solid #737373;
  pointer-events: none;
  transform: rotate(45deg);
  transform-origin: center;
  transition: transform 160ms ease;
}

.searchable-entity-picker.open .searchable-entity-chevron {
  transform: rotate(225deg);
}

body > .searchable-entity-menu,
body > .modal-backdrop > .searchable-entity-menu {
  position: fixed;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 2px;
  max-height: min(320px, 42dvh);
  margin: 0;
  border: 1px solid #dedede;
  border-radius: 10px;
  padding: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  color: #262626;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14);
  scrollbar-color: #cfcfcf transparent;
  scrollbar-width: thin;
}

body > .searchable-entity-menu::-webkit-scrollbar,
body > .modal-backdrop > .searchable-entity-menu::-webkit-scrollbar {
  width: 6px;
}

body > .searchable-entity-menu::-webkit-scrollbar-thumb,
body > .modal-backdrop > .searchable-entity-menu::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cfcfcf;
}

body > .searchable-entity-menu.hidden,
body > .modal-backdrop > .searchable-entity-menu.hidden {
  display: none;
}

body > .searchable-entity-menu .searchable-entity-option,
body > .modal-backdrop > .searchable-entity-menu .searchable-entity-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  color: #333333;
  background: #ffffff;
  box-shadow: none;
  cursor: pointer;
  text-align: left;
  transform: none;
}

body > .searchable-entity-menu .searchable-entity-option:hover,
body > .searchable-entity-menu .searchable-entity-option.active:not(.selected),
body > .modal-backdrop > .searchable-entity-menu .searchable-entity-option:hover,
body > .modal-backdrop > .searchable-entity-menu .searchable-entity-option.active:not(.selected) {
  color: #171717;
  background: #f5f5f5;
  box-shadow: none;
  transform: none;
}

body > .searchable-entity-menu .searchable-entity-option.selected,
body > .searchable-entity-menu .searchable-entity-option.selected:hover,
body > .modal-backdrop > .searchable-entity-menu .searchable-entity-option.selected,
body > .modal-backdrop > .searchable-entity-menu .searchable-entity-option.selected:hover {
  color: #171717;
  background: #eeeeee;
}

body > .searchable-entity-menu .searchable-entity-option:focus-visible,
body > .modal-backdrop > .searchable-entity-menu .searchable-entity-option:focus-visible {
  outline: 2px solid #8c8c8c;
  outline-offset: -2px;
}

.searchable-entity-option-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.searchable-entity-option-copy strong,
.searchable-entity-option-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.searchable-entity-option-copy strong {
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.searchable-entity-option-copy small {
  color: #737373;
  font-size: 12px;
  line-height: 1.4;
}

.searchable-entity-option-state {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #171717;
  font-size: 14px;
  font-weight: 600;
}

.searchable-entity-empty {
  display: grid;
  min-height: 76px;
  padding: 14px;
  place-items: center;
  color: #858585;
  font-size: 13px;
  text-align: center;
}

/* Multi-select user lists keep a real accessible checkbox. */
body > .modal-backdrop.modal-theme-scope .learning-candidate-card {
  grid-template-columns: 20px minmax(0, 1fr) auto;
  min-height: 56px;
  border-color: #e5e5e5;
  border-radius: 9px;
  padding: 9px 10px;
  background: #ffffff;
  box-shadow: none;
}

body > .modal-backdrop.modal-theme-scope .learning-candidate-card:hover {
  border-color: #c9c9c9;
  background: #f7f7f7;
  box-shadow: none;
}

body > .modal-backdrop.modal-theme-scope .learning-candidate-card.selected {
  border-color: #8c8c8c;
  background: #f2f2f2;
}

body > .modal-backdrop.modal-theme-scope .learning-candidate-card input[type="checkbox"] {
  position: relative;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  border: 1px solid #bfbfbf;
  border-radius: 4px;
  appearance: none;
  background: #ffffff;
  cursor: pointer;
}

body > .modal-backdrop.modal-theme-scope .learning-candidate-card input[type="checkbox"]::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 4px;
  border-bottom: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  content: "";
  opacity: 0;
  transform: rotate(-45deg);
}

body > .modal-backdrop.modal-theme-scope .learning-candidate-card input[type="checkbox"]:checked {
  border-color: #171717;
  background: #171717;
}

body > .modal-backdrop.modal-theme-scope .learning-candidate-card input[type="checkbox"]:checked::after {
  opacity: 1;
}

body > .modal-backdrop.modal-theme-scope .learning-candidate-card input[type="checkbox"]:focus-visible {
  outline: 2px solid #8c8c8c;
  outline-offset: 2px;
}

body > .modal-backdrop.modal-theme-scope .learning-candidate-card input[type="checkbox"]:disabled {
  border-color: #bfbfbf;
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 767px) {
  .ops-console-v3 .searchable-entity-input-shell input[type="search"] {
    min-height: 44px;
    font-size: 16px;
  }

  body > .searchable-entity-menu .searchable-entity-option,
  body > .modal-backdrop > .searchable-entity-menu .searchable-entity-option {
    min-height: 56px;
  }

  body > .modal-backdrop.modal-theme-scope .learning-candidate-card {
    min-height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .searchable-entity-chevron {
    transition: none;
  }
}

/* Unified runtime records and reply debugger refinements */
.ops-console-v3 .runtime-records-panel {
  gap: 12px;
}

.ops-console-v3 .runtime-status-strip {
  display: grid;
  grid-template-columns: auto auto minmax(180px, 1fr) auto;
  flex-wrap: initial;
}

.ops-console-v3 .runtime-status-strip .runtime-status-targets {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .runtime-status-strip .runtime-status-error {
  color: #9b1c1c;
  background: #fff0f0;
}

.ops-console-v3 .runtime-replies-panel {
  display: grid;
  gap: 14px;
}

.ops-console-v3 .runtime-replies-panel.hidden {
  display: none;
}

.ops-console-v3 .runtime-reply-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0;
}

.ops-console-v3 .runtime-reply-head > div {
  display: grid;
  gap: 3px;
}

.ops-console-v3 .runtime-reply-head strong {
  color: var(--zen-text, #171717);
  font-size: 15px;
}

.ops-console-v3 .runtime-reply-head span:not(.status-chip) {
  color: var(--zen-text-2, #737373);
  font-size: 12px;
}

.ops-console-v3 .runtime-reply-filters {
  margin: 0;
  border: 1px solid var(--zen-border, #e6e6e6);
  border-radius: 14px;
  padding: 12px;
  background: #fafafa;
}

.ops-console-v3 .records-inline-loading {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--zen-text-2, #737373);
  font-size: 13px;
}

.ops-console-v3 .compact-empty-guide {
  min-height: 180px;
  justify-content: center;
}

.ops-console-v3 .reply-records-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--zen-border, #e6e6e6);
  padding-top: 12px;
  color: var(--zen-text-2, #737373);
  font-size: 12px;
}

.ops-console-v3 .reply-records-pagination.hidden {
  display: none;
}

.ops-console-v3 .persona-editor-panel {
  grid-template-rows: minmax(220px, 1.25fr) minmax(150px, 0.85fr);
}

.reply-test-pathbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  border-bottom: 1px solid #eeeeee;
  padding: 0 2px 12px;
  scrollbar-width: none;
}

.reply-test-pathbar::-webkit-scrollbar {
  display: none;
}

.reply-test-pathbar span {
  flex: 0 0 auto;
  color: #525252;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.reply-test-pathbar i {
  width: 18px;
  height: 1px;
  flex: 0 0 18px;
  background: #d4d4d4;
}

.reply-test-config-tabs {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  border-bottom: 1px solid #e6e6e6;
  scrollbar-width: none;
}

.reply-test-config-tabs::-webkit-scrollbar {
  display: none;
}

.reply-test-config-tab {
  position: relative;
  min-height: 38px;
  flex: 0 0 auto;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  color: #737373 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px;
  font-weight: 500;
}

.reply-test-config-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: #171717;
  content: "";
  opacity: 0;
}

.reply-test-config-tab:hover {
  color: #333333 !important;
  background: transparent !important;
  transform: none !important;
}

.reply-test-config-tab.active,
.reply-test-config-tab[aria-selected="true"] {
  color: #171717 !important;
  font-weight: 700;
}

.reply-test-config-tab.active::after,
.reply-test-config-tab[aria-selected="true"]::after {
  opacity: 1;
}

.reply-test-config-section.hidden {
  display: none;
}

.reply-test-previous-result {
  display: grid;
  gap: 8px;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 10px;
  background: #ffffff;
}

.reply-test-previous-result.hidden {
  display: none;
}

.reply-test-previous-result > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reply-test-previous-result > div > span {
  color: #737373;
  font-size: 12px;
  font-weight: 600;
}

.reply-test-previous-result p {
  margin: 0;
  color: #333333;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .ops-console-v3 .runtime-status-strip {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .ops-console-v3 .runtime-status-strip .runtime-status-targets {
    white-space: normal;
  }

  .ops-console-v3 .runtime-reply-head {
    align-items: flex-start;
  }

  .reply-test-result-column {
    order: -1;
  }
}

@media (max-width: 640px) {
  .ops-console-v3 .runtime-reply-head,
  .ops-console-v3 .reply-records-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .ops-console-v3 .runtime-mode-tabs {
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .ops-console-v3 .runtime-mode-tab {
    flex: 0 0 auto;
  }

  .ops-console-v3 .reply-records-pagination .button-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reply-test-pathbar {
    margin-inline: -2px;
  }
}

/* AI persona list */
.ops-console-v3 .ai-persona-panel {
  display: grid;
  gap: 16px;
}

.ops-console-v3 .ai-persona-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ops-console-v3 .ai-persona-search-field {
  width: min(360px, 100%);
  margin: 0;
}

.ops-console-v3 .ai-persona-search-field input {
  min-height: 36px;
}

.ops-console-v3 .ai-persona-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.ops-console-v3 .ai-persona-list.list-empty,
.ops-console-v3 .ai-persona-list.is-loading {
  min-height: 220px;
  place-items: center;
}

.ops-console-v3 .ai-persona-list > .page-list-loading {
  width: min(280px, calc(100% - 32px));
  grid-column: 1 / -1;
}

.ops-console-v3 .ai-persona-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 32px 20px;
  color: var(--text-muted);
  text-align: center;
}

.ops-console-v3 .ai-persona-empty strong {
  color: var(--text);
  font-size: 15px;
}

.ops-console-v3 .ai-persona-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(126px, .8fr) minmax(186px, 1.2fr) minmax(116px, .75fr) minmax(104px, .7fr) 62px 112px 214px;
  align-items: center;
  min-height: 64px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
}

.ops-console-v3 .ai-persona-row:last-child {
  border-bottom: 0;
}

.ops-console-v3 .ai-persona-row:not(.ai-persona-head):hover {
  background: var(--surface-subtle);
  color: inherit;
}

.ops-console-v3 .ai-persona-head {
  min-height: 42px;
  color: var(--text-muted);
  background: #fafafa;
  font-size: 12px;
  font-weight: 650;
}

.ops-console-v3 .ai-persona-cell {
  min-width: 0;
  padding: 10px 8px 10px 0;
  font-size: 13px;
}

.ops-console-v3 .ai-persona-name {
  display: grid;
  gap: 3px;
}

.ops-console-v3 .ai-persona-name strong,
.ops-console-v3 .ai-persona-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .ai-persona-name strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 680;
}

.ops-console-v3 .ai-persona-name small,
.ops-console-v3 .ai-persona-sources small,
.ops-console-v3 .ai-persona-muted {
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
}

.ops-console-v3 .ai-persona-sources {
  display: grid;
  gap: 6px;
}

.ops-console-v3 .ai-persona-sources > span {
  display: grid;
  grid-template-columns: 30px auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ops-console-v3 .ai-persona-sources em {
  color: var(--text-muted);
  font-size: 11px;
  font-style: normal;
}

.ops-console-v3 .ai-persona-sources strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.ops-console-v3 .ai-persona-sources small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .ai-persona-usage {
  display: grid;
  gap: 5px;
}

.ops-console-v3 .ai-persona-usage-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.ops-console-v3 .ai-persona-usage small {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
}

.ops-console-v3 .ai-persona-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-right: 0;
}

.ops-console-v3 .ai-persona-edit-action {
  min-height: 32px;
  padding-inline: 12px;
}

.ops-console-v3 .ai-persona-more-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding-inline: 10px;
}

.ops-console-v3 .ai-persona-more-action.has-busy-action {
  color: var(--text-muted);
}

body > .ai-persona-action-popover {
  position: fixed;
  z-index: 10050;
  width: 210px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}

body > .ai-persona-action-popover .ai-persona-action-menu-title {
  overflow: hidden;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body > .ai-persona-action-popover .ai-persona-secondary-actions {
  display: grid;
  gap: 2px;
  padding-top: 4px;
}

body > .ai-persona-action-popover .ai-persona-secondary-actions .list-action-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  padding-inline: 10px;
  color: var(--text);
  background: transparent;
  box-shadow: none;
  text-align: left;
}

body > .ai-persona-action-popover .ai-persona-secondary-actions .list-action-button:not(:disabled):hover {
  border: 0;
  color: var(--text);
  background: var(--surface-subtle);
  box-shadow: none;
  transform: none;
}

body > .ai-persona-action-popover .ai-persona-secondary-actions .list-action-button.danger-text {
  color: var(--danger);
}

body > .ai-persona-action-popover .ai-persona-secondary-actions .list-action-button.danger-text:not(:disabled):hover {
  color: var(--danger-hover);
  background: var(--danger-soft);
}

.ops-console-v3 .ai-persona-modal-panel {
  max-height: calc(100dvh - 40px);
}

.ops-console-v3 .ai-persona-modal-body {
  position: relative;
}

.ops-console-v3 .ai-persona-modal-body > .page-list-loading {
  min-height: 420px;
}

.ops-console-v3 .ai-persona-modal-panel.is-saving .ai-persona-editor-content {
  pointer-events: none;
}

.ops-console-v3 .ai-persona-editor-content {
  display: grid;
  gap: 16px;
}

.ops-console-v3 .ai-persona-basic-grid {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  align-items: start;
}

body > .modal-backdrop.modal-theme-scope .ai-persona-field,
body > .modal-backdrop.modal-theme-scope .ai-persona-default-field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

body > .modal-backdrop.modal-theme-scope .ai-persona-field-label-row,
body > .modal-backdrop.modal-theme-scope .ai-persona-source-title,
body > .modal-backdrop.modal-theme-scope .ai-persona-output-title {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

body > .modal-backdrop.modal-theme-scope .ai-persona-field-label {
  margin: 0;
  color: var(--modal-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

body > .modal-backdrop.modal-theme-scope .ai-persona-default-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
}

body > .modal-backdrop.modal-theme-scope .ai-persona-default-status {
  flex: 0 0 auto;
  border: 1px solid #d9d9d9;
  border-radius: 999px;
  padding: 3px 8px;
  color: #595959;
  background: #fafafa;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

body > .modal-backdrop.modal-theme-scope .ai-persona-checkbox-row {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 9px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  color: #262626;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}

body > .modal-backdrop.modal-theme-scope .ai-persona-checkbox-row:hover {
  color: #000000;
}

body > .modal-backdrop.modal-theme-scope .ai-persona-checkbox-row:has(.ai-persona-checkbox-input:disabled) {
  cursor: default;
}

body > .modal-backdrop.modal-theme-scope .ai-persona-checkbox-row > span {
  display: block;
  min-width: 0;
  margin: 0;
  color: inherit;
  font: inherit;
}

body > .modal-backdrop.modal-theme-scope .ai-persona-checkbox-input {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  border: 1px solid #bfbfbf;
  border-radius: 4px;
  padding: 0;
  appearance: none;
  background: #ffffff;
  cursor: pointer;
}

body > .modal-backdrop.modal-theme-scope .ai-persona-checkbox-input::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 4px;
  border-bottom: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  content: "";
  opacity: 0;
  transform: translate(-50%, -62%) rotate(-45deg);
}

body > .modal-backdrop.modal-theme-scope .ai-persona-checkbox-input:checked {
  border-color: #171717;
  background: #171717;
}

body > .modal-backdrop.modal-theme-scope .ai-persona-checkbox-input:checked::after {
  opacity: 1;
}

body > .modal-backdrop.modal-theme-scope .ai-persona-checkbox-input:focus-visible {
  outline: 2px solid #8c8c8c;
  outline-offset: 2px;
}

body > .modal-backdrop.modal-theme-scope .ai-persona-checkbox-input:disabled {
  opacity: 0.62;
  cursor: default;
}

body > .modal-backdrop.modal-theme-scope .field-help-button {
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  margin-left: 0;
  border-radius: 999px;
}

body > .modal-backdrop.modal-theme-scope .field-help-button::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='7' cy='7' r='5.25' stroke='black' stroke-width='1.25'/%3E%3Cpath d='M7 3.85v4.1M7 10.15h.01' stroke='black' stroke-width='1.35' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='7' cy='7' r='5.25' stroke='black' stroke-width='1.25'/%3E%3Cpath d='M7 3.85v4.1M7 10.15h.01' stroke='black' stroke-width='1.35' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
}

.ops-console-v3 .ai-persona-source-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.ops-console-v3 .ai-persona-source-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 14px;
  background: #ffffff;
}

.ops-console-v3 .ai-persona-source-card-head,
.ops-console-v3 .ai-persona-source-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.ops-console-v3 .ai-persona-source-title strong,
.ops-console-v3 .ai-persona-output-title strong {
  color: #262626;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.ops-console-v3 .ai-persona-source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 6px;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  padding: 0 7px;
  color: #737373;
  background: #fafafa;
  font-size: 11px;
  font-weight: 500;
  vertical-align: middle;
}

.ops-console-v3 .ai-persona-source-badge.recommended {
  border-color: #d8e5dc;
  color: #2f6040;
  background: #f4faf6;
}

.ops-console-v3 .ai-persona-source-manage {
  flex: 0 0 auto;
}

.ops-console-v3 .ai-persona-source-card .searchable-entity-picker,
.ops-console-v3 .ai-persona-source-card .searchable-entity-input-shell {
  width: 100%;
}

.ops-console-v3 .ai-persona-source-card-foot {
  align-self: stretch;
  margin-top: auto;
  min-height: 45px;
  border-top: 1px solid #eeeeee;
  padding-top: 6px;
}

.ops-console-v3 .ai-persona-source-readiness {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 8px;
  padding: 8px 10px;
  color: #595959;
  background: #fafafa;
}

.ops-console-v3 .ai-persona-source-readiness > span {
  min-width: 0;
  font-size: 12px;
  line-height: 1.5;
}

.ops-console-v3 .ai-persona-source-readiness > button {
  flex: 0 0 auto;
  min-height: 32px;
}

.ops-console-v3 .ai-persona-source-status {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--text-muted);
  background: var(--surface-subtle);
  font-size: 12px;
  line-height: 1.55;
}

.ops-console-v3 .ai-persona-source-status.success {
  border-color: #cfe4d4;
  color: #28613a;
  background: #f3f9f4;
}

.ops-console-v3 .ai-persona-source-status.warning {
  border-color: #ead8b0;
  color: #7a5512;
  background: #fffaf0;
}

.ops-console-v3 .ai-persona-schedule-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ops-console-v3 .ai-persona-output-head {
  align-items: center;
  gap: 14px;
}

.ops-console-v3 .ai-persona-output-head .button-group {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ops-console-v3 .ai-persona-output-section textarea {
  width: 100%;
  min-height: 240px;
  resize: vertical;
}

.ops-console-v3 #aiPersonaValidation {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-items: flex-start;
  justify-content: flex-start;
  line-height: 1.5;
  text-align: left;
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ops-console-v3 .ai-persona-optimization {
  display: grid;
  gap: 12px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 14px;
  background: #fafafa;
}

.ops-console-v3 .ai-persona-optimization-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ops-console-v3 .ai-persona-optimization-head > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.ops-console-v3 .ai-persona-optimization-head strong {
  color: #262626;
  font-size: 14px;
  line-height: 1.4;
}

.ops-console-v3 .ai-persona-optimization-head span {
  color: #737373;
  font-size: 12px;
  line-height: 1.5;
}

.ops-console-v3 #aiPersonaOptimizationProgress {
  flex: 0 0 auto;
  color: #404040;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.ops-console-v3 .ai-persona-optimization-track {
  overflow: hidden;
  height: 4px;
  border-radius: 999px;
  background: #e5e5e5;
}

.ops-console-v3 .ai-persona-optimization-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #171717;
  transition: width 240ms ease-out;
}

.ops-console-v3 .ai-persona-optimization-result {
  display: grid;
  gap: 12px;
  border-top: 1px solid #e5e5e5;
  padding-top: 12px;
}

.ops-console-v3 .ai-persona-optimization-summary {
  color: #404040;
  font-size: 13px;
  line-height: 1.6;
}

.ops-console-v3 .ai-persona-optimization-scores {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #ffffff;
}

.ops-console-v3 .ai-persona-optimization-scores > div {
  display: grid;
  place-items: center;
  min-width: 0;
  gap: 3px;
  padding: 9px 6px;
  border-right: 1px solid #eeeeee;
}

.ops-console-v3 .ai-persona-optimization-scores > div:last-child {
  border-right: 0;
}

.ops-console-v3 .ai-persona-optimization-scores span {
  overflow: hidden;
  max-width: 100%;
  color: #737373;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .ai-persona-optimization-scores strong {
  color: #262626;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.ops-console-v3 .ai-persona-optimization-examples {
  display: grid;
  gap: 8px;
}

.ops-console-v3 .ai-persona-optimization-subhead {
  color: #404040;
  font-size: 12px;
  font-weight: 700;
}

.ops-console-v3 .ai-persona-replay-card {
  display: grid;
  gap: 8px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.ops-console-v3 .ai-persona-replay-context {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.ops-console-v3 .ai-persona-replay-context strong {
  color: #404040;
  font-size: 12px;
}

.ops-console-v3 .ai-persona-replay-context span {
  overflow-wrap: anywhere;
  color: #737373;
  font-size: 12px;
  line-height: 1.5;
}

.ops-console-v3 .ai-persona-replay-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ops-console-v3 .ai-persona-replay-comparison > div {
  min-width: 0;
  border-radius: 7px;
  padding: 8px 9px;
  background: #f5f5f5;
}

.ops-console-v3 .ai-persona-replay-comparison > div.is-optimized {
  background: #f1f7f3;
}

.ops-console-v3 .ai-persona-replay-comparison span {
  color: #8c8c8c;
  font-size: 11px;
}

.ops-console-v3 .ai-persona-replay-comparison p {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: #262626;
  font-size: 13px;
  line-height: 1.5;
}

.ops-console-v3 .ai-persona-optimization-warnings {
  border-radius: 8px;
  padding: 10px 11px;
  color: #6b531e;
  background: #fff9eb;
  font-size: 12px;
  line-height: 1.55;
}

.ops-console-v3 .ai-persona-optimization-warnings strong {
  display: block;
  margin-bottom: 4px;
  color: #594310;
}

.ops-console-v3 .ai-persona-optimization-warnings p {
  margin: 2px 0;
}

.ops-console-v3 .ai-persona-optimization-stale {
  color: #8a332d;
  font-weight: 600;
}

.ops-console-v3 .ai-persona-optimization-empty {
  min-height: 64px;
  display: grid;
  place-items: center;
  color: #8c8c8c;
  font-size: 12px;
}

.ops-console-v3 .ai-persona-optimization-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ops-console-v3 .ai-persona-optimization-actions .ai-persona-primary-action {
  border: 1px solid #171717;
  color: #ffffff;
  background: #171717;
}

.ops-console-v3 .ai-persona-optimization-actions .ai-persona-primary-action:not(:disabled):hover {
  border-color: #333333;
  color: #ffffff;
  background: #333333;
}

.ops-console-v3 .ai-persona-review,
.ops-console-v3 .ai-persona-diff {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.ops-console-v3 .ai-persona-review {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.ops-console-v3 .ai-persona-review pre {
  margin: 0;
  color: var(--text);
  font: inherit;
  line-height: 1.65;
  white-space: pre-wrap;
}

.ops-console-v3 .ai-persona-diff > div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
}

.ops-console-v3 .ai-persona-diff > div:last-child {
  border-bottom: 0;
}

.ops-console-v3 .ai-persona-diff span {
  color: var(--text-muted);
  font-weight: 700;
  text-align: center;
}

.ops-console-v3 .ai-persona-diff code {
  overflow-wrap: anywhere;
  color: inherit;
  font: inherit;
  white-space: pre-wrap;
}

.ops-console-v3 .ai-persona-diff-addition {
  background: #f2f8f3;
  color: #285c34;
}

.ops-console-v3 .ai-persona-diff-deletion {
  background: #fff5f4;
  color: #8a332d;
}

.ops-console-v3 .ai-persona-diff-context,
.ops-console-v3 .ai-persona-diff-empty {
  background: #fafafa;
  color: var(--text-muted);
}

.ops-console-v3 .ai-persona-versions-body > .page-list-loading {
  min-height: 320px;
}

.ops-console-v3 .ai-persona-version-list {
  display: grid;
  gap: 10px;
}

.ops-console-v3 .ai-persona-version-list.list-empty {
  min-height: 220px;
  place-items: center;
}

.ops-console-v3 .ai-persona-version-empty {
  color: var(--text-muted);
  font-size: 13px;
}

.ops-console-v3 .ai-persona-version-row {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.ops-console-v3 .ai-persona-version-row.expanded {
  border-color: var(--border-strong);
}

.ops-console-v3 .ai-persona-version-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 12px 14px;
  background: var(--surface);
}

.ops-console-v3 .ai-persona-version-row:not(.expanded) .ai-persona-version-summary:hover {
  background: var(--surface-subtle);
}

.ops-console-v3 .ai-persona-version-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.ops-console-v3 .ai-persona-version-copy > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ops-console-v3 .ai-persona-version-copy strong {
  color: var(--text);
  font-size: 14px;
}

.ops-console-v3 .ai-persona-version-copy small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .ai-persona-version-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 6px;
}

.ops-console-v3 .ai-persona-version-detail,
.ops-console-v3 .ai-persona-version-detail-loading {
  border-top: 1px solid var(--border);
  background: #fafafa;
}

.ops-console-v3 .ai-persona-version-detail {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.ops-console-v3 .ai-persona-version-detail section {
  display: grid;
  gap: 7px;
}

.ops-console-v3 .ai-persona-version-detail strong {
  color: var(--text);
  font-size: 12px;
}

.ops-console-v3 .ai-persona-version-detail pre {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.ops-console-v3 .ai-persona-version-detail-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 96px;
  padding: 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.ops-console-v3 .ai-persona-delete-impact {
  display: grid;
  gap: 8px;
  border: 1px solid #f2c7c2;
  border-radius: 10px;
  padding: 14px;
  color: #8a332d;
  background: #fff7f6;
}

.ops-console-v3 .ai-persona-delete-impact strong {
  color: #6f2823;
  font-size: 14px;
}

.ops-console-v3 .ai-persona-delete-impact span {
  font-size: 13px;
  line-height: 1.6;
}

@media (min-width: 761px) and (max-width: 1180px) {
  .ops-console-v3 .ai-persona-list {
    overflow-x: auto;
  }

  .ops-console-v3 .ai-persona-row {
    min-width: 1080px;
  }
}

@media (max-width: 760px) {
  .ops-console-v3 .ai-persona-modal-panel {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    margin: 8px;
  }

  .ops-console-v3 .ai-persona-basic-grid,
  .ops-console-v3 .ai-persona-source-grid,
  .ops-console-v3 .ai-persona-schedule-grid {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .ai-persona-source-card input,
  .ops-console-v3 .ai-persona-source-card button,
  .ops-console-v3 .ai-persona-schedule-grid input,
  .ops-console-v3 .ai-persona-schedule-grid select,
  .ops-console-v3 .ai-persona-output-head button {
    min-height: 44px;
  }

  body > .modal-backdrop.modal-theme-scope .ai-persona-source-readiness > button {
    min-height: 44px;
  }

  body > .modal-backdrop.modal-theme-scope .field-help-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: -10px;
  }

  .ops-console-v3 .ai-persona-source-card {
    padding: 12px;
  }

  .ops-console-v3 .ai-persona-default-control {
    min-height: 44px;
  }

  body > .modal-backdrop.modal-theme-scope .ai-persona-checkbox-input {
    width: 20px;
    min-width: 20px;
    height: 20px;
    min-height: 20px;
  }

  .ops-console-v3 .ai-persona-output-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ops-console-v3 .ai-persona-output-head .button-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-console-v3 .ai-persona-output-section textarea {
    min-height: 220px;
  }

  .ops-console-v3 .ai-persona-optimization-scores {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ops-console-v3 .ai-persona-optimization-scores > div:nth-child(3) {
    border-right: 0;
  }

  .ops-console-v3 .ai-persona-optimization-scores > div:nth-child(-n + 3) {
    border-bottom: 1px solid #eeeeee;
  }

  .ops-console-v3 .ai-persona-replay-comparison {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .ai-persona-optimization-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-console-v3 .ai-persona-optimization-actions button {
    min-height: 44px;
  }

  .ops-console-v3 .ai-persona-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .ops-console-v3 .ai-persona-search-field {
    width: 100%;
  }

  .ops-console-v3 .ai-persona-toolbar #refreshAiPersonas {
    width: auto;
    min-width: 64px;
    height: 44px;
    min-height: 44px;
    white-space: nowrap;
  }

  .ops-console-v3 .ai-persona-head {
    display: none;
  }

  .ops-console-v3 .ai-persona-row:not(.ai-persona-head) {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 10px 14px;
  }

  .ops-console-v3 .ai-persona-row:not(.ai-persona-head) + .ai-persona-row {
    border-top: 8px solid var(--surface-subtle);
  }

  .ops-console-v3 .ai-persona-cell {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    min-height: 44px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
  }

  .ops-console-v3 .ai-persona-cell::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
  }

  .ops-console-v3 .ai-persona-cell:last-child {
    border-bottom: 0;
  }

  .ops-console-v3 .ai-persona-name,
  .ops-console-v3 .ai-persona-sources {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .ops-console-v3 .ai-persona-name::before,
  .ops-console-v3 .ai-persona-sources::before {
    grid-row: 1 / span 2;
  }

  .ops-console-v3 .ai-persona-sources > span {
    grid-column: 2;
  }

  .ops-console-v3 .ai-persona-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }

  .ops-console-v3 .ai-persona-actions::before {
    margin-right: auto;
  }

  .ops-console-v3 .ai-persona-edit-action,
  .ops-console-v3 .ai-persona-more-action,
  body > .ai-persona-action-popover .ai-persona-secondary-actions .list-action-button,
  .ops-console-v3 .ai-persona-version-actions button {
    min-height: 44px;
  }

  body > .ai-persona-action-popover {
    width: min(240px, calc(100vw - 20px));
  }

  .ops-console-v3 .ai-persona-version-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .ops-console-v3 .ai-persona-version-copy small {
    white-space: normal;
  }

  .ops-console-v3 .ai-persona-version-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Workspace model bindings */
.ops-console-v3 .ai-persona-advanced-model {
  margin: 14px 0 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-subtle);
}

.ops-console-v3 .ai-persona-advanced-model > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 14px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}

.ops-console-v3 .ai-persona-advanced-model > summary::-webkit-details-marker {
  display: none;
}

.ops-console-v3 .ai-persona-advanced-model > summary::after {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg) translate(0, -2px);
  transition: transform .16s ease;
}

.ops-console-v3 .ai-persona-advanced-model[open] > summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.ops-console-v3 .ai-persona-advanced-model-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .9fr);
  align-items: end;
  gap: 12px;
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
}

.ops-console-v3 .ai-persona-advanced-model-body label {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding-top: 12px;
}

.ops-console-v3 .ai-persona-advanced-model-body label > span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.ops-console-v3 #aiPersonaEffectiveModel {
  display: flex;
  align-items: center;
  min-height: 38px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  line-height: 1.4;
}

.policy-effective-model {
  display: flex;
  align-items: center;
  min-height: 36px;
  margin-top: 8px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
  background: var(--surface-subtle);
  font-size: 12px;
  line-height: 1.4;
}

.policy-effective-model.configured {
  border-color: rgba(21, 128, 61, .24);
  color: var(--success);
  background: var(--success-soft);
}

.policy-effective-model.warning {
  border-color: rgba(217, 119, 6, .28);
  color: var(--warning);
  background: var(--warning-soft);
}

.reply-lab-field-grid .enhanced-select,
.reply-lab-field-grid select {
  width: 100%;
  min-width: 0;
}

@media (max-width: 600px) {
  .ops-console-v3 .ai-persona-advanced-model-body {
    grid-template-columns: 1fr;
  }
}

.ops-login-v3 .login-captcha-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 136px;
  align-items: stretch;
  gap: 8px;
}

.ops-login-v3 .login-captcha-field input {
  min-width: 0;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.ops-login-v3 .captcha-image-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f6f8fb;
}

.ops-login-v3 .captcha-image-button:hover,
.ops-login-v3 .captcha-image-button:focus-visible {
  border-color: var(--text);
  background: #f6f8fb;
}

.ops-login-v3 .captcha-image-button img {
  width: 100%;
  height: 44px;
  object-fit: cover;
}

.ops-login-v3 .login-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.ops-login-v3 .login-secondary-link:hover,
.ops-login-v3 .login-secondary-link:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

/* Login submit feedback */
.ops-login-v3 .login-submit-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  gap: 8px;
}

.ops-login-v3 .login-submit-label {
  line-height: 1;
}

.ops-login-v3 .login-submit-spinner {
  box-sizing: border-box;
  display: none;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
}

.ops-login-v3 .login-submit-button.is-loading .login-submit-spinner {
  display: inline-block;
}

.ops-login-v3 .login-submit-button.is-loading:disabled {
  border-color: #000000;
  color: #ffffff;
  background: #000000;
  opacity: 1;
  cursor: wait;
}

@media (prefers-reduced-motion: reduce) {
  .ops-login-v3 .login-submit-spinner {
    animation: none;
  }
}

@media (max-width: 420px) {
  .ops-login-v3 .login-captcha-field {
    grid-template-columns: minmax(0, 1fr) 116px;
  }
}

/* Tenant account and platform pages */
.ops-console-v3 .nav-external {
  display: flex;
  align-items: center;
  min-height: 40px;
  gap: 9px;
  border: 0;
  border-radius: var(--zen-radius-md);
  padding: 0 12px;
  color: var(--zen-text-2);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.ops-console-v3 .nav-external:hover,
.ops-console-v3 .nav-external:focus-visible {
  color: #000000;
  background: var(--zen-hover);
}

.ops-console-v3 .nav-external:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.22);
  outline-offset: 2px;
}

.ops-console-v3.sidebar-collapsed .nav-external {
  justify-content: center;
  padding: 0;
}

.tenant-console-page {
  min-height: 100vh;
  margin: 0;
  color: #333333;
  background: var(--zen-bg);
  font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
}

.tenant-console-page * {
  box-sizing: border-box;
}

.tenant-console-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 20px;
  border-bottom: 1px solid var(--zen-border);
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  background: rgba(255, 255, 255, 0.96);
}

.tenant-console-brand,
.tenant-console-actions,
.tenant-page-title,
.tenant-panel-head,
.tenant-inline-form,
.tenant-check-row,
.tenant-modal-head,
.tenant-modal-actions {
  display: flex;
  align-items: center;
}

.tenant-console-brand {
  gap: 10px;
  color: #000000;
  text-decoration: none;
}

.tenant-console-brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.tenant-console-brand strong {
  font-size: 15px;
}

.tenant-console-actions {
  gap: 16px;
  color: var(--zen-text-3);
  font-size: 13px;
}

.tenant-console-actions a {
  color: #000000;
  font-weight: 600;
  text-decoration: none;
}

.tenant-console-actions a:hover,
.tenant-console-actions a:focus-visible {
  text-decoration: underline;
}

.tenant-console-main {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.tenant-page-title {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.tenant-page-title h1,
.tenant-panel h2 {
  margin: 0;
  color: #000000;
}

.tenant-page-title h1 {
  font-size: 26px;
  line-height: 1.35;
}

.tenant-page-title p {
  margin: 5px 0 0;
  color: var(--zen-text-3);
  font-size: 13px;
}

.tenant-console-page button,
.tenant-console-page input,
.tenant-console-page select,
.tenant-console-page textarea {
  min-height: 40px;
  border-radius: var(--zen-radius-sm);
  font: inherit;
}

.tenant-console-page button {
  border: 1px solid #000000;
  padding: 0 16px;
  color: #ffffff;
  background: #000000;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.tenant-console-page button:not(:disabled):hover {
  border-color: #333333;
  background: #333333;
}

.tenant-console-page button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tenant-console-page button.secondary {
  border-color: transparent;
  color: #000000;
  background: var(--zen-bg);
}

.tenant-console-page button.secondary:not(:disabled):hover {
  border-color: transparent;
  background: var(--zen-active);
}

.tenant-console-page button.compact {
  min-height: 32px;
  padding: 0 11px;
  font-size: 12px;
}

.tenant-console-page button.danger {
  border-color: var(--zen-danger);
  color: var(--zen-danger);
  background: transparent;
}

.tenant-console-page button.danger:not(:disabled):hover {
  border-color: var(--zen-danger);
  color: #ffffff;
  background: var(--zen-danger);
}

.tenant-console-page input,
.tenant-console-page select,
.tenant-console-page textarea {
  width: 100%;
  border: 1px solid var(--zen-control-border);
  padding: 9px 12px;
  color: #333333;
  background: #ffffff;
  outline: 0;
}

.tenant-console-page input:focus,
.tenant-console-page select:focus,
.tenant-console-page textarea:focus {
  border-color: #000000;
}

.tenant-console-page button:focus-visible,
.tenant-console-page a:focus-visible,
.tenant-console-page input:focus-visible,
.tenant-console-page select:focus-visible,
.tenant-console-page textarea:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.22);
  outline-offset: 2px;
}

.tenant-metric-grid,
.tenant-grid-2 {
  display: grid;
  gap: 16px;
}

.tenant-metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.tenant-metric-grid article,
.tenant-panel {
  border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius-lg);
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.tenant-metric-grid article {
  display: grid;
  gap: 7px;
  min-height: 126px;
  align-content: center;
  padding: 20px;
}

.tenant-metric-grid span,
.tenant-metric-grid small,
.tenant-table-wrap small {
  color: var(--zen-text-3);
  font-size: 12px;
}

.tenant-metric-grid strong {
  color: #000000;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}

.tenant-panel {
  min-width: 0;
  margin-bottom: 16px;
  padding: 20px;
}

.tenant-panel-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.tenant-panel h2 {
  font-size: 16px;
}

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

.tenant-inline-form {
  gap: 10px;
}

.tenant-inline-form input {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tenant-form-stack,
.tenant-form-grid {
  display: grid;
  gap: 14px;
}

.tenant-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tenant-form-grid label,
.tenant-form-stack label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.tenant-form-grid label > span,
.tenant-form-stack label > span {
  color: var(--zen-text-2);
  font-size: 12px;
  font-weight: 600;
}

.tenant-form-grid button,
.tenant-form-grid .tenant-form-wide {
  grid-column: 1 / -1;
}

.tenant-check-row {
  justify-content: space-between;
  min-height: 46px;
  gap: 14px;
  border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius-md);
  padding: 0 12px;
}

.tenant-check-row input {
  width: 16px;
  min-height: 16px;
  accent-color: #000000;
}

.tenant-table-wrap {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius-md);
}

.tenant-table-wrap table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.tenant-table-wrap th,
.tenant-table-wrap td {
  border-bottom: 1px solid var(--zen-border);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

.tenant-table-wrap th {
  color: var(--zen-text-3);
  background: var(--zen-bg-stripe);
  font-size: 12px;
  font-weight: 600;
}

.tenant-table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.tenant-table-wrap tbody tr:hover {
  background: var(--zen-hover);
}

.tenant-table-wrap td strong,
.tenant-table-wrap td small {
  display: block;
}

.tenant-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--zen-text-2);
  background: var(--zen-bg);
  font-size: 12px;
  font-weight: 600;
}

.tenant-status.success {
  color: #0b7a39;
  background: var(--zen-success-bg);
}

.tenant-status.warning {
  color: #a85d00;
  background: var(--zen-warning-bg);
}

.tenant-status.danger {
  color: #c43f41;
  background: var(--zen-danger-bg);
}

.tenant-empty {
  display: grid;
  min-height: 160px;
  place-items: center;
  padding: 24px;
  color: var(--zen-text-3);
  text-align: center;
  font-size: 13px;
}

.tenant-code-output {
  min-height: 116px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.tenant-feedback {
  position: fixed;
  right: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 60;
  max-width: min(360px, calc(100vw - 40px));
  border: 1px solid var(--zen-border);
  border-radius: var(--zen-radius-md);
  padding: 11px 14px;
  color: #ffffff;
  background: #000000;
  box-shadow: var(--zen-shadow-lg);
  font-size: 13px;
}

.tenant-feedback:empty {
  display: none;
}

.tenant-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.42);
}

.tenant-modal-backdrop[hidden] {
  display: none;
}

.tenant-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(880px, 100%);
  max-height: min(760px, calc(100dvh - 40px));
  overflow: hidden;
  border-radius: var(--zen-radius-lg);
  background: #ffffff;
  box-shadow: var(--zen-shadow-lg);
}

.tenant-modal-head,
.tenant-modal-actions {
  min-height: 58px;
  gap: 12px;
  padding: 0 20px;
}

.tenant-modal-head {
  justify-content: space-between;
  border-bottom: 1px solid var(--zen-border);
}

.tenant-modal-head h2 {
  margin: 0;
  font-size: 16px;
}

.tenant-modal-close {
  width: 34px;
  min-height: 34px !important;
  padding: 0 !important;
  border-color: transparent !important;
  color: var(--zen-text-2) !important;
  background: transparent !important;
  font-size: 20px !important;
}

.tenant-modal-close:hover {
  color: #000000 !important;
  background: var(--zen-hover) !important;
}

.tenant-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 20px;
}

.tenant-modal-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--zen-border);
}

body.tenant-modal-open {
  overflow: hidden;
}

@media screen and (max-width: 760px) {
  .tenant-console-header {
    min-height: 58px;
    padding: 0 16px;
  }

  .tenant-console-brand strong {
    font-size: 14px;
  }

  .tenant-console-actions span {
    display: none;
  }

  .tenant-console-main {
    width: min(100% - 24px, 1240px);
    padding: 24px 0 40px;
  }

  .tenant-page-title {
    align-items: flex-start;
  }

  .tenant-page-title h1 {
    font-size: 22px;
  }

  .tenant-metric-grid,
  .tenant-grid-2,
  .tenant-form-grid {
    grid-template-columns: 1fr;
  }

  .tenant-panel {
    padding: 16px;
  }

  .tenant-inline-form {
    align-items: stretch;
    flex-direction: column;
  }

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

  .tenant-modal {
    width: 100%;
    max-height: 92dvh;
    border-radius: var(--zen-radius-lg) var(--zen-radius-lg) 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Per-group reply overview */
.ops-console-v3 .reply-group-overview-section {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.ops-console-v3 .reply-group-overview-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ops-console-v3 .reply-group-overview-title strong {
  color: #171717;
  font-size: 14px;
}

.ops-console-v3 .reply-group-overview-title span {
  color: #737373;
  font-size: 12px;
  text-align: right;
}

.ops-console-v3 .reply-group-overview {
  min-width: 0;
}

.ops-console-v3 .reply-group-overview-table {
  overflow: hidden;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #ffffff;
}

.ops-console-v3 .reply-group-overview-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.25fr) minmax(160px, .75fr) minmax(210px, 1fr) 92px;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  border-top: 1px solid #eeeeee;
  padding: 10px 12px;
  color: #333333;
  background: #ffffff;
}

.ops-console-v3 .reply-group-overview-row:not(.reply-group-overview-head):hover {
  background: #fafafa;
}

.ops-console-v3 .reply-group-overview-head {
  min-height: 38px;
  border-top: 0;
  color: #737373;
  background: #fafafa;
  font-size: 12px;
  font-weight: 600;
}

.ops-console-v3 .reply-group-overview-cell {
  min-width: 0;
}

.ops-console-v3 .reply-group-overview-name,
.ops-console-v3 .reply-group-overview-usage,
.ops-console-v3 .reply-group-overview-latest {
  display: grid;
  align-content: center;
  gap: 5px;
}

.ops-console-v3 .reply-group-overview-name strong,
.ops-console-v3 .reply-group-overview-usage strong,
.ops-console-v3 .reply-group-overview-latest strong {
  overflow: hidden;
  color: #171717;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .reply-group-overview-name small,
.ops-console-v3 .reply-group-overview-usage small,
.ops-console-v3 .reply-group-overview-latest small {
  overflow: hidden;
  color: #737373;
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .reply-group-overview-name .status-chip {
  width: fit-content;
}

.ops-console-v3 .reply-group-progress {
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #ededed;
}

.ops-console-v3 .reply-group-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #171717;
}

.ops-console-v3 .reply-group-overview-action {
  display: flex;
  justify-content: flex-end;
}

.ops-console-v3 .reply-group-view-button {
  min-height: 32px;
  border-color: transparent;
  color: #333333;
  background: #f2f2f2;
  box-shadow: none;
  white-space: nowrap;
}

.ops-console-v3 .reply-group-view-button:not(:disabled):hover {
  border-color: transparent;
  color: #000000;
  background: #e6e6e6;
}

.ops-console-v3 .reply-group-overview-empty {
  display: grid;
  min-height: 96px;
  place-items: center;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  color: #737373;
  background: #fafafa;
  font-size: 12px;
}

body > .modal-backdrop.modal-theme-scope > .reply-group-records-modal {
  height: min(720px, calc(100dvh - 48px));
}

body > .modal-backdrop.modal-theme-scope .reply-group-records-modal-body {
  gap: 14px;
}

body > .modal-backdrop.modal-theme-scope .reply-group-records-modal-body > .inline-status {
  min-height: 20px;
  margin: 0;
  border: 0;
  padding: 0;
  color: #737373;
  background: transparent;
  justify-content: flex-start;
  text-align: left;
}

body > .modal-backdrop.modal-theme-scope .reply-group-records-list {
  align-content: start;
  min-height: 180px;
}

body > .modal-backdrop.modal-theme-scope .reply-group-records-actions .button-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

body > .modal-backdrop.modal-theme-scope > .reply-group-records-modal > .reply-group-records-actions {
  flex-direction: row;
}

@media screen and (max-width: 760px) {
  .ops-console-v3 .reply-group-overview-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .ops-console-v3 .reply-group-overview-title span {
    text-align: left;
  }

  .ops-console-v3 .reply-group-overview-head {
    display: none;
  }

  .ops-console-v3 .reply-group-overview-table {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .ops-console-v3 .reply-group-overview-row:not(.reply-group-overview-head) {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 0;
    margin-top: 8px;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 13px;
  }

  .ops-console-v3 .reply-group-overview-row:not(.reply-group-overview-head):first-of-type {
    margin-top: 0;
  }

  .ops-console-v3 .reply-group-overview-cell:not(.reply-group-overview-name):not(.reply-group-overview-action) {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    gap: 4px 10px;
  }

  .ops-console-v3 .reply-group-overview-cell:not(.reply-group-overview-name):not(.reply-group-overview-action)::before {
    grid-row: 1 / span 3;
    color: #737373;
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
  }

  .ops-console-v3 .reply-group-overview-usage > *,
  .ops-console-v3 .reply-group-overview-latest > * {
    grid-column: 2;
  }

  .ops-console-v3 .reply-group-overview-action,
  .ops-console-v3 .reply-group-view-button {
    width: 100%;
  }

  body > .modal-backdrop.modal-theme-scope > .reply-group-records-modal {
    height: calc(100dvh - 16px);
  }

  body > .modal-backdrop.modal-theme-scope .reply-group-records-actions .button-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  body > .modal-backdrop.modal-theme-scope > .reply-group-records-modal > .reply-group-records-actions {
    align-items: stretch;
    flex-direction: column;
  }

  body > .modal-backdrop.modal-theme-scope .reply-group-records-actions .modal-footer-status {
    width: 100%;
    text-align: center;
  }

  body > .modal-backdrop.modal-theme-scope .reply-group-records-actions .button-group button {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
  }
}

/* Platform version marker */
.ops-console-v3 .sidebar form {
  display: grid;
  gap: 7px;
}

.ops-console-v3 .sidebar-version {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  color: #8a8a8a;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.ops-console-v3.sidebar-collapsed .sidebar-version {
  display: none;
}

@media screen and (max-width: 900px) {
  .ops-console-v3.sidebar-collapsed .sidebar-version {
    display: flex;
  }
}

/* Role-aware authorization and platform console */
.ops-console-v3 .nav-group-platform {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.ops-console-v3 .role-console-section.active {
  align-content: start;
  gap: 16px;
}

.ops-console-v3 .role-metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ops-console-v3 .role-metric-grid .metric-card {
  min-width: 0;
}

.ops-console-v3 .role-metric-grid .metric-card strong,
.ops-console-v3 .role-console-table td,
.ops-console-v3 .role-console-pagination {
  font-variant-numeric: tabular-nums;
}

.ops-console-v3 .role-metric-grid .metric-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.ops-console-v3 .role-metric-grid.has-role-error .metric-card {
  opacity: 0.66;
}

.ops-console-v3 .role-metric-inline-error {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 13px;
}

.ops-console-v3 .role-inline-loading {
  grid-column: 1 / -1;
  min-height: 180px;
}

.ops-console-v3 .license-redeem-panel,
.ops-console-v3 .license-record-panel,
.ops-console-v3 .platform-list-panel {
  min-width: 0;
}

.ops-console-v3 .license-redeem-panel .panel-head {
  margin-bottom: 14px;
}

.ops-console-v3 .license-redeem-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.ops-console-v3 .license-redeem-form label,
.ops-console-v3 .license-redeem-form input {
  width: 100%;
  min-width: 0;
}

.ops-console-v3 .license-redeem-form input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ops-console-v3 .license-redeem-form button {
  min-width: 108px;
  white-space: nowrap;
}

.ops-console-v3 .role-console-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: -4px 0 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}

.ops-console-v3 .role-console-tabs::-webkit-scrollbar {
  display: none;
}

.ops-console-v3 .role-console-tabs .tab-button {
  position: relative;
  flex: 0 0 auto;
  min-height: 40px;
  border: 0;
  border-radius: 8px 8px 0 0;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 500;
}

.ops-console-v3 .role-console-tabs .tab-button:not([aria-selected="true"]):not(:disabled):hover,
.ops-console-v3 .role-console-tabs .tab-button:not([aria-selected="true"]):not(:disabled):focus-visible {
  color: var(--text);
  background: var(--surface-subtle);
}

.ops-console-v3 .role-console-tabs .tab-button[aria-selected="true"] {
  color: var(--text);
  background: var(--surface);
  font-weight: 700;
}

.ops-console-v3 .role-console-tabs .tab-button::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.ops-console-v3 .role-console-tabs .tab-button[aria-selected="true"]::after {
  background: var(--text);
}

.ops-console-v3 .role-console-table {
  min-height: 180px;
  overflow: auto;
}

.ops-console-v3 .role-console-table table {
  min-width: 760px;
}

.ops-console-v3 [data-section-panel="platform-users"] .role-console-table table {
  min-width: 1180px;
}

.ops-console-v3 [data-section-panel="platform-audit"] .role-console-table table {
  min-width: 860px;
}

.ops-console-v3 .role-console-table td {
  overflow-wrap: anywhere;
}

.ops-console-v3 .role-console-table td strong,
.ops-console-v3 .role-console-table td small {
  max-width: 280px;
}

.ops-console-v3 .role-console-table td small {
  margin-top: 3px;
  line-height: 1.45;
}

.ops-console-v3 .role-console-table td:last-child,
.ops-console-v3 .role-console-table th:last-child {
  text-align: right;
  white-space: nowrap;
}

.ops-console-v3 .role-console-toolbar {
  display: grid;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
}

.ops-console-v3 .platform-user-toolbar {
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, 160px)) minmax(150px, 180px) auto;
}

.ops-console-v3 .platform-user-heading,
.ops-console-v3 .platform-user-detail-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ops-console-v3 .platform-user-detail-section-head {
  justify-content: space-between;
}

.ops-console-v3 .platform-user-batch-bar {
  display: grid;
  grid-template-columns: minmax(80px, auto) minmax(150px, 190px) auto auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface-subtle);
}

.ops-console-v3 .platform-user-batch-bar strong {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.ops-console-v3 .platform-user-batch-bar label,
.ops-console-v3 .platform-user-batch-bar select,
.ops-console-v3 .platform-user-batch-bar .enhanced-select {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.ops-console-v3 .platform-user-selection-cell {
  width: 48px;
  min-width: 48px;
  padding-right: 8px;
  padding-left: 12px;
  text-align: center;
}

.ops-console-v3 .platform-user-selection-cell input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
}

.ops-console-v3 [data-section-panel="platform-users"] .role-console-table th:first-child,
.ops-console-v3 [data-section-panel="platform-users"] .role-console-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
}

.ops-console-v3 [data-section-panel="platform-users"] .role-console-table th:nth-child(2),
.ops-console-v3 [data-section-panel="platform-users"] .role-console-table td:nth-child(2) {
  position: sticky;
  left: 48px;
  z-index: 2;
  min-width: 190px;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border);
}

.ops-console-v3 [data-section-panel="platform-users"] .role-console-table th:first-child,
.ops-console-v3 [data-section-panel="platform-users"] .role-console-table th:nth-child(2) {
  z-index: 3;
  background: var(--surface-subtle);
}

.ops-console-v3 [data-section-panel="platform-users"] .role-console-table tbody tr:hover td,
.ops-console-v3 [data-section-panel="platform-users"] .role-console-table tbody tr:hover td:first-child,
.ops-console-v3 [data-section-panel="platform-users"] .role-console-table tbody tr:hover td:nth-child(2) {
  background: #f7f8fa;
}

.ops-console-v3 [data-section-panel="platform-users"] .role-console-table tbody tr.is-selected td,
.ops-console-v3 [data-section-panel="platform-users"] .role-console-table tbody tr.is-selected:hover td,
.ops-console-v3 [data-section-panel="platform-users"] .role-console-table tbody tr.is-selected td:first-child,
.ops-console-v3 [data-section-panel="platform-users"] .role-console-table tbody tr.is-selected td:nth-child(2) {
  background: #eef6f3;
}

.ops-console-v3 .platform-user-status-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.ops-console-v3 .platform-user-detail-content {
  display: grid;
  gap: 16px;
}

.ops-console-v3 .platform-user-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ops-console-v3 .platform-user-summary-grid article {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px;
  background: var(--surface-subtle);
}

.ops-console-v3 .platform-user-summary-grid span,
.ops-console-v3 .platform-user-summary-grid small {
  color: var(--muted);
  font-size: 12px;
}

.ops-console-v3 .platform-user-summary-grid strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.ops-console-v3 .platform-user-detail-section {
  display: grid;
  gap: 9px;
}

.ops-console-v3 .platform-user-detail-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.ops-console-v3 .platform-user-detail-section-head .small-button {
  min-height: 32px;
}

.ops-console-v3 .platform-user-metadata {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.ops-console-v3 .platform-user-metadata > div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.ops-console-v3 .platform-user-metadata > div:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.ops-console-v3 .platform-user-metadata > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.ops-console-v3 .platform-user-metadata span {
  color: var(--muted);
  font-size: 12px;
}

.ops-console-v3 .platform-user-metadata strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.ops-console-v3 .platform-user-account-list,
.ops-console-v3 .platform-user-audit-list,
.ops-console-v3 .platform-user-security-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.ops-console-v3 .platform-user-account-list article,
.ops-console-v3 .platform-user-audit-list article,
.ops-console-v3 .platform-user-security-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}

.ops-console-v3 .platform-user-account-list article:last-child,
.ops-console-v3 .platform-user-audit-list article:last-child,
.ops-console-v3 .platform-user-security-list article:last-child {
  border-bottom: 0;
}

.ops-console-v3 .platform-user-account-list article > div,
.ops-console-v3 .platform-user-audit-list article > div,
.ops-console-v3 .platform-user-security-list article > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.ops-console-v3 .platform-user-account-list small,
.ops-console-v3 .platform-user-audit-list small,
.ops-console-v3 .platform-user-audit-list span,
.ops-console-v3 .platform-user-audit-list time,
.ops-console-v3 .platform-user-security-list small {
  color: var(--muted);
  font-size: 12px;
}

.ops-console-v3 .platform-user-audit-list article > div:last-child {
  justify-items: end;
  text-align: right;
}

.ops-console-v3 .platform-user-security-list article > div:last-child {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-direction: column;
  text-align: right;
}

.ops-console-v3 .platform-user-security-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--muted);
  background: var(--surface-subtle);
  font-size: 12px;
}

.ops-console-v3 .platform-user-security-summary strong {
  margin-left: 3px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.ops-console-v3 .platform-user-detail-empty {
  padding: 20px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.ops-console-v3 .platform-user-disable-form {
  gap: 12px;
}

.ops-console-v3 .platform-user-modal-form {
  grid-template-columns: 1fr;
  gap: 12px;
}

.ops-console-v3 .platform-user-password-reset-intro {
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}

.ops-console-v3 .platform-user-password-result {
  display: grid;
  gap: 12px;
}

.ops-console-v3 .platform-user-password-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.ops-console-v3 .platform-user-password-copy-row input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.password-required-panel .password-required-logout {
  margin-top: 10px;
}

.password-required-panel .password-required-logout button {
  width: 100%;
}

.ops-console-v3 .platform-audit-toolbar {
  grid-template-columns: minmax(180px, 1fr) minmax(110px, 130px) minmax(120px, 150px) minmax(145px, 170px) minmax(145px, 170px) auto auto;
}

.ops-console-v3 .role-console-toolbar label,
.ops-console-v3 .role-console-toolbar input,
.ops-console-v3 .role-console-toolbar select,
.ops-console-v3 .role-console-toolbar .enhanced-select,
.ops-console-v3 .role-console-toolbar .custom-date-picker {
  width: 100%;
  min-width: 0;
}

.ops-console-v3 .role-console-toolbar > button {
  min-width: 64px;
  white-space: nowrap;
}

.ops-console-v3 .role-console-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 40px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.ops-console-v3 .role-console-pagination span {
  min-width: 88px;
  text-align: center;
}

.ops-console-v3 .role-empty-state,
.ops-console-v3 .role-error-state {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  min-height: 178px;
  padding: 28px 20px;
  color: var(--muted);
  text-align: center;
}

.ops-console-v3 .role-empty-state strong,
.ops-console-v3 .role-error-state strong {
  color: var(--text);
  font-size: 15px;
}

.ops-console-v3 .role-empty-state span,
.ops-console-v3 .role-error-state span {
  max-width: 520px;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.ops-console-v3 .role-empty-state button,
.ops-console-v3 .role-error-state button {
  margin-top: 6px;
}

.ops-console-v3 .role-error-state {
  color: var(--danger);
  background: rgba(255, 235, 233, 0.42);
}

.ops-console-v3 .platform-overview-alerts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ops-console-v3 .platform-overview-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  background: var(--surface-subtle);
}

.ops-console-v3 .platform-overview-alert-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.ops-console-v3 .platform-overview-alert.success .platform-overview-alert-dot {
  background: var(--success);
}

.ops-console-v3 .platform-overview-alert.warning .platform-overview-alert-dot {
  background: var(--warning);
}

.ops-console-v3 .platform-overview-alert > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ops-console-v3 .platform-overview-alert strong {
  color: var(--text);
  font-size: 13px;
}

.ops-console-v3 .platform-overview-alert span:last-child {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.ops-console-v3 .role-section-state {
  min-height: 240px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.ops-console-v3 .platform-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.ops-console-v3 .platform-settings-panel {
  display: flex;
  min-width: 0;
  min-height: 330px;
  flex-direction: column;
}

.ops-console-v3 .platform-settings-panel .panel-head {
  margin-bottom: 8px;
}

.ops-console-v3 .platform-runtime-config-panel {
  grid-column: 1 / -1;
  min-height: 0;
}

.ops-console-v3 .platform-runtime-config-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ops-console-v3 .platform-runtime-config-item {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 12px 18px 4px 0;
}

.ops-console-v3 .platform-runtime-config-item + .platform-runtime-config-item {
  border-left: 1px solid var(--border);
  padding-right: 0;
  padding-left: 18px;
}

.ops-console-v3 .platform-runtime-config-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
}

.ops-console-v3 .platform-runtime-config-head strong {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
}

.ops-console-v3 .platform-runtime-config-item code {
  display: block;
  min-width: 0;
  border-radius: 4px;
  padding: 7px 9px;
  color: var(--text);
  background: var(--surface-subtle, #f7f7f7);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.ops-console-v3 .platform-runtime-config-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ops-console-v3 .platform-setting-list {
  display: grid;
}

.ops-console-v3 .platform-setting-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 78px;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  cursor: pointer;
}

.ops-console-v3 .platform-setting-switch:last-child {
  border-bottom: 0;
}

.ops-console-v3 .platform-setting-switch > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ops-console-v3 .platform-setting-switch strong {
  color: var(--text);
  font-size: 13px;
}

.ops-console-v3 .platform-setting-switch small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ops-console-v3 .platform-setting-switch .toggle-switch-input {
  flex: 0 0 auto;
  margin: 0;
}

.ops-console-v3 .platform-settings-form-grid {
  grid-template-columns: 1fr;
}

.ops-console-v3 .platform-settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.ops-console-v3 .platform-settings-actions button {
  min-width: 88px;
}

.ops-console-v3 .cdkey-generated-output {
  width: 100%;
  min-height: 240px;
  margin-top: 12px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
}

.ops-console-v3 .modal-confirm-copy {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

@media screen and (max-width: 1180px) {
  .ops-console-v3 .platform-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-console-v3 .platform-user-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ops-console-v3 .platform-user-toolbar > button {
    justify-self: end;
  }

  .ops-console-v3 .platform-audit-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media screen and (max-width: 900px) {
  .ops-console-v3 .role-metric-grid,
  .ops-console-v3 .platform-overview-alerts,
  .ops-console-v3 .platform-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-console-v3 .platform-user-toolbar,
  .ops-console-v3 .platform-user-batch-bar,
  .ops-console-v3 .platform-audit-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-console-v3 .platform-user-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-console-v3 .platform-user-toolbar > button,
  .ops-console-v3 .platform-audit-toolbar > button {
    justify-self: stretch;
    min-height: 44px;
  }
}

@media screen and (max-width: 640px) {
  .ops-console-v3 .role-metric-grid,
  .ops-console-v3 .platform-overview-alerts,
  .ops-console-v3 .platform-settings-grid,
  .ops-console-v3 .platform-user-toolbar,
  .ops-console-v3 .platform-user-batch-bar,
  .ops-console-v3 .platform-audit-toolbar,
  .ops-console-v3 .license-redeem-form {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .role-metric-grid .metric-card {
    min-height: 96px;
  }

  .ops-console-v3 .role-metric-inline-error {
    align-items: stretch;
    flex-direction: column;
  }

  .ops-console-v3 .license-redeem-form button,
  .ops-console-v3 .role-console-toolbar > button {
    width: 100%;
    min-height: 44px;
  }

  .ops-console-v3 .role-console-pagination {
    justify-content: space-between;
  }

  .ops-console-v3 .role-console-pagination button {
    min-height: 40px;
  }

  .ops-console-v3 .platform-settings-panel {
    min-height: 0;
  }

  .ops-console-v3 .platform-runtime-config-list {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .platform-runtime-config-item {
    padding: 10px 0 14px;
  }

  .ops-console-v3 .platform-runtime-config-item + .platform-runtime-config-item {
    border-top: 1px solid var(--border);
    border-left: 0;
    padding: 14px 0 4px;
  }

  .ops-console-v3 .platform-user-summary-grid,
  .ops-console-v3 .platform-user-metadata {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .platform-user-metadata > div,
  .ops-console-v3 .platform-user-metadata > div:nth-child(odd),
  .ops-console-v3 .platform-user-metadata > div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .ops-console-v3 .platform-user-metadata > div:last-child {
    border-bottom: 0;
  }

  .ops-console-v3 .platform-user-account-list article,
  .ops-console-v3 .platform-user-audit-list article,
  .ops-console-v3 .platform-user-security-list article {
    align-items: flex-start;
  }

  .ops-console-v3 .platform-user-batch-bar button {
    width: 100%;
    min-height: 44px;
  }

  .ops-console-v3 .platform-user-detail-panel .modal-actions,
  .ops-console-v3 .platform-user-detail-panel .modal-action-group {
    flex-wrap: wrap;
  }

  .ops-console-v3 .platform-user-detail-panel .modal-actions button {
    min-height: 44px;
  }

  .ops-console-v3 .platform-user-password-copy-row {
    grid-template-columns: 1fr;
  }

  .ops-console-v3 .platform-user-password-copy-row button {
    width: 100%;
    min-height: 44px;
  }

  .ops-console-v3 .role-empty-state,
  .ops-console-v3 .role-error-state {
    min-height: 160px;
    padding: 24px 16px;
  }
}

/* Reply profiles */
.ops-console-v3 [data-section-panel="reply-positioning"] {
  gap: 24px;
}

.ops-console-v3 [data-section-panel="expression-learning"] {
  gap: 24px;
}

.ops-console-v3 .reply-profile-panel {
  min-width: 0;
}

.ops-console-v3 .reply-profile-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 14px 0 16px;
}

.ops-console-v3 .reply-profile-search-field {
  margin: 0;
}

.ops-console-v3 .reply-profile-summary {
  min-width: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}

.ops-console-v3 .reply-profile-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.ops-console-v3 .reply-profile-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.ops-console-v3 .reply-profile-pagination.hidden {
  display: none;
}

.ops-console-v3 .reply-profile-pagination-meta,
.ops-console-v3 .reply-profile-page-size {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ops-console-v3 .reply-profile-page-size {
  margin: 0;
  white-space: nowrap;
}

.ops-console-v3 .reply-profile-page-size .enhanced-select,
.ops-console-v3 .reply-profile-page-size select {
  width: 92px;
  min-width: 92px;
}

.ops-console-v3 .reply-profile-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.45fr) minmax(150px, .9fr) minmax(120px, .65fr) minmax(170px, 1fr) minmax(90px, .5fr) minmax(230px, auto);
  align-items: center;
  min-height: 76px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: background-color 120ms ease;
}

.ops-console-v3 .reply-profile-row:last-child {
  border-bottom: 0;
}

.ops-console-v3 .reply-profile-row:not(.reply-profile-head):hover {
  background: #f7f8fa;
}

.ops-console-v3 .reply-profile-row.is-default {
  box-shadow: inset 3px 0 0 var(--accent);
}

.ops-console-v3 .reply-profile-head {
  min-height: 42px;
  background: #fafafa;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.ops-console-v3 .reply-profile-head > span,
.ops-console-v3 .reply-profile-cell {
  min-width: 0;
  padding: 12px 14px;
}

.ops-console-v3 .reply-profile-cell {
  display: grid;
  align-content: center;
  gap: 4px;
}

.ops-console-v3 .reply-profile-cell strong,
.ops-console-v3 .reply-profile-cell small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-console-v3 .reply-profile-cell strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.ops-console-v3 .reply-profile-cell small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
}

.ops-console-v3 .reply-profile-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ops-console-v3 .reply-profile-name-line > strong {
  flex: 0 1 auto;
}

.ops-console-v3 .reply-profile-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.ops-console-v3 .reply-profile-actions > button:first-child {
  min-width: 68px;
}

.ops-console-v3 .reply-profile-empty {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 220px;
  padding: 36px 18px;
  text-align: center;
}

.ops-console-v3 .reply-profile-empty strong {
  color: var(--text);
  font-size: 15px;
}

.ops-console-v3 .reply-profile-empty span {
  color: var(--text-muted);
  font-size: 13px;
}

.ops-console-v3 .expression-learning-panel {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.ops-console-v3 .expression-learning-content {
  padding: 0 18px 20px;
}

.ops-console-v3 .expression-learning-content > .speaking-panel {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.ops-console-v3 .expression-learning-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.ops-console-v3 .expression-learning-toolbar .speaking-mode-tabs {
  flex: 1 1 auto;
  margin: 0;
}

.ops-console-v3 .global-control-panel {
  min-width: 0;
}

.ops-console-v3 .global-control-panel .global-switch-center .global-switch-grid,
.ops-console-v3 .global-control-behavior .compact-switch-grid {
  grid-template-columns: minmax(0, 1fr);
}

.ops-console-v3 .global-control-panel .switch-card-main small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.ops-console-v3 .global-control-behavior .speaking-mode-tabs {
  margin: 10px 0 18px;
}

.ops-console-v3 .global-control-behavior .cadence-control-section {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.ops-console-v3 .global-control-behavior .global-switch-grid {
  margin-top: 0;
}

.ops-console-v3 .global-control-form-grid {
  max-width: 760px;
}

.ops-console-v3 .global-control-behavior .wide-label {
  margin-top: 0;
}

.ops-console-v3 .reply-profile-modal-panel {
  width: min(760px, calc(100vw - 32px));
}

.ops-console-v3 .reply-profile-form {
  display: grid;
  gap: 16px;
}

.ops-console-v3 .reply-profile-basic-grid,
.ops-console-v3 .reply-profile-model-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ops-console-v3 .reply-profile-output-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ops-console-v3 .reply-profile-default-row {
  width: fit-content;
  margin-top: 12px;
}

.ops-console-v3 .reply-profile-legacy-notice {
  border: 1px solid #f0d58a;
  border-radius: 8px;
  background: #fffaf0;
  padding: 11px 12px;
  color: #6f5412;
  font-size: 13px;
  line-height: 1.6;
}

.ops-console-v3 .reply-profile-delete-impact {
  display: grid;
  gap: 7px;
  padding: 4px 0;
}

.ops-console-v3 .reply-profile-delete-impact strong {
  color: var(--text);
  font-size: 15px;
}

.ops-console-v3 .reply-profile-delete-impact span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.65;
}

@media screen and (max-width: 1120px) {
  .ops-console-v3 .reply-profile-row {
    grid-template-columns: minmax(220px, 1.35fr) minmax(140px, .85fr) minmax(110px, .6fr) minmax(160px, .9fr) minmax(210px, auto);
  }

  .ops-console-v3 .reply-profile-head > span:nth-child(5),
  .ops-console-v3 .reply-profile-row > .reply-profile-cell:nth-child(5) {
    display: none;
  }
}

@media screen and (max-width: 760px) {
  .ops-console-v3 .reply-profile-toolbar {
    grid-template-columns: 1fr auto;
  }

  .ops-console-v3 .reply-profile-summary {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }

  .ops-console-v3 .reply-profile-pagination,
  .ops-console-v3 .reply-profile-pagination-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .ops-console-v3 .reply-profile-pagination .button-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .ops-console-v3 .reply-profile-pagination button {
    min-height: 40px;
  }

  .ops-console-v3 .reply-profile-page-size {
    justify-content: space-between;
  }

  .ops-console-v3 .reply-profile-head {
    display: none;
  }

  .ops-console-v3 .reply-profile-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    min-height: 0;
    padding: 16px;
  }

  .ops-console-v3 .reply-profile-row > .reply-profile-cell {
    display: grid;
    padding: 0;
  }

  .ops-console-v3 .reply-profile-row > .reply-profile-cell::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
  }

  .ops-console-v3 .reply-profile-name,
  .ops-console-v3 .reply-profile-actions {
    grid-column: 1 / -1;
  }

  .ops-console-v3 .reply-profile-actions {
    justify-content: flex-start;
    padding-top: 4px;
  }

  .ops-console-v3 .expression-learning-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0 14px;
  }

  .ops-console-v3 .expression-learning-toolbar > button {
    width: 100%;
  }

  .ops-console-v3 .reply-profile-basic-grid,
  .ops-console-v3 .reply-profile-model-grid,
  .ops-console-v3 .reply-profile-output-grid {
    grid-template-columns: 1fr;
  }
}

/* Overview dashboard */
.ops-console-v3 [data-section-panel="overview"] {
  color: var(--zen-text, var(--text));
}

.ops-console-v3 .overview-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  margin-bottom: 16px;
  border: 1px solid var(--zen-border, var(--border));
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--zen-surface-solid, #fff);
}

.ops-console-v3 .overview-scope-field {
  display: grid;
  grid-template-columns: auto minmax(180px, 260px);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ops-console-v3 .overview-scope-field > span {
  color: var(--zen-text-3, var(--text-muted));
  font-size: 12px;
  font-weight: 600;
}

.ops-console-v3 .overview-scope-field .enhanced-select {
  width: min(260px, 32vw);
}

.ops-console-v3 .overview-updated-at {
  color: var(--zen-text-3, var(--text-muted));
  font-size: 12px;
  white-space: nowrap;
}

.ops-console-v3 .overview-workspace-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  cursor: pointer;
}

.ops-console-v3 .overview-workspace-switch > span {
  display: grid;
  gap: 1px;
  text-align: right;
}

.ops-console-v3 .overview-workspace-switch strong {
  color: var(--zen-text, var(--text));
  font-size: 13px;
  line-height: 18px;
}

.ops-console-v3 .overview-workspace-switch small {
  color: var(--zen-text-3, var(--text-muted));
  font-size: 11px;
  line-height: 16px;
}

.ops-console-v3 .overview-dashboard-body {
  display: grid;
  gap: 16px;
  min-height: 320px;
}

.ops-console-v3 [data-section-panel="overview"] .overview-dashboard-body.is-refresh-loading {
  place-items: center;
  align-content: center;
  min-height: clamp(
    320px,
    calc(100dvh - 148px - env(safe-area-inset-bottom, 0px)),
    920px
  );
}

.ops-console-v3 [data-section-panel="overview"] .overview-dashboard-body.is-refresh-loading > .page-list-loading {
  min-height: 0;
}

.ops-console-v3 .overview-primary-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #ead9a7;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fffaf0;
}

.ops-console-v3 .overview-primary-alert.hidden {
  display: none;
}

.ops-console-v3 .overview-alert-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  background: #9a6700;
  font-size: 12px;
  font-weight: 700;
}

.ops-console-v3 .overview-primary-alert > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ops-console-v3 .overview-primary-alert strong,
.ops-console-v3 .overview-primary-alert small {
  overflow-wrap: anywhere;
}

.ops-console-v3 .overview-primary-alert strong {
  color: #4e3a00;
  font-size: 13px;
}

.ops-console-v3 .overview-primary-alert small {
  color: #76601e;
  font-size: 12px;
}

.ops-console-v3 .overview-metrics-grid {
  gap: 12px;
}

.ops-console-v3 .overview-metric-card.metric-card {
  display: grid;
  align-content: center;
  min-height: 104px;
  border-radius: 10px;
  padding: 16px 18px;
}

.ops-console-v3 .overview-metric-card.metric-card span {
  margin: 0 0 5px;
  color: var(--zen-text-3, var(--text-muted));
  font-size: 12px;
  font-weight: 600;
}

.ops-console-v3 .overview-metric-card.metric-card strong {
  margin: 0;
  color: var(--zen-black, #111);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 34px;
}

.ops-console-v3 .overview-metric-card.metric-card small {
  margin-top: 3px;
  color: var(--zen-text-3, var(--text-muted));
  font-size: 11px;
  line-height: 16px;
}

.ops-console-v3 .overview-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
  gap: 16px;
}

.ops-console-v3 .overview-chart-panel.panel,
.ops-console-v3 .overview-account-panel.panel,
.ops-console-v3 .overview-groups-panel.panel,
.ops-console-v3 .overview-side-stack .panel {
  min-width: 0;
  border-radius: 10px;
  padding: 18px;
}

.ops-console-v3 .overview-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  margin-bottom: 14px;
}

.ops-console-v3 .overview-panel-head > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ops-console-v3 .overview-panel-head h2 {
  margin: 0;
  color: var(--zen-black, #111);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 22px;
}

.ops-console-v3 .overview-panel-head > div:first-child > span {
  color: var(--zen-text-3, var(--text-muted));
  font-size: 11px;
  line-height: 16px;
}

.ops-console-v3 .overview-chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--zen-text-3, var(--text-muted));
  font-size: 11px;
  white-space: nowrap;
}

.ops-console-v3 .overview-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ops-console-v3 .overview-chart-legend i {
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: #8c98a5;
}

.ops-console-v3 .overview-chart-legend i.reply {
  background: #111;
}

.ops-console-v3 .overview-line-chart {
  width: 100%;
  aspect-ratio: 3 / 1;
  min-height: 180px;
}

.ops-console-v3 .overview-line-chart svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ops-console-v3 .overview-chart-grid-lines line {
  stroke: #e7e9ec;
  stroke-width: 1;
}

.ops-console-v3 .overview-chart-grid-lines text,
.ops-console-v3 .overview-chart-axis-labels text {
  fill: var(--zen-text-3, var(--text-muted));
  font-size: 10px;
}

.ops-console-v3 .overview-trend-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.ops-console-v3 .overview-trend-line.reply {
  stroke: #111;
}

.ops-console-v3 .overview-trend-line.scheduled {
  stroke: #8c98a5;
}

.ops-console-v3 .overview-trend-points circle {
  stroke: #fff;
  stroke-width: 2;
}

.ops-console-v3 .overview-trend-points circle.reply {
  fill: #111;
}

.ops-console-v3 .overview-trend-points circle.scheduled {
  fill: #8c98a5;
}

.ops-console-v3 .overview-chart-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--zen-text-3, var(--text-muted));
  font-size: 12px;
}

.ops-console-v3 .overview-progress-chart {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 180px;
}

.ops-console-v3 .overview-progress-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(100px, 1.5fr) 66px;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ops-console-v3 .overview-progress-label {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.ops-console-v3 .overview-progress-label strong,
.ops-console-v3 .overview-progress-label small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .overview-progress-label strong {
  color: var(--zen-text, var(--text));
  font-size: 12px;
  font-weight: 600;
}

.ops-console-v3 .overview-progress-label small {
  color: var(--zen-text-3, var(--text-muted));
  font-size: 10px;
}

.ops-console-v3 .overview-progress-track,
.ops-console-v3 .overview-group-usage > span {
  position: relative;
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #eceef0;
}

.ops-console-v3 .overview-progress-track i,
.ops-console-v3 .overview-group-usage > span i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #23272d;
}

.ops-console-v3 .overview-progress-row.warning .overview-progress-track i,
.ops-console-v3 .overview-group-usage > span i.warning {
  background: #b7791f;
}

.ops-console-v3 .overview-progress-row.complete .overview-progress-track {
  background: #e7f1ea;
}

.ops-console-v3 .overview-progress-row.complete .overview-progress-track i,
.ops-console-v3 .overview-group-usage > span i.complete {
  background: #2f7a4b;
}

.ops-console-v3 .overview-progress-row.complete .overview-progress-label strong,
.ops-console-v3 .overview-progress-row.complete .overview-progress-value,
.ops-console-v3 .overview-group-row.limit-reached .overview-group-usage strong {
  color: #24633c;
}

.ops-console-v3 .overview-progress-value {
  color: var(--zen-text-2, var(--text));
  font-size: 11px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.ops-console-v3 .overview-account-list,
.ops-console-v3 .overview-group-table {
  overflow: hidden;
  border: 1px solid var(--zen-border, var(--border));
  border-radius: 8px;
  background: #fff;
}

.ops-console-v3 .overview-account-row,
.ops-console-v3 .overview-group-row {
  display: grid;
  align-items: center;
  min-width: 0;
  border-bottom: 1px solid var(--zen-border, var(--border));
  transition: background-color 120ms ease;
}

.ops-console-v3 .overview-account-row:last-child,
.ops-console-v3 .overview-group-row:last-child {
  border-bottom: 0;
}

.ops-console-v3 .overview-account-row:not(.overview-table-head):hover,
.ops-console-v3 .overview-group-row:not(.overview-table-head):hover {
  color: var(--zen-text, var(--text));
  background: #f7f7f8;
}

.ops-console-v3 .overview-group-row.limit-reached {
  background: #fbfdfb;
}

.ops-console-v3 .overview-group-row.limit-reached:not(.overview-table-head):hover {
  background: #f4f9f5;
}

.ops-console-v3 .overview-account-row {
  grid-template-columns: minmax(150px, 1.25fr) minmax(170px, 1fr) 80px 80px minmax(230px, 1.25fr) 140px;
  min-height: 68px;
}

.ops-console-v3 .overview-group-row {
  grid-template-columns: minmax(180px, 1.3fr) 110px minmax(120px, .8fr) minmax(150px, 1fr) 96px;
  min-height: 64px;
}

.ops-console-v3 .overview-group-row.with-account {
  grid-template-columns: minmax(120px, .75fr) minmax(180px, 1.2fr) 110px minmax(120px, .8fr) minmax(150px, 1fr) 96px;
}

.ops-console-v3 .overview-table-head {
  min-height: 40px;
  color: var(--zen-text-3, var(--text-muted));
  background: #f7f7f8;
  font-size: 11px;
  font-weight: 600;
}

.ops-console-v3 .overview-account-row > *,
.ops-console-v3 .overview-group-row > * {
  min-width: 0;
  padding: 10px 12px;
}

.ops-console-v3 .overview-account-identity,
.ops-console-v3 .overview-account-runtime,
.ops-console-v3 .overview-account-number,
.ops-console-v3 .overview-group-name,
.ops-console-v3 .overview-group-latest {
  display: grid;
  align-content: center;
  gap: 3px;
}

.ops-console-v3 .overview-account-identity strong,
.ops-console-v3 .overview-group-name strong,
.ops-console-v3 .overview-group-latest strong {
  overflow: hidden;
  color: var(--zen-text, var(--text));
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .overview-account-identity small,
.ops-console-v3 .overview-account-runtime small,
.ops-console-v3 .overview-account-number small,
.ops-console-v3 .overview-group-name small,
.ops-console-v3 .overview-group-latest small {
  overflow: hidden;
  color: var(--zen-text-3, var(--text-muted));
  font-size: 10px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .overview-account-runtime > span {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ops-console-v3 .overview-account-runtime .status-chip,
.ops-console-v3 .overview-group-row .status-chip {
  min-height: 22px;
  padding: 3px 7px;
  font-size: 10px;
}

.ops-console-v3 .overview-group-row .status-chip.strong-complete {
  border-color: #c9dfd0;
  color: #24633c;
  background: #eef7f1;
}

.ops-console-v3 .overview-group-row .status-chip.strong-complete::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3d8b5b;
  content: "";
}

.ops-console-v3 .overview-account-runtime small.has-issue {
  color: #a33a32;
}

.ops-console-v3 .overview-account-number strong,
.ops-console-v3 .overview-group-usage strong {
  color: var(--zen-text, var(--text));
  font-size: 12px;
  font-weight: 650;
}

.ops-console-v3 .overview-account-switches {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ops-console-v3 .overview-account-switches label {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--zen-text-3, var(--text-muted));
  font-size: 10px;
  cursor: pointer;
}

.ops-console-v3 .overview-account-switches .toggle-switch-input {
  position: relative;
  width: 34px !important;
  min-width: 34px;
  height: 18px;
  min-height: 18px !important;
  margin: 0;
  border: 0;
  border-radius: 999px;
  padding: 0;
}

.ops-console-v3 .overview-account-switches .toggle-switch-input::after {
  top: 0;
  bottom: 0;
  left: 2px;
  width: 14px;
  height: 14px;
  margin: auto 0;
  transform: none;
  transition: left 180ms ease, box-shadow 180ms ease;
}

.ops-console-v3 .overview-account-switches .toggle-switch-input:checked::after {
  left: 18px;
}

.ops-console-v3 .overview-account-actions,
.ops-console-v3 .overview-group-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.ops-console-v3 .overview-account-actions button,
.ops-console-v3 .overview-group-actions button {
  white-space: nowrap;
}

.ops-console-v3 .overview-account-actions .text-action,
.ops-console-v3 .overview-group-actions .text-action,
.ops-console-v3 .overview-panel-head .text-action {
  color: var(--zen-text-2, var(--text));
  background: transparent;
}

.ops-console-v3 .overview-account-actions .text-action:hover,
.ops-console-v3 .overview-group-actions .text-action:hover,
.ops-console-v3 .overview-panel-head .text-action:hover {
  color: #111;
  background: #eeeeef;
}

.ops-console-v3 .overview-group-usage {
  display: grid;
  gap: 6px;
}

.ops-console-v3 .overview-group-usage > span {
  width: 100%;
  max-width: 120px;
  height: 5px;
}

.ops-console-v3 .overview-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, .75fr);
  align-items: start;
  gap: 16px;
}

.ops-console-v3 .overview-side-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.ops-console-v3 .overview-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--zen-text-3, var(--text-muted));
  font-size: 11px;
}

.ops-console-v3 .overview-pagination.hidden {
  display: none;
}

.ops-console-v3 .overview-issue-list {
  display: grid;
  gap: 0;
}

.ops-console-v3 .overview-issue-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  border-bottom: 1px solid var(--zen-border, var(--border));
  padding: 7px 0;
}

.ops-console-v3 .overview-issue-row:last-child {
  border-bottom: 0;
}

.ops-console-v3 .overview-issue-dot,
.ops-console-v3 .overview-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b7791f;
}

.ops-console-v3 .overview-issue-row.tone-danger .overview-issue-dot {
  background: #c2413b;
}

.ops-console-v3 .overview-issue-row > div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.ops-console-v3 .overview-issue-row strong,
.ops-console-v3 .overview-issue-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .overview-issue-row strong {
  color: var(--zen-text, var(--text));
  font-size: 12px;
}

.ops-console-v3 .overview-issue-row small {
  color: var(--zen-text-3, var(--text-muted));
  font-size: 10px;
}

.ops-console-v3 .overview-issue-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 94px;
  color: var(--zen-text-3, var(--text-muted));
  font-size: 12px;
}

.ops-console-v3 .overview-issue-empty .overview-status-dot {
  background: #34845a;
}

.ops-console-v3 .overview-more-issues {
  width: 100%;
  margin-top: 8px;
}

.ops-console-v3 .overview-quick-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--zen-border, var(--border));
  border-radius: 8px;
  background: #fff;
}

.ops-console-v3 .overview-quick-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 14px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 58px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--zen-border, var(--border));
  border-radius: 0;
  padding: 9px 11px;
  color: var(--zen-text-2, var(--text));
  background: #fff;
  box-shadow: none;
  text-align: left;
  transform: none;
}

.ops-console-v3 .overview-quick-action:last-child {
  border-bottom: 0;
}

.ops-console-v3 .overview-quick-action:not(:disabled):hover {
  color: #111;
  background: #f7f7f8;
  box-shadow: none;
  transform: none;
}

.ops-console-v3 .overview-quick-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #333;
  background: #f0f1f2;
}

.ops-console-v3 .overview-quick-icon .nav-icon {
  width: 15px;
  min-width: 15px;
  height: 15px;
}

.ops-console-v3 .overview-quick-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ops-console-v3 .overview-quick-copy strong,
.ops-console-v3 .overview-quick-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-console-v3 .overview-quick-copy strong {
  color: var(--zen-text, var(--text));
  font-size: 12px;
  font-weight: 650;
  line-height: 17px;
}

.ops-console-v3 .overview-quick-copy small {
  color: var(--zen-text-3, var(--text-muted));
  font-size: 10px;
  font-weight: 500;
  line-height: 15px;
}

.ops-console-v3 .overview-quick-arrow {
  color: #a1a1a1;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  text-align: right;
}

.ops-console-v3 .overview-empty-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 112px;
  padding: 20px;
  color: var(--zen-text-3, var(--text-muted));
  font-size: 12px;
}

@media screen and (max-width: 1180px) {
  .ops-console-v3 .overview-chart-grid,
  .ops-console-v3 .overview-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ops-console-v3 .overview-side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-console-v3 .overview-account-list,
  .ops-console-v3 .overview-group-table {
    overflow-x: auto;
  }

  .ops-console-v3 .overview-account-row {
    min-width: 900px;
  }

  .ops-console-v3 .overview-group-row {
    min-width: 720px;
  }

  .ops-console-v3 .overview-group-row.with-account {
    min-width: 860px;
  }
}

@media screen and (max-width: 760px) {
  .ops-console-v3 .overview-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px 12px;
    padding: 12px;
  }

  .ops-console-v3 .overview-scope-field {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .ops-console-v3 .overview-scope-field .enhanced-select {
    width: 100%;
  }

  .ops-console-v3 .overview-updated-at {
    align-self: center;
  }

  .ops-console-v3 .overview-workspace-switch {
    margin-left: 0;
  }

  .ops-console-v3 .overview-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-console-v3 .overview-metric-card.metric-card {
    min-height: 92px;
    padding: 13px;
  }

  .ops-console-v3 .overview-metric-card.metric-card strong {
    font-size: 24px;
    line-height: 30px;
  }

  .ops-console-v3 .overview-chart-panel.panel,
  .ops-console-v3 .overview-account-panel.panel,
  .ops-console-v3 .overview-groups-panel.panel,
  .ops-console-v3 .overview-side-stack .panel {
    padding: 14px;
  }

  .ops-console-v3 .overview-chart-legend {
    display: none;
  }

  .ops-console-v3 .overview-line-chart {
    aspect-ratio: 1.55 / 1;
    min-height: 210px;
  }

  .ops-console-v3 .overview-progress-row {
    grid-template-columns: minmax(90px, 1fr) minmax(76px, 1fr) 60px;
    gap: 7px;
  }

  .ops-console-v3 .overview-side-stack {
    grid-template-columns: minmax(0, 1fr);
  }

  .ops-console-v3 .overview-account-list,
  .ops-console-v3 .overview-group-table {
    overflow: hidden;
  }

  .ops-console-v3 .overview-table-head {
    display: none;
  }

  .ops-console-v3 .overview-account-row,
  .ops-console-v3 .overview-group-row,
  .ops-console-v3 .overview-group-row.with-account {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    min-width: 0;
    min-height: 0;
    padding: 14px;
  }

  .ops-console-v3 .overview-account-row.overview-table-head,
  .ops-console-v3 .overview-group-row.overview-table-head {
    display: none;
  }

  .ops-console-v3 .overview-account-row > *,
  .ops-console-v3 .overview-group-row > * {
    padding: 0;
  }

  .ops-console-v3 .overview-account-row > *::before,
  .ops-console-v3 .overview-group-row > *::before {
    display: block;
    margin-bottom: 3px;
    color: var(--zen-text-3, var(--text-muted));
    content: attr(data-label);
    font-size: 10px;
    font-weight: 600;
  }

  .ops-console-v3 .overview-account-identity,
  .ops-console-v3 .overview-account-switches,
  .ops-console-v3 .overview-account-actions,
  .ops-console-v3 .overview-group-name,
  .ops-console-v3 .overview-group-actions {
    grid-column: 1 / -1;
  }

  .ops-console-v3 .overview-account-switches {
    justify-content: flex-start;
    gap: 20px;
  }

  .ops-console-v3 .overview-account-switches label {
    grid-template-columns: auto auto;
    align-items: center;
    justify-items: start;
    gap: 7px;
  }

  .ops-console-v3 .overview-account-actions,
  .ops-console-v3 .overview-group-actions {
    justify-content: flex-start;
    padding-top: 2px;
  }

  .ops-console-v3 .overview-primary-alert {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ops-console-v3 .overview-primary-alert > button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media screen and (max-width: 420px) {
  .ops-console-v3 .overview-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .ops-console-v3 .overview-workspace-switch {
    justify-content: space-between;
  }

  .ops-console-v3 .overview-workspace-switch > span {
    text-align: left;
  }

  .ops-console-v3 .overview-updated-at {
    grid-row: 3;
  }

}

/* Button loading contrast must survive disabled-state color and opacity rules. */
.ops-console-v3 button.is-loading:disabled,
body > .modal-backdrop button.is-loading:disabled,
body > .modal-backdrop.modal-theme-scope button.is-loading:disabled,
body > .ai-persona-action-popover button.is-loading:disabled {
  opacity: 1;
  cursor: wait;
}

/* Expression assets must not use desktop toolbar width as mobile min-content. */
@media screen and (max-width: 767px) {
  .ops-console-v3 [data-section-panel="expression-learning"],
  .ops-console-v3 .expression-learning-panel,
  .ops-console-v3 .expression-learning-content,
  .ops-console-v3 .speech-library-panel,
  .ops-console-v3 .speech-library-workspace-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .ops-console-v3 .expression-learning-content {
    padding: 0 12px 14px;
  }
}

/* Telegram account health is global because a failed session affects every automation surface. */
.ops-console-v3 .telegram-health-alert {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 18px;
  border: 1px solid #efc9c2;
  border-radius: 10px;
  padding: 11px 12px;
  color: #7c291f;
  background: #fff7f5;
}

.ops-console-v3 .telegram-health-alert.hidden {
  display: none;
}

.ops-console-v3 .telegram-health-alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #ffffff;
  background: #b43a2d;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.ops-console-v3 .telegram-health-alert-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.ops-console-v3 .telegram-health-alert-copy strong,
.ops-console-v3 .telegram-health-alert-copy span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ops-console-v3 .telegram-health-alert-copy strong {
  font-size: 14px;
  line-height: 1.4;
}

.ops-console-v3 .telegram-health-alert-copy span {
  color: #8e4a41;
  font-size: 13px;
  line-height: 1.45;
}

.ops-console-v3 .telegram-health-alert .secondary {
  border-color: #d9aaa2;
  color: #7c291f;
  background: #ffffff;
}

.ops-console-v3 .telegram-health-alert .secondary:not(:disabled):hover {
  border-color: #c98378;
  color: #672018;
  background: #fbeae7;
}

.ops-console-v3 .telegram-account-error-detail {
  display: -webkit-box;
  overflow: hidden;
  color: #a33629 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media screen and (max-width: 767px) {
  .ops-console-v3 .telegram-health-alert {
    grid-template-columns: 28px minmax(0, 1fr);
    margin-bottom: 14px;
  }

  .ops-console-v3 .telegram-health-alert .secondary {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* Speech library modal alignment */
body > .modal-backdrop.modal-theme-scope .speech-library-modal-panel .speech-library-editor,
body > .modal-backdrop.modal-theme-scope .speech-library-modal-panel .modal-form-section {
  align-content: start;
}

body > .modal-backdrop.modal-theme-scope .speech-library-modal-panel .modal-form-section > .form-grid {
  gap: 12px;
  align-items: start;
}

body > .modal-backdrop.modal-theme-scope .speech-library-modal-panel .modal-section-head > button,
body > .modal-backdrop.modal-theme-scope .speech-library-modal-panel .modal-section-head > .speech-library-section-title {
  flex: 0 0 auto;
}

body > .modal-backdrop.modal-theme-scope .speech-library-section-title {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 32px;
}

body > .modal-backdrop.modal-theme-scope .speech-library-section-title > strong {
  color: #262626;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

body > .modal-backdrop.modal-theme-scope .speech-library-section-title .field-help-button,
body > .modal-backdrop.modal-theme-scope .speech-library-modal-panel .modal-switch-row .toggle-switch-input {
  flex: 0 0 auto;
  align-self: center;
}

body > .modal-backdrop.modal-theme-scope .speech-library-section-title .field-help-button {
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
}

body > .modal-backdrop.modal-theme-scope .speech-library-card-actions {
  align-items: center;
  min-height: 36px;
  margin: 0;
}

body > .modal-backdrop.modal-theme-scope .speech-library-card-actions .inline-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin: 0;
}

body > .modal-backdrop.modal-theme-scope .speech-library-filter-switches {
  gap: 8px 10px;
  align-items: stretch;
}

body > .modal-backdrop.modal-theme-scope .speech-library-filter-switches .switch-label {
  min-height: 44px;
  border: 1px solid var(--modal-border);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  cursor: pointer;
}

body > .modal-backdrop.modal-theme-scope .speech-library-filter-switches .switch-label > span {
  color: #4a4a4a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

body > .modal-backdrop.modal-theme-scope .speech-library-filter-switches .toggle-switch-input {
  align-self: center;
}

body > .modal-backdrop .speech-library-candidate-modal .learning-candidate-list.list-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 96px;
  text-align: center;
}

@media screen and (max-width: 767px) {
  body > .modal-backdrop.modal-theme-scope .speech-library-modal-panel .modal-form-section > .form-grid,
  body > .modal-backdrop.modal-theme-scope .speech-library-filter-switches {
    grid-template-columns: minmax(0, 1fr);
  }

  body > .modal-backdrop.modal-theme-scope .speech-library-modal-panel .modal-section-head {
    gap: 8px;
  }

  body > .modal-backdrop.modal-theme-scope > .speech-library-modal-panel > .speech-library-modal-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  body > .modal-backdrop.modal-theme-scope > .speech-library-modal-panel > .speech-library-modal-actions .modal-footer-status {
    order: 0;
    margin: 0;
    text-align: left;
  }

  body > .modal-backdrop.modal-theme-scope > .speech-library-modal-panel > .speech-library-modal-actions .modal-action-group {
    order: 1;
  }

  body > .modal-backdrop.modal-theme-scope .speech-library-section-title .field-help-button {
    width: 24px;
    min-width: 24px;
  }
}

/* Final Telegram join mobile alignment */
@media (max-width: 720px) {
  body > .modal-backdrop.modal-theme-scope .telegram-join-selection-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 6px;
  }

  body > .modal-backdrop.modal-theme-scope .telegram-join-selection-meta > span {
    grid-column: 1 / -1;
    margin: 0;
  }

  body > .modal-backdrop.modal-theme-scope .telegram-join-selection-meta .text-action {
    width: auto;
    min-width: 0;
    justify-self: end;
    padding-inline: 6px;
  }

  body > .modal-backdrop.modal-theme-scope .telegram-join-selection-meta .text-action:first-of-type {
    grid-column: 2;
  }
}

/* Platform join resources and mixed target selection */
body > .modal-backdrop.modal-theme-scope .telegram-join-target-group {
  display: grid;
  min-width: 0;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-group + .telegram-join-target-group {
  border-top: 8px solid #f5f5f5;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 6px 10px;
  color: #696969;
  background: #fafafa;
  font-size: 12px;
  line-height: 18px;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-group-head strong {
  color: #4f4f4f;
  font-size: 12px;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-main strong {
  display: flex;
  align-items: center;
  gap: 7px;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-source-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 2px 7px;
  color: #333333;
  background: #f2f2f2;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  line-height: 14px;
  white-space: nowrap;
}

.ops-console-v3 .platform-join-target-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ops-console-v3 .platform-join-target-toolbar {
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) auto;
}

.ops-console-v3 .platform-join-reference {
  color: #4f4f4f;
  font-size: 13px;
}

.ops-console-v3 .platform-join-mobile-meta {
  display: none;
}

body > .modal-backdrop.modal-theme-scope > .platform-join-target-modal-panel {
  width: min(640px, calc(100vw - 48px));
}

body > .modal-backdrop.modal-theme-scope .platform-join-target-form {
  align-items: start;
}

body > .modal-backdrop.modal-theme-scope .platform-join-target-enabled {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 8px 12px;
  background: #fafafa;
}

body > .modal-backdrop.modal-theme-scope .platform-join-target-enabled > span {
  margin: 0;
}

body > .modal-backdrop.modal-theme-scope .platform-join-target-enabled .toggle-switch-input {
  align-self: center;
}

body > .modal-backdrop.modal-theme-scope .platform-join-target-modal-panel .modal-action-spacer {
  flex: 1 1 auto;
}

@media (max-width: 720px) {
  .ops-console-v3 .platform-join-target-panel .panel-head,
  .ops-console-v3 .platform-join-target-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .ops-console-v3 .platform-join-target-panel .panel-head {
    display: grid;
    gap: 10px;
  }

  .ops-console-v3 .platform-join-target-panel .panel-head > button,
  .ops-console-v3 .platform-join-target-toolbar > button {
    width: 100%;
  }

  .ops-console-v3 [data-section-panel="platform-join-targets"] .role-console-table table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .ops-console-v3 [data-section-panel="platform-join-targets"] .role-console-table th:nth-child(2),
  .ops-console-v3 [data-section-panel="platform-join-targets"] .role-console-table td:nth-child(2),
  .ops-console-v3 [data-section-panel="platform-join-targets"] .role-console-table th:nth-child(3),
  .ops-console-v3 [data-section-panel="platform-join-targets"] .role-console-table td:nth-child(3),
  .ops-console-v3 [data-section-panel="platform-join-targets"] .role-console-table th:nth-child(5),
  .ops-console-v3 [data-section-panel="platform-join-targets"] .role-console-table td:nth-child(5) {
    display: none;
  }

  .ops-console-v3 [data-section-panel="platform-join-targets"] .role-console-table th:nth-child(4),
  .ops-console-v3 [data-section-panel="platform-join-targets"] .role-console-table td:nth-child(4) {
    width: 76px;
  }

  .ops-console-v3 [data-section-panel="platform-join-targets"] .role-console-table th:last-child,
  .ops-console-v3 [data-section-panel="platform-join-targets"] .role-console-table td:last-child {
    width: 64px;
  }

  .ops-console-v3 .platform-join-mobile-meta {
    display: block;
  }

  body > .modal-backdrop.modal-theme-scope > .platform-join-target-modal-panel {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }

  body > .modal-backdrop.modal-theme-scope .platform-join-target-modal-panel .modal-action-spacer {
    display: none;
  }
}

body > .modal-backdrop.modal-theme-scope .platform-join-detect-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

body > .modal-backdrop.modal-theme-scope .platform-join-detect-control > button {
  min-width: 76px;
  min-height: 40px;
}

body > .modal-backdrop.modal-theme-scope .platform-join-detection {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border: 1px solid #d9e5df;
  border-radius: 10px;
  padding: 9px 11px;
  color: #262626;
  background: #f6faf8;
}

body > .modal-backdrop.modal-theme-scope .platform-join-detection.hidden {
  display: none;
}

body > .modal-backdrop.modal-theme-scope .platform-join-detection-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #ffffff;
  background: #356a53;
  font-size: 13px;
  font-weight: 700;
}

body > .modal-backdrop.modal-theme-scope .platform-join-detection > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body > .modal-backdrop.modal-theme-scope .platform-join-detection strong,
body > .modal-backdrop.modal-theme-scope .platform-join-detection small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body > .modal-backdrop.modal-theme-scope .platform-join-detection small {
  color: #707070;
  font-size: 12px;
}

body > .modal-backdrop.modal-theme-scope .platform-join-schedule-section {
  display: grid;
  gap: 12px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 10px 12px 12px;
  background: #fafafa;
}

body > .modal-backdrop.modal-theme-scope .platform-join-schedule-section.hidden {
  display: none;
}

body > .modal-backdrop.modal-theme-scope .platform-join-schedule-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin: 0;
}

body > .modal-backdrop.modal-theme-scope .platform-join-schedule-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #e7e7e7;
}

body > .modal-backdrop.modal-theme-scope .platform-join-schedule-fields.hidden {
  display: none;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-actions > .text-action {
  min-height: 30px;
  padding: 0 8px;
  color: #555555;
  background: transparent;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-target-actions > .text-action:not(:disabled):hover {
  color: #000000;
  background: #eeeeee;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-schedule-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 134px;
  min-height: 38px;
  margin: 0;
  border: 1px solid #dedede;
  border-radius: 8px;
  padding: 5px 8px;
  color: #333333;
  background: #ffffff;
  cursor: pointer;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-schedule-choice:hover {
  border-color: #bdbdbd;
  background: #f7f7f7;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-schedule-choice.disabled {
  opacity: 0.5;
  cursor: default;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-schedule-choice input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: #111111;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-schedule-choice > span {
  display: grid;
  gap: 1px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

body > .modal-backdrop.modal-theme-scope .telegram-join-schedule-choice small {
  color: #777777;
  font-size: 10px;
  font-weight: 400;
  line-height: 14px;
  white-space: nowrap;
}

@media (max-width: 720px) {
  body > .modal-backdrop.modal-theme-scope .platform-join-detect-control,
  body > .modal-backdrop.modal-theme-scope .platform-join-schedule-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  body > .modal-backdrop.modal-theme-scope .platform-join-detect-control > button {
    width: 100%;
  }

  body > .modal-backdrop.modal-theme-scope .telegram-join-target-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  body > .modal-backdrop.modal-theme-scope .telegram-join-target-actions {
    justify-content: flex-start;
    margin-left: 28px;
  }
}

/* Channel discount alerts */
.ops-console-v3 .channel-alert-main-stack {
  gap: 14px;
}

.ops-console-v3 .channel-alert-rule-row,
.ops-console-v3 .channel-alert-delivery-row {
  align-items: center;
}

.ops-console-v3 .channel-alert-rule-row .redemption-task-main,
.ops-console-v3 .channel-alert-delivery-row > div:first-child {
  min-width: 0;
}

.ops-console-v3 .channel-alert-rule-row .redemption-task-path {
  overflow-wrap: anywhere;
}

.ops-console-v3 .channel-alert-rule-actions {
  flex-wrap: nowrap;
}

.ops-console-v3 .channel-alert-list-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin: 0;
  color: var(--zen-text-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.ops-console-v3 .channel-alert-list-switch .toggle-switch-input {
  flex: 0 0 auto;
}

.ops-console-v3 .channel-alert-delivery-row p {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0 0;
  color: var(--zen-text-2);
  line-height: 1.55;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ops-console-v3 .channel-alert-delivery-row .redemption-run-head {
  flex-wrap: wrap;
}

body > .modal-backdrop.modal-theme-scope > .channel-alert-rule-modal {
  width: min(680px, calc(100vw - 48px));
}

body > .modal-backdrop.modal-theme-scope .channel-alert-rule-modal .channel-alert-enable-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 64px;
  margin: 0 0 14px;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-enable-row > .channel-alert-enable-copy {
  display: flex;
  align-self: stretch;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-enable-copy > strong,
body > .modal-backdrop.modal-theme-scope .channel-alert-enable-copy > small {
  display: block;
  margin: 0;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-enable-row > .toggle-switch-input {
  align-self: center;
  margin: 0;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-signup-section {
  display: grid;
  gap: 14px;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-signup-toggle-row {
  min-height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-signup-preview-wrap {
  display: grid;
  gap: 8px;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-signup-preview {
  min-height: 154px;
  margin: 0;
  border: 1px solid var(--modal-border);
  border-radius: 9px;
  padding: 12px 14px;
  color: #3b3b3b;
  background: #f8f8f8;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-dialog-field {
  display: grid;
  gap: 8px;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-dialog-picker {
  display: grid;
  gap: 8px;
  border: 1px solid var(--modal-border);
  border-radius: 10px;
  padding: 8px;
  background: #ffffff;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-dialog-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-dialog-search-row input[type="search"] {
  min-height: 38px;
  margin: 0;
}

body > .modal-backdrop.modal-theme-scope #channelAlertDialogCount {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 6px;
  padding: 0 8px;
  color: #737373;
  background: #f5f5f5;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

body > .modal-backdrop.modal-theme-scope #channelAlertDialogCount.has-selection {
  color: #262626;
  background: #ededed;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-dialog-options {
  display: grid;
  gap: 3px;
  max-height: 190px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-dialog-options.list-empty {
  min-height: 72px;
  place-items: center;
  color: #858585;
  font-size: 13px;
  text-align: center;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-dialog-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 50px;
  margin: 0;
  border-radius: 7px;
  padding: 7px 9px;
  color: #333333;
  background: #ffffff;
  cursor: pointer;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-dialog-option:hover {
  color: #171717;
  background: #f5f5f5;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-dialog-option.selected,
body > .modal-backdrop.modal-theme-scope .channel-alert-dialog-option.selected:hover {
  color: #171717;
  background: #eeeeee;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-dialog-option input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: #111111;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-dialog-option-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-dialog-option-copy strong,
body > .modal-backdrop.modal-theme-scope .channel-alert-dialog-option-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-dialog-option-copy strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-dialog-option-copy small {
  color: #737373;
  font-size: 12px;
  line-height: 1.4;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-discount-field {
  display: grid;
  gap: 8px;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-rate-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-rate-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin: 0;
  border: 1px solid var(--modal-border);
  border-radius: 8px;
  padding: 8px 10px;
  color: #333333;
  background: #ffffff;
  cursor: pointer;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-rate-options label:hover {
  border-color: #bdbdbd;
  background: #f7f7f7;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-rate-options input,
body > .modal-backdrop.modal-theme-scope .channel-alert-clear-secret input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: #111111;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-rate-options span {
  color: #333333;
  font-size: 13px;
  font-weight: 600;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-clear-secret {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin: 0;
  color: #555555;
  font-size: 13px;
  cursor: pointer;
}

body > .modal-backdrop.modal-theme-scope .channel-alert-clear-secret.hidden {
  display: none;
}

@media (max-width: 720px) {
  .ops-console-v3 .channel-alert-main-stack .panel-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .ops-console-v3 .channel-alert-main-stack .panel-head .button-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .ops-console-v3 .channel-alert-main-stack .panel-head .button-group button {
    width: auto;
  }

  .ops-console-v3 .channel-alert-rule-row,
  .ops-console-v3 .channel-alert-delivery-row {
    align-items: stretch;
  }

  .ops-console-v3 .channel-alert-rule-actions,
  .ops-console-v3 .channel-alert-delivery-row .redemption-task-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .ops-console-v3 .channel-alert-list-switch,
  .ops-console-v3 .channel-alert-rule-actions .list-action-button,
  .ops-console-v3 .channel-alert-delivery-row .list-action-button {
    justify-content: center;
    width: 100%;
  }

  body > .modal-backdrop.modal-theme-scope > .channel-alert-rule-modal {
    width: 100%;
  }

  body > .modal-backdrop.modal-theme-scope .channel-alert-rate-options {
    grid-template-columns: minmax(0, 1fr);
  }

  body > .modal-backdrop.modal-theme-scope .channel-alert-dialog-search-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  body > .modal-backdrop.modal-theme-scope #channelAlertDialogCount {
    justify-self: start;
  }

  body > .modal-backdrop.modal-theme-scope > .channel-alert-rule-modal > .modal-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  body > .modal-backdrop.modal-theme-scope .channel-alert-rule-modal #testChannelAlertWebhook {
    grid-row: 1;
  }

  body > .modal-backdrop.modal-theme-scope .channel-alert-rule-modal .modal-action-group {
    grid-row: 2;
  }
}

/* Unified help icon/title alignment contract */
.ops-console-v3 .help-title-inline {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  min-width: 0;
  vertical-align: middle;
}

.ops-console-v3 .title-help-button,
.ops-console-v3 .help-title-inline > .title-help-button {
  flex: 0 0 auto;
  align-self: center;
  margin-left: 0;
}

.ops-console-v3 .form-grid > label > span:first-child,
.ops-console-v3 .form-grid > .wide-label > span:first-child,
.ops-console-v3 label.wide-label > span:first-child,
.ops-console-v3 .telegram-join-target-fields > label > span:first-child,
.ops-console-v3 .platform-join-schedule-fields > label > span:first-child {
  display: flex;
  align-items: center;
  min-height: 24px;
}

/* Final button loading geometry; keep this after component-level overrides. */
.ops-console-v3 button.is-loading,
.ops-login-v3 button.is-loading,
body > .modal-backdrop.modal-theme-scope button.is-loading,
body > .ai-persona-action-popover button.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
}

.ops-console-v3 button.is-loading > .button-loading-label,
body > .modal-backdrop.modal-theme-scope button.is-loading > .button-loading-label,
body > .ai-persona-action-popover button.is-loading > .button-loading-label,
.ops-login-v3 .login-submit-button.is-loading > .login-submit-label {
  display: inline-flex;
  align-items: center;
  align-self: center;
  height: 1em;
  min-height: 0;
  margin: 0;
  padding: 0;
  color: var(--button-loading-foreground, inherit);
  font: inherit;
  line-height: 1;
}

.ops-console-v3 button.is-loading > .loading-inline-spinner,
body > .modal-backdrop.modal-theme-scope button.is-loading > .loading-inline-spinner,
body > .ai-persona-action-popover button.is-loading > .loading-inline-spinner,
.ops-login-v3 .login-submit-button > .login-submit-spinner {
  align-self: center;
  margin: 0;
}

/* Keep control focus visible without turning the whole field into a heavy halo. */
.ops-console-v3 input:focus,
.ops-console-v3 select:focus,
.ops-console-v3 textarea:focus,
.ops-login-v3 input:focus,
body > .modal-backdrop.modal-theme-scope input:focus,
body > .modal-backdrop.modal-theme-scope select:focus,
body > .modal-backdrop.modal-theme-scope textarea:focus,
body > .modal-backdrop .policy-modal-card input:focus,
body > .modal-backdrop .policy-modal-card select:focus,
body > .modal-backdrop .policy-modal-card textarea:focus,
body > .modal-backdrop .policy-time-input:focus {
  border-color: #858585;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
  outline: none;
}

.ops-console-v3 input:focus-visible,
.ops-console-v3 select:focus-visible,
.ops-console-v3 textarea:focus-visible,
.ops-login-v3 input:focus-visible,
body > .modal-backdrop.modal-theme-scope input:focus-visible,
body > .modal-backdrop.modal-theme-scope select:focus-visible,
body > .modal-backdrop.modal-theme-scope textarea:focus-visible,
body > .modal-backdrop .policy-modal-card input:focus-visible,
body > .modal-backdrop .policy-modal-card select:focus-visible,
body > .modal-backdrop .policy-modal-card textarea:focus-visible,
body > .modal-backdrop .policy-time-input:focus-visible,
.ops-console-v3 .enhanced-select-button:focus-visible,
.ops-console-v3 .custom-date-button:focus-visible,
.ops-console-v3 .custom-time-button:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.2);
  outline-offset: 1px;
}

.ops-console-v3 .enhanced-select-button:focus-visible,
.ops-console-v3 .custom-date-button:focus-visible,
.ops-console-v3 .custom-time-button:focus-visible {
  border-color: #858585;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

/* Unified disclosure headers: make the whole row read as an interactive control. */
.ops-console-v3 details > summary,
.ai-reply-test-drawer details > summary,
body > .modal-backdrop.modal-theme-scope details > summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin: 0;
  border: 1px solid #e5e5e5;
  border-radius: 9px;
  padding: 9px 40px 9px 12px;
  color: #333333;
  background: #fafafa;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.ops-console-v3 details > summary::-webkit-details-marker,
.ai-reply-test-drawer details > summary::-webkit-details-marker,
body > .modal-backdrop.modal-theme-scope details > summary::-webkit-details-marker {
  display: none;
}

.ops-console-v3 details > summary::after,
.ai-reply-test-drawer details > summary::after,
body > .modal-backdrop.modal-theme-scope details > summary::after {
  position: absolute;
  inset-block-start: calc(50% - 4px);
  inset-inline-end: 16px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #737373;
  border-bottom: 1.5px solid #737373;
  content: "";
  pointer-events: none;
  transform: rotate(45deg);
  transition: inset-block-start 160ms ease, border-color 140ms ease, transform 160ms ease;
}

.ops-console-v3 details > summary:hover,
.ai-reply-test-drawer details > summary:hover,
body > .modal-backdrop.modal-theme-scope details > summary:hover {
  border-color: #cfcfcf;
  color: #171717;
  background: #f5f5f5;
}

.ops-console-v3 details > summary:active,
.ai-reply-test-drawer details > summary:active,
body > .modal-backdrop.modal-theme-scope details > summary:active {
  background: #eeeeee;
}

.ops-console-v3 details > summary:focus-visible,
.ai-reply-test-drawer details > summary:focus-visible,
body > .modal-backdrop.modal-theme-scope details > summary:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.2);
  outline-offset: 1px;
}

.ops-console-v3 details[open] > summary,
.ai-reply-test-drawer details[open] > summary,
body > .modal-backdrop.modal-theme-scope details[open] > summary {
  border-color: transparent;
  border-bottom-color: #e7e7e7;
  border-radius: 9px 9px 0 0;
  background: #f7f7f7;
}

.ops-console-v3 details[open] > summary::after,
.ai-reply-test-drawer details[open] > summary::after,
body > .modal-backdrop.modal-theme-scope details[open] > summary::after {
  inset-block-start: calc(50% - 3px);
  border-color: #333333;
  transform: rotate(225deg);
}

.ops-console-v3 details > summary > :first-child,
.ai-reply-test-drawer details > summary > :first-child,
body > .modal-backdrop.modal-theme-scope details > summary > :first-child {
  min-width: 0;
}

.ops-console-v3 details > summary > :last-child,
.ai-reply-test-drawer details > summary > :last-child,
body > .modal-backdrop.modal-theme-scope details > summary > :last-child {
  flex: 0 1 auto;
  min-width: 0;
  margin-inline-end: 14px;
}

@media (max-width: 640px) {
  .ops-console-v3 details > summary,
  .ai-reply-test-drawer details > summary,
  body > .modal-backdrop.modal-theme-scope details > summary {
    min-height: 46px;
    padding-inline: 11px 38px;
  }
}
