* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f5f6f8;
  color: #1d2329;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.is-hidden {
  display: none !important;
}

html.direct-login-route #loginView { display: grid !important; }
html.direct-login-route #appView { display: none !important; }

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

.login-panel {
  width: min(380px, 100%);
  padding: 28px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  gap: 16px;
}

.login-panel h1 {
  font-size: 22px;
}

.login-panel p {
  color: #667085;
  font-size: 14px;
}

.login-panel label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
}

.login-panel input {
  height: 42px;
  border: 1px solid #cfd6dd;
  border-radius: 6px;
  padding: 0 10px;
  color: #1d2329;
  font: inherit;
}

#loginBtn {
  background: #1f6feb;
  border-color: #1f6feb;
  color: white;
}

.phone-auth-panel {
  display: grid;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px solid #e4e7ec;
}

.phone-auth-panel h2 {
  color: #1d2939;
  font-size: 15px;
}

.phone-auth-panel p {
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.phone-auth-panel select {
  width: 100%;
  height: 42px;
  border: 1px solid #cfd6dd;
  border-radius: 6px;
  padding: 0 10px;
  background: #ffffff;
  color: #1d2329;
  font: inherit;
}

.sms-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.sms-code-row input {
  min-width: 0;
}

.sms-code-row button,
.phone-auth-actions button {
  height: 42px;
  padding: 0 12px;
  font-size: 13px;
}

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

.phone-auth-actions .primary {
  border-color: #1f6feb;
  background: #1f6feb;
  color: #ffffff;
}

.phone-auth-status {
  min-height: 18px;
  color: #b42318 !important;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 24px;
}

.call {
  width: min(920px, 100%);
  min-height: min(760px, calc(100vh - 48px));
  background: #ffffff;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #e8ebef;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px;
}

#logoutBtn {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.account-button {
  height: 34px;
  max-width: 250px;
  overflow: hidden;
  padding: 0 12px;
  border-color: #b9d4f8;
  background: #eff6ff;
  color: #175ca7;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboardBtn,
#historyBtn,
#feedbackBtn,
#personalCenterBtn,
#regressionBtn,
#scenarioAdminBtn {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 20px;
  line-height: 1.2;
}

.product-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.product-version {
  color: #667085;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

#status {
  margin-top: 6px;
  color: #667085;
  font-size: 14px;
}

.meter {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #667085;
  font-size: 13px;
}

.meter div {
  width: 120px;
  height: 8px;
  background: #edf0f3;
  border-radius: 999px;
  overflow: hidden;
}

.meter i {
  display: block;
  width: 0%;
  height: 100%;
  background: #18a058;
}

.customer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: #fafbfc;
  border-bottom: 1px solid #e8ebef;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #22324a;
  color: white;
  font-size: 24px;
  font-weight: 700;
}

.customer h2 {
  font-size: 18px;
}

.customer p {
  margin-top: 4px;
  color: #667085;
  font-size: 14px;
}

.harness {
  display: grid;
  grid-template-columns: 1fr 2fr 84px;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid #e8ebef;
  background: #ffffff;
}

.harness div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.harness span {
  color: #667085;
  font-size: 12px;
}

.harness strong {
  color: #1d2329;
  font-size: 14px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.harness-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid #e8ebef;
  background: #fbfcfd;
}

.harness-detail div {
  min-width: 0;
}

.harness-detail span {
  display: block;
  margin-bottom: 4px;
  color: #667085;
  font-size: 12px;
}

.harness-detail p {
  min-height: 20px;
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.harness-detail .warn {
  color: #b42318;
}

.learning {
  padding: 12px 24px;
  border-bottom: 1px solid #e8ebef;
  background: #ffffff;
}

.learning > span {
  display: block;
  margin-bottom: 8px;
  color: #667085;
  font-size: 12px;
}

#learningSignals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.learn-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #f9fafb;
  font-size: 13px;
}

.learn-chip button {
  height: 24px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 12px;
}

.learn-chip button:first-of-type {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}

.learn-chip button:last-of-type {
  background: #fef3f2;
  border-color: #fecdca;
  color: #b42318;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid #e8ebef;
}

.difficulty-experiment-panel {
  padding: 12px 24px;
  border-bottom: 1px solid #e8ebef;
  background: #f8fafc;
}

.difficulty-experiment-panel summary {
  width: fit-content;
  cursor: pointer;
  color: #344054;
  font-size: 13px;
}

.difficulty-experiment-panel summary span {
  margin-right: 8px;
  padding: 2px 5px;
  border: 1px solid #98a2b3;
  border-radius: 4px;
  color: #475467;
  font-size: 10px;
  font-weight: 600;
}

.difficulty-experiment-fields {
  margin-top: 12px;
  display: grid;
  gap: 7px;
}

.difficulty-experiment-fields label,
.difficulty-experiment-meta {
  color: #667085;
  font-size: 12px;
}

.difficulty-experiment-fields textarea {
  width: 100%;
  min-height: 88px;
  border: 1px solid #cfd6dd;
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  color: #1d2329;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

.difficulty-experiment-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.difficulty-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #667085;
  font-size: 13px;
}

.difficulty-control select {
  height: 40px;
  min-width: 96px;
  border: 1px solid #cfd6dd;
  border-radius: 6px;
  background: white;
  color: #1d2329;
  padding: 0 10px;
  font: inherit;
}

