:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #d9e0ea;
  --brand: #1769aa;
  --brand-strong: #0f4d7f;
  --green: #16875d;
  --amber: #b7791f;
  --red: #c2410c;
  --soft-blue: #eaf4ff;
  --soft-green: #e9f8f0;
  --soft-amber: #fff7e6;
  --soft-red: #fff1ed;
  --shadow: 0 14px 32px rgba(20, 35, 55, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  overflow: hidden;
}

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

button {
  border: 0;
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 420px;
}

.login-brand {
  padding: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #103b5f;
  color: white;
}

.login-brand h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

.login-brand p {
  max-width: 620px;
  margin: 24px 0 0;
  color: #d7e8f8;
  font-size: 18px;
  line-height: 1.7;
}

.login-panel {
  display: flex;
  align-items: center;
  padding: 28px;
  background: var(--panel);
}

.login-card {
  width: 100%;
}

.login-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.hint {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.6;
}

.field {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.field span {
  color: #374151;
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 240px;
  padding: 12px;
  line-height: 1.55;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.14);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--brand-strong);
}

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

.btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.btn.secondary {
  background: #eef2f7;
  color: #243447;
}

.btn.secondary:hover {
  background: #e2e8f0;
}

.demo-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.demo-user {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fafcff;
}

.demo-user strong {
  display: block;
  margin-bottom: 4px;
}

.app-shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 252px 1fr;
  overflow: hidden;
}

.sidebar {
  background: #112f49;
  color: #eef6ff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 26px;
}

