.text-edit-td {
  padding: 0 !important;
  height: 73px !important;
  max-height: 73px !important;
  overflow: hidden;
}

.orders-table tbody tr {
  height: 73px;
}

.orders-table thead th {
  position: relative;
}

.column-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  z-index: 8;
  width: 9px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
}

.column-resizer::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 4px;
  width: 1px;
  border-radius: 2px;
  background: transparent;
  transition: background .15s, width .15s;
}

.column-resizer:hover::after,
body.resizing-order-column .column-resizer::after {
  width: 2px;
  background: #2f7bf4;
}

/* Keep the last resize handle inside the table so it cannot create a
   meaningless few-pixel horizontal scrollbar at the default widths. */
.orders-table thead th:last-child .column-resizer {
  right: 0;
  width: 5px;
}

body.resizing-order-column,
body.resizing-order-column * {
  cursor: col-resize !important;
  user-select: none !important;
}

.control-cell {
  position: relative;
  transition: background .15s, box-shadow .15s;
}

.animated-voice-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.animated-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.animated-select-trigger {
  width: 100%;
  height: 40px;
  padding: 0 36px 0 13px;
  border: 1px solid #d8e0ea;
  border-radius: 7px;
  background: #fff;
  color: #26344c;
  text-align: left;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: border-color .16s, box-shadow .16s, background .16s;
}

.animated-select-trigger span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.animated-select-trigger i {
  position: absolute;
  right: 13px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid #40506a;
  border-bottom: 2px solid #40506a;
  transform: translateY(-70%) rotate(45deg);
  transition: transform .18s;
}

.animated-voice-select.is-open .animated-select-trigger {
  border-color: #2f7bf4;
  box-shadow: 0 0 0 3px #2f7bf424;
}

.animated-voice-select.is-open .animated-select-trigger i {
  transform: translateY(-28%) rotate(225deg);
}

.animated-voice-select.is-disabled .animated-select-trigger,
.animated-select-trigger:disabled {
  cursor: default;
  color: #8e96a8;
  background: #f7f9fc;
  border-color: #e1e6ed;
  box-shadow: none;
}

.order-date-select .animated-select-control { min-width: 108px; flex: 1 1 auto; }
.order-date-select .animated-select-trigger { height: 31px; border: 0; padding-left: 4px; background: transparent; }
.cleanup-row .animated-select-control { width: 125px; flex: 0 0 125px; }
.voice-order-control .animated-select-control { width: 62px; flex: 0 0 62px; }
.voice-order-control .animated-select-trigger { height: 30px; padding-left: 9px; padding-right: 25px; font-size: 11px; }
.voice-order-control .animated-select-trigger i { right: 10px; }
.admin-table .animated-select-trigger { height: 33px; font-size: 12px; }
.small-modal label > .animated-select-control { margin-top: 7px; }

#default-voice-dialog,
#default-breath-dialog {
  overflow: visible;
}

.animated-select-popover {
  position: fixed;
  z-index: 1000;
  max-height: min(310px, 48vh);
  padding: 6px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 42px #20304b2b, 0 3px 10px #20304b12;
  opacity: 0;
  transform: translateY(-6px) scale(.985);
  transform-origin: top center;
  transition: opacity .14s ease, transform .18s ease;
  overflow: hidden;
}