.voice-control select {
  min-width: 180px;
}

.persona-control select {
  width: 260px;
  max-width: min(42vw, 360px);
}

button {
  height: 40px;
  border: 1px solid #cfd6dd;
  border-radius: 6px;
  background: white;
  color: #1d2329;
  padding: 0 16px;
  font: inherit;
  cursor: pointer;
}

#startBtn {
  background: #1f6feb;
  border-color: #1f6feb;
  color: white;
}

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

.transcript {
  padding: 20px 24px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.line {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.5;
  font-size: 15px;
}

.line.user {
  align-self: flex-end;
  background: #e8f2ff;
}

.line.ai {
  align-self: flex-start;
  background: #f0f2f5;
}

.line.system {
  max-width: 100%;
  align-self: center;
  background: transparent;
  color: #667085;
  font-size: 13px;
}

.management-panel {
  width: min(1180px, 100%);
  background: #ffffff;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  overflow: hidden;
}

.management-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #e8ebef;
}

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

.management-head p {
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
}

.management-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.management-actions select {
  height: 36px;
  border: 1px solid #cfd6dd;
  border-radius: 6px;
  background: #ffffff;
  color: #1d2329;
  padding: 0 10px;
  font: inherit;
}

.history-search-control {
  height: 36px;
  min-width: 240px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #cfd6dd;
  border-radius: 6px;
  background: #ffffff;
}

.history-search-control span {
  color: #667085;
  font-size: 13px;
  white-space: nowrap;
}

.history-search-control input {
  width: 160px;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1d2329;
  font: inherit;
}

.inline-check {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #cfd6dd;
  border-radius: 6px;
  background: #ffffff;
  color: #344054;
  font-size: 13px;
  white-space: nowrap;
}

.inline-check input {
  margin: 0;
}

.management-actions button {
  height: 36px;
}

.dashboard-body {
  padding: 18px 20px 22px;
}

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

.dashboard-card {
  min-height: 86px;
  padding: 14px;
  border: 1px solid #e8ebef;
  border-radius: 8px;
  background: #fbfcfd;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.dashboard-card strong {
  color: #1d2329;
  font-size: 28px;
  line-height: 1;
}

.dashboard-card span {
  color: #667085;
  font-size: 13px;
}

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

.dashboard-section {
  min-height: 220px;
  padding: 14px;
  border: 1px solid #e8ebef;
  border-radius: 8px;
  background: #ffffff;
}

.dashboard-section h3 {
  margin: 0 0 12px;
  color: #1d2329;
  font-size: 15px;
}

.stat-list,
.latest-list {
  display: grid;
  gap: 10px;
}

.stat-list p,
.latest-list p {
  color: #667085;
  font-size: 13px;
}

.stat-row {
  position: relative;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.stat-row span,
.stat-row strong {
  position: relative;
  z-index: 1;
  font-size: 13px;
}

.stat-row span {
  color: #344054;
}

.stat-row strong {
  color: #1d2329;
}

.stat-row i {
  position: absolute;
  inset: 0 auto 0 0;
  background: #e8f2ff;
}

.latest-session {
  width: 100%;
  height: auto;
  min-height: 38px;
  padding: 9px 10px;
  text-align: left;
  line-height: 1.4;
}

.history-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: min(680px, calc(100vh - 150px));
}

.history-list {
  max-height: min(680px, calc(100vh - 150px));
  overflow: auto;
  padding: 14px;
  border-right: 1px solid #e8ebef;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 82px;
  border: 1px solid #e8ebef;
  border-radius: 8px;
  background: #fbfcfd;
  color: #1d2329;
  line-height: 1.35;
  overflow: hidden;
}

.history-item:hover {
  border-color: #b7c6d6;
  background: #ffffff;
}

.history-item.is-active {
  border-color: #1f6feb;
  background: #eff6ff;
}