.user-box {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.user-box:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.user-box strong {
  display: block;
  margin-bottom: 4px;
}

.user-box span {
  color: #bdd7ee;
  font-size: 13px;
}

.user-box em {
  display: inline-flex;
  margin-top: 10px;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #e6f3ff;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 12px;
  text-align: left;
  color: #d8eafd;
  background: transparent;
}

.nav button.active,
.nav button:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.sidebar-footer {
  margin-top: auto;
}

.main {
  min-width: 0;
  padding: 28px;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.topbar p {
  margin: 0;
  color: var(--muted);
}

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

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.grid.cards {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.dashboard-insights {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.panel,
.metric,
.record,
.dimension-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel {
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel h2,
.panel h3 {
  margin: 0 0 14px;
}

.section-gap {
  margin-top: 18px;
}

.panel-subtitle {
  margin: -8px 0 16px;
  color: var(--muted);
}

.panel-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-headline h2 {
  margin: 0;
}

.panel-headline span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #245985;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.metric {
  padding: 16px;
}

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

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.upload-status {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.upload-status strong {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.upload-status p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.upload-status.loading {
  border-color: #bdd7ee;
  background: var(--soft-blue);
}

.upload-status.success {
  border-color: #b7e4cb;
  background: var(--soft-green);
}

.upload-status.fail {
  border-color: #fec9b8;
  background: var(--soft-red);
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(23, 105, 170, 0.24);
  border-top-color: var(--brand);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.spinner.light {
  border-color: rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
}

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

.parser-preview {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.raw-preview {
  min-height: 420px;
  max-height: 420px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border-left: 4px solid var(--brand);
  border-radius: 6px;
  background: #f8fafc;
  padding: 12px 14px;
  color: #1f2937;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.65;
}

.raw-preview.muted {
  min-height: 120px;
  max-height: 160px;
  color: var(--muted);
}

.draft-list {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow: auto;
  padding-right: 4px;
}

.draft-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.draft-item div {
  min-width: 0;
}

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

.draft-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.draft-item p {
  grid-column: 1 / -1;
  margin: 0;
  color: #374151;
  line-height: 1.6;
}

.draft-item .btn {
  min-height: 34px;
}

.package-actions {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.empty.compact {
  padding: 22px 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 47, 73, 0.42);
}

.manager-edge-nav {
  position: fixed;
  top: 50%;
  z-index: 90;
  width: 48px;
  height: 86px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(17, 47, 73, 0.9);
  color: #fff;
  font-size: 34px;
  font-weight: 300;
  line-height: 1;
  transform: translateY(-50%);
  box-shadow: 0 10px 26px rgba(17, 47, 73, 0.28);
}

.manager-edge-nav.left {
  left: 18px;
}

.manager-edge-nav.right {
  right: 18px;
}

.manager-edge-nav:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.confirm-modal {
  width: min(560px, 100%);
  padding: 22px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(17, 47, 73, 0.24);
}

.confirm-modal h2 {
  margin: 0 0 10px;
}

.confirm-modal p {
  margin: 0 0 12px;
  color: #374151;
  line-height: 1.7;
}

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

.profile-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.profile-summary div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

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

.profile-summary strong {
  display: block;
  overflow-wrap: anywhere;
}

.account-modal-section {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.account-modal-section h3 {
  margin: 0 0 14px;
}

.account-note {
  margin-top: 14px;
}

.danger-note {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--soft-red);
  color: var(--red) !important;
  font-weight: 700;
}

.draft-confirm-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.draft-confirm-list span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #245985;
  font-size: 12px;
  font-weight: 800;
}

.message {
  border-left: 4px solid #a5b4c6;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 6px;
}

.message.client {
  border-color: var(--amber);
  background: var(--soft-amber);
}

.message.manager {
  border-color: var(--brand);
  background: var(--soft-blue);
}

.message.system {
  border-color: #94a3b8;
}

.message span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.toast-root {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 50;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  transform: translateY(-8px);
  opacity: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  color: #243447;
  font-weight: 800;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: #b7e4cb;
  background: var(--soft-green);
  color: var(--green);
}

.toast.warn {
  border-color: #f5d28f;
  background: var(--soft-amber);
  color: var(--amber);
}

.toast.fail {
  border-color: #fec9b8;
  background: var(--soft-red);
  color: var(--red);
}

.score-wrap {
  display: grid;
  gap: 14px;
}

.score-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: 8px;
  background: var(--soft-blue);
}

.score-hero strong {
  font-size: 42px;
}

.dimension-row {
  padding: 12px;
}

.dimension-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 700;
}

.bar {
  height: 8px;
  border-radius: 99px;
  background: #e5e7eb;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: var(--value);
  background: var(--brand);
}

.summary-box {
  padding: 14px;
  border-radius: 8px;
  background: #f8fafc;
  color: #374151;
  line-height: 1.65;
}

.mini-report {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mini-report span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #245985;
  font-size: 12px;
  font-weight: 700;
}

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

.manager-history-list {
  display: grid;
  gap: 18px;
}

.manager-history-list.collapsed {
  gap: 14px;
}

.history-filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  background: #fbfcfe;
}

.history-filter-panel strong {
  display: block;
  margin-bottom: 4px;
}

.history-filter-panel span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.history-date-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-date-tools input {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  font-weight: 800;
}

.manager-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.manager-history-head h2 {
  margin: 0 0 4px;
}

.history-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.history-card-meta > span:first-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.history-trend {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #526071;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.history-trend.up {
  background: var(--soft-green);
  color: var(--green);
}

.history-trend.down {
  background: var(--soft-amber);
  color: #b36b00;
}

.history-trend.flat,
.history-trend.neutral {
  background: #eef2f7;
  color: #526071;
}

.manager-history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fbff;
}

.history-summary-score {
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-summary-score > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.history-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.manager-history.collapsed .manager-history-body {
  display: none;
}

.manager-history.open .manager-history-body {
  display: grid;
  gap: 12px;
}

.history-pager-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.history-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.history-pager button {
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-weight: 800;
}

.history-pager button.active {
  border-color: #9dccf2;
  background: #eaf4ff;
  color: var(--brand);
}

.history-pager button:hover {
  background: #f8fbff;
}

.record-section {
  margin-top: 18px;
}

.record-section:first-of-type {
  margin-top: 0;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.section-title-row h2 {
  margin: 0;
  font-size: 18px;
}

.section-title-row span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #526071;
  font-size: 12px;
  font-weight: 800;
}

.record {
  padding: 14px;
}

.record.featured {
  border-color: #9dccf2;
  background: linear-gradient(180deg, #ffffff 0%, #f3f9ff 100%);
  box-shadow: var(--shadow);
}

.record.featured .record-head {
  grid-template-columns: 1fr 120px 150px;
}

.record.featured .record-head strong {
  font-size: 20px;
}

.record.featured .summary-box {
  background: #fff;
}

.history-record-list {
  gap: 10px;
}

.compact-record {
  padding: 12px;
  background: #fbfcfe;
}

.compact-record .record-head {
  grid-template-columns: 1fr 128px 116px;
}

.compact-record .summary-box {
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
}

.compact-record .mini-report {
  margin-top: 10px;
}

.compact-record .mini-report span {
  min-height: 24px;
  font-size: 11px;
}

.record-head,
.table-row {
  display: grid;
  grid-template-columns: 1fr 110px 140px;
  gap: 12px;
  align-items: center;
}

button.table-row {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.clickable-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.clickable-row:hover {
  background: #f5f9fd;
}

.ranking-row {
  grid-template-columns: 1fr 130px 110px;
}

.ceo-ranking-row {
  grid-template-columns: 1fr 120px 130px 110px;
}

.record strong {
  display: block;
}

.record span,
.table-row span {
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  width: max-content;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.excellent {
  background: #e7f7ef;
  color: #0f6b49;
}

.badge.good {
  background: var(--soft-green);
  color: var(--green);
}

.badge.stable {
  background: var(--soft-blue);
  color: var(--brand);
}

.badge.pass {
  background: var(--soft-amber);
  color: var(--amber);
}

.badge.improve {
  background: var(--soft-red);
  color: var(--red);
}

.badge.muted {
  background: #eef2f7;
  color: #64748b;
}

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

.team-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

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

.team-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

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

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

.team-card-stats div {
  padding: 10px;
  border-radius: 8px;
  background: #fff;
}

.team-card-stats span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.team-card-stats strong {
  display: block;
  color: #1f2937;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.team-trend {
  padding: 10px 10px 8px;
  border: 1px solid #e5edf6;
  border-radius: 8px;
  background: #fff;
}

.team-trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.team-trend-head span,
.empty-trend span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.team-trend-head strong {
  color: #1f2937;
  font-size: 13px;
}

.team-trend-head em {
  margin-left: 4px;
  font-style: normal;
  font-size: 12px;
}

.team-trend.up .team-trend-head em {
  color: var(--green);
}

.team-trend.down .team-trend-head em {
  color: var(--amber);
}

.team-trend.flat .team-trend-head em {
  color: var(--muted);
}

.team-trend svg {
  display: block;
  width: 100%;
  height: 64px;
}

.team-trend line {
  stroke: #e7eef6;
  stroke-width: 1;
}

.team-trend polyline {
  fill: none;
  stroke: var(--brand);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.team-trend.up polyline {
  stroke: var(--green);
}

.team-trend.down polyline {
  stroke: var(--amber);
}

.team-trend circle {
  fill: #fff;
  stroke: currentColor;
  stroke-width: 2;
  color: var(--brand);
}

.team-trend.up circle {
  color: var(--green);
}

.team-trend.down circle {
  color: var(--amber);
}

.empty-trend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
}

.empty-trend strong {
  color: var(--muted);
  font-size: 13px;
}

.team-card-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-card-themes span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #245985;
  font-size: 12px;
  font-weight: 800;
}

.distribution-list {
  display: grid;
  gap: 14px;
}

.distribution-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 54px;
  gap: 12px;
  align-items: center;
}

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

.distribution-row span,
.distribution-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.distribution-bar {
  height: 10px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.distribution-bar i {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
}

.distribution-bar i.excellent,
.distribution-bar i.good {
  background: var(--green);
}

.distribution-bar i.stable {
  background: var(--brand);
}

.distribution-bar i.pass {
  background: var(--amber);
}

.distribution-bar i.improve {
  background: var(--red);
}

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

.theme-list article {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.theme-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--soft-amber);
  color: var(--amber);
  font-weight: 800;
}

.theme-list p {
  margin: 0;
  color: #374151;
  line-height: 1.6;
}

.manager-modal {
  width: min(1120px, 100%);
  max-height: min(860px, calc(100vh - 40px));
  overflow: auto;
}

.manager-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.manager-modal-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.manager-daily-grid {
  display: grid;
  grid-template-columns: 170px minmax(240px, 0.9fr) minmax(260px, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.score-tile.compact {
  min-height: 220px;
}

.score-tile.compact strong {
  font-size: 52px;
}

.radar-panel.compact .radar-chart {
  height: 220px;
}

.daily-insight {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.daily-insight p {
  margin: 0;
  color: #374151;
  line-height: 1.7;
}

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

.modal-two-col h3,
.modal-section h3 {
  margin: 0 0 12px;
}

.modal-section {
  margin-top: 18px;
}

.daily-record-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.daily-record-strip button {
  display: grid;
  gap: 4px;
  min-width: 220px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-align: left;
}

.daily-record-strip button:hover {
  border-color: #9dccf2;
  background: #f8fbff;
}

.daily-record-strip span {
  color: var(--muted);
  font-size: 12px;
}

.table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.table-row {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.table-row.header {
  border-top: 0;
  background: #f8fafc;
  color: #374151;
  font-weight: 800;
}

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

.config-manage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.mini-config-form {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.mini-config-form h3 {
  margin: 0 0 12px;
}

.mini-config-form .field {
  margin: 12px 0;
}

.config-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 46px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.config-chip-list span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #245985;
  font-size: 12px;
  font-weight: 800;
}

.config-grid div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.config-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.config-grid strong {
  display: block;
  overflow-wrap: anywhere;
}

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

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

.config-form .upload-actions,
.config-form .form-note,
.config-form .checkline {
  grid-column: 1 / -1;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #374151;
  font-size: 14px;
}

.checkline input {
  width: 18px;
  height: 18px;
}

.form-note {
  margin: -4px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.password-change-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.password-change-form .field {
  margin: 0;
}

.password-actions,
.password-change-form .form-note {
  grid-column: 1 / -1;
}

.password-actions {
  margin: 0;
}

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

.account-create-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.account-create-form .field {
  gap: 8px;
}

.account-create-form .upload-actions {
  margin: 0;
}

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

.account-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.8fr 1fr 0.9fr 96px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.account-row.header {
  background: #f8fafc;
  color: #526071;
  font-size: 12px;
  font-weight: 800;
}

.account-row input,
.account-row select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
}

.account-row input[readonly],
.account-row select:disabled {
  background: #f8fafc;
  color: #64748b;
}

.backup-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fbfcfe;
}

.backup-panel h2 {
  margin: 0 0 6px;
}

.backup-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.task-table {
  display: grid;
  gap: 8px;
}

.task-row {
  display: grid;
  grid-template-columns: 86px 130px minmax(180px, 1fr) 128px minmax(180px, 1fr) 104px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.task-row.header {
  background: #f8fafc;
  color: #526071;
  font-size: 12px;
  font-weight: 800;
}

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

.task-row span {
  color: var(--muted);
  font-size: 12px;
}

.task-row p {
  max-height: 58px;
  margin: 0;
  overflow: auto;
  color: #526071;
  font-size: 12px;
  line-height: 1.5;
}

.task-status {
  display: inline-flex !important;
  width: max-content;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.task-status.completed {
  background: var(--soft-green);
  color: var(--green);
}

.task-status.failed {
  background: var(--soft-red);
  color: var(--red);
}

.task-status.processing {
  background: var(--soft-blue);
  color: var(--brand);
}

.task-status.pending {
  background: #eef2f7;
  color: #526071;
}

.test-result {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.test-result strong {
  display: block;
  margin-bottom: 8px;
}

.test-result p {
  margin: 0;
  color: #374151;
  line-height: 1.7;
}

.test-result ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: #374151;
}

.test-result.pass {
  border-color: #b7e4cb;
  background: var(--soft-green);
}

.test-result.fail {
  border-color: #fec9b8;
  background: var(--soft-red);
}

.test-result.pending {
  border-color: #bdd7ee;
  background: var(--soft-blue);
}

.test-result .summary-box {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

.report-main > h2,
.report-side > h2 {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.report-main > h2:first-of-type,
.report-side > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.report-hero {
  display: grid;
  grid-template-columns: 180px minmax(280px, 0.95fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 24px;
}

.score-tile,
.radar-panel,
.insight-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.score-tile {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 18px;
}

.score-tile span,
.insight-panel > span {
  color: var(--muted);
  font-weight: 800;
}

.score-tile strong {
  font-size: 58px;
  line-height: 0.95;
}

.source-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: normal;
  gap: 2px;
}

.source-badge-line {
  display: block;
  max-width: 100%;
}

.source-badge-line.subtle {
  color: inherit;
  font-weight: 700;
  opacity: 0.88;
}

.source-badge.llm {
  background: var(--soft-green);
  color: var(--green);
}

.source-badge.rules {
  background: var(--soft-red);
  color: var(--red);
}

.radar-panel {
  padding: 14px;
  background: #fff;
}

.section-title-row.compact {
  margin-bottom: 4px;
}

.section-title-row.compact h2 {
  font-size: 16px;
}

.radar-chart {
  display: block;
  width: min(100%, 320px);
  height: 260px;
  margin: 0 auto;
}

.radar-ring {
  fill: none;
  stroke: #d9e5f2;
  stroke-width: 1;
}

.radar-axis {
  stroke: #e4ebf3;
  stroke-width: 1;
}

.radar-area {
  fill: rgba(23, 105, 170, 0.18);
  stroke: var(--brand);
  stroke-width: 2.5;
}

.radar-dot {
  fill: #fff;
  stroke: var(--brand);
  stroke-width: 2;
}

.radar-label {
  fill: #526071;
  font-size: 11px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: middle;
}

.insight-panel {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
}

.insight-panel p {
  margin: 0;
  color: #243447;
  line-height: 1.75;
}

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

.insight-pair div {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
}

.insight-pair small,
.insight-pair strong {
  display: block;
}

.insight-pair small {
  color: var(--muted);
  font-weight: 800;
}

.insight-pair strong {
  margin-top: 4px;
  color: #1f2937;
}

.timeline-table .table-row {
  grid-template-columns: 90px 110px minmax(0, 1fr);
}

.chat-summary-cards {
  display: grid;
  gap: 8px;
}

.chat-summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.chat-summary-card summary {
  display: grid;
  grid-template-columns: 28px 130px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.chat-summary-card summary::-webkit-details-marker {
  display: none;
}

.summary-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--brand);
  font-weight: 800;
}

.summary-title strong,
.summary-title span {
  display: block;
}

.summary-title span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chat-summary-card summary p {
  margin: 0;
  color: #374151;
  font-size: 13px;
  line-height: 1.55;
}

.chat-summary-card summary em {
  justify-self: end;
  color: var(--brand);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.chat-summary-card[open] summary {
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.chat-summary-card[open] summary em {
  color: var(--muted);
}

.summary-flow {
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px 48px;
}

.summary-step {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.summary-step i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344256;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.summary-step p {
  margin: 0;
  color: #374151;
  font-size: 13px;
  line-height: 1.65;
}

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

.report-list article {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.report-list article > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--brand);
  font-weight: 800;
}

.report-list.improve article > span {
  background: var(--soft-amber);
  color: var(--amber);
}

.report-list strong {
  display: block;
  margin-bottom: 6px;
}

.report-list p {
  margin: 0;
  color: #4b5563;
  line-height: 1.7;
}

.action-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: #374151;
  line-height: 1.7;
}

.script-box {
  display: grid;
  gap: 10px;
}

.script-box p {
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid var(--brand);
  border-radius: 6px;
  background: #f8fafc;
  line-height: 1.7;
}

.dimension-row p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.improvement-note-list {
  display: grid;
  gap: 10px;
}

.improvement-note-list p {
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid var(--amber);
  border-radius: 6px;
  background: var(--soft-amber);
  color: #5f3f08;
  line-height: 1.65;
}

.parser-preview.compact {
  max-height: 520px;
}

.empty {
  padding: 34px 16px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .login-shell,
  .app-shell,
  .grid.two,
  .report-layout,
  .report-hero,
  .dashboard-insights,
  .team-compare-grid,
  .manager-daily-grid,
  .modal-two-col {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 42px 28px;
  }

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

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

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

  .config-form {
    grid-template-columns: 1fr;
  }

  .password-change-form {
    grid-template-columns: 1fr;
  }

  .account-create-form,
  .account-row,
  .backup-panel,
  .history-filter-panel,
  .history-date-tools,
  .profile-summary {
    grid-template-columns: 1fr;
    display: grid;
  }

  .main {
    height: auto;
    overflow: visible;
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
    background: #f3f6fa;
  }

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

  input,
  select {
    height: 46px;
  }

  textarea {
    min-height: 280px;
  }

  .login-shell {
    min-height: 100dvh;
    display: block;
  }

  .login-brand {
    padding: 28px 20px 22px;
  }

  .login-brand h1 {
    font-size: 28px;
    line-height: 1.18;
  }

  .login-brand p {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.65;
  }

  .login-panel {
    align-items: flex-start;
    min-height: auto;
    padding: 22px 16px 34px;
  }

  .login-card h2 {
    font-size: 22px;
  }

  .app-shell {
    display: block;
    min-height: 100dvh;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    height: auto;
    padding: 10px 12px;
    overflow: visible;
    box-shadow: 0 10px 28px rgba(17, 47, 73, 0.2);
  }

  .logo {
    align-self: center;
    margin: 0;
    font-size: 18px;
  }

  .user-box {
    grid-column: 1 / -1;
    order: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 10px;
    margin: 0;
    padding: 9px 10px;
  }

  .user-box strong,
  .user-box span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-box em {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    margin-top: 0;
    white-space: nowrap;
  }

  .nav {
    grid-column: 1 / -1;
    order: 4;
    display: flex;
    gap: 8px;
    margin: 0 -12px;
    padding: 0 12px 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 12px;
    white-space: nowrap;
  }

  .sidebar-footer {
    align-self: center;
    margin: 0;
  }

  .sidebar-footer .btn {
    min-height: 36px;
    padding: 0 12px;
  }

  .main {
    padding: 16px 12px 28px;
  }

  .topbar {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
  }

  .topbar h1 {
    font-size: 24px;
    line-height: 1.22;
  }

  .topbar p {
    font-size: 14px;
    line-height: 1.55;
  }

  .topbar-actions,
  .upload-actions {
    justify-content: stretch;
  }

  .topbar-actions .btn,
  .upload-actions .btn {
    flex: 1 1 140px;
  }

  .panel {
    padding: 14px;
    box-shadow: 0 8px 24px rgba(20, 35, 55, 0.06);
  }

  .panel h2,
  .panel h3 {
    font-size: 18px;
  }

  .panel-headline,
  .manager-history-head,
  .manager-history-summary,
  .section-title-row,
  .team-card-head,
  .backup-panel {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .panel-headline span,
  .section-title-row span,
  .badge,
  .source-badge {
    width: fit-content;
    max-width: 100%;
  }

  .metric {
    padding: 14px;
  }

  .metric strong {
    font-size: 26px;
  }

  .raw-preview,
  .parser-preview,
  .draft-list {
    max-height: 48vh;
  }

  .raw-preview {
    min-height: 180px;
    font-size: 14px;
  }

  .draft-item {
    grid-template-columns: 1fr;
  }

  .draft-item .btn {
    width: 100%;
  }

  .record,
  .compact-record {
    padding: 12px;
  }

  .record.featured .record-head strong {
    font-size: 18px;
  }

  .record-head .btn,
  .compact-record .record-head .btn {
    width: 100%;
  }

  .summary-box {
    padding: 12px;
    font-size: 14px;
  }

  .history-filter-panel,
  .history-date-tools,
  .history-summary-score,
  .history-summary-meta {
    width: 100%;
  }

  .history-date-tools .btn,
  .history-date-tools input {
    width: 100%;
  }

  .history-pager {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .team-card-stats,
  .insight-pair {
    grid-template-columns: 1fr;
  }

  .team-trend svg {
    height: 58px;
  }

  .modal-backdrop {
    align-items: start;
    place-items: start stretch;
    padding: 10px;
    overflow: auto;
  }

  .confirm-modal,
  .manager-modal {
    width: 100%;
    max-height: calc(100dvh - 20px);
    overflow: auto;
    padding: 16px;
  }

  .manager-modal-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .manager-modal-head .btn {
    width: 100%;
  }

  .manager-edge-nav {
    top: auto;
    bottom: 14px;
    width: 46px;
    height: 46px;
    font-size: 28px;
    transform: none;
  }

  .manager-edge-nav.left {
    left: 14px;
  }

  .manager-edge-nav.right {
    right: 14px;
  }

  .manager-daily-grid,
  .report-hero,
  .report-layout,
  .modal-two-col,
  .config-manage-grid,
  .config-form,
  .password-change-form,
  .account-create-form,
  .config-grid,
  .profile-summary {
    grid-template-columns: 1fr;
  }

  .score-tile,
  .score-tile.compact {
    min-height: auto;
  }

  .score-tile strong,
  .score-tile.compact strong {
    font-size: 48px;
  }

  .radar-chart,
  .radar-panel.compact .radar-chart {
    height: 220px;
  }

  .daily-record-strip {
    display: grid;
  }

  .daily-record-strip button {
    min-width: 0;
    width: 100%;
  }

  .table {
    overflow: visible;
  }

  .account-table,
  .task-table {
    gap: 10px;
  }

  .account-row,
  .task-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }

  .account-row.header,
  .task-row.header {
    display: none;
  }

  .account-row .btn,
  .task-row .btn {
    width: 100%;
  }

  .task-row p {
    max-height: 90px;
  }

  .report-main > h2,
  .report-side > h2 {
    margin-top: 18px;
    padding-top: 14px;
  }

  .timeline-table .table-row,
  .table-row {
    padding: 11px 12px;
  }

  .chat-summary-card summary {
    min-height: auto;
  }

  .summary-title span,
  .chat-summary-card summary p,
  .summary-step p,
  .report-list p,
  .script-box p,
  .improvement-note-list p {
    font-size: 14px;
  }

  .report-list article {
    grid-template-columns: 28px 1fr;
    padding: 12px;
  }

  .report-list article > span {
    width: 28px;
    height: 28px;
  }

  .toast-root {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 16px 12px 28px;
  }

  .topbar,
  .record-head,
  .record.featured .record-head,
  .compact-record .record-head,
  .ranking-row,
  .ceo-ranking-row,
  .table-row,
  .timeline-table .table-row,
  .chat-summary-card summary {
    grid-template-columns: 1fr;
    display: grid;
  }

  .chat-summary-card summary em {
    justify-self: start;
  }

  .summary-flow {
    padding-left: 16px;
  }

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

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

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

@media (max-width: 420px) {
  .sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar-footer .btn {
    width: 100%;
  }

  .user-box {
    grid-template-columns: 1fr;
  }

  .user-box em {
    grid-row: auto;
    grid-column: auto;
    width: fit-content;
  }

  .btn {
    width: 100%;
  }

  .nav button,
  .history-pager button {
    width: auto;
  }

  .score-hero {
    display: grid;
  }
}

@media print {
  body {
    overflow: visible;
    background: #fff;
  }

  .sidebar,
  .topbar-actions,
  .toast-root {
    display: none !important;
  }

  .app-shell {
    display: block;
    height: auto;
    overflow: visible;
  }

  .main {
    height: auto;
    overflow: visible;
    padding: 0;
  }

  .panel,
  .record,
  .dimension-row {
    box-shadow: none;
    break-inside: avoid;
  }

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