.animated-select-popover.is-visible:not(.hidden) {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.animated-select-list {
  max-height: calc(min(310px, 48vh) - 12px);
  padding: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c7d2e2 transparent;
}

.animated-select-list::-webkit-scrollbar { width: 7px; }
.animated-select-list::-webkit-scrollbar-track { background: transparent; }
.animated-select-list::-webkit-scrollbar-thumb { background: #c7d2e2; border-radius: 99px; }

.animated-select-option {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 42px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #26344c;
  text-align: left;
  opacity: 0;
  transform: translateY(7px) scale(.97);
  animation: animated-select-item-in .22s cubic-bezier(.2,.75,.3,1) forwards;
  animation-delay: min(calc(var(--animated-index) * 24ms), 168ms);
}

.animated-select-option:hover,
.animated-select-option.is-keyboard-active {
  background: #f1f6fd;
  border-color: #dbe8f8;
  color: #1769e0;
}

.animated-select-option.is-selected {
  background: #eaf3ff;
  border-color: #7cacf0;
  color: #1769e0;
  font-weight: 700;
}

.animated-radio-dot {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  display: grid;
  place-items: center;
  border: 1px solid #b8c5d6;
  border-radius: 50%;
  background: #fff;
  transition: border-color .16s, background .16s, box-shadow .16s;
}

.animated-radio-dot i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
  transition: transform .14s cubic-bezier(.2,.8,.3,1.25);
}

.animated-select-option:hover .animated-radio-dot,
.animated-select-option.is-keyboard-active .animated-radio-dot {
  border-color: #6c9de4;
}

.animated-select-option.is-selected .animated-radio-dot {
  border-color: #2f7bf4;
  background: #2f7bf4;
  animation: animated-radio-pulse .65s ease-out;
}

.animated-select-option.is-selected .animated-radio-dot i {
  transform: scale(1);
}

.animated-option-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.animated-select-gradient {
  position: absolute;
  left: 7px;
  right: 14px;
  z-index: 2;
  height: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s;
}

.animated-select-gradient.top { top: 6px; background: linear-gradient(#fff, #fff0); }
.animated-select-gradient.bottom { bottom: 6px; background: linear-gradient(#fff0, #fff); }

@keyframes animated-select-item-in {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes animated-radio-pulse {
  0% { box-shadow: 0 0 0 0 #2f7bf455; }
  70% { box-shadow: 0 0 0 8px #2f7bf400; }
  100% { box-shadow: 0 0 0 0 #2f7bf400; }
}

@media (prefers-reduced-motion: reduce) {
  .animated-select-popover,
  .animated-select-option { transition: none; animation: none; opacity: 1; transform: none; }
}

.control-cell.selected {
  background: #f8f8ff !important;
  box-shadow: inset 0 0 0 2px #7778ef;
}

.control-cell.readonly {
  background: #fafafa;
}

.text-cell {
  position: relative;
  width: 100%;
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  padding: 15px 12px;
  display: flex;
  align-items: center;
  color: #293149;
  outline: 0;
  overflow: hidden;
  transition: background .15s, box-shadow .15s;
}

.text-cell:hover {
  background: #fafaff;
}

.text-cell.selected {
  background: #f8f8ff;
  box-shadow: inset 0 0 0 2px #7778ef;
}

.text-cell.readonly {
  color: #8e96a8;
}

.text-cell.readonly .cell-content {
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

.text-cell.readonly:hover .expand-cell,
.text-cell.readonly:focus-within .expand-cell {
  display: grid;
  place-items: center;
}

.cell-content {
  width: 100%;
  min-height: 20px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  cursor: default;
}

.cell-content:not([contenteditable="true"]) {
  display: -webkit-box;
  max-height: 38px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.cell-content.placeholder {
  color: #a6adbc;
}

.cell-content[contenteditable="true"] {
  display: block;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  padding: 0;
  margin: 0;
  border: 0;
  cursor: text;
  border-radius: 0;
  outline: none !important;
  background: transparent;
  box-shadow: none;
  cursor: text;
  overflow-y: auto;
  white-space: pre-wrap;
  caret-color: #3033d8;
}

.expand-cell {
  display: none;
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid #d9daf0;
  border-radius: 6px;
  background: #fff;
  color: #5658e5;
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 4px 12px #3032691a;
  z-index: 5;
  pointer-events: auto;
}

.text-cell.selected .expand-cell {
  display: grid;
  place-items: center;
}

.expand-cell:hover {
  color: #fff;
  border-color: #595be6;
  background: #595be6;
}

.editor-modal {
  width: min(760px, calc(100% - 36px));
}

.editor-modal textarea {
  min-height: min(480px, 62vh);
  margin-top: 14px;
  margin-bottom: 14px;
  border: 0;
  border-radius: 0;
  font-size: 16px;
  line-height: 1.85;
  outline: 0;
}

.editor-modal textarea[readonly] {
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
  color: #293149;
  background: #fafafa;
}

.editor-modal footer {
  align-items: center;
  border-top: 1px solid #e7e8ee;
  padding-top: 12px;
}

.autosave-note {
  margin-right: auto;
  color: #9aa1b2;
  font-size: 11px;
}

.grid-cell {
  user-select: none;
  -webkit-user-select: none;
}

.grid-cell.selected {
  position: relative;
  background: #eef0ff !important;
  box-shadow: inset 0 0 0 1px #8b8cf1;
}

.grid-cell.active-cell {
  z-index: 2;
  box-shadow: inset 0 0 0 2px #5558e8;
}

.text-cell.selected:not(.active-cell) .expand-cell {
  display: none;
}

.text-cell.active-cell .expand-cell {
  display: grid;
  place-items: center;
}

.cell-content[contenteditable="true"] {
  user-select: text;
  -webkit-user-select: text;
}

.grid-cell.editing {
  user-select: text !important;
  -webkit-user-select: text !important;
  cursor: text;
}

body.selecting-cells,
body.selecting-cells .grid-cell {
  cursor: cell !important;
}

.order-tool-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.order-tools { flex-wrap:wrap; gap:10px; }
.order-filter-group,
.order-date-tools,
.custom-order-date-range,
.order-date-select,
.custom-order-date-range label { display:flex; align-items:center; }
.order-filter-group { min-width:0; gap:10px; }
.order-date-tools { gap:9px; }
.order-date-select,
.custom-order-date-range label {
  height:43px;
  gap:7px;
  padding:0 10px;
  border:1px solid #dfe5ed;
  border-radius:7px;
  background:#fff;
  color:#6d778c;
  font-size:11px;
  white-space:nowrap;
}
.order-date-select:focus-within,
.custom-order-date-range label:focus-within { border-color:#1769e0; box-shadow:0 0 0 3px #1769e012; }
.order-date-select select,
.custom-order-date-range input { border:0; outline:0; background:transparent; color:#263248; font-size:12px; }
.order-date-select select { min-width:94px; cursor:pointer; }
.custom-order-date-range { gap:7px; }
.custom-order-date-range label { padding-inline:9px; }
.custom-order-date-range input { width:112px; }
.custom-order-date-range > i { color:#929bad; font-size:11px; font-style:normal; }

.batch-download {
  height: 39px;
  padding: 0 15px;
  border: 1px solid #cfd1f4;
  border-radius: 9px;
  background: #f4f4ff;
  color: #4f52df;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 5px 14px #5255d71a;
}

.batch-download:hover {
  border-color: #6668e8;
  background: #ededff;
}

.batch-download:disabled {
  opacity: .65;
  cursor: wait;
}

.batch-download-help {
  height: 39px;
  padding: 0 13px;
  border: 1px solid #f0c56b;
  border-radius: 9px;
  background: #fff8e8;
  color: #9b6500;
  font-size: 11px;
  font-weight: 700;
}

.batch-permission-modal,
.batch-result-modal {
  width: min(650px, calc(100% - 30px));
  padding: 34px;
  text-align: center;
}

.batch-permission-modal::backdrop,
.batch-result-modal::backdrop {
  background: #11172bcc;
  backdrop-filter: blur(4px);
}

.batch-permission-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff0c8;
  color: #c87900;
  font-size: 38px;
  font-weight: 900;
}

.batch-permission-modal h2,
.batch-result-modal h2 { margin: 0 0 12px; font-size: 25px; }
.batch-permission-lead,
.batch-result-modal p { margin: 0 auto 20px; color: #687086; font-size: 14px; line-height: 1.7; }
.batch-permission-modal ol { margin: 0; padding: 18px 22px 18px 44px; border-radius: 12px; background: #f7f7fb; color: #343b50; text-align: left; font-size: 14px; line-height: 2; }
.batch-permission-warning { margin: 18px 0; padding: 13px; border: 1px solid #f2cc78; border-radius: 10px; background: #fff9e9; color: #9b6500; font-size: 13px; font-weight: 700; }
.batch-permission-confirm { width: 100%; height: 48px; font-size: 15px; }
.batch-result-actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }

.audio-grid-cell {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

.order-action-cell {
  position: relative;
  text-align: center;
}

.orders-table th:nth-child(7) {
  text-align: center;
}

.order-action-cell > .confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.order-action-cell > .confirm:not(:disabled) {
  width: min(100%, 96px);
  height: 40px;
  padding: 0 12px;
  border: 2px solid #315cfd;
  border-radius: 999px;
  background: #fff;
  color: #315cfd;
  box-shadow: none;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  transition: background-color .3s, color .3s, border-color .3s, font-size .3s, box-shadow .3s, transform .12s;
}

.order-action-cell > .confirm:not(:disabled):hover,
.order-action-cell > .confirm:not(:disabled):focus-visible {
  border-color: #315cfd;
  background: #315cfd;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 7px 16px #315cfd2b;
  outline: none;
}

.order-action-cell > .confirm:not(:disabled):active {
  transform: scale(.97);
}

.completed-action {
  position: relative;
  width: 100%;
  min-height: 40px;
  display: grid;
  place-items: center;
}

.completed-pill {
  min-width: 72px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid #cfe5fb;
  background: #eaf4ff;
  color: #2878c8;
  font-size: 12px;
  font-weight: 700;
  transition: opacity .15s;
}

.order-action-cell > .confirm.status-pending:disabled {
  border-color: #f2dfb8;
  background: #fff6e5;
  color: #ad7414;
}

.order-action-cell > .confirm.status-working:disabled {
  border-color: #c9eadb;
  background: #e8f7ef;
  color: #159565;
}

.order-action-cell > .confirm.status-done:disabled {
  border-color: #cfe5fb;
  background: #eaf4ff;
  color: #2878c8;
}

.order-action-cell > .confirm.status-error:disabled {
  border-color: #f4c8cf;
  background: #fff0f2;
  color: #d8495d;
}

.regenerate-order {
  position: absolute;
  inset: 0;
  width: min(100%, 96px);
  min-width: 78px;
  height: 40px;
  margin: auto;
  padding: 0 12px;
  border: 2px solid #f2b52b;
  border-radius: 999px;
  background: #fff;
  color: #9a6500;
  font-size: 11px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  white-space: nowrap;
  transition: opacity .15s, transform .12s, background-color .3s, color .3s, border-color .3s, font-size .3s, box-shadow .3s;
}

.completed-action:hover .completed-pill,
.completed-action:focus-within .completed-pill {
  opacity: 0;
}

.completed-action:hover .regenerate-order,
.completed-action:focus-within .regenerate-order {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.regenerate-order:hover {
  border-color: #f2b52b;
  background: #f2b52b;
  color: #4a3500;
  font-size: 12px;
  box-shadow: 0 7px 16px #f2b52b38;
}

.regenerate-order:active {
  transform: scale(.97) !important;
}

.regenerate-order:disabled {
  opacity: .6 !important;
  cursor: wait;
}

.retry-action .regenerate-order {
  border-color: #ef536d;
  color: #d84259;
  background: #fff7f8;
}

.retry-action .regenerate-order:hover,
.retry-action .regenerate-order:focus-visible {
  border-color: #ef536d;
  background: #ef536d;
  color: #fff;
  box-shadow: 0 7px 16px #ef536d2b;
}

.retry-action .error-pill {
  border-color: #f4c8cf;
  background: #fff0f2;
  color: #d8495d;
}

.audio-upload.has-file {
  gap: 6px;
  padding: 4px 6px 4px 9px;
  overflow: visible;
}

.audio-upload.has-file.downloaded {
  padding-right: 27px;
  border-color: #b8e4d3;
  background: #fbfffd;
}

.downloaded-check {
  position: absolute;
  right: 5px;
  bottom: 3px;
  z-index: 3;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #22a876;
  color: #fff;
  box-shadow: 0 2px 6px #15926738;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.audio-file-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: #4f51d9;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-upload.is-saving {
  border-style: solid;
  border-color: #cfd1ff;
  background: #f7f7ff;
}

.audio-saving {
  flex: 0 0 auto;
  color: #7779de;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.times .time-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: baseline;
  column-gap: 0;
  line-height: 1.3;
}

.times .time-row > span,
.times .time-row > b {
  min-width: 0;
  margin-left: 0;
  white-space: nowrap;
}

.worker-health-panel {
  margin-bottom: 16px;
  padding: 20px 22px;
  border: 1px solid #e4e5ec;
  border-radius: 11px;
  background: #fff;
}

.worker-health-panel > header,
.worker-machine-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.worker-health-panel > header > div > b { display:block; font-size:15px; }
.worker-health-panel > header > div > span,
.worker-machine-row span { display:block; margin-top:4px; color:#8b93a8; font-size:11px; }

.worker-online-state {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 70px;
  width: auto;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}

.worker-online-state::before { content:""; flex:0 0 7px; width:7px; height:7px; border-radius:50%; background:currentColor; box-shadow:0 0 0 4px currentColor; opacity:.85; }
.worker-online-state.ok { color:#12966b; background:#e7f7f0; }
.worker-online-state.error { color:#d94b5e; background:#fff0f2; }
.worker-machine-row { margin:17px 0 12px; padding-top:15px; border-top:1px solid #ececf2; }
.worker-machine-row b { font-size:12px; }

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

.worker-interface-card {
  position: relative;
  display: grid;
  grid-template-columns: 9px minmax(0,1fr) auto;
  gap: 10px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid #e6e7ee;
  border-radius: 9px;
  background: #fafafd;
}

.worker-interface-dot { width:9px; height:9px; margin-top:3px; border-radius:50%; background:#9da4b6; }
.worker-interface-card b { display:block; color:#252b3d; font-size:12px; }
.worker-interface-card p { min-height:30px; margin:5px 0 3px; color:#737c91; font-size:10px; line-height:1.45; }
.worker-interface-card small { color:#a0a6b6; font-size:9px; }
.worker-interface-card em { color:#8d94a6; font-size:10px; font-style:normal; font-weight:700; }
.worker-interface-card.ok { border-color:#ccebdd; background:#f7fcfa; }
.worker-interface-card.ok .worker-interface-dot { background:#19a875; box-shadow:0 0 0 4px #19a87518; }
.worker-interface-card.ok em { color:#149368; }
.worker-interface-card.error { border-color:#f1ccd2; background:#fff9fa; }
.worker-interface-card.error .worker-interface-dot { background:#e24f63; box-shadow:0 0 0 4px #e24f6318; }
.worker-interface-card.error em { color:#d74458; }

.admin-worker-actions { display:flex; flex:0 0 auto; align-items:center; gap:10px; min-width:max-content; overflow:visible; }
.admin-worker-actions .worker-online-state {
  display: inline-flex;
  flex: 0 0 112px;
  width: 112px;
  min-width: 112px;
  height: 36px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid currentColor;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}
.admin-worker-actions .worker-online-state::before { content:none; display:none; }
.worker-repair-button { box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; height:36px; margin:0; padding:0 14px; border:1px solid #d7d9e7; border-radius:8px; background:#fff; color:#5558df; font-size:11px; font-weight:700; line-height:1; vertical-align:middle; white-space:nowrap; }
.worker-repair-button:hover { border-color:#7778ed; background:#f5f5ff; }
.worker-repair-button.recommended { border-color:#ef6679; background:#fff1f3; color:#d84259; box-shadow:0 0 0 4px #ef536d12; }
.worker-repair-button:disabled { opacity:.65; cursor:wait; }
.worker-queue-summary { display:grid; grid-template-columns:150px 150px minmax(0,1fr); gap:10px; margin:0 0 12px; }
.worker-queue-summary > span { min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:0 13px; border:1px solid #e6e7ee; border-radius:9px; background:#fafafd; color:#7f879b; font-size:11px; }
.worker-queue-summary b { color:#222a3e; font-size:15px; }
.worker-queue-summary > span:last-child b { font-size:11px; text-align:right; }
.worker-repair-note { margin:12px 0 0; padding:10px 12px; border-radius:8px; background:#f6f6fb; color:#767e92; font-size:11px; }
.admin-top-grid {
  display:grid;
  grid-template-columns:minmax(0, 1.1fr) minmax(430px, .9fr);
  align-items:start;
  gap:18px;
  margin-bottom:18px;
}
.admin-worker-health-panel { margin-bottom:0; }
.admin-worker-health-panel .worker-interface-grid {
  grid-template-columns:repeat(6, minmax(0, 1fr));
}
.admin-worker-health-panel .worker-interface-card {
  grid-column:span 2;
}
.admin-worker-health-panel .worker-interface-card:nth-child(n + 4) {
  grid-column:span 3;
}

.studio-completion-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  min-height: 132px;
  margin-bottom: 16px;
  padding: 24px 28px;
  border: 1px solid #e4e5ec;
  border-radius: 11px;
  background: linear-gradient(135deg, #fff 55%, #f7f7ff);
}

.all-orders-overview { margin-bottom: 16px; }
.all-orders-overview .all-orders-completion-card { margin-bottom: 0; }

.studio-completion-card > div:first-child > span,
.studio-completion-card small {
  display: block;
  color: #8a92a7;
  font-size: 11px;
}

.studio-completion-card b {
  display: inline-block;
  margin: 7px 9px 5px 0;
  font-size: 34px;
  line-height: 1;
}

.studio-today-stats {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
}

.studio-today-stats article {
  min-width: 92px;
  padding: 12px 14px;
  border: 1px solid #e5e6ee;
  border-radius: 9px;
  background: #fff;
}

.studio-today-stats article > span {
  display: block;
  color: #81899d;
  font-size: 10px;
}

.studio-today-stats article > b {
  margin: 8px 4px 0 0;
  color: #20263a;
  font-size: 23px;
}

.studio-today-stats article.success > b {
  color: #15916a;
}

.studio-today-stats article.failed > b {
  color: #e14e62;
}

.studio-total-progress {
  width: min(520px, 50%);
  display: flex;
  align-items: center;
  gap: 13px;
}

.studio-total-progress > div {
  height: 9px;
  flex: 1;
  overflow: hidden;
  border-radius: 99px;
  background: #ececf4;
}

.studio-total-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5d5feb, #8889f7);
  transition: width .25s ease;
}

.studio-total-progress span {
  min-width: 38px;
  color: #5558df;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.studio-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(390px, .85fr);
  align-items: stretch;
  gap: 16px;
  margin-bottom: 16px;
}

.studio-overview-grid .worker-health-panel,
.studio-overview-grid .studio-completion-card {
  min-width: 0;
  height: 100%;
  margin-bottom: 0;
}

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

.studio-overview-grid .worker-interface-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.studio-overview-grid .studio-completion-card {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  flex-direction: column;
  gap: 22px;
  padding: 24px;
}

.studio-overview-grid .studio-completion-card > div:first-child {
  padding-bottom: 18px;
  border-bottom: 1px solid #e9eaf1;
}

.studio-overview-grid .studio-today-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.studio-overview-grid .studio-today-stats article {
  min-width: 0;
  padding: 12px;
}

.studio-overview-grid .studio-total-progress {
  width: 100%;
  margin-top: auto;
  padding-top: 4px;
}

.studio-recent-panel {
  overflow: hidden;
  border: 1px solid #e4e5ec;
  border-radius: 11px;
  background: #fff;
}

@media (max-width: 1200px) {
  .studio-overview-grid { grid-template-columns: 1fr; }
  .studio-overview-grid .worker-interface-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .studio-overview-grid .worker-interface-card:last-child:nth-child(odd) { grid-column: auto; }
}

.studio-recent-panel > header {
  padding: 17px 20px;
  border-bottom: 1px solid #e8e9ef;
}

.studio-recent-panel > header b,
.studio-recent-panel > header span {
  display: block;
}

.studio-recent-panel > header b {
  font-size: 14px;
}

.studio-recent-panel > header span {
  margin-top: 5px;
  color: #9299aa;
  font-size: 10px;
}

.studio-recent-head,
.studio-recent-row {
  display: grid;
  grid-template-columns: 1.4fr .8fr .7fr;
  align-items: center;
  column-gap: 18px;
  padding: 0 20px;
}

.studio-recent-head {
  height: 39px;
  color: #858da1;
  background: #f8f8fa;
  font-size: 11px;
}

.studio-recent-panel .studio-list {
  border: 0;
  border-radius: 0;
}

.studio-recent-row {
  min-height: 58px;
  border-bottom: 1px solid #ececf1;
  font-size: 12px;
}

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

.studio-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef0ff;
  color: #5558df;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.studio-status.pending {
  background: #fff5df;
  color: #b47a15;
}

.studio-status.working {
  background: #e9f8f2;
  color: #15916a;
}

.small-modal input[readonly] {
  color: #6f7688;
  background: #f5f6f9;
  cursor: default;
}

.voice-column-heading { display:inline-flex; align-items:center; gap:7px; }
.voice-default-settings { width:25px; height:25px; display:grid; place-items:center; padding:0; border:1px solid #dfe1ea; border-radius:7px; background:#fff; color:#6668df; font-size:14px; line-height:1; }
.voice-default-settings:hover { border-color:#7778ed; background:#f1f1ff; }
#default-voice-dialog select { display:block; width:100%; height:41px; margin-top:7px; padding:0 34px 0 11px; border:1px solid #dfe1ea; border-radius:8px; background:#fff; color:#293149; outline:0; }
#default-voice-dialog select:focus { border-color:#7778ed; box-shadow:0 0 0 3px #5b5ceb12; }
.preference-note { margin:0 22px 20px; padding:11px 12px; border-radius:8px; background:#f6f6fb; color:#7d8497; font-size:11px; line-height:1.55; }

.small-modal .primary:disabled {
  opacity: .7;
  cursor: wait;
}

.voice-meta {
  margin: 0;
  color: #8d95a7;
  font-size: 11px;
}

.voice-grid {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.voice-toolbar-actions { display:flex; align-items:center; gap:10px; }

.compact-voice-card {
  position: relative;
  min-width: 0;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.voice-order-number {
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: #5b5ceb;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.voice-order-control { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px; }
.voice-order-actions { min-width:0; display:flex; align-items:center; justify-content:flex-end; gap:10px; }
.voice-order-control label { display:flex; align-items:center; gap:7px; color:#858ca0; font-size:11px; font-weight:600; }
.voice-order-control select { width:62px; height:30px; padding:0 24px 0 10px; border:1px solid #dfe1ea; border-radius:7px; background:#fff; color:#343b50; outline:0; cursor:pointer; }
.voice-order-control select:hover,.voice-order-control select:focus { border-color:#7778ed; box-shadow:0 0 0 3px #5b5ceb10; }

.compact-voice-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.compact-voice-card .voice-icon {
  margin-bottom: 16px;
}

.voice-playback-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}

.voice-playback-row .voice-meta {
  flex: 0 0 auto;
  min-width: 82px;
  white-space: nowrap;
}

.voice-inline-player {
  width: 0;
  max-width: none;
  min-width: 0;
  height: 34px;
  flex: 1 1 0;
}

.voice-delete-button {
  position: static;
  flex: 0 0 auto;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 13px;
  border-radius: 7px;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #ffabb5;
  color: #ec5267;
  opacity: 0;
  pointer-events: none;
  transform: none;
  transition: opacity .15s, background .15s;
}

.compact-voice-card:hover .voice-delete-button,
.compact-voice-card:focus-within .voice-delete-button {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.voice-delete-button:hover {
  background: #fff2f4;
}

.voice-delete-button .trash-icon {
  width: 10px;
  height: 12px;
}

@media (max-width: 1700px) {
  .voice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

@media (max-width: 720px) {
  .voice-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.audio-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.audio-action {
  height: 28px;
  padding: 0 8px;
  border: 1px solid #cfd2f1;
  border-radius: 6px;
  background: #fff;
  color: #5053df;
  font-size: 10px;
  font-weight: 700;
}

.audio-action:hover {
  border-color: #6567e9;
  background: #f1f1ff;
}

.audio-actions .remove {
  height: 28px;
  padding: 0 7px;
}

.audio-hover-actions {
  position: absolute;
  top: 50%;
  right: 5px;
  z-index: 4;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 58px;
  gap: 4px;
  width: max-content;
  max-width: none;
  padding: 3px;
  border: 1px solid #e0e1f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 18px #26295a20;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(5px);
  transition: opacity .15s, transform .15s;
}

.audio-upload.has-file.downloaded .audio-hover-actions {
  right: 30px;
}

.audio-hover-actions .audio-action,
.audio-hover-actions .audio-delete {
  width: 58px;
  min-width: 58px;
  height: 28px;
  padding: 0 8px !important;
  white-space: nowrap;
  line-height: 1;
}

.audio-hover-actions .audio-delete {
  position: static;
  inset: auto;
  z-index: auto;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.audio-upload.has-file:hover .audio-hover-actions,
.audio-upload.has-file:focus-within .audio-hover-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.audio-delete {
  position: absolute;
  top: 50%;
  right: 5px;
  z-index: 5;
  width: auto;
  min-width: 60px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 9px !important;
  border: 2px solid #ef536d !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #ef536d;
  font-size: 11px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(4px);
  transition: opacity .15s, transform .15s, background-color .3s, color .3s, box-shadow .3s;
}

.audio-upload.has-file:hover > .audio-delete,
.audio-upload.has-file:focus-within > .audio-delete,
.local-voice-empty:hover .audio-delete,
.local-voice-empty:focus-within .audio-delete {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.audio-delete:hover,
.audio-delete:focus-visible {
  background: #ef536d !important;
  color: #fff;
  box-shadow: 0 6px 14px #ef536d2b;
  outline: none;
}

.trash-icon {
  position: relative;
  width: 9px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-top: 0;
  border-radius: 0 0 2px 2px;
}

.trash-icon::before {
  content: "";
  position: absolute;
  left: -2.5px;
  top: -3px;
  width: 11px;
  border-top: 1.5px solid currentColor;
}

.trash-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  top: -5.5px;
  width: 3px;
  height: 2px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
}

.audio-modal {
  width: min(520px, calc(100% - 30px));
}

.audio-preview {
  padding: 27px 28px 20px;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.audio-preview-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #5b5ceb;
  color: #fff;
  font-size: 28px;
  box-shadow: 0 10px 25px #5557e638;
}

.audio-preview b {
  max-width: 100%;
  overflow: hidden;
  color: #6d7487;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#audio-player {
  width: 100%;
  margin-top: 5px;
}

.stop-audio {
  height: 40px;
  padding: 0 15px;
  border: 1px solid #f2b7bd;
  border-radius: 8px;
  background: #fff6f7;
  color: #d44957;
  font-weight: 700;
}

.order-number-cell {
  position: relative;
}

.order-number {
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.order-delete {
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 3;
  min-width: 60px;
  height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 9px;
  border: 2px solid #ef536d;
  border-radius: 999px;
  background: #fff;
  color: #ef536d;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(4px);
  transition: opacity .15s, transform .15s, background-color .3s, color .3s, box-shadow .3s;
}

.order-number-cell:hover .order-delete,
.order-number-cell:focus-within .order-delete {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.order-delete:hover,
.order-delete:focus-visible {
  background: #ef536d;
  color: #fff;
  box-shadow: 0 6px 14px #ef536d2b;
  outline: none;
}

.local-voice-empty {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
}

.local-voice-empty .audio-upload {
  min-width: 0;
  flex: 1;
}

.local-voice-file {
  width: 100%;
}

.local-voice-waiting {
  display: block;
  color: #9aa1b2;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 720px) {
  .text-edit-td { height: 67px !important; max-height: 67px !important; }
  .orders-table tbody tr { height: 67px; }
  .text-cell { height: 66px; min-height: 66px; max-height: 66px; }
  .editor-modal textarea { min-height: 55vh; }
  .studio-completion-card { align-items: stretch; flex-direction: column; gap: 18px; }
  .studio-total-progress { width: 100%; }
  .worker-health-panel > header,
  .worker-machine-row { align-items:flex-start; flex-direction:column; }
  .worker-interface-grid { grid-template-columns:1fr; }
  .admin-worker-actions { width:100%; justify-content:space-between; }
  .worker-queue-summary { grid-template-columns:1fr; }
  .studio-overview-grid .worker-interface-grid { grid-template-columns:1fr; }
  .studio-overview-grid .worker-interface-card:last-child:nth-child(odd) { grid-column:auto; }
  .studio-overview-grid .studio-today-stats { grid-template-columns:1fr; }
  .studio-recent-head,
  .studio-recent-row { grid-template-columns: 1.25fr .75fr .75fr; column-gap: 8px; padding: 0 12px; }
  .order-filter-group,
  .order-date-tools { width:100%; align-items:stretch; flex-direction:column; }
  .custom-order-date-range { width:100%; }
  .custom-order-date-range label { min-width:0; flex:1; }
  .custom-order-date-range input { width:100%; }
  .order-tool-actions { align-items: stretch; flex-direction: column; }
  .batch-download { width: 100%; }
  .voice-toolbar-actions { width:100%; align-items:stretch; flex-direction:column; }
}
.auth-pending .topbar,
.auth-pending .workspace {
  display: none;
}

.auth-checking .auth-screen {
  visibility: hidden;
}

.auth-checking {
  min-height: 100vh;
  background: #f6f8fc;
}

[data-grid-cell][data-field="voice"].voice-drop-target {
  position: relative;
  background: #eef6ff;
  box-shadow: inset 0 0 0 2px #2f7bf4;
}

[data-grid-cell][data-field="voice"].voice-drop-target::after {
  content: "松开即可上传音频";
  position: absolute;
  inset: 6px;
  z-index: 5;
  display: grid;
  place-items: center;
  border: 1px dashed #2f7bf4;
  border-radius: 8px;
  background: #eef6fff2;
  color: #1765d1;
  font-size: 12px;
  font-weight: 700;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(145deg, #f7f7ff, #ffffff 52%, #f5f6ff);
}

.auth-card {
  width: min(430px, 100%);
  padding: 30px;
  border: 1px solid #e2e3ee;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px #34365c1f;
}

.auth-brand { display:flex; align-items:center; gap:12px; margin-bottom:28px; }
.auth-brand b { display:block; font-size:20px; }
.auth-brand small { display:block; margin-top:4px; color:#9299ad; }
.auth-form h1 { margin:0 0 7px; font-size:25px; }
.auth-form > p { margin:0 0 22px; color:#858da0; font-size:12px; }
.auth-form label { display:block; margin:14px 0; color:#596174; font-size:12px; }
.auth-form input { display:block; width:100%; height:44px; margin-top:7px; border:1px solid #dfe1ea; border-radius:9px; padding:0 12px; outline:0; }
.auth-form input:focus { border-color:#6668ee; box-shadow:0 0 0 3px #5b5ceb12; }
.auth-form .primary { width:100%; margin-top:10px; }
.auth-switch { display:block; margin:16px auto 0; border:0; background:transparent; color:#5557e4; font-size:12px; }
.auth-message { min-height:20px; margin-top:15px; color:#d84259; text-align:center; font-size:12px; }
.auth-message.success { color:#139565; }
.auth-password-note { padding:10px 12px; border-radius:8px; background:#f5f5fa; color:#7d8497; font-size:11px; }
.account-menu { display:flex; align-items:center; gap:9px; color:#555d70; font-size:12px; font-weight:700; }
.account-menu button { height:32px; border:1px solid #e0e1e9; border-radius:7px; background:#fff; color:#747b90; }
.account-review-panel { display:flex; min-width:0; min-height:0; margin-bottom:0; padding:20px 22px; flex-direction:column; overflow:hidden; border:1px solid #e4e5ec; border-radius:11px; background:#fff; }
.account-review-panel > header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.account-review-panel > header b { display:block; font-size:15px; }
.account-review-panel > header span { display:block; margin-top:4px; color:#9299ad; font-size:11px; }
.account-review-panel > .table-shell { flex:1 1 auto; min-height:0; overflow:auto; border:1px solid #e5e9f2; border-radius:9px; }
.account-review-panel .admin-table { margin:0; }
.account-review-panel .admin-table thead { position:sticky; top:0; z-index:2; background:#f7f9fc; }
.account-status { display:inline-flex; min-width:58px; height:27px; align-items:center; justify-content:center; border-radius:999px; background:#fff4df; color:#b87300; font-size:11px; }
.account-status.approved { background:#e5f6ef; color:#139565; }
.account-status.rejected { background:#fff0f2; color:#d8495d; }
.account-status.deletion_pending { background:#f1f2f6; color:#6f778b; }
.account-delete-time { margin-top:5px; color:#9a6470; font-size:9px; white-space:nowrap; }
.approve-account { height:31px; border:0; border-radius:7px; padding:0 12px; background:#5b5ceb; color:#fff; font-size:11px; font-weight:700; }
.account-actions { display:flex; align-items:center; flex-wrap:wrap; gap:7px; white-space:normal; }
.account-role { color:#526077; font-weight:700; }
.account-role.super { color:#256de8; }
.role-account { border:1px solid #8eb8f8; background:#f3f8ff; color:#256de8; }
.role-account:hover { border-color:#4b8df2; background:#eaf3ff; }
.role-account.demote { border-color:#efb9c0; background:#fff7f8; color:#d94b5e; }
.reset-password-account { height:31px; border:1px solid #cfd2e5; border-radius:7px; padding:0 12px; background:#fff; color:#4f5870; font-size:11px; font-weight:700; }
.reset-password-account:hover { border-color:#696aec; color:#5557df; background:#f8f8ff; }
.reject-account,.delete-account,.restore-account { height:31px; border-radius:7px; padding:0 12px; font-size:11px; font-weight:700; }
.reject-account { border:1px solid #efb7bf; background:#fff7f8; color:#d8495d; }
.delete-account { border:1px solid #e5a7b0; background:#fff; color:#d43f53; }
.restore-account { border:1px solid #a8d9c6; background:#f2fbf7; color:#148961; }

/* Default order grid always fits the available viewport. User-resized pixel widths
   are applied inline by app.js and may scroll only when the user makes them wider. */
.orders-table { width:100%; min-width:0; }
.orders-table th:nth-child(1) { width:7.5%; }
.orders-table th:nth-child(2) { width:6.5%; }
.orders-table th:nth-child(3) { width:14%; }
.orders-table th:nth-child(4) { width:6%; }
.orders-table th:nth-child(5) { width:13%; }
.orders-table th:nth-child(6) { width:10.5%; }
.orders-table th:nth-child(7) { width:8%; }
.orders-table th:nth-child(8) { width:9%; }
.orders-table th:nth-child(9) { width:15%; }
.orders-table th:nth-child(10) { width:10.5%; }
.small-modal label select { display:block; width:100%; height:41px; margin-top:7px; border:1px solid #e7e8ee; border-radius:8px; padding:0 11px; background:#fff; }

/* Local preview: per-order IndexTTS 2.5 controls. */
.advanced-settings-cell { text-align:center; }
.advanced-settings-button { width:100%; min-width:86px; height:40px; display:inline-flex; align-items:center; justify-content:center; gap:6px; border:2px solid #2f62ff; border-radius:999px; background:#fff; color:#2f62ff; font-size:12px; font-weight:700; transition:color .18s,border-color .18s,background .18s,box-shadow .18s,transform .18s; }
.advanced-settings-button:hover { border-color:#2f62ff; background:#2f62ff; color:#fff; box-shadow:0 7px 16px #2f62ff38; transform:translateY(-1px); }
.advanced-settings-button.configured { border-color:#2f62ff; background:#fff; color:#2f62ff; }
.advanced-settings-button.configured:hover { background:#2f62ff; color:#fff; }
.advanced-settings-button:disabled { cursor:default; opacity:.72; box-shadow:none; }
.advanced-settings-gear { width:20px; height:20px; display:grid; place-items:center; border-radius:6px; background:#e9f1ff; font-size:12px; line-height:1; transition:background .18s; }
.advanced-settings-button.configured .advanced-settings-gear { background:#e9f1ff; }
.advanced-settings-button:hover .advanced-settings-gear { background:#ffffff2e; }
.advanced-settings-unavailable { color:#b0b7c7; }

.advanced-settings-modal { width:min(920px,calc(100% - 34px)); max-height:min(760px,calc(100vh - 34px)); overflow:hidden; }
.advanced-settings-modal form { display:flex; flex-direction:column; max-height:min(760px,calc(100vh - 34px)); }
.advanced-settings-modal header { flex:0 0 auto; align-items:flex-start; padding:21px 24px 18px; }
.advanced-settings-modal header h2 { font-size:21px; }
.advanced-settings-modal header p { margin:6px 0 0; color:#8b95aa; font-size:11px; }
.advanced-settings-layout { min-height:420px; display:grid; grid-template-columns:224px minmax(0,1fr); overflow:hidden; background:#fff; }
.advanced-settings-nav { padding:18px 12px; border-right:1px solid #e7ecf4; background:#f8faff; overflow:auto; }
.advanced-settings-nav button { width:100%; min-height:49px; display:flex; align-items:center; gap:11px; margin-bottom:7px; padding:0 13px; border:1px solid transparent; border-radius:10px; background:transparent; color:#58647a; text-align:left; font-size:13px; font-weight:700; }
.advanced-settings-nav button span { width:25px; height:25px; flex:0 0 auto; display:grid; place-items:center; border-radius:8px; background:#e9eef7; color:#8a96aa; font-size:10px; }
.advanced-settings-nav button:hover { background:#f0f5fd; color:#2e6fdf; }
.advanced-settings-nav button.active { border-color:#a9c8ff; background:#edf5ff; color:#2268e6; box-shadow:0 4px 14px #357be515; }
.advanced-settings-nav button.active span { background:#357cf0; color:#fff; }
.advanced-settings-content { min-width:0; overflow:auto; padding:26px 30px; }
.advanced-settings-panel { display:none; animation:advancedPanelIn .18s ease-out; }
.advanced-settings-panel.active { display:block; }
@keyframes advancedPanelIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
.advanced-panel-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding-bottom:19px; margin-bottom:20px; border-bottom:1px solid #edf0f5; }
.advanced-panel-heading b { display:block; color:#18233a; font-size:17px; }
.advanced-panel-heading p { margin:6px 0 0; color:#8b95a8; font-size:12px; }
.advanced-panel-heading output { min-width:112px; padding:8px 11px; border-radius:9px; background:#edf5ff; color:#246ee7; text-align:center; font-size:16px; font-weight:800; }
.local-preview-badge { padding:5px 9px; border-radius:999px; background:#fff5df; color:#b87505; font-size:10px; font-weight:700; }
.emotion-choice-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:11px; }
.emotion-choice-grid label { display:block; margin:0; cursor:pointer; color:inherit; }
.emotion-choice-grid input { position:absolute; opacity:0; pointer-events:none; }
.emotion-choice-grid label > span { min-height:78px; display:flex; flex-direction:column; justify-content:center; padding:14px 15px; border:1px solid #dfe5ef; border-radius:11px; background:#fff; color:#344158; font-size:14px; font-weight:700; transition:.18s; }
.emotion-choice-grid label > span small { margin-top:6px; color:#98a2b4; font-size:11px; font-weight:400; }
.emotion-choice-grid input:checked + span { border-color:#4a88f4; background:#eef5ff; color:#2169e8; box-shadow:0 0 0 2px #4a88f41a; }
.emotion-choice-grid input:disabled + span { cursor:default; opacity:.55; }
.advanced-setting-tip { margin:19px 0 0; padding:11px 13px; border-radius:9px; background:#f6f8fb; color:#7e899e; font-size:11px; line-height:1.6; }
.advanced-setting-tip.highlight { background:#eef7ff; color:#3471ce; }
.strength-range-wrap { display:grid; grid-template-columns:40px minmax(0,1fr) 40px; align-items:center; gap:14px; padding:30px 12px 8px; color:#7d899c; font-size:11px; }
.strength-range-wrap input { width:100%; accent-color:#347cf0; }
.strength-marks { display:flex; justify-content:space-between; padding:0 56px; color:#a2aabb; font-size:10px; }
.advanced-switch-card { display:flex; align-items:center; justify-content:space-between; gap:24px; margin:0; padding:18px; border:1px solid #dfe6ef; border-radius:12px; background:#fbfcfe; color:#344158; }
.advanced-switch-card span b,.advanced-switch-card span small { display:block; }
.advanced-switch-card span b { font-size:14px; }
.advanced-switch-card span small { max-width:520px; margin-top:7px; color:#8994a8; font-size:11px; line-height:1.55; font-weight:400; }
.advanced-switch-card input { position:absolute; opacity:0; pointer-events:none; }
.advanced-switch-card i { width:48px; height:27px; flex:0 0 auto; position:relative; border-radius:999px; background:#cdd4df; transition:.18s; }
.advanced-switch-card i::after { content:""; width:21px; height:21px; position:absolute; left:3px; top:3px; border-radius:50%; background:#fff; box-shadow:0 2px 6px #1c2b4630; transition:.18s; }
.advanced-switch-card input:checked + i { background:#347cf0; }
.advanced-switch-card input:checked + i::after { transform:translateX(21px); }
.advanced-textarea-label { display:block; margin:0 0 8px; color:#5c687e; font-size:12px; font-weight:700; }
.pronunciation-examples { display:grid; grid-template-columns:max-content 1fr; gap:3px 12px; margin:0 0 10px; padding:10px 12px; border:1px solid #edf0f5; border-radius:10px; background:#fafbfd; color:#5c687e; font-size:12px; font-weight:700; line-height:1.5; }
.pronunciation-examples b { grid-row:1 / span 4; color:inherit; font-weight:inherit; white-space:nowrap; }
.pronunciation-examples span { min-width:0; }
.advanced-settings-modal #pronunciation-rules { width:100%; min-height:170px; margin:0; padding:13px 14px; border:1px solid #dfe5ee; border-radius:10px; resize:vertical; color:#2e3b52; line-height:1.7; }
.advanced-settings-modal #pronunciation-rules:focus { outline:0; border-color:#5c91ef; box-shadow:0 0 0 3px #4383ef16; }
.pause-setting-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.pause-setting-grid.three-columns { grid-template-columns:repeat(3,minmax(0,1fr)); }
.pause-setting-grid label { margin:0; color:#5d687c; font-size:12px; font-weight:700; }
.pause-setting-grid select { width:100%; height:43px; display:block; margin-top:8px; padding:0 12px; border:1px solid #dce3ed; border-radius:9px; background:#fff; color:#334158; }
.advanced-settings-modal footer { flex:0 0 auto; align-items:center; padding:15px 22px; border-top:1px solid #e8edf4; background:#fff; }
.advanced-local-note { margin-right:auto; color:#9aa4b6; font-size:10px; }

@media (max-width: 760px) {
  .advanced-settings-modal { width:calc(100% - 16px); max-height:calc(100vh - 16px); }
  .advanced-settings-modal form { max-height:calc(100vh - 16px); }
  .advanced-settings-layout { grid-template-columns:1fr; min-height:0; overflow:auto; }
  .advanced-settings-nav { display:flex; gap:6px; padding:10px; border-right:0; border-bottom:1px solid #e7ecf4; overflow:auto; }
  .advanced-settings-nav button { width:auto; min-width:max-content; min-height:38px; margin:0; padding:0 10px; font-size:11px; }
  .advanced-settings-nav button span { width:20px; height:20px; }
  .advanced-settings-content { padding:20px 16px 24px; overflow:visible; }
  .emotion-choice-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .pause-setting-grid { grid-template-columns:1fr; }
  .pause-setting-grid.three-columns { grid-template-columns:1fr; }
  .pronunciation-examples { grid-template-columns:1fr; }
  .pronunciation-examples b { grid-row:auto; }
  .advanced-settings-modal footer { flex-wrap:wrap; padding:12px; }
  .advanced-local-note { width:100%; margin:0 0 2px; }
}

@media (max-width: 1180px) {
  .admin-top-grid { grid-template-columns:1fr; }
  .account-review-panel { height:auto !important; max-height:520px; }
}

@media (max-width: 720px) {
  .admin-worker-health-panel .worker-interface-grid { grid-template-columns:1fr; }
  .admin-worker-health-panel .worker-interface-card,
  .admin-worker-health-panel .worker-interface-card:nth-child(n + 4) { grid-column:auto; }
}