.history-item-main {
  width: 100%;
  height: auto;
  min-height: 82px;
  padding: 12px 82px 12px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.history-feedback-button {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 30px;
  padding: 0 9px;
  border-color: #b8c8dc;
  background: #ffffff;
  color: #175cd3;
  font-size: 12px;
}

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

.history-item strong {
  font-size: 14px;
  line-height: 1.35;
}

.history-item span {
  margin-top: 5px;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.history-item small {
  margin-top: 5px;
  color: #98a2b3;
  font-size: 12px;
  line-height: 1.45;
}

.history-detail {
  max-height: min(680px, calc(100vh - 150px));
  overflow: auto;
  padding: 20px 24px;
}

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

.history-detail-head > div {
  min-width: 0;
}

.history-detail-feedback-button {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 11px;
  border-color: #1f6feb;
  color: #175cd3;
  font-size: 13px;
}

.history-empty {
  padding: 20px;
  color: #667085;
  text-align: center;
}

.history-detail-head h3 {
  font-size: 17px;
  color: #1d2329;
  line-height: 1.4;
}

.history-detail-head p,
.history-summary {
  margin-top: 8px;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.history-runtime-config {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 10px 12px;
  border-bottom: 1px solid #e8ebef;
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.history-difficulty-experiment {
  flex: 0 0 100%;
  margin: 2px 0 0;
  color: #344054;
  overflow-wrap: anywhere;
}

.history-customer-context {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #fbfcfd;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.history-customer-context strong {
  display: block;
  margin-bottom: 8px;
  color: #1d2329;
}

.history-customer-context p {
  margin: 0;
  color: #667085;
}

.history-customer-context dl {
  margin: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 6px 10px;
}

.history-customer-context dt {
  color: #667085;
}

.history-customer-context dd {
  margin: 0;
  color: #1d2329;
}

.history-customer-objections {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.history-customer-objections span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #ffffff;
  color: #475467;
  font-size: 12px;
}

.history-feedback {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-feedback-entry {
  max-width: 100%;
}

.history-feedback-entry p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.history-feedback span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #f9fafb;
  color: #475467;
  font-size: 12px;
}

.history-session-audit {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #f8fbff;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.history-session-audit strong {
  display: block;
  margin-bottom: 6px;
  color: #1d2329;
}

.history-session-audit p {
  margin: 0;
}

.session-pressure-exit {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #f5c2c7;
  border-left: 3px solid #d92d20;
  border-radius: 6px;
  background: #fff7f7;
  color: #7a271a;
}

.session-pressure-exit strong {
  margin: 0;
  color: #912018;
}

.history-session-audit .history-audit-status.is-error {
  color: #b42318;
}

.history-session-audit .history-audit-status.is-warning {
  color: #8a4b08;
}

.history-audit-retry-button {
  margin-top: 10px;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid #98a2b3;
  border-radius: 6px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.history-audit-retry-button:hover:not(:disabled) {
  border-color: #475467;
  background: #f2f4f7;
}

.history-audit-retry-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.history-session-audit ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.session-score-breakdown {
  margin: 10px 0 0;
  padding: 9px 0;
  border-top: 1px solid #d9e2ec;
  border-bottom: 1px solid #d9e2ec;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.session-score-breakdown dt {
  color: #667085;
  font-size: 11px;
}

.session-score-breakdown dd {
  margin: 2px 0 0;
  color: #101828;
  font-size: 18px;
  font-weight: 700;
}

.history-session-audit .session-score-cap {
  margin-top: 8px;
  color: #b42318;
  font-weight: 600;
}

.score-overall-commentary {
  margin: 14px 0 0;
  padding: 10px 12px;
  color: #475467;
  background: #f8fafc;
  border-left: 3px solid #98a2b3;
  font-size: 13px;
  line-height: 1.6;
}

.score-overall-commentary.is-needs_improvement {
  color: #92400e;
  background: #fffbeb;
  border-left-color: #f59e0b;
}

.score-overall-commentary.is-insufficient {
  color: #475467;
  background: #f8fafc;
  border-left-color: #98a2b3;
}

.score-overall-commentary.is-positive {
  color: #166534;
  background: #f0fdf4;
  border-left-color: #22c55e;
}

.score-dimension-section,
.score-deduction-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #d9e2ec;
}

.history-session-audit h4 {
  margin: 0 0 9px;
  color: #1d2329;
  font-size: 13px;
}

.score-dimension-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 18px;
}

.score-dimension-row {
  min-width: 0;
}

.score-dimension-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.score-dimension-heading > span {
  color: #344054;
  font-weight: 600;
}

.score-dimension-heading > strong {
  margin: 0;
  color: #1d2939;
  font-size: 12px;
  white-space: nowrap;
}

.score-dimension-track {
  height: 5px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #e4eaf0;
}

.score-dimension-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #28776a;
}

.score-dimension-row > p {
  margin-top: 4px;
  color: #667085;
  font-size: 11px;
}

.score-deduction-list {
  display: grid;
  gap: 12px;
}

.score-deduction-item {
  padding: 0 0 12px 12px;
  border-bottom: 1px solid #e4eaf0;
  border-left: 3px solid #d92d20;
}

.score-deduction-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.score-deduction-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.score-deduction-heading > strong {
  margin: 0;
  font-size: 13px;
}

.score-deduction-heading > span {
  flex: 0 0 auto;
  color: #b42318;
  font-weight: 700;
}

.score-deduction-detail {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 10px;
  padding: 3px 0;
}

.score-deduction-detail > span {
  color: #667085;
  font-size: 11px;
}

.score-deduction-detail > p {
  color: #344054;
  overflow-wrap: anywhere;
}

.score-no-deductions {
  margin-top: 12px !important;
  color: #28776a;
  font-weight: 600;
}

.unverified-issue-title {
  margin-top: 12px !important;
  color: #7a5c16;
  font-weight: 600;
}

.unverified-issue-list {
  color: #7a5c16;
}

.history-transcript {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e8ebef;
  display: grid;
  gap: 8px;
}

.history-transcript .feedback-turn {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.feedback-list {
  max-height: 620px;
  overflow: auto;
  padding: 16px 20px;
  display: grid;
  gap: 14px;
}

.feedback-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 20px 20px;
  color: #667085;
  font-size: 13px;
}

.feedback-pagination button {
  min-width: 112px;
  height: 36px;
  border: 1px solid #cfd6dd;
  border-radius: 6px;
  background: #ffffff;
  color: #344054;
  font: inherit;
}

.feedback-pagination button:hover:not(:disabled) {
  border-color: #96b9b3;
  color: #136d63;
}

.feedback-empty {
  padding: 20px;
  color: #667085;
  text-align: center;
}

.feedback-item {
  padding: 14px;
  border: 1px solid #e8ebef;
  border-radius: 8px;
  background: #fbfcfd;
}

.feedback-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.feedback-item-head strong {
  color: #1d2329;
  font-size: 15px;
}

.feedback-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.feedback-status {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #d0d5dd;
  background: #ffffff;
  color: #475467;
  font-size: 12px;
  line-height: 1;
}

.feedback-status.status-confirmed {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.feedback-status.status-fixed {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #047857;
}

.feedback-status.status-ignored {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.feedback-item-head span {
  flex: 0 0 auto;
  color: #667085;
  font-size: 12px;
}

.feedback-row-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feedback-row-actions select {
  height: 32px;
  border: 1px solid #cfd6dd;
  border-radius: 6px;
  background: #ffffff;
  color: #1d2329;
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
}

.feedback-row-actions select:disabled {
  color: #98a2b3;
  background: #f2f4f7;
}

.feedback-row-actions button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.feedback-note {
  margin-top: 8px;
  color: #344054;
  font-size: 14px;
  line-height: 1.5;
}

.feedback-expected {
  margin-top: 6px;
  color: #475467;
  font-size: 13px;
  line-height: 1.5;
}

.feedback-session,
.feedback-signals {
  margin-top: 8px;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.feedback-transcript {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e8ebef;
  display: grid;
  gap: 6px;
}

.feedback-turn {
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.feedback-turn.sales {
  color: #1d4ed8;
}

.feedback-turn.customer {
  color: #047857;
}

.feedback-turn.is-feedback-target {
  padding: 7px 9px;
  border-left: 3px solid #d92d20;
  background: #fff5f4;
  color: #912018;
}

.regression-list {
  max-height: 680px;
  overflow: auto;
  padding: 16px 20px;
  display: grid;
  gap: 12px;
}

.regression-item {
  padding: 14px;
  border: 1px solid #e8ebef;
  border-radius: 8px;
  background: #ffffff;
}

.regression-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.regression-item-head strong {
  min-width: 0;
  color: #1d2329;
  font-size: 14px;
  line-height: 1.45;
}

.regression-item-head span {
  flex: 0 0 auto;
  color: #667085;
  font-size: 12px;
}

.regression-evidence,
.regression-expected {
  margin-top: 9px;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}

.regression-expected {
  color: #475467;
}

.feedback-dialog {
  width: min(500px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #ffffff;
  color: #1d2329;
  box-shadow: 0 18px 50px rgb(16 24 40 / 18%);
}

.sales-guide {
  border-top: 1px solid #e4e7ec;
  border-bottom: 1px solid #e4e7ec;
  background: #f8fafc;
}

.sales-guide summary {
  min-height: 52px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: #344054;
  font-size: 13px;
}

.sales-guide summary strong {
  color: #101828;
  font-size: 14px;
}

.sales-guide-notice {
  margin: 0;
  padding: 0 18px 14px;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.sales-guide-layout {
  padding: 0 18px 18px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 20px;
}

.sales-guide-layout section {
  min-width: 0;
}

.sales-guide-layout h3 {
  margin: 0 0 10px;
  color: #344054;
  font-size: 13px;
}

.sales-guide-list {
  display: grid;
  gap: 10px;
}

.sales-guide-list > div {
  padding-top: 10px;
  border-top: 1px solid #e4e7ec;
}

.sales-guide-list > div:first-child {
  padding-top: 0;
  border-top: 0;
}

.sales-guide-list strong {
  color: #1d2939;
  font-size: 12px;
}

.sales-guide-list p,
.sales-guide-list blockquote,
.sales-guide-list small,
.sales-guide-prohibited {
  color: #475467;
  font-size: 12px;
  line-height: 1.55;
}

.sales-guide-list p {
  margin: 3px 0 0;
}

.sales-guide-list blockquote {
  margin: 6px 0;
  padding-left: 9px;
  border-left: 2px solid #1f6feb;
}

.sales-guide-list small {
  display: block;
  color: #b54708;
}

.sales-guide-prohibited {
  margin: 0;
  padding-left: 18px;
}

.sales-guide-prohibited li + li {
  margin-top: 7px;
}

.feedback-dialog::backdrop {
  background: rgb(16 24 40 / 42%);
}

/* Temporary internal diagnostic surface. It has no normal-product entry and
 * remains hidden unless the explicit ?debug=barge-in URL switch is present. */
.barge-in-diagnostics {
  position: fixed;
  z-index: 90;
  right: 16px;
  bottom: 16px;
  width: min(390px, calc(100vw - 32px));
  max-height: min(70vh, 620px);
  overflow-y: auto;
  border: 1px solid #b9c9e8;
  border-radius: 8px;
  background: rgb(255 255 255 / 97%);
  color: #172b4d;
  box-shadow: 0 12px 32px rgb(15 49 94 / 22%);
  backdrop-filter: blur(8px);
}

.barge-in-diagnostics[hidden] {
  display: none;
}

.barge-in-diagnostics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #d8e2f3;
  background: #eef4ff;
}

.barge-in-diagnostics-head div {
  display: grid;
  gap: 2px;
}

.barge-in-diagnostics-head span {
  color: #47668f;
  font-size: 11px;
}

.barge-in-diagnostics-head strong {
  color: #163f73;
  font-size: 14px;
}

.barge-in-diagnostics-head small {
  color: #5e718c;
  font-size: 11px;
  white-space: nowrap;
}

.barge-in-diagnostics dl {
  margin: 0;
}

.barge-in-diagnostics dl > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid #edf1f7;
}

.barge-in-diagnostics dl > div:last-child {
  border-bottom: 0;
}

.barge-in-diagnostics dt,
.barge-in-diagnostics dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.42;
}

.barge-in-diagnostics dt {
  color: #587092;
}

.barge-in-diagnostics dd {
  overflow-wrap: anywhere;
  color: #1d3557;
}

.feedback-form {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 22px;
  display: grid;
  gap: 16px;
}

.feedback-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

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

.feedback-form-head p {
  margin-top: 5px;
  color: #667085;
  font-size: 13px;
  line-height: 1.45;
}

.feedback-form label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
}

.feedback-form select,
.feedback-form textarea {
  width: 100%;
  border: 1px solid #cfd6dd;
  border-radius: 6px;
  background: #ffffff;
  color: #1d2329;
  padding: 10px;
  font: inherit;
}

.feedback-form select {
  height: 42px;
  padding-block: 0;
}

.feedback-form textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.5;
}

.dialog-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #667085;
  font-size: 25px;
  line-height: 1;
}

.feedback-submit-status {
  min-height: 20px;
  color: #b42318;
  font-size: 13px;
}

.feedback-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.feedback-form-actions .primary {
  border-color: #1f6feb;
  background: #1f6feb;
  color: #ffffff;
}

.account-details {
  display: grid;
  gap: 10px;
  margin: 0;
}

.account-details > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef1f4;
}

.account-details > div:last-child {
  border-bottom: 0;
}

.account-details dt {
  color: #667085;
  font-size: 13px;
}

.account-details dd {
  min-width: 0;
  margin: 0;
  color: #1d2939;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.active-task-banner {
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #b9d9c7;
  background: #eef8f2;
}

.active-task-banner span {
  display: block;
  margin-bottom: 3px;
  color: #4d6a5b;
  font-size: 12px;
}

.active-task-banner strong {
  font-size: 14px;
}

.my-task-list {
  display: grid;
}

.my-task-empty {
  padding: 36px 20px;
  color: #667085;
  text-align: center;
}

.personal-center-panel {
  min-height: 430px;
}

.personal-center-body {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.personal-profile-card {
  min-height: 250px;
  padding: 20px;
  border: 1px solid #dfe7ea;
  border-radius: 7px;
  background: #fbfdfd;
}

.personal-profile-card h3 {
  margin: 5px 0 18px;
  color: #243646;
  font-size: 18px;
}

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

.personal-details div {
  min-width: 0;
}

.personal-details .personal-detail-wide {
  grid-column: 1 / -1;
}

.personal-details dt {
  margin-bottom: 5px;
  color: #637482;
  font-size: 12px;
}

.personal-details dd {
  margin: 0;
  color: #203140;
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.personal-permission-list {
  display: grid;
  gap: 10px;
}

.personal-permission-list > div {
  padding: 11px 12px;
  display: grid;
  gap: 3px;
  border-left: 3px solid #5aa59b;
  background: #f2f8f7;
}

.personal-permission-list strong {
  color: #205e58;
  font-size: 13px;
}

.personal-permission-list span {
  color: #5e707c;
  font-size: 12px;
  line-height: 1.55;
}

.my-task-item {
  padding: 18px 20px;
  display: grid;
  gap: 12px;
  border-bottom: 1px solid #e8ebef;
}

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

.my-task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.my-task-head h3,
.my-task-head p {
  margin: 0;
}

.my-task-head h3 {
  font-size: 16px;
}

.my-task-head p {
  margin-top: 5px;
  color: #667085;
  font-size: 12px;
}

.my-task-status {
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid #b9d9c7;
  border-radius: 4px;
  background: #eef8f2;
  color: #276745;
  font-size: 11px;
}

.my-task-status.is-pending {
  border-color: #d5c38b;
  background: #fff9e8;
  color: #7a5b08;
}

.my-task-status.is-closed {
  border-color: #d8b2ad;
  background: #fff4f2;
  color: #9a3028;
}

.my-task-progress {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  color: #486174;
  font-size: 13px;
}

.my-task-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #e8edf1;
}

.my-task-progress-track i {
  height: 100%;
  display: block;
  background: #2d7d5a;
}

.my-task-attempts {
  color: #667085;
  font-size: 12px;
  line-height: 1.6;
}

.my-task-comment {
  padding: 9px 11px;
  border-left: 3px solid #8ca99a;
  background: #f7faf8;
  color: #344054;
  font-size: 13px;
}

.my-task-actions {
  display: flex;
  justify-content: flex-end;
}

.my-task-actions button {
  border-color: #1f6feb;
  background: #1f6feb;
  color: #fff;
}

:root {
  --ink: #18212b;
  --muted: #627284;
  --line: #dce5eb;
  --canvas: #edf2f3;
  --surface: #ffffff;
  --surface-muted: #f7faf9;
  --blue: #1769aa;
  --blue-soft: #eaf4fb;
  --teal: #1d7c71;
  --teal-soft: #e9f7f3;
  --amber: #9a6105;
}

body {
  background: var(--canvas);
  color: var(--ink);
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: var(--teal);
  color: #fff;
  font-size: 17px;
  font-weight: 750;
}

.product-heading {
  gap: 10px;
}

.product-heading > div {
  min-width: 0;
}

.product-heading h1 {
  font-size: 18px;
  letter-spacing: 0;
}

.product-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.product-version {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: #708092;
}

.login-shell {
  padding: 28px;
  background: #f1f5f4;
}

.login-panel {
  width: min(400px, 100%);
  padding: 30px;
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgb(31 48 55 / 8%);
}

.login-panel .product-heading {
  align-items: center;
}

.shell {
  display: block;
  padding: 20px;
}

.call {
  width: min(1440px, 100%);
  min-height: calc(100vh - 40px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 38px rgb(31 48 55 / 7%);
}

.topbar {
  min-height: 72px;
  padding: 13px 20px;
  align-items: center;
  background: #fff;
}

.transcript:empty::before {
  content: "等待开始训练";
  margin: auto;
  color: #93a0aa;
  font-size: 13px;
}

.workspace-brand {
  min-width: 230px;
}

.workspace-brand .product-heading {
  --training-brand-size: 48px;
  align-items: center;
}

.workspace-brand .brand-mark {
  width: var(--training-brand-size);
  height: var(--training-brand-size);
}

.workspace-brand .product-heading > div {
  min-height: var(--training-brand-size);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.workspace-brand .product-heading h1 {
  line-height: 26px;
}

.workspace-brand .product-heading p {
  margin-top: 4px;
  line-height: 18px;
}

.workspace-mode {
  width: fit-content;
  margin-top: 6px;
  padding: 3px 7px;
  display: inline-flex;
  border: 1px solid #b8ddd6;
  border-radius: 4px;
  background: #edf9f6;
  color: #147268;
  font-size: 11px;
  font-weight: 700;
}

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

.topbar-actions {
  gap: 8px;
}

.account-button {
  max-width: 214px;
  border-color: #bad5dc;
  background: #f0f9fa;
  color: #155a65;
}

.workspace-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7fafb;
}

.workspace-nav button,
.workspace-tools summary,
.workspace-tools button {
  min-height: 30px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #425466;
  font-size: 12px;
}

.workspace-nav button {
  padding: 0 8px;
}

.workspace-nav button:hover,
.workspace-tools summary:hover,
.workspace-tools button:hover {
  background: #eaf3f5;
  color: #145d66;
}

.workspace-nav button.is-active,
.workspace-tools button.is-active {
  background: #dff1ed;
  color: #146458;
  font-weight: 700;
}

.workspace-tools {
  position: relative;
}

.workspace-tools summary {
  min-width: 60px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  list-style: none;
}

.workspace-tools summary::-webkit-details-marker {
  display: none;
}

.workspace-tools[open] summary {
  background: #eaf3f5;
  color: #145d66;
}

.workspace-tools > div {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  right: 0;
  width: 132px;
  padding: 5px;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(30 48 58 / 13%);
}

.workspace-tools button {
  width: 100%;
  padding: 0 9px;
  text-align: left;
}

#logoutBtn {
  border-color: transparent;
  color: #6c4b4b;
  background: transparent;
}

.meter {
  padding-left: 7px;
  border-left: 1px solid var(--line);
}

.meter div {
  width: 70px;
  height: 6px;
  border-radius: 3px;
}

.meter i {
  background: var(--teal);
}

.training-workspace {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(292px, 340px);
  background: #f7faf9;
}

.training-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.training-sidebar {
  min-width: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
}

.customer {
  padding: 20px 22px;
  background: #fbfcfc;
}

.section-eyebrow,
.training-side-heading span {
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 7px;
  background: #315b70;
  font-size: 20px;
}

.customer h2 {
  margin-top: 2px;
}

.harness {
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 2fr) 74px;
  gap: 18px;
  padding: 13px 22px;
}

.harness strong {
  color: #273b48;
}

.harness > div:last-child {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.actions {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) 90px minmax(160px, 0.86fr) minmax(156px, 1fr) auto;
  align-items: end;
  padding: 14px 22px;
  gap: 10px;
  background: #f8fbfb;
}

.scenario-control {
  min-width: 0;
}

.scenario-control select {
  width: 100%;
}

.difficulty-control {
  display: grid;
  gap: 4px;
  color: #607080;
  font-size: 11px;
  font-weight: 650;
}

.difficulty-control select {
  height: 36px;
  min-width: 90px;
  border-color: #cbd8de;
  border-radius: 5px;
  font-size: 13px;
}

.voice-control select {
  min-width: 156px;
}

.persona-control select {
  width: 210px;
}

#startBtn,
#stopBtn {
  align-self: end;
  height: 36px;
  font-size: 13px;
  font-weight: 650;
}

.call-actions {
  grid-column: 5;
  grid-row: 1;
  align-self: end;
  display: inline-flex;
  align-items: end;
  gap: 8px;
}

#startBtn {
  border-color: var(--teal);
  background: var(--teal);
}

#stopBtn:not(:disabled) {
  border-color: #d8b6ad;
  background: #fff7f5;
  color: #9a3d2d;
}

.difficulty-experiment-panel {
  padding: 12px 22px;
}

.transcript {
  min-height: 300px;
  flex: 1;
  padding: 22px;
  gap: 10px;
  background: #fff;
}

.line {
  max-width: min(78%, 660px);
  padding: 10px 12px;
  border-radius: 7px;
  box-shadow: 0 1px 0 rgb(16 24 40 / 3%);
}

.line.user {
  background: #e5f3f1;
  color: #174d49;
}

.line.ai {
  border: 1px solid #e1e8ec;
  background: #f7f9fa;
}

.training-side-section,
.sales-guide,
.active-task-banner {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.training-side-heading {
  min-height: 40px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e7edef;
}

.training-side-heading strong {
  color: #82909a;
  font-size: 11px;
  font-weight: 500;
}

.training-sidebar .harness-detail {
  padding: 10px 12px 12px;
  grid-template-columns: 1fr;
  gap: 10px;
  border: 0;
  background: transparent;
}

.training-sidebar .harness-detail div + div {
  padding-top: 10px;
  border-top: 1px solid #edf1f2;
}

.training-sidebar .harness-detail p {
  min-height: 0;
  margin: 0;
}

.learning {
  padding: 0 0 12px;
  background: #fff;
}

.learning #learningSignals {
  padding: 10px 12px 0;
}

.learn-chip {
  min-height: 30px;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 12px;
}

.active-task-banner {
  padding: 11px 12px;
  border-color: #b8ded1;
  background: var(--teal-soft);
}

.active-task-banner button {
  height: 30px;
  padding: 0 9px;
  border-color: #aad2c6;
  background: #fff;
  color: #226358;
  font-size: 12px;
}

.sales-guide {
  overflow: hidden;
}

.sales-guide summary {
  min-height: 48px;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  background: #fff;
}

.sales-guide summary span {
  color: #496270;
  font-size: 12px;
}

.sales-guide summary strong {
  color: #21303a;
  font-size: 13px;
}

.sales-guide-notice {
  padding: 0 12px 10px;
}

.sales-guide-layout {
  padding: 0 12px 14px;
  grid-template-columns: 1fr;
  gap: 14px;
}

.sales-guide-layout section + section {
  padding-top: 12px;
  border-top: 1px solid #e8edef;
}

.management-panel {
  width: min(1280px, 100%);
  margin: 0 auto;
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 38px rgb(31 48 55 / 7%);
}

/* Shared training workspace shell. Navigation views keep the same header and
 * replace only the content area, so they do not feel like detached dialogs. */
.call.is-navigation-view {
  min-height: 72px;
  margin-bottom: 18px;
}

.call.is-navigation-view .topbar {
  border-bottom: 0;
}

.management-panel {
  width: min(1440px, 100%);
  min-height: min(720px, calc(100vh - 132px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgb(31 48 55 / 6%);
}

.management-head {
  min-height: 98px;
  padding: 22px 24px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #fcfdfd;
}

.management-head > div:first-child::before {
  display: block;
  margin-bottom: 5px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
}

#myTasksView .management-head > div:first-child::before { content: "训练计划"; }
#historyView .management-head > div:first-child::before { content: "训练资产"; }
#feedbackView .management-head > div:first-child::before { content: "质量协作"; }
#personalView .management-head > div:first-child::before { content: "个人账户"; }
#dashboardView .management-head > div:first-child::before { content: "训练洞察"; }
#regressionView .management-head > div:first-child::before { content: "质量保障"; }

.management-head h2 {
  color: #20313d;
  font-size: 21px;
  letter-spacing: 0;
}

.management-head p {
  margin-top: 5px;
  color: #657783;
  font-size: 13px;
}

.management-actions {
  gap: 8px;
}

.management-actions button,
.management-actions select,
.history-search-control,
.inline-check {
  min-height: 36px;
  border-color: #cfdae0;
  border-radius: 6px;
  box-shadow: none;
}

.management-actions button:last-child {
  border-color: transparent;
  background: transparent;
  color: #5b6d78;
}

.management-actions button:last-child:hover {
  border-color: #d8e2e6;
  background: #f3f7f8;
}

.my-task-list,
.feedback-list,
.regression-list {
  padding: 20px 24px 28px;
}

.my-task-empty,
.feedback-empty,
.history-empty {
  min-height: 250px;
  padding: 42px 24px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px dashed #c8d7dc;
  border-radius: 7px;
  background: #fbfdfd;
  color: #647681;
  font-size: 14px;
  text-align: center;
}

.my-task-empty::before,
.feedback-empty::before,
.history-empty::before {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  display: grid;
  place-items: center;
  border: 1px solid #b9dcd5;
  border-radius: 7px;
  background: #edf8f5;
  color: #16766b;
  content: "+";
  font-size: 22px;
  line-height: 1;
}

.my-task-item,
.feedback-item,
.regression-item {
  border-color: #dce6e8;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgb(31 48 55 / 2%);
}

.my-task-item {
  padding: 20px;
}

.my-task-item:hover,
.feedback-item:hover,
.regression-item:hover {
  border-color: #b5d5cf;
}

.history-layout {
  min-height: min(680px, calc(100vh - 178px));
  grid-template-columns: 380px minmax(0, 1fr);
  background: #f8fbfb;
}

.history-list {
  max-height: min(680px, calc(100vh - 178px));
  padding: 16px;
  border-right-color: var(--line);
  background: #fbfcfc;
}

.history-item {
  min-height: 90px;
  border-color: #dfe8ea;
  border-radius: 7px;
  background: #ffffff;
}

.history-item.is-active {
  border-color: #77bdb3;
  background: #eef8f5;
  box-shadow: inset 3px 0 0 #198277;
}

.history-item-main {
  min-height: 90px;
  padding: 13px 84px 13px 14px;
}

.history-feedback-button,
.history-detail-feedback-button {
  border-color: #a8d2cb;
  background: #f2faf8;
  color: #136d63;
}

.history-detail {
  max-height: min(680px, calc(100vh - 178px));
  padding: 24px 28px;
  background: #ffffff;
}

.history-detail > .history-empty {
  min-height: 100%;
}

.feedback-list {
  max-height: none;
  gap: 12px;
}

.feedback-item {
  padding: 18px;
}

.personal-center-panel {
  background: #f8fbfb;
}

.personal-center-body {
  padding: 24px;
  gap: 18px;
}

.personal-profile-card {
  min-height: 300px;
  padding: 22px;
  border-color: #dce7e8;
  background: #ffffff;
  box-shadow: 0 1px 2px rgb(31 48 55 / 2%);
}

.personal-profile-card h3 {
  margin-top: 7px;
  color: #20313d;
}

.personal-permission-list > div {
  border-left-color: #218176;
  background: #f1f8f6;
}

@media (max-width: 1050px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .training-workspace {
    grid-template-columns: minmax(0, 1fr) 286px;
  }

  .persona-control select {
    width: 160px;
  }

  .voice-control {
    display: none;
  }

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

  .management-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 800px) {
  .training-workspace {
    display: block;
  }

  .training-main {
    border-right: 0;
  }

  .training-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
  }

  .training-sidebar .sales-guide,
  .training-sidebar .active-task-banner {
    grid-column: 1 / -1;
  }

  .history-layout {
    grid-template-columns: 1fr;
  }

  .history-list,
  .history-detail {
    max-height: none;
  }

  .history-list {
    min-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 0;
  }

  .call {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .topbar {
    padding: 13px 16px;
  }

  .topbar-actions {
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 7px;
  }

  .workspace-brand {
    min-width: 0;
  }

  .workspace-tools {
    width: auto;
    margin-left: auto;
  }

  .workspace-tools summary {
    min-width: 48px;
  }

  #logoutBtn {
    width: auto;
    margin-left: 2px;
    padding-inline: 7px;
  }

  .workspace-nav {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
  }

  .workspace-nav button {
    flex: 1;
  }

  .call.is-navigation-view {
    margin-bottom: 0;
  }

  .management-panel {
    min-height: calc(100vh - 104px);
    border-radius: 0;
    border-inline: 0;
    box-shadow: none;
  }

  .management-head {
    min-height: 0;
    padding: 18px 16px;
  }

  .management-actions {
    gap: 7px;
  }

  .management-actions button,
  .management-actions select,
  .history-search-control,
  .inline-check {
    min-height: 34px;
  }

  .history-search-control {
    min-width: min(100%, 260px);
  }

  .history-search-control input {
    width: 100%;
  }

  .my-task-list,
  .feedback-list,
  .regression-list,
  .personal-center-body {
    padding: 14px 16px 22px;
  }

  .history-list,
  .history-detail {
    padding: 14px 16px;
  }

  .personal-center-body {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .personal-profile-card {
    min-height: 0;
  }

  .account-button {
    max-width: min(48vw, 188px);
  }

  .meter {
    display: none;
  }

  .training-sidebar {
    padding: 12px;
    grid-template-columns: 1fr;
  }

  .training-sidebar .training-side-section,
  .training-sidebar .sales-guide,
  .training-sidebar .active-task-banner {
    grid-column: auto;
  }

  .customer {
    padding: 16px;
  }

  .harness {
    padding: 12px 16px;
    grid-template-columns: minmax(0, 1fr) 68px;
    gap: 10px;
  }

  .harness > div:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 9px;
    border-top: 1px solid var(--line);
  }

  .harness > div:last-child {
    padding-left: 10px;
  }

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

  .difficulty-control,
  .scenario-control,
  .persona-control {
    min-width: 0;
  }

  .scenario-control {
    grid-column: 1 / -1;
  }

  .difficulty-control select,
  .persona-control select {
    width: 100%;
    max-width: none;
  }

  .voice-control {
    display: none;
  }

  #startBtn,
  #stopBtn {
    width: 100%;
  }

  .call-actions {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .difficulty-experiment-panel,
  .transcript {
    padding-inline: 16px;
  }

  .regression-item-head {
    flex-direction: column;
  }

  .my-task-head,
  .active-task-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .regression-item-head span {
    flex: 1 1 auto;
  }

  .management-head,
  .management-actions,
  .feedback-item-head {
    align-items: stretch;
    flex-direction: column;
  }

  .history-search-control,
  .history-search-control input {
    width: 100%;
  }

  .history-layout {
    grid-template-columns: 1fr;
  }

  .history-detail-head {
    flex-direction: column;
  }

  .history-detail-feedback-button {
    width: 100%;
  }

  .dashboard-cards,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .sales-guide-layout {
    grid-template-columns: 1fr;
  }

  .history-list {
    max-height: 300px;
    border-right: 0;
    border-bottom: 1px solid #e8ebef;
  }

  .session-score-breakdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .score-dimension-list {
    grid-template-columns: 1fr;
  }

  .score-deduction-detail {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .line {
    max-width: 92%;
  }
}
