:root {
  color-scheme: light;
  --focus-color: #0c66e4;
  --placeholder: #626f86;
  --control-border: #8590a2;
  --disabled-text: #626f86;
  --bg: #f7f8f9;
  --panel: #ffffff;
  --panel-soft: #f1f2f4;
  --text: #172b4d;
  --ink: #172b4d;
  --muted: #626f86;
  --line: #dcdfe4;
  --line-strong: #b3b9c4;
  --brand: #0c66e4;
  --brand-strong: #0052cc;
  --accent: #ae2e24;
  --ok: #216e4e;
  --warn: #a54800;
  --shadow: 0 12px 24px rgba(9, 30, 66, 0.13);
  --shadow-soft: 0 1px 2px rgba(9, 30, 66, 0.12);
  --tone-backlog: #626f86;
  --tone-backlog-bg: #dfe1e6;
  --tone-backlog-border: #dcdfe4;
  --tone-backlog-text: #44546f;
  --tone-todo: #946f00;
  --tone-todo-bg: #f8e6a0;
  --tone-todo-border: #f5cd47;
  --tone-todo-text: #533f04;
  --tone-dev: #0c66e4;
  --tone-dev-bg: #dbeafe;
  --tone-dev-border: #85b8ff;
  --tone-dev-text: #0052cc;
  --tone-test: #6e5dc6;
  --tone-test-bg: #dfd8fd;
  --tone-test-border: #b8acf6;
  --tone-test-text: #5e4db2;
  --tone-pass: #1f845a;
  --tone-pass-bg: #dcfff1;
  --tone-pass-border: #7ee2b8;
  --tone-pass-text: #216e4e;
  --tone-done: #216e4e;
  --tone-done-bg: #dcfff1;
  --tone-done-border: #7ee2b8;
  --tone-done-text: #216e4e;
  --tone-risk: #c9372c;
  --tone-risk-bg: #ffebe6;
  --tone-risk-border: #ffbdad;
  --tone-risk-text: #ae2e24;
  --tone-neutral: #44546f;
  --tone-neutral-bg: #f1f2f4;
  --tone-neutral-border: #dcdfe4;
  --tone-neutral-text: #44546f;
  --tone-module: #227d9b;
  --tone-module-bg: #e7f9ff;
  --tone-module-border: #9dd9ee;
  --tone-module-text: #206a83;
  --tone-owner: #6e5dc6;
  --tone-owner-bg: #f3f0ff;
  --tone-owner-border: #c6b7ff;
  --tone-owner-text: #5e4db2;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 800;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

h1,
h2,
p {
  margin: 0;
  letter-spacing: 0;
}

.file-warning {
  border-bottom: 1px solid #e2caa9;
  padding: 10px 18px;
  background: #fff4df;
  color: #744400;
  font-size: 13px;
  text-align: center;
}

.app-shell {
  width: min(1360px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18px 0 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(31, 102, 109, 0.25);
  border-radius: 8px;
  background: #e8f4f4;
  color: var(--brand-strong);
  font-size: 15px;
  font-weight: 900;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

h1 {
  font-size: 25px;
  line-height: 1.16;
}

h2 {
  font-size: 18px;
  line-height: 1.2;
}

h3 {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #f8fafc;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill::before {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ok);
  content: "";
  margin-right: 8px;
}

.top-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-wrap {
  position: relative;
  flex: 0 0 72px;
  overflow: visible;
}

.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 72px;
  min-width: 72px;
  min-height: 36px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--brand-strong);
  padding: 0 25px 0 12px;
  white-space: nowrap;
}

.logout-button {
  min-width: 58px;
  min-height: 36px;
  padding: 0 14px;
  white-space: nowrap;
}

.bell-mark {
  font-size: 13px;
  font-weight: 950;
}

.notification-count {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  box-sizing: border-box;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #c9363e;
  color: #fff;
  box-shadow: 0 2px 6px rgba(151, 39, 44, 0.28);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transform: translateY(-50%);
}

.notification-panel {
  --notification-bg: var(--panel);
  --notification-hover: #f0f6ff;
  --notification-unread: #e9f2ff;
  --notification-muted: #56647a;
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
}

.notification-list {
  display: grid;
  max-height: 360px;
  overflow: auto;
  gap: 8px;
}

.notification-item {
  display: grid;
  min-width: 0;
  overflow-wrap: anywhere;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: var(--panel-soft);
  color: inherit;
  text-align: left;
}

.notification-item[role="button"] {
  cursor: pointer;
}

.notification-item[role="button"]:hover {
  border-color: var(--brand);
  background: var(--notification-hover);
}

.notification-item.unread {
  border-color: rgba(31, 102, 109, 0.36);
  background: var(--notification-unread);
}

.notification-item.mention {
  border-color: var(--tone-dev-border);
  border-left: 4px solid var(--tone-dev);
  background: var(--tone-dev-bg);
}

.notification-item.assignment,
.notification-item.todo-assignment {
  border-color: var(--tone-owner-border);
  border-left: 4px solid var(--tone-owner);
  background: var(--tone-owner-bg);
}

.notification-item strong {
  color: var(--text);
  font-size: 13px;
}

.notification-item span,
.notification-item time {
  color: var(--notification-muted);
  font-size: 12px;
  line-height: 1.4;
}

.notification-item .notification-summary {
  color: var(--text);
  font-weight: 700;
}

.notification-item .notification-snippet {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notice {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.app-notice {
  margin-bottom: 14px;
}

.top-auth-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 16px;
}

.top-auth-panel #jiraCookie {
  min-height: 92px;
  padding-right: 76px;
}

.account-login-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

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

.account-login-grid > button {
  min-width: 132px;
}

.top-auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.cookie-input-wrap,
.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  width: 100%;
  padding-right: 76px;
}

.cookie-masked {
  -webkit-text-security: disc;
}

.cookie-toggle,
.password-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 32px;
  min-width: 56px;
  padding: 4px 10px;
  font-size: 12px;
}

.password-toggle {
  width: auto;
  min-width: 56px !important;
}

.remember-credentials-control {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 9px;
  color: var(--text);
  cursor: pointer;
}

.remember-credentials-control input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  accent-color: var(--brand);
}

.remember-credentials-control span {
  display: grid;
  gap: 1px;
}

.remember-credentials-control strong {
  font-size: 13px;
  font-weight: 750;
}

.remember-credentials-control small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.mode-switch button {
  min-height: 46px;
  border-color: transparent;
  background: transparent;
  color: #33404d;
  font-size: 15px;
}

.mode-switch button.active {
  border-color: rgba(18, 109, 120, 0.36);
  background: #e8f4f4;
  color: var(--brand-strong);
}

.query-workspace {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 18px;
}

.query-workspace[hidden],
.workspace[hidden],
.overview-workspace[hidden],
.telegram-workspace[hidden] {
  display: none;
}

[hidden] {
  display: none !important;
}

.mobile-jump,
.mobile-actionbar {
  display: none;
}

.notice.ok {
  border-color: rgba(47, 122, 85, 0.34);
  background: #edf7f1;
  color: #246546;
}

.notice.warn {
  border-color: rgba(173, 93, 60, 0.34);
  background: #fff2e8;
  color: #814225;
}

.tone-backlog {
  --tone: var(--tone-backlog);
  --tone-bg: var(--tone-backlog-bg);
  --tone-border: var(--tone-backlog-border);
  --tone-text: var(--tone-backlog-text);
}

.tone-todo {
  --tone: var(--tone-todo);
  --tone-bg: var(--tone-todo-bg);
  --tone-border: var(--tone-todo-border);
  --tone-text: var(--tone-todo-text);
}

.tone-dev {
  --tone: var(--tone-dev);
  --tone-bg: var(--tone-dev-bg);
  --tone-border: var(--tone-dev-border);
  --tone-text: var(--tone-dev-text);
}

.tone-test {
  --tone: var(--tone-test);
  --tone-bg: var(--tone-test-bg);
  --tone-border: var(--tone-test-border);
  --tone-text: var(--tone-test-text);
}

.tone-pass {
  --tone: var(--tone-pass);
  --tone-bg: var(--tone-pass-bg);
  --tone-border: var(--tone-pass-border);
  --tone-text: var(--tone-pass-text);
}

.tone-done {
  --tone: var(--tone-done);
  --tone-bg: var(--tone-done-bg);
  --tone-border: var(--tone-done-border);
  --tone-text: var(--tone-done-text);
}

.tone-risk {
  --tone: var(--tone-risk);
  --tone-bg: var(--tone-risk-bg);
  --tone-border: var(--tone-risk-border);
  --tone-text: var(--tone-risk-text);
}

.tone-neutral {
  --tone: var(--tone-neutral);
  --tone-bg: var(--tone-neutral-bg);
  --tone-border: var(--tone-neutral-border);
  --tone-text: var(--tone-neutral-text);
}

.tone-module {
  --tone: var(--tone-module);
  --tone-bg: var(--tone-module-bg);
  --tone-border: var(--tone-module-border);
  --tone-text: var(--tone-module-text);
}

.tone-owner {
  --tone: var(--tone-owner);
  --tone-bg: var(--tone-owner-bg);
  --tone-border: var(--tone-owner-border);
  --tone-text: var(--tone-owner-text);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--tone-border, var(--line));
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--tone-bg, var(--panel-soft));
  color: var(--tone-text, var(--muted));
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.35;
}

.status-chip span,
.status-chip b {
  color: inherit;
  font: inherit;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
  gap: 16px;
  align-items: start;
}

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

.overview-workspace {
  display: grid;
  gap: 14px;
}

.overview-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 4px solid var(--brand);
  padding: 18px;
}

.overview-hero p:not(.eyebrow) {
  margin-top: 8px;
  max-width: 680px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.overview-actions,
.agent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  padding: 8px 14px;
  text-decoration: none;
  font-weight: 800;
}

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

.sprint-dashboard-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.sprint-management-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.sprint-control-panel {
  display: grid;
  gap: 16px;
  overflow: visible;
  padding: 18px;
  position: relative;
  z-index: 20;
}

.sprint-control-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
}

.sprint-create-area,
.sprint-dashboard-area {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.sprint-create-area .section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.sprint-create-area .section-head > div {
  min-width: 0;
}

.sprint-create-actions {
  display: flex;
  justify-self: end;
  gap: 8px;
}

.sprint-create-area .section-head .primary {
  justify-self: end;
  white-space: nowrap;
}

.sprint-create-actions button {
  white-space: nowrap;
}

.sprint-edit-picker {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 12px;
  background: #f7f8f9;
}

.sprint-edit-picker .field {
  min-width: 0;
}

.sprint-dashboard-area {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.sprint-create-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.sprint-name-field,
.sprint-goal-field {
  grid-column: span 4;
  min-width: 0;
}

.sprint-date-field {
  grid-column: span 2;
}

.sprint-release-field {
  grid-column: span 4;
}

.sprint-state-field {
  grid-column: span 4;
}

.sprint-release-schedule-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.dashboard-controls {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto;
  gap: 10px;
  align-items: end;
}

.sprint-dashboard-area .dashboard-controls {
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
}

.sprint-dashboard-area .dashboard-controls .primary {
  height: 42px;
  min-height: 42px;
  min-width: 88px;
  padding: 0 14px;
  white-space: nowrap;
}

.sprint-context-info {
  margin: 0;
  min-width: 0;
}

.sprint-context-info[hidden] {
  display: none;
}

.sprint-context-info-title {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.sprint-context-cards {
  display: grid;
  gap: 8px;
}

.sprint-context-card {
  overflow: hidden;
  border: 1px solid #d9e0e8;
  border-radius: 8px;
  background: #fbfcfe;
}

.sprint-context-card > header {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 12px 0;
}

.sprint-context-card > header strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sprint-context-card > header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.sprint-context-card dl {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  margin: 0;
  padding: 8px 12px 10px;
}

.sprint-context-card dl > div {
  min-width: 0;
  padding: 0 10px;
  border-left: 1px solid #e4e9ef;
}

.sprint-context-card dl > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.sprint-context-card dt {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.sprint-context-card dd {
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-sprint-field {
  gap: 6px;
}

.dashboard-sprint-field .filter-sprint-toggle {
  height: 42px;
  min-height: 42px;
  padding-top: 0;
  padding-bottom: 0;
}

.dashboard-sprint-field select {
  min-height: 42px;
}

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

.dashboard-status-card {
  display: grid;
  gap: 4px;
  min-height: 78px;
  border: 1px solid var(--tone-border, var(--line));
  border-left: 4px solid var(--tone, var(--brand));
  border-radius: 8px;
  padding: 10px;
  background: var(--tone-bg, var(--panel-soft));
}

.dashboard-status-card strong {
  overflow: hidden;
  color: var(--tone-text, var(--text));
  font-size: 22px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-status-card span {
  overflow: hidden;
  color: var(--tone-text, var(--muted));
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-board {
  display: grid;
  gap: 12px;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.dashboard-column {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 220px;
  border: 1px solid var(--tone-border, var(--line));
  border-top: 4px solid var(--tone, var(--brand));
  border-radius: 8px;
  padding: 10px;
  background: var(--tone-bg, #f8fafb);
}

.dashboard-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--tone-text, #33404d);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-column-head span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-column-head .status-chip {
  color: var(--tone-text, var(--muted));
  font-size: 12px;
}

.dashboard-issue-item {
  display: grid;
  gap: 6px;
}

.dashboard-issue-card {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 96px;
  border: 1px solid rgba(23, 33, 43, 0.08);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: inherit;
  text-align: left;
}

.dashboard-issue-card:hover,
.dashboard-issue-card.open {
  border-color: var(--tone-border, rgba(18, 109, 120, 0.34));
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.dashboard-issue-card em {
  color: var(--brand);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.dashboard-issue-card strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
}

.dashboard-issue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.dashboard-issue-meta span {
  font-size: 11px;
}

.dashboard-issue-meta .status-chip {
  border-color: var(--tone-border, var(--line));
  background: var(--tone-bg, var(--panel-soft));
  color: var(--tone-text, var(--muted));
}

.dashboard-issue-detail {
  margin-top: 4px;
}

.dashboard-issue-detail:not([hidden]) {
  min-width: min(760px, calc(100vw - 64px));
}

.metric-card {
  display: grid;
  gap: 7px;
  min-height: 118px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.metric-card:nth-child(2) {
  border-top-color: var(--tone-dev);
}

.metric-card:nth-child(3) {
  border-top-color: var(--tone-risk);
}

.metric-card:nth-child(4) {
  border-top-color: var(--tone-todo);
}

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

.metric-card strong {
  color: var(--text);
  font-size: 34px;
  line-height: 1;
}

.metric-card small {
  color: var(--muted);
  line-height: 1.35;
}

.platform-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 14px;
}

.insight-panel,
.agent-panel,
.telegram-workspace {
  padding: 18px;
}

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

.insight-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

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

.insight-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.agent-panel textarea {
  width: 100%;
  min-height: 220px;
  margin-top: 12px;
  resize: vertical;
}

.telegram-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 12px;
}

.telegram-sprint-area {
  margin-top: 14px;
}

.telegram-sprint-field {
  position: relative;
}

.telegram-sprint-picker {
  position: relative;
  width: 100%;
}

.telegram-sprint-options {
  top: calc(100% + 8px);
  width: min(620px, 100%);
}

.telegram-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.telegram-status::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #8993a4;
  content: "";
}

.telegram-status[data-state="ready"] {
  border-color: rgba(34, 160, 107, 0.32);
  background: #effaf4;
  color: #1f6f4a;
}

.telegram-status[data-state="ready"]::before {
  background: #22a06b;
}

.telegram-status[data-state="paused"] {
  border-color: rgba(245, 184, 75, 0.34);
  background: #fff8e8;
  color: #7a5a15;
}

.telegram-status[data-state="paused"]::before {
  background: #f5b84b;
}

.telegram-settings-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 16px;
  align-items: start;
  margin-top: 14px;
}

.telegram-section {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  background: #fff;
}

.telegram-section-title {
  display: grid;
  gap: 4px;
}

.telegram-section-title span {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.telegram-section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.jira-monitor-section {
  margin-top: 16px;
}

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

.jira-monitor-head .telegram-status {
  flex: 0 0 auto;
  margin-top: 0;
}

.jira-monitor-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(210px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.jira-monitor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.jira-monitor-actions button {
  white-space: nowrap;
}

.jira-monitor-enabled {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.jira-monitor-enabled input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
}

.jira-monitor-enabled:has(input:disabled) {
  color: var(--muted);
  cursor: not-allowed;
}

.jira-monitor-detail {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

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

.telegram-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  background: var(--panel-soft);
  cursor: pointer;
}

.telegram-toggle-primary {
  grid-column: 1 / -1;
  min-height: 76px;
  background: #f8fbff;
}

.telegram-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.telegram-toggle-box {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 2px solid #8993a4;
  border-radius: 4px;
  background: #fff;
}

.telegram-toggle-box::after {
  width: 9px;
  height: 5px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}

.telegram-toggle input:checked + .telegram-toggle-box {
  border-color: var(--brand);
  background: var(--brand);
}

.telegram-toggle input:checked + .telegram-toggle-box::after {
  opacity: 1;
}

.telegram-toggle:has(input:checked) {
  border-color: rgba(12, 102, 228, 0.35);
  background: #f4f8ff;
}

.telegram-toggle-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.telegram-toggle-copy strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

.telegram-toggle-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.telegram-footer {
  display: block;
  margin-top: 14px;
}

.telegram-help {
  margin: 0;
  min-height: 46px;
  padding: 0;
}

.telegram-help summary {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 12px;
}

.telegram-help[open] summary {
  border-bottom: 1px solid var(--line);
}

.telegram-help ol {
  margin: 10px 12px 12px 30px;
  padding-left: 0;
}

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

.telegram-actions button {
  min-width: 0;
}

.telegram-export-tools {
  display: grid;
  gap: 12px;
  justify-items: stretch;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.telegram-date-field {
  width: min(360px, 100%);
}

.telegram-date-field input {
  height: 40px;
}

.telegram-action-card {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  background: var(--panel-soft);
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.telegram-action-card.secondary,
.telegram-action-card.primary {
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--text);
  box-shadow: none;
}

.telegram-action-card:hover {
  border-color: rgba(12, 102, 228, 0.35);
  background: #f4f8ff;
  color: var(--text);
  box-shadow: none;
}

.telegram-action-icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.telegram-action-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.telegram-action-copy strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

.telegram-action-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.telegram-action-primary {
  border-color: rgba(12, 102, 228, 0.45);
  background: #f4f8ff;
}

.telegram-action-card.primary:hover {
  border-color: rgba(12, 102, 228, 0.45);
  background: #e9f2ff;
}

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

/* Telegram 状态筛选是浮动清单，必须能覆盖在面板外并保留底部选项。 */
.telegram-workspace {
  overflow: visible;
  position: relative;
  z-index: 20;
}

.editor-panel,
.preview-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.preview-panel {
  gap: 8px;
  align-self: start;
  align-content: start;
}

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

.section-head.compact {
  padding: 0;
}

.section-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.role-switch {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  align-self: center;
  margin: 0;
  border: 0;
  padding: 0;
}

.role-switch label {
  position: relative;
}

.role-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.role-switch span {
  display: grid;
  min-width: 64px;
  min-height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #33404d;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.role-switch input:focus-visible + span {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 102, 109, 0.14);
}

.role-switch input:checked + span {
  border-color: #6fa3a7;
  background: #e9f2f1;
  color: var(--brand);
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: #405060;
  font-size: 12px;
  font-weight: 800;
}

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

.title-field input {
  min-height: 48px;
  font-size: 18px;
  font-weight: 800;
}

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

.description-title {
  color: #405060;
  font-size: 12px;
  font-weight: 900;
}

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

.description-fields .wide-field {
  grid-column: 1 / -1;
}

.description-fields textarea {
  min-height: 112px;
}

#descriptionBody {
  min-height: 150px;
}

.media-field {
  gap: 8px;
}

.description-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
}

.field-upload {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  gap: 8px 10px;
}

.description-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.description-actions .primary {
  min-width: 124px;
}

.related-issue-field {
  position: relative;
}

.related-issue-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
}

.related-issue-picker input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.related-issue-toggle {
  display: grid;
  place-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #fff;
}

.related-issue-toggle::before {
  display: block;
  width: 9px;
  height: 9px;
  border-right: 2px solid #24313d;
  border-bottom: 2px solid #24313d;
  content: "";
  transform: translateY(-2px) rotate(45deg);
}

.related-issue-toggle[aria-expanded="true"]::before {
  transform: translateY(4px) rotate(225deg);
}

.related-issue-options {
  position: absolute;
  z-index: 30;
  right: 0;
  left: 0;
  top: calc(100% - 18px);
  display: grid;
  gap: 6px;
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.related-issue-options[hidden] {
  display: none;
}

.related-issue-option {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.related-issue-option:hover {
  background: var(--panel-soft);
}

.related-issue-option strong {
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.related-issue-option span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-issue-option em,
.related-issue-empty {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.related-issue-empty {
  margin: 0;
  padding: 8px;
}

.upload-button {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
}

.upload-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.upload-list {
  display: grid;
  width: 100%;
  gap: 6px;
}

/* 创建工单的媒体只在描述编辑区内预览，避免下方重复显示。 */
[data-upload-list="body"] {
  display: none;
}

.upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--panel-soft);
}

.upload-item span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.upload-item strong,
.upload-item em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.upload-item em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

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

input,
select {
  min-height: 40px;
  padding: 8px 10px;
}

fieldset.role-switch {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  align-self: center;
  width: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: var(--panel-soft);
}

fieldset.role-switch::before {
  content: "使用角色";
  padding: 0 7px 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

fieldset.role-switch label {
  position: relative;
  display: block;
  margin: 0;
}

fieldset.role-switch input[type="radio"] {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 0;
  height: 100%;
  margin: 0;
  border: 0;
  padding: 0;
  opacity: 0;
  appearance: none;
  pointer-events: none;
}

fieldset.role-switch span {
  display: grid;
  min-width: 54px;
  min-height: 30px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 12px;
  background: transparent;
  color: #405060;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

fieldset.role-switch input[type="radio"]:focus-visible + span {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 102, 109, 0.14);
}

fieldset.role-switch input[type="radio"]:checked + span {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

textarea {
  min-height: 360px;
  resize: vertical;
  padding: 12px;
  line-height: 1.58;
}

#htmlSource {
  min-height: 160px;
  background: var(--panel-soft);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 102, 109, 0.14);
}

.actionbar,
.copybar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.actions,
.copybar {
  flex-wrap: wrap;
}

.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 14px rgba(18, 109, 120, 0.16);
}

.primary:hover {
  background: var(--brand-strong);
  box-shadow: 0 8px 18px rgba(18, 109, 120, 0.2);
}

.secondary {
  border-color: var(--line-strong);
  background: #fff;
  color: #24313d;
}

.secondary:hover {
  border-color: var(--brand);
  background: #f5fbfb;
  color: var(--brand-strong);
}

.danger {
  border-color: #f2b8b5;
  background: #fff;
  color: #b3261e;
}

.danger:hover {
  border-color: #d93025;
  background: #fce8e6;
  color: #8c1d18;
}

.preview-stack {
  display: grid;
  gap: 8px;
}

.wide-field {
  grid-column: 1 / -1;
}

.wide-field textarea {
  min-height: 96px;
}

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

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

.personal-workspace {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(180deg, #fbfcfd 0%, #fff 140px);
}

.personal-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.personal-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.personal-head p {
  margin-top: 6px;
  color: #5f6f86;
  font-size: 13px;
  font-weight: 750;
}

.personal-head .secondary {
  min-height: 36px;
  border-color: #b8c4d1;
  background: #fff;
  box-shadow: none;
  font-size: 13px;
}

.personal-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.personal-filter-row {
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(280px, 460px) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.personal-sprint-field {
  position: relative;
  z-index: 45;
  min-width: 0;
}

.personal-sprint-field .filter-sprint-toggle {
  min-height: 42px;
  background: #fff;
}

.personal-sprint-field > .personal-sprint-options {
  position: static;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 6px;
  box-shadow: none;
}

.personal-status-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 0;
}

.personal-status-grid .dashboard-status-card {
  align-content: center;
  min-height: 72px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.personal-status-grid .dashboard-status-card strong {
  font-size: 24px;
}

.personal-status-grid .dashboard-status-card span {
  font-size: 12px;
  letter-spacing: 0;
}

.personal-issue-result {
  min-height: 220px;
  border-color: #d9e0e8;
  background: #fff;
  box-shadow: none;
}

.personal-issue-result .sprint-issue-head {
  min-height: 54px;
  padding: 2px 0 12px;
}

.personal-issue-result .sprint-issue-titlebar strong {
  font-size: 20px;
}

.personal-issue-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.personal-issue-titlebar small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.personal-issue-count {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: #f7f9fb;
  color: #42526e;
  font-size: 12px;
  font-weight: 900;
}

.personal-issue-result .sprint-sort-bar {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.personal-issue-result .sprint-issue-list {
  gap: 7px;
}

.personal-issue-item {
  border-color: #d9e0e8;
  box-shadow: none;
}

.personal-issue-row {
  grid-template-columns: minmax(260px, 1fr) minmax(360px, auto);
  min-height: 64px;
  padding: 12px 14px;
}

.personal-issue-row:hover {
  background: #f7f9fb;
}

.personal-issue-row.open {
  background: #f4f8ff;
}

.personal-issue-row .sprint-issue-key {
  font-size: 12px;
}

.personal-issue-row .sprint-issue-main strong {
  font-size: 14px;
  line-height: 1.35;
}

.personal-issue-row .sprint-issue-side {
  padding-right: 12px;
}

.personal-issue-row .sprint-issue-chevron {
  right: 12px;
  opacity: 0.55;
}

.lookup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  gap: 8px;
  align-items: end;
}

.lookup-row button,
.lookup-row .jira-filter-link {
  min-width: 104px;
}

.jira-filter-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-width: 1px;
  border-style: solid;
  border-radius: var(--radius-control, 8px);
  padding: 8px 14px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.jira-filter-link[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.issue-filter-grid {
  display: grid;
  grid-template-columns: minmax(170px, 1.1fr) repeat(5, minmax(120px, 0.8fr));
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafb;
}

.issue-filter-grid .field {
  min-width: 0;
}

.batch-status-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.batch-status-panel[hidden] {
  display: none;
}

.batch-status-grid {
  display: grid;
  /* Keep the pasted-key input compact and align every batch field on one row. */
  grid-template-columns: minmax(220px, 1.35fr) repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.batch-status-grid > .field {
  min-width: 0;
}

.batch-issue-keys-field textarea {
  /* Override the application-wide long-form textarea height. */
  min-height: 84px;
  height: 84px;
  resize: vertical;
}

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

  .batch-issue-keys-field {
    grid-column: 1 / -1;
  }
}

.batch-target-status-field {
  min-width: 0;
}

.batch-status-actions {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 8px;
}

.batch-status-result {
  display: grid;
  gap: 6px;
}

.batch-status-result[hidden] {
  display: none;
}

.batch-status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--tone-border, var(--line));
  border-left: 4px solid var(--tone, var(--brand));
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--tone-bg, #fff);
  color: var(--tone-text, #33404d);
  font-size: 12px;
}

.batch-status-item.ok {
  border-color: rgba(47, 122, 85, 0.32);
  background: #edf7f1;
}

.batch-status-item.warn {
  border-color: rgba(173, 93, 60, 0.32);
  background: #fff2e8;
}

.issue-filter-grid input,
.issue-filter-grid select {
  min-height: 39px;
  padding-top: 7px;
  padding-bottom: 7px;
  font-size: 14px;
}

.issue-filter-sprint-field,
.issue-filter-status-field,
.issue-filter-single-field,
.batch-single-field {
  position: relative;
}

.issue-filter-status-field .filter-sprint-toggle {
  white-space: nowrap;
}

.overview-sprint-field {
  position: relative;
  z-index: 30;
}

.overview-sprint-options {
  width: min(560px, 78vw);
}

.batch-single-options {
  width: min(420px, 92vw);
}

.issue-filter-single-options {
  width: min(360px, 92vw);
}

.filter-sprint-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 39px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 7px 36px 7px 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  text-align: left;
}

.filter-sprint-toggle::after {
  position: absolute;
  right: 14px;
  width: 9px;
  height: 9px;
  border-right: 2px solid #26323e;
  border-bottom: 2px solid #26323e;
  content: "";
  transform: rotate(45deg);
}

.filter-sprint-toggle[aria-expanded="true"]::after {
  transform: translateY(3px) rotate(225deg);
}

.filter-sprint-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1000;
  display: grid;
  width: min(360px, 92vw);
  gap: 8px;
  max-height: min(360px, calc(100vh - 220px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(31, 42, 55, 0.16);
}

.filter-sprint-options.align-end {
  right: 0;
  left: auto;
}

.filter-sprint-options.open-upward {
  top: auto;
  bottom: calc(100% + 8px);
}

.filter-sprint-list {
  display: grid;
  gap: 4px;
  max-height: min(280px, calc(100vh - 310px));
  overflow: auto;
}

.filter-sprint-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border-radius: 7px;
  padding: 7px 8px;
  color: #2f3d49;
  font-size: 13px;
  font-weight: 850;
}

.filter-sprint-option:hover {
  background: #eef4f3;
}

.filter-sprint-option input {
  min-height: auto;
  margin: 0;
}

button.filter-sprint-option {
  width: 100%;
  border: 0;
  padding: 8px 10px;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

button.filter-sprint-option[aria-pressed="true"] {
  background: linear-gradient(90deg, #eef0ff, #f8f9ff);
  color: var(--brand-strong);
}

.sprint-choice-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.sprint-choice-copy strong {
  overflow: hidden;
  color: currentColor;
  font: inherit;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sprint-state-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 20px;
  border: 1px solid #dbe2ec;
  border-radius: 999px;
  padding: 1px 7px;
  background: #f8fafc;
  color: #64748b;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
}

.sprint-state-badge.state-active {
  border-color: #b9e7d5;
  background: #ecfdf5;
  color: #07865f;
}

.sprint-state-badge.state-future {
  border-color: #d9d6fe;
  background: #f5f3ff;
  color: #6756c9;
}

.sprint-state-badge.state-closed {
  border-color: #d9dee7;
  background: #f3f4f6;
  color: #667085;
}

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

.small-button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.issue-filter-text {
  grid-column: span 2;
}

.issue-lookup-result {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.issue-lookup-result.muted-result {
  color: var(--muted);
}

.issue-lookup-result p {
  margin: 0;
  line-height: 1.5;
}

.sprint-issue-result {
  gap: 12px;
}

.sprint-issue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.sprint-issue-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sprint-select-all,
.sprint-issue-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sprint-select-all {
  gap: 6px;
  min-height: 28px;
  white-space: nowrap;
}

.sprint-select-all input,
.sprint-issue-select input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: var(--brand);
}

.sprint-select-all span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sprint-issue-head strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}

.sprint-issue-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.sprint-sort-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.sprint-sort-bar > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.sprint-sort-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.sprint-sort-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
  background: #fff;
  color: #405060;
  font-size: 12px;
  font-weight: 900;
}

.sprint-sort-button:hover,
.sprint-sort-button.active {
  border-color: var(--brand);
  background: #e8f0ef;
  color: var(--brand-strong);
}

.sprint-issue-list {
  display: grid;
  gap: 8px;
}

.sprint-query-groups {
  display: grid;
  gap: 14px;
}

.sprint-query-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: #fff;
}

.sprint-query-group-head {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  gap: 9px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  background: #f7f9fc;
  color: var(--ink);
  text-align: left;
}

.sprint-query-group-head:hover {
  background: #edf3f8;
}

.sprint-query-group-chevron {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.16s ease;
}

.sprint-query-group-head[aria-expanded="false"] .sprint-query-group-chevron {
  transform: rotate(-45deg) translate(-2px, 2px);
}

.sprint-query-group-title {
  min-width: 0;
  overflow: hidden;
  color: var(--brand-strong);
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sprint-query-group-state,
.sprint-query-group-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sprint-query-group-state {
  border-radius: 999px;
  padding: 3px 7px;
  background: #e8f0ef;
  color: var(--brand-strong);
}

.sprint-query-group-count {
  margin-left: auto;
}

.sprint-query-group-body {
  padding: 8px;
}

.sprint-query-group-body[hidden] {
  display: none;
}

.sprint-issue-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.sprint-issue-item.selected {
  border-color: #85b8ff;
  background: #f4f8ff;
}

.sprint-issue-line {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: stretch;
  background: #fff;
}

.personal-issue-line {
  grid-template-columns: minmax(0, 1fr);
}

.sprint-issue-item.selected .sprint-issue-line {
  background: #f4f8ff;
}

.sprint-issue-select {
  border-right: 1px solid var(--line);
  background: inherit;
}

.sprint-issue-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, auto);
  align-items: center;
  column-gap: 12px;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 0;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.sprint-issue-row:hover,
.sprint-issue-row.open {
  background: var(--panel-soft);
}

.personal-issue-row.open {
  box-shadow: inset 3px 0 0 var(--brand);
}

.sprint-issue-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sprint-issue-key {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.sprint-issue-main strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sprint-issue-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  padding-right: 0;
}

.sprint-issue-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  max-width: none;
}

.sprint-issue-meta em {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 7px;
  background: #fff;
  color: #405060;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.sprint-issue-meta .status-chip {
  border-color: var(--tone-border, var(--line));
  border-radius: 999px;
  background: var(--tone-bg, #fff);
  color: var(--tone-text, #405060);
  font-size: 11px;
  font-weight: 850;
}

.sprint-issue-chevron {
  position: absolute;
  right: 14px;
  bottom: 10px;
  width: 12px;
  height: 12px;
  opacity: 0;
  pointer-events: none;
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: rotate(45deg);
}

.sprint-issue-row.open .sprint-issue-chevron {
  transform: translateY(4px) rotate(225deg);
}

.sprint-issue-detail {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 12px;
  background: #fbfcfd;
}

.sprint-issue-detail[hidden] {
  display: none;
}

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

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

.issue-card-edit-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.issue-card-edit-head > div {
  flex: 1 1 auto;
  min-width: 0;
}

.issue-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
  max-width: 100%;
  flex-wrap: wrap;
}

.issue-head-actions button {
  white-space: nowrap;
}

.issue-title-field {
  margin-top: 6px;
}

.issue-title-field input {
  min-height: 42px;
  font-size: 18px;
  font-weight: 900;
}

.issue-key {
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.issue-status-badge {
  margin-left: 8px;
  vertical-align: middle;
}

.issue-updated-at {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.issue-key:hover {
  text-decoration: underline;
}

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

.issue-meta span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 7px;
  background: var(--panel-soft);
  color: #405060;
  font-size: 12px;
  font-weight: 800;
}

.issue-description {
  overflow: auto;
  max-height: 220px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
  color: #24313d;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.issue-edit-block {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.issue-rendered-block,
.issue-edit-details,
.description-inline-editor {
  display: grid;
  gap: 8px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.issue-rendered-block > strong,
.section-title-row > strong {
  color: #405060;
  font-size: 12px;
}

.issue-edit-details summary {
  cursor: pointer;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  color: #24313d;
  background: var(--panel-soft);
  font-weight: 800;
}

.issue-edit-details[open] summary {
  margin-bottom: 8px;
}

.issue-edit-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
}

.issue-edit-meta-grid .field {
  min-width: 0;
}

.issue-edit-meta-grid select {
  min-height: 38px;
  font-size: 13px;
}

.issue-edit-meta-grid input {
  min-height: 38px;
  font-size: 13px;
}

/* 报告人是只读资料，但视觉尺寸需与同列的 Jira 选择栏位一致。 */
.issue-edit-meta-grid #lookupIssueReporter {
  height: 40px;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--text);
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 20px;
}

.issue-sprint-edit-field select {
  overflow: hidden;
  text-overflow: ellipsis;
}

.issue-direct-edit {
  padding: 8px;
}

.readonly-field input {
  background: var(--panel-soft);
  color: var(--muted);
}

.issue-rendered-description {
  cursor: text;
}

.description-inline-editor[hidden] {
  display: none;
}

#lookupIssueDescription {
  min-height: 180px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.source-description-textarea {
  display: none;
}

.rich-description-editor {
  min-height: 260px;
  max-height: 640px;
  cursor: text;
}

.create-description-editor {
  min-height: 240px;
  max-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
}

.create-description-editor .rich-media-node {
  position: relative;
  margin: 10px 0;
  white-space: normal;
}

.inline-create-media-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  border: 1px solid rgba(176, 52, 52, 0.28);
  border-radius: 999px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(113, 42, 42, 0.12);
  color: #bf4545;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.inline-create-media-remove > span:first-child {
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
}

.inline-create-media-remove:hover {
  border-color: #dd7676;
  background: #fff3f2;
  box-shadow: 0 6px 16px rgba(171, 62, 62, 0.18);
  transform: translateY(-1px);
}

.inline-create-media-remove:focus-visible {
  outline: 3px solid rgba(92, 91, 242, 0.3);
  outline-offset: 2px;
}

.rich-description-editor:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(31, 102, 109, 0.12);
  outline: none;
}

.rich-description-editor:empty::before {
  content: "输入描述内容";
  color: var(--muted);
}

.rich-description-editor[data-placeholder]:empty::before {
  content: attr(data-placeholder);
}

.rich-description-editor .rich-media-node {
  display: block;
  width: fit-content;
}

.editable-rich-media:focus {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.issue-edit-block .edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.issue-edit-block .field-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.description-inline-editor > .edit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 0 0;
}

.description-inline-editor > .edit-actions .field-upload {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 8px 10px;
}

.description-inline-editor > .edit-actions .upload-hint {
  white-space: nowrap;
}

.small-button {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 12px;
}

.attachment-block {
  display: grid;
  gap: 8px;
}

.attachment-block strong {
  color: #405060;
  font-size: 12px;
}

.issue-links-block {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #d9e2ee;
  border-radius: 10px;
  background: #fbfdff;
}

.issue-links-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #405060;
}

.issue-links-head strong {
  font-size: 12px;
}

.issue-links-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.issue-links-list {
  display: grid;
  gap: 7px;
}

.issue-links-empty {
  margin: 0;
}

.issue-links-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding-top: 2px;
}

.issue-links-editor input {
  min-width: 0;
}

.issue-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.issue-link-item-main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  min-width: 0;
  gap: 5px 8px;
}

.issue-link-item-main .issue-key {
  font-size: 12px;
  white-space: nowrap;
}

.issue-link-item-main strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.issue-link-relation,
.issue-link-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.issue-link-relation {
  color: #4d46b4;
  background: #f0efff;
}

.issue-link-status {
  color: #526070;
  background: #f2f5f8;
}

.issue-link-status.tone-done,
.issue-link-status.tone-pass {
  color: #087458;
  background: #dff9ef;
}

.issue-link-status.tone-dev,
.issue-link-status.tone-test,
.issue-link-status.tone-todo {
  color: #275bb8;
  background: #eaf1ff;
}

.issue-link-remove {
  flex: 0 0 auto;
}

@media (max-width: 620px) {
  .issue-link-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .issue-links-editor {
    grid-template-columns: 1fr;
  }

  .issue-links-editor button {
    width: 100%;
  }
}

.attachment-list {
  display: grid;
  gap: 7px;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.attachment-item .attachment-link {
  flex: 1 1 auto;
  min-width: 0;
}

.attachment-remove {
  flex: 0 0 auto;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 13px;
  box-shadow: 0 2px 8px rgba(164, 62, 62, 0.08);
}

.attachment-link {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  background: var(--panel-soft);
  color: #24313d;
  font: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.attachment-link:hover {
  border-color: var(--brand);
  background: #f0f6ff;
}

.attachment-link img {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
  background: #fff;
}

.attachment-link:empty {
  display: none;
}

.attachment-link span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-link.attachment-image {
  grid-template-columns: 72px minmax(0, 1fr);
}

.attachment-link.no-thumb {
  grid-template-columns: minmax(0, 1fr);
}

.attachment-link.attachment-video {
  grid-template-columns: 72px minmax(0, 1fr);
}

.attachment-video-mark {
  display: grid;
  width: 72px;
  height: 54px;
  place-items: center;
  border-radius: 6px;
  background: #172b4d;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 560px) {
  .attachment-item {
    align-items: stretch;
    flex-direction: column;
  }

  .attachment-remove {
    align-self: flex-end;
  }
}

.empty-lookup {
  color: var(--muted);
  font-size: 12px;
}

.comment-block {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.comment-title,
.comment-meta,
.comment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.comment-title strong {
  color: #405060;
  font-size: 12px;
}

.comment-title span,
.comment-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.comment-list {
  display: grid;
  gap: 8px;
  max-height: min(46vh, 460px);
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scroll-behavior: smooth;
}

.comment-item {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: var(--panel-soft);
}

.comment-meta strong {
  overflow: hidden;
  color: #24313d;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-item pre {
  overflow: auto;
  max-height: 160px;
  margin: 0;
  color: #24313d;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.comment-edit-panel {
  display: grid;
  gap: 10px;
}

.comment-edit-panel[hidden] {
  display: none;
}

.comment-edit-panel textarea {
  min-height: 110px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.rich-comment-editor {
  min-height: 150px;
  max-height: 420px;
  overflow: auto;
}

.rich-reply-editor {
  min-height: 120px;
}

.comment-field textarea {
  min-height: 98px;
}

.comment-composer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  gap: 8px;
  margin-top: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -8px 18px rgba(31, 47, 62, 0.08);
  backdrop-filter: blur(8px);
}

.comment-actions {
  justify-content: flex-end;
}

.comment-edit-actions,
.comment-composer .comment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-upload-control {
  margin-right: auto;
}

.mention-token {
  display: inline-block;
  border-radius: 999px;
  padding: 0 6px;
  background: #e8f3f3;
  color: #1e6d72;
  font-weight: 700;
}

.mention-menu {
  position: fixed;
  z-index: 10050;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: var(--panel);
  box-sizing: border-box;
  box-shadow: 0 14px 34px rgba(31, 47, 62, 0.18);
}

.mention-menu button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mention-menu button:hover,
.mention-menu button:focus {
  background: #e8f3f3;
  outline: none;
}

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

.cookie-help {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
}

.cookie-help summary {
  cursor: pointer;
  color: #33404d;
  font-weight: 850;
}

.cookie-help ol {
  margin: 10px 0 0;
  padding-left: 20px;
  line-height: 1.65;
}

.result-box {
  overflow: auto;
  max-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
  color: #33404d;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.result-box.ok {
  border-color: rgba(47, 122, 85, 0.34);
  background: #edf7f1;
}

.result-box.warn {
  border-color: rgba(173, 93, 60, 0.34);
  background: #fff2e8;
}

.created-issue-link {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--panel-soft);
}

.created-issue-link[hidden] {
  display: none;
}

.created-issue-link strong {
  color: var(--text);
  font-size: 13px;
}

.created-issue-link .created-issue-key-link {
  width: fit-content;
  color: var(--brand-strong);
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
}

.created-issue-link .created-issue-url-link {
  width: fit-content;
  max-width: 100%;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.created-issue-link a:hover {
  text-decoration: underline;
}

.created-issue-link small,
.created-issue-link span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}

.created-issue-link.ok {
  border-color: rgba(47, 122, 85, 0.34);
  background: #edf7f1;
}

.created-issue-link.warn {
  border-color: rgba(173, 93, 60, 0.34);
  background: #fff2e8;
}

.required-section {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

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

.required-field span::after,
.marked-field span::after {
  content: " *";
  color: var(--accent);
}

.required-field select,
.sprint-picker input {
  min-height: 46px;
}

.required-field.error select,
.required-field.error .sprint-input-wrap input {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(173, 93, 60, 0.14);
}

.field-error {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.sprint-field {
  grid-column: span 2;
  max-width: none;
}

.assignee-field {
  grid-column: span 1;
}

.sprint-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 10px;
  align-items: start;
}

.sprint-input-wrap {
  position: relative;
}

.sprint-input-wrap input {
  padding-right: 44px;
}

.sprint-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  width: 42px;
  min-width: 42px;
  min-height: 0;
  border-color: transparent;
  border-radius: 0 8px 8px 0;
  padding: 0;
  background: transparent;
}

.sprint-toggle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid #24313d;
  border-bottom: 2px solid #24313d;
  transform: translate(-50%, -65%) rotate(45deg);
}

.sprint-toggle:hover {
  background: #edf1f3;
}

.sprint-toggle[aria-expanded="true"]::before {
  transform: translate(-50%, -35%) rotate(225deg);
}

.sprint-picker button {
  min-height: 46px;
}

.sprint-picker > .secondary {
  min-width: 86px;
  padding-right: 14px;
  padding-left: 14px;
}

.sprint-options {
  display: grid;
  gap: 0;
  width: calc(100% - 96px);
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: #fff;
  box-shadow: var(--shadow);
}

.sprint-options[hidden] {
  display: none;
}

.sprint-option {
  position: relative;
  display: block;
  width: 100%;
  min-height: 36px;
  border-color: transparent;
  border-radius: 6px;
  padding: 7px 12px 7px 34px;
  background: #fff;
  color: var(--text);
  text-align: left;
  font-size: 16px;
  line-height: 1.35;
}

.sprint-option:hover,
.sprint-option.selected {
  background: #e8f0ef;
}

.sprint-option .sprint-choice-copy {
  display: flex;
  width: 100%;
}

.ui-sprint-select-option .sprint-choice-copy {
  flex: 1 1 auto;
}

.sprint-option.selected::before {
  content: "✓";
  position: absolute;
  margin-left: -24px;
  color: var(--brand);
  font-weight: 900;
}

.sprint-option span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sprint-field .field-help {
  min-height: 22px;
}

.format-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.segmented-field {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.segmented-field legend {
  width: 100%;
  margin-bottom: 2px;
  color: #405060;
  font-size: 12px;
  font-weight: 800;
}

.segmented-field label {
  position: relative;
  flex: 1 1 110px;
}

.segmented-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-field span {
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #33404d;
  font-size: 13px;
  font-weight: 850;
}

.segmented-field input:checked + span {
  border-color: rgba(31, 102, 109, 0.54);
  background: #e8f0ef;
  color: var(--brand-strong);
}

.html-preview {
  min-height: 0;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  line-height: 1.65;
}

.jira-rendered-content {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: #1b2632;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.jira-rendered-content a,
.jira-inline-link {
  color: var(--brand);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.issue-rendered-description {
  max-height: 520px;
}

.comment-rendered {
  max-height: 420px;
}

.html-preview p,
.html-preview ol,
.html-preview ul,
.html-preview figure,
.jira-rendered-content p,
.jira-rendered-content ol,
.jira-rendered-content ul,
.jira-rendered-content figure {
  margin: 0 0 10px;
}

.html-preview p:last-child,
.html-preview ol:last-child,
.html-preview ul:last-child,
.html-preview figure:last-child,
.html-preview table:last-child,
.jira-rendered-content p:last-child,
.jira-rendered-content ol:last-child,
.jira-rendered-content ul:last-child,
.jira-rendered-content figure:last-child,
.jira-rendered-content table:last-child {
  margin-bottom: 0;
}

.html-preview ol,
.html-preview ul,
.jira-rendered-content ol,
.jira-rendered-content ul {
  padding-left: 22px;
}

.html-preview img,
.jira-rendered-content img {
  display: block;
  max-width: min(100%, 750px);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.jira-rendered-content img[data-media-preview],
.jira-rendered-content video[data-media-preview],
.inline-media-preview img[data-media-preview],
.inline-media-preview video[data-media-preview] {
  cursor: zoom-in;
}

.jira-rendered-content video {
  display: block;
  max-width: min(100%, 750px);
  height: auto;
}

.html-preview table,
.jira-rendered-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 14px;
}

.html-preview th,
.html-preview td,
.jira-rendered-content th,
.jira-rendered-content td {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.html-preview th,
.jira-rendered-content th {
  background: var(--panel-soft);
}

.inline-media-preview {
  display: block;
  margin-top: 8px;
}

.inline-media-preview img,
.inline-media-preview video {
  display: block;
  max-width: min(100%, 750px);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.inline-media-preview em,
.inline-attachment-preview {
  display: inline-block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.inline-attachment-preview::before {
  content: "附件：";
}

.html-preview table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 14px;
}

.html-preview th,
.html-preview td {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.html-preview th {
  background: var(--panel-soft);
  color: #33404d;
  font-size: 13px;
}

.html-preview figcaption,
.local-note {
  margin-top: 6px;
  color: var(--warn);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 900px) {
  body {
    background: var(--bg);
  }

  .app-shell {
    width: min(100% - 24px, 760px);
  }

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

  .overview-hero,
  .platform-grid,
  .telegram-settings-shell,
  .telegram-grid {
    grid-template-columns: 1fr;
  }

  .telegram-options {
    grid-template-columns: 1fr;
  }

  .telegram-footer {
    grid-template-columns: 1fr;
  }

  .telegram-actions {
    grid-template-columns: 1fr;
  }

  .telegram-export-tools {
    justify-items: stretch;
  }

  .overview-hero {
    align-items: stretch;
    flex-direction: column;
  }

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

  .sprint-create-grid,
  .batch-status-grid {
    grid-template-columns: 1fr;
  }

  .batch-status-actions {
    justify-content: flex-start;
  }

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

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

  .format-section {
    grid-template-columns: 1fr;
  }

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

  .sprint-field {
    grid-column: span 1;
    max-width: none;
  }

  .assignee-field {
    grid-column: span 1;
  }

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

  .status-pill {
    align-self: flex-start;
  }
}

@media (max-width: 560px) {
  body {
    padding-bottom: 78px;
  }

  .app-shell {
    width: 100%;
    padding: 10px 10px 22px;
  }

  .editor-panel,
  .preview-panel {
    gap: 13px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    padding: 14px 12px;
    box-shadow: none;
  }

  .workspace {
    gap: 12px;
  }

  .topbar {
    gap: 10px;
    padding: 4px 4px 12px;
  }

  .brand-block {
    gap: 10px;
  }

  .app-mark {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .eyebrow {
    margin-bottom: 3px;
    font-size: 11px;
  }

  h1 {
    font-size: 21px;
  }

  h2 {
    font-size: 16px;
  }

  .notice {
    margin-right: 0;
    margin-left: 0;
    border-radius: 8px;
    font-size: 12px;
  }

  .mobile-jump {
    position: sticky;
    top: 0;
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px;
    background: rgba(238, 242, 244, 0.96);
    backdrop-filter: blur(10px);
  }

  .mobile-jump a {
    display: grid;
    place-items: center;
    min-height: 34px;
    border-radius: 7px;
    color: #33404d;
    text-decoration: none;
    font-size: 13px;
    font-weight: 850;
  }

  .mobile-jump a:active {
    background: #e8f0ef;
    color: var(--brand-strong);
  }

  .title-field input {
    min-height: 44px;
    font-size: 16px;
  }

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

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

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

  .dashboard-columns {
    grid-template-columns: minmax(260px, 1fr);
  }

  .dashboard-issue-detail:not([hidden]) {
    min-width: 100%;
  }

  .overview-hero,
  .sprint-dashboard-panel,
  .sprint-management-panel,
  .sprint-control-panel,
  .sprint-board-panel,
  .insight-panel,
  .agent-panel,
  .telegram-workspace {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    padding: 14px 12px;
    box-shadow: none;
  }

  input,
  select {
    min-height: 42px;
  }

  textarea {
    min-height: 220px;
    font-size: 14px;
  }

  #description {
    display: none;
  }

  .description-fields {
    grid-template-columns: 1fr;
  }

  .description-fields textarea,
  #descriptionBody {
    min-height: 128px;
  }

  .description-action-row {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 9px;
  }

  .field-upload,
  .description-actions {
    width: 100%;
  }

  .description-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .description-actions .primary {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .related-issue-picker {
    grid-template-columns: minmax(0, 1fr) 46px;
  }

  .related-issue-options {
    top: calc(100% - 14px);
    max-height: 260px;
  }

  .related-issue-option {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .related-issue-option span {
    white-space: normal;
  }

  .wide-field textarea {
    min-height: 112px;
  }

  .html-preview {
    min-height: 0;
    max-height: 260px;
    padding: 10px;
    font-size: 14px;
  }

  #htmlSource {
    min-height: 140px;
    font-size: 11px;
  }

  .section-head {
    gap: 8px;
  }

  .section-head:not(.compact) {
    flex-direction: column;
    align-items: stretch;
  }

  .role-switch {
    width: 100%;
  }

  fieldset.role-switch {
    width: 100%;
    justify-content: stretch;
  }

  fieldset.role-switch::before {
    padding-right: 4px;
  }

  .role-switch label {
    flex: 1 1 0;
  }

  .role-switch span {
    min-width: 0;
    min-height: 36px;
  }

  fieldset.role-switch span {
    min-width: 0;
    min-height: 34px;
    padding: 0 8px;
  }

  .section-head p,
  .field-help,
  .cookie-help {
    font-size: 12px;
  }

  .format-section {
    grid-template-columns: 1fr;
  }

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

  .sprint-field,
  .assignee-field {
    grid-column: 1 / -1;
  }

  .sprint-picker {
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 8px;
  }

  .sprint-options {
    width: calc(100% - 84px);
  }

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

  .lookup-row button,
  .lookup-row .jira-filter-link {
    width: 100%;
  }

  .personal-head-actions {
    width: 100%;
  }

  .personal-head-actions > * {
    flex: 1 1 0;
  }

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

  .issue-filter-text {
    grid-column: auto;
  }

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

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

  .sprint-sort-bar {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
  }

  .sprint-sort-buttons {
    justify-content: flex-start;
  }

  .sprint-sort-button {
    flex: 1 1 calc(50% - 6px);
  }

  .sprint-issue-side {
    justify-content: space-between;
    width: 100%;
  }

  .sprint-issue-meta {
    justify-content: flex-start;
    max-width: none;
  }

  .sprint-issue-chevron {
    align-self: center;
  }

  .top-auth-panel {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    padding: 14px 12px;
    box-shadow: none;
  }

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

  .account-login-grid button {
    width: 100%;
  }

  .top-auth-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mode-switch {
    margin-right: 0;
    margin-left: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    padding: 6px 10px;
    box-shadow: none;
  }

  .mode-switch button {
    min-height: 42px;
    font-size: 14px;
  }

  .query-workspace {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    padding: 14px 12px;
    box-shadow: none;
  }

  #lookupIssueDescription {
    min-height: 160px;
  }

  .issue-edit-meta-grid {
    grid-template-columns: 1fr;
  }

  .issue-edit-block .edit-actions,
  .edit-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .comment-list {
    max-height: 42vh;
  }

  .comment-composer {
    bottom: 8px;
    padding: 8px;
  }

  .comment-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .segmented-field span {
    min-height: 40px;
  }

  .actionbar,
  .copybar {
    justify-content: stretch;
  }

  .actions,
  .copybar {
    width: 100%;
  }

  .actions > button,
  .copybar > button {
    flex: 1 1 140px;
  }

  .actionbar {
    display: none;
  }

  .mobile-actionbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding: 10px 10px max(10px, env(safe-area-inset-bottom));
    background: rgba(248, 250, 251, 0.96);
    box-shadow: 0 -8px 22px rgba(31, 42, 55, 0.10);
    backdrop-filter: blur(10px);
  }

  .mobile-actionbar button {
    min-height: 44px;
    flex: none;
  }
}

@media (max-width: 380px) {
}

/* Professional Jira-style refresh */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
}

button {
  min-height: 32px;
  border-radius: 3px;
  padding: 6px 12px;
  font-weight: 650;
  box-shadow: none;
  transform: none;
}

button:hover,
button:active {
  transform: none;
}

.app-shell {
  width: 100%;
  margin: 0;
  padding: 0 0 40px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.app-mark,
.project-avatar {
  border-radius: 4px;
  background: #deebff;
  color: var(--brand-strong);
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

h1 {
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
}

h2 {
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
}

h3 {
  color: var(--text);
  font-weight: 700;
}

.status-pill {
  min-height: 34px;
  border-radius: 3px;
  background: #fff;
  color: var(--text);
  font-weight: 650;
}

.notification-bell {
  min-height: 36px;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-weight: 750;
}

.status-pill::before {
  background: #22a06b;
}

.notification-panel {
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.product-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  width: min(1520px, 100%);
  margin: 0 auto;
  padding: 20px 24px 48px;
}

.product-main {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.mobile-jump {
  display: none !important;
}

body.auth-locked .top-actions,
body.auth-locked .sidebar-toggle,
body.auth-locked .project-sidebar,
body.auth-locked .mobile-jump,
body.auth-locked #overviewWorkspace,
body.auth-locked #personalWorkspace,
body.auth-locked #queryWorkspace,
body.auth-locked #createWorkspace,
body.auth-locked #telegramWorkspace,
body.auth-locked #operationsWorkspace,
body.auth-locked .mobile-actionbar {
  display: none !important;
}

body.auth-locked .product-layout {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1180px;
  padding-top: 28px;
}

body.auth-locked .product-main {
  max-width: none;
}

body.auth-locked #jiraLoginTop {
  display: grid;
}

body.auth-ready #jiraLoginTop {
  display: none !important;
}

/* Legacy lightweight flag is no longer used. One build now uses Jira identity. */
body.legacy-app-lite #modeOverview,
body.legacy-app-lite #modeTelegram,
body.legacy-app-lite #modeOperations,
body.legacy-app-lite #overviewWorkspace,
body.legacy-app-lite #telegramWorkspace,
body.legacy-app-lite #operationsWorkspace,
body.legacy-app-lite .mobile-jump a[href="#overviewWorkspace"],
body.legacy-app-lite .mobile-jump a[href="#telegramWorkspace"],
body.legacy-app-lite .mobile-jump a[href="#operationsWorkspace"] {
  display: none !important;
}

.project-sidebar {
  position: sticky;
  top: 72px;
  display: grid;
  align-self: start;
  gap: 14px;
  min-width: 0;
}

.project-summary,
.sidebar-context {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  background: #fff;
}

.project-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.project-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 12px 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 82%, var(--brand) 4%);
}

.project-switch-tab {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 6px 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.project-switch-tab:hover {
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  color: var(--text);
}

.project-switch-tab.active {
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
  background: var(--panel);
  box-shadow: 0 2px 7px rgba(39, 56, 85, 0.1);
  color: var(--brand-strong);
}

.project-switch-mark {
  display: inline-grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  border-radius: 6px;
  background: color-mix(in srgb, var(--brand) 13%, var(--panel));
  color: var(--brand-strong);
  font-size: 10px;
  font-weight: 900;
}

.mode-switch button[hidden] {
  display: none !important;
}

.project-setup-workspace {
  display: grid;
  gap: 14px;
  min-height: 360px;
  align-content: start;
  padding: 28px;
}

.project-setup-label {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: color-mix(in srgb, var(--brand) 11%, var(--panel));
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
}

.project-setup-workspace h2 {
  margin: 0;
}

.project-setup-workspace > p {
  max-width: 760px;
  margin: -6px 0 6px;
  color: var(--muted);
  line-height: 1.75;
}

.project-setup-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 920px;
}

.project-setup-cards article {
  display: grid;
  gap: 8px;
  min-height: 120px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: color-mix(in srgb, var(--panel) 93%, var(--brand) 3%);
}

.project-setup-cards strong {
  color: var(--text);
  font-size: 15px;
}

.project-setup-cards span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.project-setup-single-card {
  grid-template-columns: minmax(0, 1fr);
}

/* Klive / Lark overview -------------------------------------------------- */
#kliveOverviewWorkspace > :not(.klive-lark-overview) {
  display: none;
}

.klive-lark-overview {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.klive-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.klive-overview-head h2 {
  margin: 9px 0 4px;
}

.klive-overview-head p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.klive-overview-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.klive-overview-actions a {
  text-decoration: none;
}

.klive-sync-state {
  min-height: 22px;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, var(--brand));
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand) 5%, var(--panel));
  color: var(--muted);
  font-size: 13px;
}

.klive-sync-state[data-tone="ok"] {
  border-color: color-mix(in srgb, var(--ok) 32%, var(--line));
  background: color-mix(in srgb, var(--ok) 8%, var(--panel));
  color: color-mix(in srgb, var(--ok) 78%, var(--text));
}

.klive-sync-state[data-tone="warn"] {
  border-color: color-mix(in srgb, var(--warn) 38%, var(--line));
  background: color-mix(in srgb, var(--warn) 8%, var(--panel));
  color: color-mix(in srgb, var(--warn) 78%, var(--text));
}

.klive-dashboard-pulse {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  min-height: 166px;
  padding: 24px 28px;
  border: 1px solid color-mix(in srgb, var(--brand) 31%, var(--line));
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 16%, color-mix(in srgb, var(--brand) 28%, transparent), transparent 30%),
    radial-gradient(circle at 68% 120%, color-mix(in srgb, #68b7ff 18%, transparent), transparent 43%),
    linear-gradient(130deg, color-mix(in srgb, var(--brand) 14%, var(--panel)), var(--panel) 60%);
}

.klive-dashboard-pulse-copy {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.klive-dashboard-pulse h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -.025em;
}

.klive-dashboard-pulse p {
  max-width: 610px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.klive-dashboard-pulse-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.klive-dashboard-pulse-meta span {
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 74%, transparent);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.klive-dashboard-ring-wrap {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
}

.klive-dashboard-ring {
  display: grid;
  width: 108px;
  height: 108px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--brand) calc(var(--klive-progress) * 1%), color-mix(in srgb, var(--line) 82%, var(--panel)) 0);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 22%, transparent), 0 14px 30px color-mix(in srgb, var(--brand) 18%, transparent);
}

.klive-dashboard-ring > span {
  display: grid;
  width: 78px;
  height: 78px;
  place-content: center;
  border-radius: 50%;
  background: var(--panel);
  text-align: center;
}

.klive-dashboard-ring strong {
  color: var(--text);
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.045em;
}

.klive-dashboard-ring small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.klive-dashboard-ring-label {
  display: grid;
  max-width: 140px;
  gap: 3px;
}

.klive-dashboard-ring-label strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.klive-dashboard-ring-label span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.klive-overview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
}

.klive-overview-stat {
  display: grid;
  gap: 3px;
  min-height: 74px;
  align-content: center;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, color-mix(in srgb, var(--panel) 88%, var(--brand) 7%), var(--panel));
}

.klive-overview-stat::after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--brand);
  content: "";
}

.klive-overview-stat:nth-child(2)::after { background: #0ea67a; }
.klive-overview-stat:nth-child(3)::after { background: #3c82f6; }
.klive-overview-stat:nth-child(4)::after { background: #f0a229; }
.klive-overview-stat:nth-child(5)::after { background: #8a63df; }
.klive-overview-stat:nth-child(6)::after { background: #dc6876; }
}

.klive-overview-stat strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.klive-overview-stat span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.klive-bi-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.04fr) minmax(250px, .96fr) minmax(250px, .96fr);
  gap: 12px;
}

.klive-bi-card {
  min-width: 0;
  min-height: 202px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 9px 20px color-mix(in srgb, var(--text) 4%, transparent);
}

.klive-bi-status {
  background:
    radial-gradient(circle at 10% 120%, color-mix(in srgb, var(--brand) 15%, transparent), transparent 45%),
    var(--panel);
}

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

.klive-bi-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.klive-bi-card-meta {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.klive-bi-status-content {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  min-height: 135px;
}

.klive-status-doughnut {
  display: grid;
  width: 108px;
  height: 108px;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 8%, transparent);
}

.klive-status-doughnut > span {
  display: grid;
  width: 74px;
  height: 74px;
  place-content: center;
  border-radius: 50%;
  background: var(--panel);
  text-align: center;
}

.klive-status-doughnut strong {
  color: var(--text);
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.045em;
}

.klive-status-doughnut small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.klive-status-legend {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.klive-status-legend > span {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.klive-status-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--klive-chart-color);
}

.klive-status-legend b {
  overflow: hidden;
  color: var(--text);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.klive-status-legend strong {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.klive-horizontal-chart {
  display: grid;
  gap: 11px;
  min-height: 135px;
  align-content: center;
}

.klive-horizontal-bar {
  display: grid;
  grid-template-columns: minmax(76px, 1fr) minmax(92px, 2fr) 24px;
  align-items: center;
  gap: 9px;
}

.klive-horizontal-bar > span {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.klive-horizontal-bar > i {
  display: block;
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 72%, var(--panel));
}

.klive-horizontal-bar > i > b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--klive-chart-color);
  box-shadow: 0 0 12px color-mix(in srgb, var(--klive-chart-color) 30%, transparent);
}

.klive-horizontal-bar > strong {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.klive-vertical-chart {
  display: flex;
  min-height: 135px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 11px;
  padding-top: 7px;
}

.klive-vertical-bar {
  display: grid;
  flex: 1 1 0;
  min-width: 0;
  grid-template-rows: auto 84px auto;
  align-items: end;
  gap: 5px;
  text-align: center;
}

.klive-vertical-bar > strong {
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.klive-vertical-bar > i {
  display: flex;
  height: 84px;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}

.klive-vertical-bar > i > b {
  display: block;
  width: min(30px, 74%);
  min-height: 5px;
  border-radius: 6px 6px 2px 2px;
  background: var(--klive-chart-color);
  box-shadow: 0 0 12px color-mix(in srgb, var(--klive-chart-color) 24%, transparent);
}

.klive-vertical-bar > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.klive-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .8fr);
  gap: 12px;
}

.klive-dashboard-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--brand) 7%, var(--panel)), var(--panel) 52%);
}

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

.klive-dashboard-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.klive-dashboard-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.klive-dashboard-meta {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 10%, var(--panel));
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.klive-status-distribution {
  display: grid;
  gap: 8px;
}

.klive-status-bar {
  display: grid;
  grid-template-columns: minmax(74px, 1fr) minmax(80px, 2.3fr) 28px 34px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 28px;
  padding: 2px 4px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.klive-status-bar:hover,
.klive-status-bar.is-active {
  background: color-mix(in srgb, var(--brand) 9%, transparent);
}

.klive-status-bar:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 72%, transparent);
  outline-offset: 2px;
}

.klive-status-bar-label {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.klive-status-bar-track {
  display: block;
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 72%, var(--panel));
}

.klive-status-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 72%, #61a8ff), var(--brand));
}

.klive-status-bar strong,
.klive-status-bar em {
  color: var(--text);
  font-size: 12px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.klive-status-bar em {
  color: var(--muted);
  font-size: 11px;
}

.klive-dashboard-guide p,
.klive-dashboard-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.klive-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.klive-table-toolbar > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text);
}

.klive-table-toolbar > div:first-child span {
  color: var(--muted);
  font-size: 12px;
}

.klive-table-filters {
  display: flex;
  flex: 0 1 520px;
  gap: 8px;
}

.klive-table-filters input,
.klive-status-filter-trigger {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.klive-table-filters input {
  width: 100%;
  padding: 7px 10px;
}

.klive-table-filters input:focus,
.klive-status-filter-trigger:focus-visible,
.klive-status-filter-search input:focus-visible,
.klive-status-filter-search button:focus-visible,
.klive-status-filter-option:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 13%, transparent);
}

.klive-status-multiselect {
  position: relative;
  flex: 0 1 276px;
  min-width: 212px;
}

.klive-status-filter-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 38px;
  padding: 5px 9px 5px 10px;
  cursor: pointer;
  text-align: left;
}

.klive-status-filter-trigger:hover,
.klive-status-filter-trigger.is-open {
  border-color: color-mix(in srgb, var(--brand) 52%, var(--line));
}

.klive-status-filter-values {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-height: 58px;
  overflow: hidden;
}

.klive-status-filter-placeholder {
  color: var(--muted);
}

.klive-status-filter-caret {
  flex: 0 0 auto;
  margin-left: 7px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  transition: transform .16s ease;
}

.klive-status-filter-trigger.is-open .klive-status-filter-caret {
  transform: rotate(180deg);
}

.klive-status-filter-chip,
.klive-status-filter-dot {
  background: color-mix(in srgb, var(--brand) 14%, var(--panel));
  color: color-mix(in srgb, var(--brand) 82%, var(--text));
}

.klive-status-filter-chip {
  max-width: 188px;
  overflow: hidden;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.klive-status-filter-chip.chip-1,
.klive-status-filter-dot.chip-1 { background: color-mix(in srgb, #16a085 16%, var(--panel)); color: color-mix(in srgb, #13836d 88%, var(--text)); }
.klive-status-filter-chip.chip-2,
.klive-status-filter-dot.chip-2 { background: color-mix(in srgb, #f59e0b 19%, var(--panel)); color: color-mix(in srgb, #aa6900 86%, var(--text)); }
.klive-status-filter-chip.chip-3,
.klive-status-filter-dot.chip-3 { background: color-mix(in srgb, #e65f79 15%, var(--panel)); color: color-mix(in srgb, #bd3854 88%, var(--text)); }
.klive-status-filter-chip.chip-4,
.klive-status-filter-dot.chip-4 { background: color-mix(in srgb, #3b82f6 15%, var(--panel)); color: color-mix(in srgb, #2865c5 88%, var(--text)); }
.klive-status-filter-chip.chip-5,
.klive-status-filter-dot.chip-5 { background: color-mix(in srgb, #8b5cf6 15%, var(--panel)); color: color-mix(in srgb, #6f42c1 88%, var(--text)); }

.klive-status-filter-menu {
  position: absolute;
  z-index: 24;
  top: calc(100% + 7px);
  right: 0;
  width: min(330px, calc(100vw - 44px));
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 36px color-mix(in srgb, #111827 18%, transparent);
}

.klive-status-filter-search {
  display: flex;
  gap: 7px;
  padding: 9px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, var(--brand) 8%);
}

.klive-status-filter-search input {
  min-width: 0;
  min-height: 34px;
  padding: 6px 9px;
}

.klive-status-filter-search button {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.klive-status-filter-search button:disabled {
  cursor: default;
  opacity: .48;
}

.klive-status-filter-options {
  max-height: min(320px, 42vh);
  padding: 6px;
  overflow-y: auto;
}

.klive-status-filter-option {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.klive-status-filter-option:hover,
.klive-status-filter-option.is-selected {
  background: color-mix(in srgb, var(--brand) 11%, var(--panel));
}

.klive-status-filter-check {
  display: grid;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--brand) 42%, var(--line));
  border-radius: 5px;
  color: var(--panel);
  font-size: 11px;
  font-weight: 900;
}

.klive-status-filter-option.is-selected .klive-status-filter-check {
  border-color: var(--brand);
  background: var(--brand);
}

.klive-status-filter-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.klive-status-filter-empty {
  margin: 0;
  padding: 18px 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.klive-overview-table-wrap {
  overflow: auto;
  max-height: min(62vh, 680px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.klive-overview-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.klive-overview-table th,
.klive-overview-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}

.klive-overview-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 93%, var(--brand) 7%);
  font-size: 12px;
  font-weight: 800;
}

.klive-overview-table tr:last-child td {
  border-bottom: 0;
}

.klive-overview-table td {
  max-width: 360px;
  overflow-wrap: anywhere;
}

.klive-status-cell {
  min-width: 152px;
  color: color-mix(in srgb, var(--brand) 75%, var(--text));
  font-weight: 750;
}

.klive-status-select {
  width: 100%;
  min-width: 132px;
  min-height: 34px;
  padding: 6px 30px 6px 9px;
  border: 1px solid color-mix(in srgb, var(--brand) 42%, var(--line));
  border-radius: 8px;
  outline: none;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.klive-status-select:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}

.klive-status-pending {
  display: inline-flex;
  margin-top: 6px;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--warn) 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--warn) 12%, var(--panel));
  color: color-mix(in srgb, var(--warn) 84%, var(--text));
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
}

.klive-overview-empty {
  padding: 34px 18px !important;
  color: var(--muted);
  text-align: center !important;
}

@media (max-width: 680px) {
  .project-setup-workspace {
    min-height: 0;
    padding: 20px;
  }

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

  .klive-overview-head {
    display: grid;
  }

  .klive-overview-actions {
    flex-wrap: wrap;
  }

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

  .klive-bi-grid {
    grid-template-columns: 1fr;
  }

  .klive-dashboard-pulse {
    align-items: flex-start;
    flex-direction: column;
    padding: 21px;
  }

  .klive-table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .klive-table-filters {
    width: 100%;
    flex-wrap: wrap;
  }

  .klive-status-multiselect {
    flex-basis: 100%;
    width: 100%;
  }
}

:root[data-theme="dark"] .project-switcher {
  border-color: #3a414c;
  background: #272a30;
}

:root[data-theme="dark"] .project-switch-tab {
  color: #b9c0cb;
}

:root[data-theme="dark"] .project-switch-tab:hover {
  background: #343942;
  color: #fff;
}

:root[data-theme="dark"] .project-switch-tab.active {
  border-color: #5b6d83;
  background: #34363b;
  box-shadow: none;
  color: #fff;
}

:root[data-theme="dark"] .project-switch-mark,
:root[data-theme="dark"] .project-setup-label {
  background: #253c57;
  color: #b7d4f7;
}

:root[data-theme="dark"] .project-setup-cards article {
  border-color: #3a414c;
  background: #26282d;
}

:root[data-theme="dark"] .klive-sync-state {
  border-color: #3a414c;
  background: #26282d;
}

:root[data-theme="dark"] .klive-overview-stat,
:root[data-theme="dark"] .klive-overview-table-wrap,
:root[data-theme="dark"] .klive-overview-table th {
  border-color: #3a414c;
  background: #26282d;
}

.project-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
}

.project-summary strong,
.sidebar-context strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-summary span,
.sidebar-context span,
.sidebar-context small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.sidebar-context {
  display: grid;
  gap: 4px;
}

.project-sidebar .mode-switch {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.mode-switch button {
  justify-content: flex-start;
  min-height: 38px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 3px;
  padding: 8px 10px;
  background: transparent;
  color: #44546f;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
}

.mode-switch button:hover {
  background: #f1f2f4;
  color: var(--text);
}

.mode-switch button.active {
  border-color: var(--brand);
  background: #e9f2ff;
  color: var(--brand-strong);
}

.notice {
  min-height: 36px;
  border-radius: 4px;
  background: #fff;
}

.app-notice {
  margin-bottom: 0;
}

.panel {
  border-radius: 4px;
  box-shadow: none;
}

.top-auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 0;
  border-left: 3px solid #85b8ff;
  padding: 14px;
}

.top-auth-panel #jiraCookie {
  min-height: 68px;
}

.account-login-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

input,
select,
textarea,
.filter-sprint-toggle,
.related-issue-toggle,
.sprint-toggle,
.segmented-field span,
fieldset.role-switch,
fieldset.role-switch span {
  border-radius: 3px;
}

input,
select {
  min-height: 36px;
  padding: 7px 9px;
}

textarea {
  padding: 10px;
}

input:focus,
select:focus,
textarea:focus,
.rich-description-editor:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px #deebff;
}

.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: none;
}

.primary:hover {
  background: var(--brand-strong);
  box-shadow: none;
}

.secondary {
  border-color: var(--line);
  background: #fff;
  color: #172b4d;
}

.secondary:hover {
  border-color: #8590a2;
  background: #f7f8f9;
  color: #172b4d;
}

.danger {
  border-color: #ffd5d2;
  background: #fff;
  color: #ae2a19;
  box-shadow: none;
}

.danger:hover {
  border-color: #e2483d;
  background: #fff4f3;
  color: #8f1f11;
  box-shadow: none;
}

.overview-workspace {
  gap: 16px;
}

.overview-hero {
  overflow: visible;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 4px 0 18px;
  background: transparent;
  box-shadow: none;
}

.overview-hero h2 {
  font-size: 28px;
  letter-spacing: 0;
}

.overview-hero p:not(.eyebrow) {
  max-width: 780px;
  color: var(--muted);
  font-size: 14px;
}

.sprint-dashboard-panel,
.sprint-management-panel,
.sprint-control-panel,
.sprint-board-panel,
.query-workspace,
.editor-panel,
.preview-panel,
.telegram-workspace,
.insight-panel,
.agent-panel {
  padding: 16px;
}

.sprint-control-panel {
  overflow: visible;
  position: relative;
  z-index: 20;
}

.section-head p {
  color: var(--muted);
  font-size: 12px;
}

.metric-grid {
  gap: 10px;
}

.metric-card {
  min-height: 104px;
  border-top: 0;
  border-left: 3px solid var(--brand);
  border-radius: 4px;
  padding: 14px;
  box-shadow: none;
}

.metric-card strong {
  font-size: 32px;
  font-weight: 700;
}

.metric-card span {
  color: var(--muted);
  font-weight: 700;
}

.status-chip {
  gap: 3px;
  border: 0;
  border-radius: 3px;
  padding: 2px 6px;
  background: var(--tone-bg, var(--panel-soft));
  color: var(--tone-text, var(--muted));
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
}

.dashboard-status-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.dashboard-status-card {
  min-height: 68px;
  border: 0;
  border-left: 3px solid var(--tone, var(--brand));
  border-radius: 4px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.dashboard-status-card strong {
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
}

.dashboard-columns {
  grid-template-columns: none;
  grid-auto-columns: minmax(260px, 1fr);
  grid-auto-flow: column;
  gap: 12px;
  padding: 2px 2px 8px;
}

.dashboard-column {
  min-width: 260px;
  border: 0;
  border-radius: 6px;
  padding: 8px;
  background: #f1f2f4;
  box-shadow: inset 0 0 0 1px var(--line);
}

.dashboard-column-head {
  min-height: 32px;
  padding: 0 2px 4px;
  color: #44546f;
  font-size: 12px;
  letter-spacing: 0;
}

.dashboard-column-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-issue-card {
  min-height: 92px;
  border: 0;
  border-radius: 4px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(9, 30, 66, 0.2);
}

.dashboard-issue-card[draggable="true"] {
  cursor: grab;
  user-select: none;
}

.dashboard-issue-card[draggable="true"]:active {
  cursor: grabbing;
}

.dashboard-issue-card.dragging {
  opacity: 0.56;
  box-shadow: 0 8px 18px rgba(9, 30, 66, 0.18);
}

.dashboard-column.drop-target {
  background: #e9f2ff;
  box-shadow: inset 0 0 0 2px var(--brand);
}

.dashboard-column.drop-target .dashboard-column-head {
  color: var(--brand-strong);
}

.dashboard-issue-card:hover,
.dashboard-issue-card.open {
  background: #fff;
  box-shadow: 0 2px 6px rgba(9, 30, 66, 0.18);
}

.dashboard-issue-card em,
.sprint-issue-key,
.issue-key {
  color: var(--brand-strong);
}

.sprint-board-panel {
  display: grid;
  gap: 14px;
}

.platform-grid {
  gap: 16px;
}

.insight-item,
.comment-item,
.upload-item,
.created-issue-link,
.result-box,
.cookie-help,
.issue-edit-block,
.issue-description,
.jira-rendered-content,
.html-preview,
.batch-status-panel,
.lookup-section,
.issue-filter-grid,
.issue-lookup-result {
  border-radius: 4px;
}

.lookup-section,
.batch-status-panel,
.issue-filter-grid {
  background: #f7f8f9;
}

.issue-filter-grid {
  grid-template-columns: minmax(190px, 1.2fr) repeat(4, minmax(120px, 0.8fr)) minmax(180px, 1fr);
}

.issue-filter-text {
  grid-column: auto;
}

.sprint-issue-item {
  border-radius: 4px;
  box-shadow: none;
}

.sprint-issue-item.selected {
  border-color: #85b8ff;
  box-shadow: inset 3px 0 0 #0c66e4;
}

.sprint-issue-row {
  min-height: 60px;
  border-left: 3px solid transparent;
  border-radius: 0;
}

.sprint-issue-row:hover,
.sprint-issue-row.open {
  border-left-color: var(--brand);
  background: #f7f8f9;
}

.sprint-issue-item.selected .sprint-issue-row {
  background: #f4f8ff;
}

.sprint-issue-main strong {
  font-weight: 650;
}

.sprint-issue-meta em {
  border: 0;
  border-radius: 3px;
  background: #f1f2f4;
}

.sprint-sort-button {
  border-radius: 3px;
}

.sprint-sort-button:hover,
.sprint-sort-button.active {
  background: #e9f2ff;
  color: var(--brand-strong);
}

.issue-detail-shell {
  gap: 12px;
}

.issue-card-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.issue-edit-meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.issue-sprint-edit-field {
  position: relative;
  z-index: 5;
}

.comment-composer {
  border-radius: 4px;
  box-shadow: 0 -2px 8px rgba(9, 30, 66, 0.08);
}

.notification-item {
  border-radius: 4px;
}

.notification-item.unread {
  background: var(--notification-unread);
}

.notification-item.mention {
  border-left-color: var(--brand);
  background: var(--notification-unread);
}

.notification-item.assignment,
.notification-item.todo-assignment {
  border-left-color: var(--tone-owner);
  background: var(--tone-owner-bg);
}

.program-dashboard {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.dashboard-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.dashboard-title-row h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 750;
}

.dashboard-title-row p:not(.eyebrow) {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.program-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.sprint-summary-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  background: #fff;
}

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

.sprint-conclusion-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 132px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 4px;
  padding: 12px;
  background: #fff;
}

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

.sprint-conclusion-card strong {
  color: var(--text);
  font-size: 28px;
  font-weight: 850;
  line-height: 1;
}

.sprint-conclusion-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.sprint-conclusion-card.conclusion-warning {
  border-left-color: #f5b84b;
  background: #fffaf0;
}

.sprint-conclusion-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.75fr);
  gap: 12px;
  align-items: stretch;
  min-width: 0;
}

.conclusion-block {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  background: #fff;
}

.conclusion-block-side {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.change-log-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.conclusion-block-head {
  display: grid;
  gap: 4px;
}

.conclusion-block-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.conclusion-block-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.conclusion-list,
.conclusion-side-list {
  min-width: 0;
}

.conclusion-list {
  overflow: auto;
  padding-right: 4px;
}

.conclusion-side-list {
  max-height: 172px;
  overflow: auto;
  padding-right: 4px;
}

.change-log-block {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.change-log-head {
  display: grid;
  gap: 4px;
}

.change-log-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.change-log-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.change-log-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.change-log-filter label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.change-log-filter span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.change-log-filter input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 6px 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.change-log-list {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.change-log-items {
  display: grid;
  grid-auto-rows: 128px;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.change-log-items li {
  display: grid;
  grid-template-rows: 38px 24px minmax(0, 1fr);
  gap: 6px;
  height: 128px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px;
  background: #fff;
}

.change-log-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 38px;
  overflow: hidden;
}

.change-log-title .summary-issue-link {
  align-self: center;
  line-height: 1.2;
}

.change-log-title strong {
  display: -webkit-box;
  align-self: center;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.change-log-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  overflow: hidden;
}

.change-log-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding: 3px 6px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.change-log-items p {
  display: -webkit-box;
  align-self: center;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
}

.incomplete-table-wrap {
  overflow: auto;
  min-width: 0;
}

.incomplete-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  color: var(--text);
  font-size: 13px;
}

.incomplete-table th,
.incomplete-table td {
  border-top: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.incomplete-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.incomplete-table td:first-child {
  width: 32%;
}

.incomplete-table td:nth-child(2) {
  width: 86px;
  color: var(--muted);
  font-weight: 750;
}

.incomplete-table td:nth-child(3) {
  width: 22%;
}

.incomplete-table td:first-child span {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.incomplete-owner-cell em {
  display: block;
  margin-bottom: 6px;
  border-radius: 4px;
  padding: 6px 8px;
  border-left: 3px solid var(--tone-border, var(--line));
  background: var(--tone-bg, var(--panel-soft));
  color: var(--tone-text, var(--text));
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
}

.incomplete-owner-cell em.tone-risk {
  background: var(--tone-risk-bg);
  color: var(--tone-risk-text);
}

.incomplete-owner-cell em.tone-owner {
  background: var(--tone-owner-bg);
  color: var(--tone-owner-text);
}

.incomplete-owner-cell em span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.incomplete-owner-cell em:last-child {
  margin-bottom: 0;
}

.incomplete-missing-cell em {
  display: block;
  margin-bottom: 6px;
  border-radius: 4px;
  padding: 6px 8px;
  background: #fff2e8;
  color: #7a3516;
  font-style: normal;
  font-weight: 750;
  line-height: 1.45;
}

.incomplete-missing-cell em:last-child {
  margin-bottom: 0;
}

.conclusion-bullets {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.conclusion-bullets li {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px;
  background: var(--panel-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

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

.sprint-summary-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  background: #fff;
}

.summary-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.summary-card-head span {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.summary-card-head strong {
  color: var(--brand);
  font-size: 24px;
  font-weight: 850;
}

.summary-card-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.summary-mini-metrics,
.summary-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.summary-mini-metrics span,
.summary-rules span {
  border-radius: 4px;
  padding: 4px 7px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.summary-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px;
  background: #fff;
}

.summary-list li > span {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-list li > em {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.4;
}

.summary-issue-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.summary-line {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.dashboard-widget {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  min-height: 236px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 4px;
  padding: 14px;
  background: #fff;
}

.dashboard-widget h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  text-align: center;
}

.widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
}

.widget-head::after {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 2px;
  content: "...";
}

.widget-wide,
.widget-tall,
.agent-panel.dashboard-widget {
  min-height: 286px;
}

.donut-widget {
  min-height: 210px;
}

.donut-chart-wrap {
  display: grid;
  grid-template-columns: minmax(190px, 0.78fr) minmax(240px, 1fr);
  gap: 24px;
  align-items: center;
  min-width: 0;
  padding: 6px 4px 2px;
}

.donut-widget.compact .donut-chart-wrap {
  grid-template-columns: minmax(132px, 0.65fr) minmax(170px, 1fr);
}

.donut-chart {
  position: relative;
  display: grid;
  place-items: center;
  width: min(188px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  border: 1px solid rgba(9, 30, 66, 0.06);
  border-radius: 999px;
  background: var(--donut-bg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.donut-chart::after {
  position: absolute;
  width: 61%;
  aspect-ratio: 1;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(9, 30, 66, 0.06);
  content: "";
}

.donut-center {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  place-items: center;
  text-align: center;
}

.donut-center strong {
  color: var(--text);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

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

.donut-legend {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.donut-legend-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 12px;
  align-items: end;
  border-bottom: 1px solid #f1f2f4;
  padding: 0 0 9px;
  color: var(--text);
  font-size: 13px;
}

.donut-legend-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.donut-legend-main {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.donut-legend-main i {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--legend-color);
}

.donut-legend-main span {
  overflow: hidden;
  color: var(--text);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-legend-metric {
  display: grid;
  grid-template-columns: minmax(30px, auto) minmax(40px, auto);
  gap: 12px;
  align-items: baseline;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.donut-legend-metric b,
.donut-legend-metric em {
  font-style: normal;
  text-align: right;
}

.donut-legend-metric b {
  color: var(--text);
  font-weight: 900;
}

.donut-legend-track {
  grid-column: 1 / -1;
  overflow: hidden;
  height: 5px;
  border-radius: 999px;
  background: #f1f2f4;
}

.donut-legend-track div {
  width: max(4px, var(--legend-width));
  height: 100%;
  border-radius: inherit;
  background: var(--legend-color);
}

.sprint-distribution {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 4px 2px;
}

.sprint-distribution-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.sprint-distribution-summary strong {
  color: var(--text);
  font-size: 26px;
  font-weight: 850;
  line-height: 1;
}

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

.sprint-distribution-summary em {
  color: #7a3516;
}

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

.sprint-distribution-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 6px 10px;
  align-items: center;
}

.sprint-distribution-meta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.sprint-distribution-meta span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sprint-distribution-meta i {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.sprint-distribution-meta strong,
.sprint-distribution-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.sprint-distribution-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #f1f2f4;
}

.sprint-distribution-fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: var(--bar-color);
}

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

.dashboard-table-wrap {
  overflow-x: auto;
  min-width: 0;
}

.dashboard-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  color: var(--text);
  font-size: 12px;
}

.dashboard-table th,
.dashboard-table td {
  border-bottom: 1px solid var(--line);
  padding: 7px 8px;
  text-align: left;
  vertical-align: middle;
}

.dashboard-table th {
  color: var(--muted);
  font-weight: 750;
  white-space: nowrap;
}

.dashboard-table td:not(:first-child),
.dashboard-table th:not(:first-child) {
  text-align: center;
}

.dashboard-table tfoot td {
  color: var(--text);
  font-weight: 750;
}

.bar-widget {
  display: grid;
  gap: 10px;
}

.workload-method {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.workload-method strong {
  color: var(--text);
  font-weight: 800;
}

.workload-method span {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row {
  display: grid;
  gap: 5px;
}

.bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.bar-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workload-person-meta {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.workload-person-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workload-bar-label small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.workload-bar-label b {
  flex: 0 0 auto;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.workload-role-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.workload-role-metrics span {
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 5px;
  color: #44546f;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
  white-space: nowrap;
}

.workload-role-metrics .workload-role-label {
  border-color: #d7e1f2;
  background: #f4f8ff;
  color: var(--brand-strong);
}

.workload-role-metrics .workload-metric-primary {
  border-color: #bfe3d0;
  background: #eefaf3;
  color: #216e4e;
}

.workload-role-metrics .workload-metric-secondary {
  border-color: #f3d6a3;
  background: #fff8e8;
  color: #8d5a00;
}

.workload-metric-detail {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.35;
  white-space: normal;
}

.bar-track {
  overflow: hidden;
  height: 20px;
  border-radius: 4px;
  background: #f1f2f4;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--bar-color, var(--brand));
}

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

.summary-card {
  display: grid;
  gap: 4px;
  min-height: 78px;
  border: 1px solid var(--tone-border, var(--line));
  border-left: 3px solid var(--tone, var(--brand));
  border-radius: 4px;
  padding: 10px;
  background: var(--tone-bg, #fff);
}

.summary-card span {
  color: var(--tone-text, var(--muted));
  font-size: 12px;
  font-weight: 750;
}

.summary-card strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.summary-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.tone-brand {
  --tone: var(--brand);
  --tone-bg: #e9f2ff;
  --tone-border: #85b8ff;
  --tone-text: var(--brand-strong);
}

.issue-attention-table td:nth-child(2) {
  max-width: 280px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-issue-link {
  min-height: auto;
  border: 0;
  border-radius: 3px;
  padding: 2px 4px;
  background: transparent;
  color: var(--brand-strong);
  font-weight: 850;
}

.table-issue-link:hover {
  background: #e9f2ff;
  transform: none;
}

.agent-panel.dashboard-widget {
  padding: 10px;
}

.agent-panel.dashboard-widget p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.agent-panel.dashboard-widget textarea {
  min-height: 170px;
}

@media (max-width: 1180px) {
  .product-layout {
    grid-template-columns: 208px minmax(0, 1fr);
    gap: 18px;
    padding-right: 18px;
    padding-left: 18px;
  }

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

  .sprint-conclusion-grid,
  .sprint-conclusion-body {
    grid-template-columns: 1fr;
  }

  .sprint-summary-grid {
    grid-template-columns: 1fr;
  }

  .change-log-filter {
    grid-template-columns: 1fr;
  }

  .widget-wide,
  .widget-tall,
  .agent-panel.dashboard-widget {
    min-height: auto;
  }

  .issue-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sprint-control-head {
    grid-template-columns: 1fr;
  }

  .sprint-dashboard-area {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 16px;
    padding-left: 0;
  }
}

@media (max-width: 900px) {
  .topbar {
    position: relative;
    padding: 12px 14px;
  }

  .product-layout {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .project-sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: -12px -12px 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 12px;
    background: rgba(247, 248, 249, 0.96);
    backdrop-filter: blur(10px);
  }

  .project-summary,
  .sidebar-context {
    display: none;
  }

  .project-sidebar .mode-switch {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .mode-switch button {
    justify-content: center;
    border-left: 0;
    border-bottom: 3px solid transparent;
    text-align: center;
    white-space: nowrap;
  }

  .mode-switch button.active {
    border-bottom-color: var(--brand);
  }

  .overview-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-title-row {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-title-row .overview-actions {
    justify-content: flex-start;
  }

  .donut-chart-wrap,
  .donut-widget.compact .donut-chart-wrap {
    grid-template-columns: 1fr;
  }

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

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

  .topbar {
    gap: 10px;
    padding: 10px;
  }

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

  .product-layout {
    padding: 10px 0 22px;
  }

  .product-main {
    gap: 12px;
  }

  .project-sidebar {
    margin: -10px 0 0;
    padding: 8px 10px;
  }

  .project-sidebar .mode-switch {
    grid-template-columns: repeat(4, minmax(96px, 1fr));
  }

  .mode-switch {
    margin: 0;
    border: 0;
    padding: 0;
  }

  .mode-switch button {
    min-height: 38px;
    font-size: 13px;
  }

  .app-notice,
  .top-auth-panel,
  .overview-hero,
  .program-dashboard,
  .sprint-summary-panel,
  .sprint-dashboard-panel,
  .sprint-management-panel,
  .sprint-control-panel,
  .sprint-board-panel,
  .query-workspace,
  .editor-panel,
  .preview-panel,
  .insight-panel,
  .agent-panel,
  .telegram-workspace {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .overview-hero {
    padding: 12px 12px 16px;
  }

  .overview-hero h2 {
    font-size: 24px;
  }

  .dashboard-title-row h2 {
    font-size: 22px;
  }

  .release-summary {
    grid-template-columns: 1fr;
  }

  .issue-filter-grid,
  .account-login-grid,
  .batch-status-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-columns {
    grid-auto-columns: minmax(260px, 86vw);
  }
}

.issue-readonly-drawer {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
}

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9600;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
}

.media-lightbox[hidden] {
  display: none;
}

.media-lightbox:not([hidden]) {
  pointer-events: auto;
}

.media-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 30, 66, 0.62);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.media-lightbox-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1100px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(9, 30, 66, 0.38);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.media-lightbox.open .media-lightbox-backdrop {
  opacity: 1;
}

.media-lightbox.open .media-lightbox-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

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

.media-lightbox-head strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-lightbox-body {
  display: grid;
  gap: 10px;
  min-height: 0;
  place-items: center;
  overflow: auto;
  padding: 14px;
  background: #101820;
}

.media-lightbox-body img,
.media-lightbox-body video,
.media-lightbox-drive-frame {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 138px);
  border-radius: 6px;
  background: #000;
}

.media-lightbox-body video {
  width: min(100%, 1040px);
}

.media-lightbox-drive-frame {
  width: min(100%, 1040px);
  height: min(68vh, 680px);
  border: 0;
}

.media-lightbox-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.media-lightbox-link:hover {
  background: rgba(255, 255, 255, 0.16);
}

.media-lightbox-open {
  overflow: hidden;
}

body.issue-drawer-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

.issue-readonly-drawer:not([hidden]) {
  pointer-events: auto;
}

.issue-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 30, 66, 0.28);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.issue-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(960px, calc(100vw - 56px));
  height: 100%;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -12px 0 30px rgba(9, 30, 66, 0.18);
  transform: translateX(100%);
  transition: transform 0.24s ease;
}

.issue-readonly-drawer.open .issue-drawer-backdrop {
  opacity: 1;
}

.issue-readonly-drawer.open .issue-drawer-panel {
  transform: translateX(0);
}

.issue-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px 14px;
}

.issue-drawer-eyebrow {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.issue-drawer-head h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.issue-drawer-body {
  min-height: 0;
  overflow: auto;
  padding: 18px 20px 24px;
  background: #f7f8f9;
}

.issue-readonly-shell {
  display: grid;
  gap: 14px;
}

.issue-readonly-title {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  background: #fff;
}

.issue-readonly-title h3 {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.38;
  letter-spacing: 0;
}

.issue-readonly-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  background: #fff;
}

.issue-readonly-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  background: #fff;
}

.issue-readonly-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.issue-readonly-section-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.issue-readonly-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.readonly-description {
  max-height: none;
  cursor: default;
}

.readonly-comment-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.readonly-comment {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px;
  background: #fff;
}

.readonly-comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.readonly-comment-head strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.readonly-comment-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

@media (max-width: 720px) {
  .issue-drawer-panel {
    width: 100vw;
  }

  .issue-drawer-head,
  .issue-drawer-body {
    padding-left: 14px;
    padding-right: 14px;
  }
}

#actionStatus.app-notice {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 9999;
  width: min(760px, calc(100vw - 32px));
  min-height: 44px;
  margin: 0;
  border-radius: 6px;
  padding: 12px 16px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(9, 30, 66, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -18px);
  transition: opacity 0.18s ease, transform 0.22s ease;
}

#actionStatus.app-notice.toast-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

#actionStatus.app-notice.toast-leaving {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -18px);
}

#actionStatus.app-notice.ok {
  border-color: rgba(47, 122, 85, 0.36);
  background: #edf7f1;
  color: #246546;
}

#actionStatus.app-notice.warn {
  border-color: rgba(173, 93, 60, 0.36);
  background: #fff2e8;
  color: #814225;
}

#actionStatus.app-notice.timed {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding-bottom: 10px;
}

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

.toast-timed-track {
  display: block;
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 15%, transparent);
}

.toast-timed-bar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left center;
  background: currentColor;
  opacity: 0.7;
  animation-name: toast-timed-progress;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes toast-timed-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

#actionStatus.app-notice.loading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 14px;
  align-items: center;
  padding-bottom: 10px;
  border-color: rgba(81, 77, 226, 0.32);
  background: #f4f4ff;
  color: #292769;
}

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

.toast-progress-value {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #5f5ce6;
}

.toast-progress-track {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(91, 88, 230, 0.14);
}

.toast-progress-bar {
  display: block;
  min-width: 10%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6d6af1, #4d5de6);
  box-shadow: 0 0 9px rgba(77, 93, 230, 0.35);
  transition: width 0.18s ease-out;
}

.personal-workspace .personal-head {
  align-items: center;
}

.personal-workspace .personal-issue-row {
  grid-template-columns: minmax(260px, 1fr) minmax(360px, auto);
  min-height: 64px;
  border-left: 0;
  padding: 12px 14px;
}

.personal-workspace .personal-issue-row.open {
  box-shadow: inset 3px 0 0 var(--brand);
}

.personal-workspace .personal-issue-row .sprint-issue-main strong {
  font-weight: 850;
}

@media (max-width: 900px) {
  .sprint-context-card dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 0;
  }

  .sprint-context-card dl > div:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

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

  .personal-workspace .personal-issue-row {
    grid-template-columns: 1fr;
  }

  .personal-workspace .sprint-issue-side,
  .personal-workspace .sprint-issue-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .sprint-context-card dl {
    grid-template-columns: 1fr;
  }

  .sprint-context-card dl > div {
    padding-left: 0;
    border-left: 0;
  }

  #actionStatus.app-notice {
    top: 10px;
    width: calc(100vw - 20px);
    border-radius: 6px;
    font-size: 12px;
  }
}

/* Professional UI pass */
:root {
  --bg: #f4f5f7;
  --panel: #fff;
  --panel-soft: #f7f8f9;
  --surface-raised: #fff;
  --text: #172b4d;
  --ink: #172b4d;
  --muted: #626f86;
  --line: #dfe1e6;
  --line-strong: #b3b9c4;
  --brand: #0c66e4;
  --brand-strong: #0052cc;
  --focus-ring: rgba(12, 102, 228, 0.18);
  --shadow: 0 18px 42px rgba(9, 30, 66, 0.14);
  --shadow-soft: 0 1px 2px rgba(9, 30, 66, 0.1);
  --radius-panel: 6px;
  --radius-control: 4px;
  --space-panel: 16px;
}

html {
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

button:hover,
.primary:hover,
.secondary:hover,
.danger:hover,
.table-issue-link:hover {
  transform: none;
}

.app-shell {
  /* Use the entire desktop viewport; individual sections retain their own padding. */
  width: 100%;
  max-width: none;
  padding: 16px 0 40px;
}

.topbar {
  position: relative;
  z-index: 0;
  margin: 0 0 14px;
  border-top: 3px solid #1d4741;
  border-radius: 0 0 var(--radius-panel) var(--radius-panel);
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(9, 30, 66, 0.08);
  backdrop-filter: blur(10px);
}

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

.app-mark,
.project-avatar {
  border-radius: 5px;
  background: #e9f2ff;
  color: var(--brand-strong);
}

.eyebrow {
  color: #6b778c;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
}

h2 {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.top-actions {
  gap: 8px;
}

.top-actions button,
button,
.primary,
.secondary,
.danger {
  min-height: 38px;
  border-radius: var(--radius-control);
  font-weight: 850;
  box-shadow: none;
}

.product-layout {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  padding: 18px 20px 48px;
}

.product-main {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.project-sidebar {
  top: 16px;
  gap: 14px;
}

.project-summary,
.sidebar-context,
.panel,
.program-dashboard,
.sprint-summary-panel,
.dashboard-widget,
.sprint-conclusion-card,
.conclusion-block,
.telegram-section,
.issue-lookup-result,
.batch-status-panel,
.lookup-section,
.issue-filter-grid,
.top-auth-panel,
.sprint-control-panel,
.sprint-board-panel,
.sprint-management-panel,
.sprint-dashboard-panel,
.editor-panel,
.preview-panel,
.insight-panel,
.agent-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: #fff;
  box-shadow: none;
}

.project-summary,
.sidebar-context {
  padding: 12px;
}

.project-summary strong,
.sidebar-context strong {
  font-weight: 850;
}

.project-summary span,
.sidebar-context span,
.sidebar-context small {
  color: var(--muted);
}

.project-sidebar .mode-switch {
  gap: 2px;
}

.mode-switch button {
  min-height: 40px;
  border-radius: var(--radius-control);
  color: #44546f;
  font-size: 14px;
  font-weight: 800;
}

.mode-switch button:hover {
  background: #f1f2f4;
  color: var(--text);
}

.mode-switch button.active {
  border-left-color: var(--brand);
  background: #e9f2ff;
  color: var(--brand-strong);
}

.sprint-control-panel,
.sprint-board-panel,
.sprint-summary-panel,
.program-dashboard,
.query-workspace,
.personal-workspace,
.telegram-workspace,
.editor-panel,
.preview-panel,
.insight-panel,
.agent-panel,
.top-auth-panel {
  padding: var(--space-panel);
}

.section-head {
  align-items: center;
  gap: 12px;
  padding: 0;
}

.section-head p,
.dashboard-title-row p:not(.eyebrow),
.conclusion-block-head p,
.change-log-head p,
.personal-head p,
.telegram-section > p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea,
.filter-sprint-toggle,
.related-issue-toggle,
.sprint-toggle,
.segmented-field span,
fieldset.role-switch,
fieldset.role-switch span {
  border-radius: var(--radius-control);
}

input,
select,
.filter-sprint-toggle,
.related-issue-toggle,
.sprint-toggle {
  min-height: 40px;
}

input,
select,
textarea {
  border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus,
.rich-description-editor:focus,
.filter-sprint-toggle:focus-visible,
.related-issue-toggle:focus-visible,
.sprint-toggle:focus-visible {
  border-color: #85b8ff;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.primary {
  background: var(--brand);
  color: #fff;
}

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

.secondary {
  border-color: var(--line);
  background: #fff;
  color: #172b4d;
}

.secondary:hover {
  border-color: #85b8ff;
  background: #f4f8ff;
  color: var(--brand-strong);
}

.danger {
  border-color: #ffd5d2;
  background: #fff;
  color: #ae2a19;
}

.danger:hover {
  border-color: #e2483d;
  background: #fff4f3;
  color: #8f1f11;
}

.notice {
  border-radius: var(--radius-panel);
}

#actionStatus.app-notice {
  border-radius: var(--radius-panel);
  box-shadow: 0 8px 24px rgba(9, 30, 66, 0.14);
}

.overview-hero {
  padding: 4px 0 16px;
}

.overview-hero h2 {
  font-size: 28px;
  font-weight: 900;
}

.dashboard-title-row {
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 12px;
}

.dashboard-title-row h2 {
  font-size: 24px;
  font-weight: 900;
}

.dashboard-status-grid,
.personal-status-grid,
.metric-grid {
  gap: 10px;
}

.dashboard-status-card,
.metric-card {
  min-height: 78px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--tone, var(--brand));
  border-radius: var(--radius-panel);
  background: #fff;
  box-shadow: none;
}

.dashboard-status-card strong,
.metric-card strong {
  color: var(--text);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.dashboard-status-card span,
.metric-card span {
  color: var(--tone-text, var(--muted));
  font-size: 13px;
  font-weight: 850;
}

.personal-status-grid .dashboard-status-card {
  box-shadow: none;
}

.program-dashboard-grid {
  gap: 14px;
  align-items: stretch;
}

.dashboard-widget {
  min-width: 0;
  border-top: 4px solid var(--brand);
  padding: 14px;
}

.dashboard-widget h3 {
  font-size: 16px;
  font-weight: 900;
}

.widget-head {
  align-items: center;
  min-height: 28px;
}

.donut-chart-wrap {
  gap: 22px;
}

.donut-chart {
  width: min(190px, 100%);
  box-shadow: none;
}

.donut-center strong {
  font-size: 32px;
}

.donut-legend-row,
.dashboard-table th,
.dashboard-table td {
  border-color: var(--line);
}

.bar-track,
.sprint-distribution-track,
.donut-legend-track {
  background: #f1f2f4;
}

.dashboard-columns {
  gap: 12px;
  padding: 2px 2px 10px;
}

.dashboard-column {
  min-width: 280px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--tone, var(--brand));
  border-radius: var(--radius-panel);
  background: #f7f8f9;
  box-shadow: none;
}

.dashboard-column-head {
  min-height: 34px;
  padding: 0 2px 6px;
}

.dashboard-issue-card {
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: #fff;
  box-shadow: 0 1px 1px rgba(9, 30, 66, 0.12);
}

.dashboard-issue-card:hover,
.dashboard-issue-card.open {
  border-color: #85b8ff;
  box-shadow: 0 2px 8px rgba(9, 30, 66, 0.12);
}

.status-chip,
.sprint-issue-meta em,
.summary-mini-metrics span,
.summary-rules span,
.change-log-meta span {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 850;
}

.lookup-section,
.batch-status-panel,
.issue-filter-grid {
  background: #f7f8f9;
}

.issue-filter-grid,
.batch-status-grid,
.sprint-create-grid,
.telegram-form-grid,
.change-log-filter {
  gap: 10px;
}

.filter-sprint-field,
.issue-filter-sprint-field,
.personal-sprint-field,
.telegram-sprint-field,
.batch-field {
  position: relative;
}

.filter-sprint-toggle {
  width: 100%;
  border-color: var(--line-strong);
  background: #fff;
}

.filter-sprint-options {
  z-index: 7000;
  max-width: min(640px, calc(100vw - 32px));
  border-radius: var(--radius-panel);
  background: #fff;
  box-shadow: 0 16px 32px rgba(9, 30, 66, 0.16);
}

.filter-sprint-search {
  min-height: 40px;
}

.filter-sprint-option {
  border-radius: var(--radius-control);
}

.filter-sprint-option:hover {
  background: #f4f8ff;
}

.sprint-issue-result {
  border-radius: var(--radius-panel);
}

.sprint-issue-head {
  min-height: 50px;
  padding-bottom: 12px;
}

.sprint-issue-item {
  border-radius: var(--radius-panel);
  box-shadow: none;
}

.sprint-issue-row {
  min-height: 64px;
  border-left: 3px solid transparent;
}

.sprint-issue-row:hover,
.sprint-issue-row.open {
  border-left-color: var(--brand);
  background: #f7f9fc;
}

.sprint-issue-item.selected {
  border-color: #85b8ff;
  box-shadow: inset 3px 0 0 var(--brand);
}

.sprint-issue-main strong {
  white-space: normal;
  line-height: 1.35;
}

.sprint-issue-side {
  min-width: 0;
}

.sprint-issue-meta {
  align-items: center;
}

.sprint-sort-button {
  border-radius: var(--radius-control);
}

.batch-status-panel {
  padding: 14px;
}

.telegram-settings-shell {
  gap: 16px;
  align-items: stretch;
}

.telegram-section {
  padding: 16px;
}

.telegram-toggle,
.telegram-event-card,
.telegram-action-card {
  border-radius: var(--radius-panel);
  background: #fff;
}

.telegram-toggle:has(input:checked),
.telegram-event-card:has(input:checked),
.telegram-action-card:hover,
.telegram-action-primary {
  border-color: #85b8ff;
  background: #f4f8ff;
}

.telegram-action-card,
.telegram-action-primary {
  min-height: 76px;
  text-align: left;
}

.notification-panel {
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow);
}

.notification-item {
  border-radius: var(--radius-control);
  background: var(--notification-bg);
}

.sprint-summary-panel {
  gap: 14px;
}

.sprint-conclusion-grid {
  gap: 12px;
}

.sprint-conclusion-card {
  min-height: 124px;
}

.sprint-conclusion-card strong {
  font-size: 32px;
}

.sprint-conclusion-body {
  gap: 14px;
}

.conclusion-block {
  height: 540px;
}

.incomplete-table-wrap,
.change-log-list,
.readonly-comment-list,
.issue-drawer-body {
  scrollbar-gutter: stable;
}

.change-log-items {
  grid-auto-rows: 132px;
}

.change-log-items li {
  height: 132px;
}

.change-log-title {
  align-items: center;
}

.change-log-title strong,
.change-log-title .summary-issue-link {
  align-self: center;
}

.incomplete-table th,
.incomplete-table td {
  padding: 11px 10px;
}

.incomplete-owner-cell em,
.incomplete-missing-cell em {
  border-radius: var(--radius-control);
}

.issue-readonly-drawer {
  z-index: 9000;
}

.issue-drawer-backdrop {
  background: rgba(9, 30, 66, 0.32);
}

.issue-drawer-panel {
  width: min(1080px, calc(100vw - 96px));
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 45px rgba(9, 30, 66, 0.18);
}

.issue-drawer-head {
  padding: 16px 20px;
  background: #fff;
}

.issue-drawer-body {
  padding: 16px 20px 24px;
  background: #f7f8f9;
}

.issue-readonly-title,
.issue-readonly-meta,
.issue-readonly-section,
.issue-edit-block,
.jira-rendered-content,
.issue-description,
.comment-item,
.readonly-comment,
.upload-item {
  border-radius: var(--radius-panel);
  box-shadow: none;
}

.media-lightbox-panel {
  border-radius: var(--radius-panel);
}

@media (max-width: 1280px) {
  .product-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 16px;
  }

  .program-dashboard-grid,
  .sprint-conclusion-body {
    grid-template-columns: 1fr;
  }

  .issue-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .app-shell {
    width: 100%;
    padding: 0 0 28px;
  }

  .topbar {
    position: static;
    border-radius: 0;
  }

  .product-layout {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .project-sidebar {
    position: sticky;
    top: 0;
  }

  .project-sidebar .mode-switch {
    grid-template-columns: repeat(4, minmax(116px, 1fr));
  }

  .mode-switch button {
    justify-content: center;
    border-left: 0;
    border-bottom: 3px solid transparent;
    text-align: center;
  }

  .mode-switch button.active {
    border-bottom-color: var(--brand);
  }

  .donut-chart-wrap,
  .donut-widget.compact .donut-chart-wrap,
  .telegram-settings-shell {
    grid-template-columns: 1fr;
  }

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

  .issue-drawer-panel {
    width: min(100vw, 920px);
  }
}

@media (max-width: 560px) {
  .product-layout {
    padding: 10px 0 24px;
  }

  .product-main {
    gap: 12px;
  }

  .dashboard-status-grid,
  .personal-status-grid,
  .sprint-conclusion-grid,
  .issue-filter-grid,
  .account-login-grid,
  .batch-status-grid,
  .sprint-create-grid,
  .change-log-filter {
    grid-template-columns: 1fr;
  }

  .dashboard-columns {
    grid-auto-columns: minmax(260px, 86vw);
  }

  .sprint-issue-row,
  .personal-workspace .personal-issue-row {
    grid-template-columns: 1fr;
  }

  .issue-drawer-panel {
    width: 100vw;
  }
}

/* Non-sticky application header */
.app-shell {
  padding-top: 0;
}

.topbar {
  position: static;
  top: auto;
  z-index: auto;
  min-height: 82px;
  margin: 0 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 0 rgba(9, 30, 66, 0.08);
  backdrop-filter: none;
}

.topbar .brand-block,
.topbar .top-actions {
  min-height: 48px;
}

/* Keep the Telegram columns content-sized. The taller event column must not
   stretch the connection form's grid rows and create large blank gaps. */
.telegram-settings-shell {
  align-items: start;
  overflow: visible;
}

.telegram-section {
  align-content: start;
  overflow: visible;
}

.telegram-connection {
  height: fit-content;
  position: relative;
  z-index: 20;
}

.telegram-event-section {
  position: relative;
  z-index: 1;
}

/* A delivery target is a Bot + Chat pair. Keep its selector and credentials
   compact so multiple destinations remain easy to scan and manage. */
.telegram-target-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.telegram-target-select-field {
  margin: 0;
}

.telegram-target-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.telegram-target-actions button {
  min-height: 38px;
  white-space: nowrap;
}

.telegram-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.7fr);
}

.telegram-target-name-field {
  grid-column: 1 / -1;
}

/* Notification choices and export commands share one compact action grid. */
.telegram-event-section {
  align-content: start;
}

.telegram-export-tools {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  gap: 10px;
}

.telegram-event-options .telegram-toggle:last-child {
  grid-column: 1 / -1;
}

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

.telegram-export-heading strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.telegram-export-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.telegram-actions {
  gap: 10px;
}

.telegram-action-card,
.telegram-action-card.secondary,
.telegram-action-card.primary {
  min-height: 70px;
  border-color: #85b8ff;
  border-radius: var(--radius-panel);
  background: #f4f8ff;
  color: var(--text);
}

.telegram-action-card:hover,
.telegram-action-card.primary:hover {
  border-color: #5797ef;
  background: #e9f2ff;
}

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

.telegram-board-status-filter {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 12px;
  background: #fff;
}

.telegram-board-status-heading {
  display: grid;
  gap: 3px;
}

.telegram-board-status-heading strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.telegram-board-status-heading small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.telegram-board-status-options {
  top: calc(100% + 8px);
  width: min(440px, 100%);
}

.telegram-daily-schedule {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 12px;
  background: #f8faff;
}

.telegram-daily-schedule-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.telegram-daily-schedule-head > div {
  display: grid;
  gap: 3px;
}

.telegram-daily-schedule-head strong,
.telegram-daily-time-field > span {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.telegram-daily-schedule-head small,
.telegram-daily-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.telegram-daily-enabled {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  white-space: nowrap;
  color: var(--text);
  font-size: 13px;
  font-weight: 780;
}

.telegram-daily-enabled input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

.telegram-daily-time-field {
  width: min(230px, 100%);
  margin: 0;
}

.telegram-daily-status {
  margin: 0;
}

.telegram-daily-status[data-state="ready"] {
  color: #137a58;
}

.telegram-daily-status[data-state="error"] {
  color: #ad4d13;
}

.telegram-change-log-range {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 12px;
  background: #fff;
}

.telegram-change-log-range[hidden] {
  display: none;
}

.telegram-change-log-range > span {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.telegram-change-log-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.telegram-command-bar {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.telegram-command-bar .primary {
  min-width: 132px;
}

@media (max-width: 560px) {
  .telegram-target-toolbar {
    grid-template-columns: 1fr;
  }

  .telegram-target-actions {
    justify-content: stretch;
  }

  .telegram-target-actions button {
    flex: 1 1 0;
  }

  .telegram-export-options,
  .telegram-change-log-fields {
    grid-template-columns: 1fr;
  }

  .telegram-daily-schedule-head {
    align-items: stretch;
    flex-direction: column;
  }

  .telegram-command-bar {
    justify-content: stretch;
  }

  .telegram-command-bar button {
    flex: 1 1 100%;
  }
}

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

  .topbar {
    position: static;
    flex-direction: row;
    align-items: center;
    padding: 10px 16px;
  }
}

@media (max-width: 560px) {
  .topbar {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 10px 12px;
  }

  .topbar .top-actions {
    margin-left: auto;
  }
}

/* Issue drawer should scroll like Jira: one continuous reading surface. */
.issue-drawer-body {
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.issue-drawer-body .issue-rendered-description,
.issue-drawer-body .comment-list,
.issue-drawer-body .readonly-comment-list,
.issue-drawer-body .comment-rendered,
.issue-drawer-body .jira-rendered-content,
.issue-drawer-body .html-preview {
  max-height: none;
  overflow: visible;
}

.issue-drawer-body .rich-description-editor,
.issue-drawer-body .rich-comment-editor {
  max-height: none;
  overflow: visible;
}

.issue-drawer-body .comment-item pre {
  max-height: none;
}

.issue-drawer-body .comment-composer {
  position: static;
  box-shadow: none;
  backdrop-filter: none;
}

/* Keep the account password control as one input group instead of floating the
   visibility action over the form grid. */
.account-login-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) max-content;
  align-items: end;
  gap: 12px;
}

.account-login-grid > .field {
  min-width: 0;
}

.account-login-grid > button {
  width: auto;
  min-width: 168px;
  white-space: nowrap;
}

.password-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  width: 100%;
  min-width: 0;
}

.password-input-wrap input {
  min-width: 0;
  padding-right: 9px;
  border-radius: var(--radius-control) 0 0 var(--radius-control);
}

.password-input-wrap .password-toggle {
  position: static;
  inset: auto;
  z-index: 1;
  width: 58px;
  min-width: 58px !important;
  min-height: 36px;
  margin-left: -1px;
  padding: 0 8px;
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
}

@media (max-width: 760px) {
  .account-login-grid {
    grid-template-columns: 1fr;
  }

  .account-login-grid > button {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .sprint-create-grid > .sprint-name-field,
  .sprint-create-grid > .sprint-date-field,
  .sprint-create-grid > .sprint-goal-field,
  .sprint-create-grid > .sprint-release-field,
  .sprint-create-grid > .sprint-state-field {
    grid-column: span 1;
  }
}

@media (max-width: 560px) {
  .sprint-create-area .section-head,
  .sprint-edit-picker {
    grid-template-columns: 1fr;
  }

  .sprint-create-actions {
    justify-self: stretch;
  }

  .sprint-create-actions button,
  .sprint-edit-picker button {
    flex: 1 1 0;
    width: 100%;
  }
}

/* Meeting reports */
body.auth-locked #meetingWorkspace {
  display: none !important;
}

body.legacy-app-lite #modeMeeting,
body.legacy-app-lite #meetingWorkspace,
body.legacy-app-lite .mobile-jump a[href="#meetingWorkspace"] {
  display: none !important;
}

/* Telegram、运营问题与会议报告由 Jira 身份控制，而不是再维护轻量/完整版。 */
body.owner-workspaces-restricted #modeTelegram,
body.owner-workspaces-restricted #modeOperations,
body.owner-workspaces-restricted #modeMeeting,
body.owner-workspaces-restricted #telegramWorkspace,
body.owner-workspaces-restricted #operationsWorkspace,
body.owner-workspaces-restricted #meetingWorkspace,
body.owner-workspaces-restricted .mobile-jump a[href="#telegramWorkspace"],
body.owner-workspaces-restricted .mobile-jump a[href="#operationsWorkspace"],
body.owner-workspaces-restricted .mobile-jump a[href="#meetingWorkspace"] {
  display: none !important;
}

.meeting-workspace {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: var(--space-panel);
}

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

.meeting-workspace-head > div {
  min-width: 0;
}

.meeting-workspace-head p {
  max-width: 760px;
  margin-top: 4px;
  color: var(--muted);
}

.meeting-workspace-head .primary {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Operations overview workspace. */
.operations-workspace {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: var(--space-panel);
}

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

.operations-workspace-head > div {
  min-width: 0;
}

.operations-workspace-head p {
  max-width: 760px;
  margin-top: 4px;
  color: var(--muted);
}

.operations-workspace-head .secondary {
  flex: 0 0 auto;
  white-space: nowrap;
}

.operations-report-select-field {
  width: min(100%, 520px);
}

.operations-overview-content {
  min-width: 0;
}

.operations-overview-card,
.operations-overview-empty {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 16px;
  background: #fff;
}

.operations-overview-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.operations-overview-card > header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.operations-overview-card > header strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.operations-overview-card > header span,
.operations-overview-card > header small,
.operations-overview-empty p,
.operations-overview-empty-table {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.operations-overview-card-header-actions {
  display: flex;
  flex: 0 1 48%;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
}

.operations-overview-card-header-actions > small {
  max-width: min(48%, 480px);
  text-align: right;
}

.operations-overview-card-header-actions > button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.operations-overview-editor {
  display: grid;
  gap: 12px;
}

.operations-overview-editor-note {
  padding: 10px 12px;
  border: 1px solid #dbe5ff;
  border-radius: 9px;
  color: #52627d;
  background: #f6f8ff;
  font-size: 12px;
  line-height: 1.55;
}

.operations-overview-editor-scroll {
  max-height: min(68vh, 720px);
  border: 1px solid #dce5f0;
  border-radius: 10px;
}

.operations-overview-editor-scroll table {
  min-width: 1420px;
}

.operations-overview-editor-scroll td {
  padding: 8px 9px;
}

.operations-overview-editor-scroll :is(input, textarea) {
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #cfdaf0;
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
}

.operations-overview-editor-scroll textarea {
  display: block;
  min-height: 76px;
  resize: vertical;
}

.operations-overview-editor-scroll :is(input, textarea):focus {
  border-color: var(--primary);
  outline: 3px solid color-mix(in srgb, var(--primary) 16%, transparent);
}

.operations-overview-editor > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.operations-overview-editor > footer small {
  color: var(--muted);
  font-size: 12px;
}

.operations-overview-editor > footer > div {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.operations-overview-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.operations-overview-table .meeting-document-table-scroll {
  max-height: 560px;
  overflow: auto;
}

.operations-overview-table .meeting-document-table {
  min-width: 720px;
}

.operations-overview-empty-table {
  padding: 20px;
}

.operations-overview-images {
  display: grid;
  gap: 10px;
}

.operations-overview-images h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.operations-source-tool {
  margin: 0;
}

.operations-summary-dashboard {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid #e4eaf3;
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.08), transparent 27%),
    linear-gradient(180deg, #fbfdff 0%, #ffffff 48%);
}

/* JQL 汇整在会议报告中采用运营简报格式：按板块分组、逐条列出状态与角色。 */
.meeting-operations-jql-brief {
  display: grid;
  gap: 22px;
  padding: 6px 4px;
  color: #133252;
  font-family: ui-monospace, "Cascadia Mono", "Microsoft JhengHei UI", monospace;
  font-size: 14px;
  line-height: 1.7;
}

.meeting-operations-jql-group {
  display: grid;
  gap: 6px;
}

.meeting-operations-jql-group h3 {
  margin: 0;
  color: #102d4d;
  font: inherit;
  font-weight: 900;
}

.meeting-operations-jql-group ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 22px;
}

.meeting-operations-jql-group li {
  padding-left: 2px;
}

.meeting-operations-jql-title {
  color: #102d4d;
}

.meeting-operations-jql-status {
  color: #235382;
  white-space: normal;
}

.operations-summary-heading {
  display: grid;
  gap: 4px;
}

.operations-summary-heading > span {
  width: fit-content;
  padding: 4px 9px;
  border: 1px solid #cdeee3;
  border-radius: 999px;
  color: #0d806d;
  background: #ebfbf5;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.operations-summary-heading h3 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  letter-spacing: -0.025em;
  font-weight: 900;
}

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

.operations-summary-metrics article {
  display: grid;
  position: relative;
  align-content: start;
  min-height: 116px;
  gap: 7px;
  overflow: hidden;
  padding: 17px 18px 15px;
  border: 1px solid #e4eaf3;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 7px 16px rgba(24, 39, 75, 0.035);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.operations-summary-metrics article::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  content: "";
  background: #6675f5;
}

.operations-summary-metrics article::after {
  position: absolute;
  right: -24px;
  bottom: -31px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  content: "";
  background: rgba(102, 117, 245, 0.055);
}

.operations-summary-metrics article:hover {
  z-index: 1;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(45, 55, 104, 0.09);
}

.operations-summary-metrics .is-feedback::before,
.operations-summary-metrics .is-feedback::after {
  background: #3b82f6;
}

.operations-summary-metrics .is-feedback::after {
  background: rgba(59, 130, 246, 0.06);
}

.operations-summary-metrics .is-period::before,
.operations-summary-metrics .is-period::after {
  background: #7c6df2;
}

.operations-summary-metrics .is-period::after {
  background: rgba(124, 109, 242, 0.065);
}

.operations-summary-metrics .is-module::before,
.operations-summary-metrics .is-module::after {
  background: #11a886;
}

.operations-summary-metrics .is-module::after {
  background: rgba(17, 168, 134, 0.065);
}

.operations-summary-metrics .is-tracking::before,
.operations-summary-metrics .is-tracking::after {
  background: #e59c35;
}

.operations-summary-metrics .is-tracking::after {
  background: rgba(229, 156, 53, 0.075);
}

.operations-summary-metrics span {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.operations-summary-metrics strong {
  position: relative;
  z-index: 1;
  color: #162039;
  font-size: clamp(30px, 2.1vw, 36px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 900;
}

.operations-summary-metrics small {
  position: relative;
  z-index: 1;
  color: #8491a8;
  font-size: 11px;
  font-weight: 700;
}

.operations-summary-metrics .is-period strong {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  padding-top: 3px;
  font-size: clamp(17px, 1.2vw, 20px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.operations-summary-metrics .is-period time,
.operations-summary-metrics .is-period .operations-summary-period-end {
  font-size: inherit;
  font-weight: inherit;
  white-space: nowrap;
}

.operations-summary-period-end {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.operations-summary-metrics .is-period i {
  display: inline-grid;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  place-items: center;
  border: 1px solid #ded9ff;
  border-radius: 999px;
  color: #7667dc;
  background: #f5f3ff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
}

.operations-summary-list {
  overflow: hidden;
  border: 1px solid #dce5f0;
  border-radius: 10px;
  background: #fff;
}

.operations-summary-list > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  border-bottom: 1px solid #e6edf5;
}

.operations-summary-list > header strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.operations-summary-list > header span {
  color: var(--muted);
  font-size: 12px;
}

.operations-summary-table-scroll {
  max-height: 650px;
  overflow: auto;
}

.operations-summary-table-scroll table {
  width: 100%;
  min-width: 1420px;
  border-collapse: collapse;
  color: var(--text);
  font-size: 13px;
}

.operations-summary-table-scroll th,
.operations-summary-table-scroll td {
  padding: 11px 13px;
  border-bottom: 1px solid #e6edf5;
  text-align: left;
  vertical-align: top;
}

.operations-summary-table-scroll th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #64748b;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 850;
}

.operations-summary-table-scroll td:nth-child(1),
.operations-summary-table-scroll td:nth-child(5),
.operations-summary-table-scroll td:nth-child(6) {
  white-space: nowrap;
}

.operations-summary-table-scroll td:nth-child(7) {
  white-space: nowrap;
}

/* 运营问题总览固定为单页表格；长内容在栏内换行，不再产生左右拖动。 */
.operations-summary-list .operations-summary-table-scroll {
  overflow-x: hidden;
  overflow-y: auto;
}

.operations-summary-list .operations-summary-table-scroll table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.operations-summary-list .operations-summary-table-scroll th,
.operations-summary-list .operations-summary-table-scroll td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.operations-summary-list .operations-summary-table-scroll th:nth-child(1),
.operations-summary-list .operations-summary-table-scroll td:nth-child(1) { width: 7%; }

.operations-summary-list .operations-summary-table-scroll th:nth-child(2),
.operations-summary-list .operations-summary-table-scroll td:nth-child(2) { width: 10%; min-width: 0; }

.operations-summary-list .operations-summary-table-scroll th:nth-child(3),
.operations-summary-list .operations-summary-table-scroll td:nth-child(3) { width: 37%; }

.operations-summary-list .operations-summary-table-scroll th:nth-child(4),
.operations-summary-list .operations-summary-table-scroll td:nth-child(4) { width: 29%; }

.operations-summary-list .operations-summary-table-scroll th:nth-child(5),
.operations-summary-list .operations-summary-table-scroll td:nth-child(5) { width: 9%; }

.operations-summary-list .operations-summary-table-scroll th:nth-child(6),
.operations-summary-list .operations-summary-table-scroll td:nth-child(6) { width: 8%; }

.operations-summary-list .operations-summary-problem,
.operations-summary-list .operations-summary-reply {
  min-width: 0;
}

.operations-summary-table-scroll th:nth-child(1),
.operations-summary-table-scroll td:nth-child(1) {
  width: 92px;
}

.operations-summary-table-scroll th:nth-child(2),
.operations-summary-table-scroll td:nth-child(2) {
  width: 126px;
  min-width: 126px;
  white-space: nowrap;
  word-break: keep-all;
}

.operations-summary-table-scroll th:nth-child(5),
.operations-summary-table-scroll td:nth-child(5) {
  width: 104px;
}

.operations-summary-table-scroll th:nth-child(6),
.operations-summary-table-scroll td:nth-child(6) {
  width: 96px;
}

.operations-summary-table-scroll th:nth-child(7),
.operations-summary-table-scroll td:nth-child(7) {
  width: 92px;
}

.operations-summary-problem {
  min-width: 340px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.operations-summary-reply {
  min-width: 360px;
  color: #34445f;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.operations-summary-group td {
  padding: 9px 13px;
  border-bottom-color: #dbeafe;
  color: #315e9a;
  background: #edf5ff;
}

.operations-summary-group strong {
  font-weight: 900;
}

.operations-summary-group span {
  margin-left: 8px;
  color: #6b85a5;
  font-size: 12px;
  font-weight: 750;
}

.operations-summary-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 5px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 800;
}

.operations-summary-status.updated,
.operations-summary-status.done {
  color: #138466;
  background: #e7f8ef;
}

.operations-summary-status.tracking {
  color: #a56515;
  background: #fff5dc;
}

@media (max-width: 680px) {
  .operations-workspace-head,
  .operations-overview-card > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .operations-overview-card-header-actions,
  .operations-overview-editor > footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .operations-overview-card-header-actions > small {
    max-width: none;
    text-align: left;
  }

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

  .operations-summary-heading h3 {
    font-size: 19px;
  }
}

@media (max-width: 480px) {
  .operations-summary-dashboard {
    padding: 16px;
    border-radius: 13px;
  }

  .operations-summary-metrics {
    grid-template-columns: 1fr;
  }

  .operations-summary-metrics article {
    min-height: 102px;
  }
}

.meeting-workspace-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  align-items: start;
}

.meeting-report-library,
.meeting-report-editor {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 14px;
  background: #fff;
}

.meeting-report-library {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 16px;
}

.meeting-search-field {
  gap: 5px;
}

.meeting-report-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}

.meeting-report-library-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.meeting-report-library-head span,
.meeting-report-updated {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.meeting-report-batch-actions {
  display: grid;
  gap: 8px;
  border: 1px solid #d9defe;
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(135deg, #fbfcff 0%, #f4f5ff 100%);
}

.meeting-report-batch-topline,
.meeting-report-batch-buttons,
.meeting-report-select-all {
  display: flex;
  align-items: center;
}

.meeting-report-batch-topline {
  justify-content: space-between;
  gap: 8px;
}

.meeting-report-select-all {
  gap: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.meeting-report-select-all input,
.meeting-report-item-select input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.meeting-report-batch-topline strong {
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 850;
}

.meeting-report-batch-buttons {
  gap: 8px;
}

.meeting-report-batch-buttons button {
  min-width: 0;
  flex: 1 1 0;
  padding: 7px 8px;
  font-size: 12px;
}

.meeting-report-batch-actions small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.meeting-report-list {
  display: grid;
  gap: 8px;
  max-height: min(600px, calc(100vh - 310px));
  overflow: auto;
  padding-right: 2px;
}

.meeting-report-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 4px;
  width: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: var(--radius-control);
  padding: 10px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.meeting-report-item-select {
  display: grid;
  place-items: center;
  min-height: 34px;
  padding-top: 2px;
}

.meeting-report-open {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.meeting-report-open:focus-visible {
  outline: 2px solid #8b9cff;
  outline-offset: 3px;
  border-radius: 4px;
}

.meeting-report-item:hover {
  border-color: var(--line-strong);
  background: #f7f8f9;
}

.meeting-report-open:hover strong {
  color: var(--brand);
}

.meeting-report-item.active {
  border-color: #85b8ff;
  border-left-color: var(--brand);
  background: #e9f2ff;
}

.meeting-report-item strong,
.meeting-report-item span,
.meeting-report-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-report-item strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.meeting-report-item span,
.meeting-report-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.meeting-report-empty {
  margin: 0;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-control);
  padding: 18px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.meeting-report-editor {
  display: grid;
  gap: 16px;
}

.meeting-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.meeting-editor-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 850;
}

.meeting-editor-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.meeting-editor-head .danger {
  flex: 0 0 auto;
  white-space: nowrap;
}

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

.meeting-report-grid > .field {
  grid-column: span 2;
  min-width: 0;
}

.meeting-report-grid > .meeting-title-field {
  grid-column: span 6;
}

.meeting-report-grid > .meeting-sprint-field,
.meeting-report-grid > .meeting-participants-field {
  grid-column: span 3;
}

.meeting-title-field b {
  color: var(--accent);
}

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

.meeting-notes-grid .field {
  min-width: 0;
}

.meeting-notes-grid textarea {
  min-height: 128px;
  resize: vertical;
  line-height: 1.5;
}

.meeting-editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.meeting-editor-actions .meeting-report-updated {
  margin-right: auto;
}

@media (max-width: 1080px) {
  .meeting-workspace-layout {
    grid-template-columns: 1fr;
  }

  .meeting-report-library {
    position: static;
  }

  .meeting-report-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 240px;
  }
}

@media (max-width: 720px) {
  .meeting-workspace-head,
  .meeting-editor-head {
    flex-direction: column;
  }

  .meeting-workspace-head .primary,
  .meeting-editor-head .danger {
    width: 100%;
  }

  .meeting-report-grid,
  .meeting-notes-grid {
    grid-template-columns: 1fr;
  }

  .meeting-report-grid > .field,
  .meeting-report-grid > .meeting-title-field,
  .meeting-report-grid > .meeting-sprint-field,
  .meeting-report-grid > .meeting-participants-field {
    grid-column: span 1;
  }
}

@media (max-width: 560px) {
  .meeting-workspace {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    padding: 12px;
  }

  .meeting-report-library,
  .meeting-report-editor {
    padding: 12px;
  }

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

  .meeting-editor-actions {
    flex-wrap: wrap;
  }

  .meeting-editor-actions .meeting-report-updated {
    flex: 1 0 100%;
  }

  .meeting-editor-actions button {
    flex: 1 1 0;
  }
}

.meeting-report-viewer {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.meeting-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meeting-viewer-toolbar > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.meeting-report-document {
  display: grid;
  gap: 22px;
  min-height: calc(100vh - 210px);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: clamp(22px, 3vw, 48px);
  background: #fff;
}

.meeting-document-hero {
  border-bottom: 2px solid var(--brand);
  padding-bottom: 20px;
}

.meeting-document-hero > span {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  background: #e9f2ff;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 850;
}

.meeting-document-hero h1 {
  margin: 10px 0 6px;
  color: var(--text);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
  line-height: 1.2;
}

.meeting-document-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.meeting-document-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: #fbfcfe;
}

.meeting-document-meta > div {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.meeting-document-meta > div:last-child {
  border-right: 0;
}

.meeting-document-meta dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.meeting-document-meta dd {
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

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

.meeting-document-section {
  display: grid;
  grid-template-rows: auto minmax(136px, 1fr);
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-panel);
  overflow: hidden;
  background: #fff;
}

.meeting-document-section h2 {
  margin: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  background: #f7f8f9;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.meeting-document-section > div {
  min-height: 136px;
  padding: 14px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.meeting-document-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .meeting-report-document {
    min-height: auto;
  }

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

  .meeting-document-meta > div:nth-child(2n) {
    border-right: 0;
  }

  .meeting-document-meta > div:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 600px) {
  .meeting-viewer-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .meeting-viewer-toolbar > div,
  .meeting-viewer-toolbar button {
    width: 100%;
  }

  .meeting-viewer-toolbar > div button {
    flex: 1 1 0;
  }

  .meeting-report-document {
    gap: 16px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    padding: 20px 14px;
  }

  .meeting-document-meta,
  .meeting-document-sections {
    grid-template-columns: 1fr;
  }

  .meeting-document-meta > div,
  .meeting-document-meta > div:nth-child(2n) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .meeting-document-meta > div:last-child {
    border-bottom: 0;
  }
}

/* The signed-out view is a standalone screen.  Keep its form anchored to the
   full application column even when a browser password-manager overlay or a
   cached layout state causes the surrounding grid to recalculate. */
body.auth-locked .product-layout {
  display: block;
  width: min(1180px, calc(100vw - 48px));
  max-width: 1180px;
  margin: 0 auto;
}

body.auth-locked .product-main,
body.auth-locked #jiraLoginTop,
body.auth-locked .account-login-form,
body.auth-locked .account-login-grid {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

body.auth-locked .account-login-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) max-content;
}

body.auth-locked .account-login-grid input,
body.auth-locked #jiraCookie {
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 760px) {
  body.auth-locked .product-layout {
    width: 100%;
  }

  body.auth-locked .account-login-grid {
    grid-template-columns: 1fr;
  }

  body.auth-locked .account-login-grid > button {
    width: 100%;
  }
}

/* Workspace refresh: inspired by modern admin workbenches, with a distinct NX visual system. */
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #f8faff;
  --text: #172033;
  --ink: #172033;
  --muted: #596579;
  --line: #e6eaf1;
  --line-strong: #cbd5e1;
  --brand: #575be1;
  --brand-strong: #4f46e5;
  --focus-ring: rgba(99, 102, 241, 0.2);
  --shadow: 0 18px 50px rgba(25, 35, 58, 0.1);
  --shadow-soft: 0 4px 14px rgba(25, 35, 58, 0.06);
  --radius-panel: 16px;
  --radius-control: 10px;
  --space-panel: 20px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 84% -12%, rgba(129, 140, 248, 0.14), transparent 30rem),
    radial-gradient(circle at 6% 12%, rgba(56, 189, 248, 0.08), transparent 25rem),
    var(--bg);
  letter-spacing: 0.01em;
}

.app-shell {
  padding: 0 0 44px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  min-height: 72px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid rgba(230, 234, 241, 0.94);
  border-radius: 0;
  padding: 10px 26px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 6px 20px rgba(25, 35, 58, 0.045);
  backdrop-filter: blur(18px) saturate(1.2);
}

.brand-block {
  gap: 12px;
}

.sidebar-toggle {
  display: grid;
  width: 36px;
  min-width: 36px !important;
  height: 36px;
  min-height: 36px !important;
  place-items: center;
  border: 1px solid transparent;
  padding: 0;
  background: #f3f5fb;
  color: #475569;
}

.sidebar-toggle:hover {
  border-color: #dfe4f3;
  background: #e9edff;
  color: var(--brand-strong);
}

.sidebar-toggle span,
.sidebar-toggle span::before,
.sidebar-toggle span::after {
  display: block;
  width: 15px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
  transition: transform 0.2s ease, width 0.2s ease;
}

.sidebar-toggle span {
  position: relative;
}

.sidebar-toggle span::before,
.sidebar-toggle span::after {
  position: absolute;
  left: 0;
}

.sidebar-toggle span::before {
  top: -5px;
}

.sidebar-toggle span::after {
  top: 5px;
  width: 10px;
}

body.sidebar-collapsed .sidebar-toggle span::after {
  width: 15px;
}

.app-mark,
.project-avatar {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.22);
  color: #fff;
}

.topbar h1 {
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.topbar .eyebrow {
  color: #7c879a;
  font-size: 11px;
  font-weight: 750;
}

.top-actions > button,
.notification-bell,
.logout-button {
  border-color: #e3e8f2;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
}

.product-layout {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  padding: 24px;
}

.project-sidebar {
  position: sticky;
  top: 96px;
  gap: 10px;
  border: 1px solid rgba(230, 234, 241, 0.9);
  border-radius: 18px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 32px rgba(25, 35, 58, 0.045);
  backdrop-filter: blur(12px);
}

.project-summary {
  grid-template-columns: 42px minmax(0, 1fr);
  border: 0;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(135deg, #f1f3ff, #f9fbff);
}

.project-summary strong {
  color: #27364d;
  font-weight: 850;
}

.project-summary span {
  color: #78849a;
}

.project-sidebar .mode-switch {
  gap: 4px;
}

.mode-switch button {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 0;
  border-left: 0;
  border-radius: 10px;
  padding: 9px 10px;
  color: #667085;
  font-size: 13px;
  font-weight: 750;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.mode-switch button::before {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  margin-right: 9px;
  border-radius: 8px;
  background: #f2f4f8;
  color: #7a859a;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
  transition: inherit;
}

#modeOverview::before { content: "⌂"; }
#modePersonal::before { content: "◉"; }
#modeTodo::before {
  content: "☑";
  font-size: 15px;
}
#modeCreate::before { content: "+"; }
#modeQuery::before { content: "⌕"; }
#modeTelegram::before { content: "↗"; }
#modeOperations::before {
  /* Checklist = operations/issues; deliberately distinct from the report icon. */
  content: "✓";
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0;
}
#modeMeeting::before { content: "▤"; }

.mode-switch button:hover {
  background: #f4f6ff;
  color: #4f46e5;
  transform: translateX(2px);
}

.mode-switch button:hover::before {
  background: #e6e9ff;
  color: var(--brand-strong);
}

.mode-switch button.active {
  border-color: transparent;
  background: linear-gradient(90deg, #e8eaff, #f3f5ff);
  box-shadow: inset 3px 0 0 var(--brand), 0 4px 12px rgba(99, 102, 241, 0.1);
  color: var(--brand-strong);
}

.mode-switch button.active::before {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 5px 10px rgba(99, 102, 241, 0.24);
}

.sidebar-context {
  border: 0;
  border-top: 1px solid #edf0f5;
  border-radius: 0;
  padding: 14px 10px 4px;
  background: transparent;
}

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

.sidebar-version {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 6px 0;
  padding: 9px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(241, 243, 255, 0.9), rgba(248, 250, 255, 0.94));
  color: #7a859a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.sidebar-version strong {
  color: #4f46e5;
  font-size: 12px;
  font-weight: 900;
}

.panel,
.program-dashboard,
.sprint-summary-panel,
.dashboard-widget,
.sprint-conclusion-card,
.conclusion-block,
.telegram-section,
.issue-lookup-result,
.batch-status-panel,
.lookup-section,
.issue-filter-grid,
.top-auth-panel,
.sprint-control-panel,
.sprint-board-panel,
.sprint-management-panel,
.sprint-dashboard-panel,
.editor-panel,
.preview-panel,
.insight-panel,
.agent-panel,
.meeting-report-library,
.meeting-report-editor,
.meeting-report-document {
  border-color: rgba(226, 232, 240, 0.92);
  border-radius: var(--radius-panel);
  box-shadow: 0 10px 28px rgba(25, 35, 58, 0.045);
}

.section-head h2,
.overview-hero h2,
.personal-head h2,
.meeting-workspace h2 {
  color: #172033;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.section-head p,
.meeting-workspace-head p,
.meeting-editor-head p {
  color: #748097;
}

button,
.primary,
.secondary,
.danger,
.table-issue-link {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

button:hover,
.primary:hover,
.secondary:hover,
.danger:hover,
.table-issue-link:hover {
  transform: translateY(-1px);
}

button:active,
.primary:active,
.secondary:active,
.danger:active {
  transform: translateY(0) scale(0.98);
}

.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: none;
}

.primary:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #7477f6, #5548ed);
  box-shadow: none;
}

.secondary {
  border-color: #e0e6f0;
  background: #fff;
  color: #43516a;
}

.secondary:hover {
  border-color: #c8d0ff;
  background: #f6f7ff;
  color: var(--brand-strong);
}

.danger {
  border-color: #fecaca;
  background: #fff7f7;
  color: #dc2626;
}

input,
select,
textarea,
.filter-sprint-toggle,
.related-issue-toggle,
.sprint-toggle {
  border-color: #dbe2ec;
  border-radius: var(--radius-control);
  background: #fff;
  box-shadow: 0 1px 2px rgba(25, 35, 58, 0.025);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

input:hover,
select:hover,
textarea:hover,
.filter-sprint-toggle:hover,
.related-issue-toggle:hover,
.sprint-toggle:hover {
  border-color: #b9c5d7;
}

input:focus,
select:focus,
textarea:focus,
.filter-sprint-toggle:focus-visible,
.related-issue-toggle:focus-visible,
.sprint-toggle:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 0;
  border-color: #818cf8;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.metric-card,
.dashboard-widget,
.sprint-conclusion-card,
.meeting-report-item,
.sprint-context-card,
.dashboard-issue-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.metric-card:hover,
.dashboard-widget:hover,
.sprint-conclusion-card:hover,
.sprint-context-card:hover,
.dashboard-issue-card:hover {
  transform: translateY(-3px);
  border-color: #d7dcff;
  box-shadow: 0 16px 30px rgba(36, 45, 79, 0.1);
}

.meeting-report-item {
  border-left-width: 1px;
  border-radius: 12px;
}

.meeting-report-item:hover {
  transform: translateY(-2px);
  border-color: #c9d0ff;
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.1);
}

.meeting-report-item.active {
  border-left-width: 3px;
  border-color: #c7d2fe;
  border-left-color: var(--brand);
  background: linear-gradient(135deg, #eef0ff, #f8f9ff);
}

.dashboard-table tbody tr,
.incomplete-table tbody tr {
  transition: background-color 0.16s ease;
}

.dashboard-table tbody tr:is(:hover, :focus-within),
.incomplete-table tbody tr:is(:hover, :focus-within) {
  background: var(--surface-hover, #f6f7ff);
}

.workspace-motion > :not([hidden]) {
  animation: workspace-enter 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.workspace-motion > :not([hidden]):nth-child(2) {
  animation-delay: 0.035s;
}

.workspace-motion > :not([hidden]):nth-child(3) {
  animation-delay: 0.07s;
}

.ui-ripple {
  position: absolute;
  z-index: -1;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.16;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  animation: control-ripple 0.52s ease-out forwards;
}

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

@keyframes control-ripple {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(18);
  }
}

@media (min-width: 901px) {
  body.sidebar-collapsed .product-layout {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  body.sidebar-collapsed .project-sidebar {
    padding: 8px;
  }

  body.sidebar-collapsed .project-summary {
    grid-template-columns: 1fr;
    place-items: center;
    padding: 9px;
  }

  body.sidebar-collapsed .project-summary > div:last-child,
  body.sidebar-collapsed .sidebar-context,
  body.sidebar-collapsed .sidebar-version {
    display: none;
  }

  body.sidebar-collapsed .mode-switch button {
    justify-content: center;
    padding: 9px;
    font-size: 0;
  }

  body.sidebar-collapsed .mode-switch button::before {
    width: 30px;
    height: 30px;
    margin: 0;
    font-size: 17px;
  }
}

@media (max-width: 900px) {
  .topbar {
    position: static;
    min-height: 64px;
    padding: 10px 14px;
  }

  .product-layout {
    padding: 14px;
  }

  .project-sidebar {
    position: sticky;
    top: 0;
    border-radius: 0 0 14px 14px;
  }

  .mode-switch button::before {
    margin-right: 7px;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 10px 12px;
  }

  .sidebar-toggle {
    display: none;
  }

  .topbar h1 {
    font-size: 17px;
  }

  .product-layout {
    padding: 10px 0 28px;
  }

  .project-sidebar {
    padding: 8px 10px;
  }

  .project-sidebar .mode-switch {
    gap: 3px;
  }

  .mode-switch button {
    min-height: 38px;
    padding: 8px;
    font-size: 12px;
  }

  .mode-switch button::before {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Todo workspace --------------------------------------------------------- */
.todo-workspace {
  display: grid;
  gap: 18px;
  overflow: visible;
  border-color: #dfe5f6;
  background:
    radial-gradient(circle at 100% 0%, rgba(109, 94, 252, 0.08), transparent 28%),
    linear-gradient(145deg, #ffffff, #fbfcff);
}

.todo-head {
  align-items: flex-start;
  margin-bottom: 0;
}

.todo-head .primary {
  min-width: 112px;
}

.todo-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  padding: 5px 10px;
  border: 1px solid #cdd8ff;
  border-radius: 999px;
  background: #f0f2ff;
  color: #5147d9;
  font-size: 12px;
  font-weight: 800;
}

.todo-kicker span {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 5px;
  background: #6157ed;
  color: #fff;
  font-size: 11px;
}

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

.todo-metric-card {
  position: relative;
  min-height: 116px;
  overflow: hidden;
  padding: 17px 18px;
  border: 1px solid #e3e8f4;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

.todo-metric-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  content: "";
  background: #7a70ef;
}

.todo-metric-card span,
.todo-metric-card small {
  display: block;
  color: #748199;
  font-size: 12px;
  font-weight: 700;
}

.todo-metric-card strong {
  display: block;
  margin: 6px 0 4px;
  color: #1b2742;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.todo-metric-open::before { background: #5e69ec; }
.todo-metric-doing::before { background: #2584e8; }
.todo-metric-overdue::before { background: #e66a53; }
.todo-metric-done::before { background: #1d9d75; }

.todo-composer {
  display: grid;
  gap: 13px;
  padding: 18px;
  border: 1px solid #cfd8ff;
  border-radius: 16px;
  background: #f8f9ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.todo-composer-head,
.todo-form-actions,
.todo-list-toolbar,
.todo-card-main,
.todo-card-title-row,
.todo-card-meta,
.todo-card-actions {
  display: flex;
  align-items: center;
}

.todo-composer-head,
.todo-form-actions,
.todo-list-toolbar {
  justify-content: space-between;
  gap: 14px;
}

.todo-composer-head strong {
  display: block;
  color: #24324c;
  font-size: 16px;
}

.todo-composer-head small,
.todo-form-actions > span {
  color: #748199;
  font-size: 12px;
  line-height: 1.55;
}

.todo-form-grid {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(132px, 0.72fr) minmax(120px, 0.7fr) minmax(120px, 0.72fr) minmax(150px, 0.9fr);
  gap: 12px;
}

.todo-issue-field input { text-transform: uppercase; }

.todo-media-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed #c8d3f4;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.74);
}

.todo-media-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.todo-media-editor-head > div {
  display: grid;
  gap: 3px;
}

.todo-media-editor-head strong {
  color: #3d4b65;
  font-size: 13px;
  font-weight: 850;
}

.todo-media-editor-head small,
.todo-media-empty {
  margin: 0;
  color: #75839a;
  font-size: 12px;
  line-height: 1.55;
}

#todoMediaInput {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.todo-media-editor-grid,
.todo-card-media {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.todo-media-item {
  display: grid;
  width: 138px;
  overflow: hidden;
  margin: 0;
  border: 1px solid #dde4f1;
  border-radius: 10px;
  background: #fff;
}

.todo-media-preview-button {
  display: grid;
  width: 100%;
  height: 94px;
  overflow: hidden;
  border: 0;
  padding: 0;
  place-items: center;
  background: #f4f6fb;
  cursor: zoom-in;
  box-shadow: none;
}

.todo-media-preview-button:hover { background: #edf1ff; }

.todo-media-preview-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.todo-media-video {
  gap: 4px;
  background: linear-gradient(135deg, #e9ebff, #f4f7ff);
  color: #5248d3;
  cursor: pointer;
}

.todo-media-video span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #6358ed;
  color: #fff;
  font-size: 12px;
}

.todo-media-video em {
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.todo-media-item figcaption {
  display: grid;
  gap: 2px;
  padding: 7px 8px 8px;
}

.todo-media-item figcaption > span {
  overflow: hidden;
  color: #506078;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-media-item figcaption small {
  color: #8a97aa;
  font-size: 10px;
}

.todo-media-remove {
  justify-self: start;
  margin-top: 3px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #d55a49;
  font-size: 11px;
  font-weight: 800;
  box-shadow: none;
}

.todo-media-remove:hover { color: #b8473a; text-decoration: underline; }

.todo-card-media { margin: 8px 0 9px; }

.todo-card-media .todo-media-item { width: 112px; }
.todo-card-media .todo-media-preview-button { height: 76px; }
.todo-card-media .todo-media-item figcaption { padding: 5px 6px 6px; }

.todo-audit-log {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #dde4f1;
  border-radius: 13px;
  background: #fff;
}

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

.todo-audit-head > div {
  display: grid;
  gap: 2px;
}

.todo-audit-head strong {
  color: #33415a;
  font-size: 13px;
  font-weight: 850;
}

.todo-audit-head small,
.todo-audit-empty {
  margin: 0;
  color: #748199;
  font-size: 12px;
  line-height: 1.55;
}

.todo-audit-head > span {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f0ff;
  color: #5b50d7;
  font-size: 11px;
  font-weight: 800;
}

.todo-audit-list {
  display: grid;
  gap: 8px;
  max-height: 290px;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.todo-audit-entry {
  display: grid;
  gap: 6px;
  padding: 10px 11px;
  border: 1px solid #edf0f5;
  border-radius: 10px;
  background: #fbfcff;
}

.todo-audit-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.todo-audit-entry-head strong {
  color: #44516a;
  font-size: 12px;
  font-weight: 850;
}

.todo-audit-entry-head time {
  color: #8793a6;
  font-size: 11px;
  white-space: nowrap;
}

.todo-audit-change-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.todo-audit-change-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  color: #66748b;
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
}

.todo-audit-change-list b {
  color: #4c5970;
  font-weight: 800;
}

.todo-audit-change-list span {
  color: #8a96a8;
  text-decoration: line-through;
}

.todo-audit-change-list i {
  color: #8e85e8;
  font-style: normal;
  font-weight: 800;
}

.todo-audit-change-list em {
  color: #37455e;
  font-style: normal;
  font-weight: 700;
}

.todo-list-panel {
  overflow: hidden;
  border: 1px solid #e0e6f2;
  border-radius: 17px;
  background: #fff;
}

.todo-list-toolbar {
  flex-wrap: wrap;
  padding: 13px 14px;
  border-bottom: 1px solid #ebeff6;
  background: #fbfcff;
}

.todo-filter-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.todo-filter-tabs button {
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #6c7890;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.todo-filter-tabs button:hover {
  background: #f0f2ff;
  color: #5046d8;
}

.todo-filter-tabs button.active {
  border-color: #d6d2ff;
  background: #eeedff;
  color: #5046d8;
}

.todo-search-field {
  min-width: min(100%, 260px);
  flex: 0 1 290px;
}

.todo-search-field input {
  min-height: 36px;
  width: 100%;
  border-radius: 10px;
  font-size: 13px;
}

.todo-list {
  display: grid;
}

.todo-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px 17px;
  border-bottom: 1px solid #edf0f6;
  background: #fff;
  transition: background-color 0.18s ease;
}

.todo-card:last-child { border-bottom: 0; }
.todo-card:hover { background: #fcfcff; }
.todo-card.is-done { background: #fbfdfc; }

.todo-card-main {
  min-width: 0;
  align-items: flex-start;
  gap: 12px;
}

.todo-complete-toggle {
  position: relative;
  display: inline-grid;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  place-items: center;
  margin-top: 2px;
  cursor: pointer;
}

.todo-complete-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.todo-complete-toggle span {
  width: 19px;
  height: 19px;
  border: 2px solid #b9c4dc;
  border-radius: 7px;
  background: #fff;
  transition: all 0.16s ease;
}

.todo-complete-toggle input:checked + span {
  border-color: #1b9d75;
  background: #1b9d75;
}

.todo-complete-toggle input:checked + span::after {
  display: block;
  content: "✓";
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 17px;
  text-align: center;
}

.todo-complete-toggle input:focus-visible + span {
  outline: 3px solid rgba(91, 83, 237, 0.25);
  outline-offset: 2px;
}

.todo-card-content { min-width: 0; }

.todo-card-title-row {
  flex-wrap: wrap;
  gap: 8px;
}

.todo-card-title-row h3 {
  margin: 0;
  color: #1f2a43;
  font-size: 15px;
  line-height: 1.45;
}

.todo-card.is-done h3 {
  color: #8290a5;
  text-decoration: line-through;
}

.todo-priority,
.todo-card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.todo-priority { padding: 2px 8px; }
.todo-priority.priority-p0 { background: #fff0ed; color: #c54b37; }
.todo-priority.priority-p1 { background: #fff6dc; color: #a87009; }
.todo-priority.priority-p2 { background: #edf2ff; color: #4a63ba; }
.todo-priority.priority-p3 { background: #f1f4f7; color: #728096; }

.todo-card-content p {
  margin: 7px 0 9px;
  color: #5d6b82;
  font-size: 13px;
  line-height: 1.6;
}

.todo-card-content p.todo-card-empty { color: #9aa6b8; }

.todo-card-meta {
  flex-wrap: wrap;
  gap: 7px;
}

.todo-card-meta span {
  padding: 2px 8px;
  background: #f4f6fa;
  color: #748198;
}

.todo-card-meta .todo-due.overdue {
  background: #fff0ed;
  color: #c34b37;
}

.todo-card-meta .todo-created {
  background: #f2f6fc;
  color: #58708f;
}

.todo-card-meta .todo-creator {
  background: #f1f0ff;
  color: #6656bf;
}

.todo-card-meta .todo-issue-key {
  background: #edf0ff;
  color: #5549d4;
}

.todo-card-actions {
  align-items: flex-start;
  gap: 7px;
}

.todo-status-select select {
  min-height: 33px;
  width: 88px;
  padding: 5px 26px 5px 9px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 750;
}

.todo-card-actions .small-button,
.todo-delete-button {
  min-height: 33px;
  padding: 5px 9px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 750;
}

.todo-delete-button {
  border: 1px solid #ffd1ca;
  background: #fff;
  color: #d55a49;
  box-shadow: none;
}

.todo-delete-button:hover { background: #fff3f1; }

.todo-empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 230px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.todo-empty-state strong {
  color: var(--text);
  font-size: 16px;
}

.todo-empty-state span {
  max-width: 360px;
  font-size: 13px;
  line-height: 1.6;
}

.todo-empty-state .primary { margin-top: 5px; }

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

@media (max-width: 1120px) {
  .todo-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .todo-issue-field { grid-column: span 2; }
}

@media (max-width: 820px) {
  .todo-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .todo-card { grid-template-columns: 1fr; }
  .todo-card-actions { padding-left: 33px; }
}

@media (max-width: 600px) {
  .todo-head .primary { width: 100%; }
  .todo-head { gap: 13px; }
  .todo-metric-grid,
  .todo-form-grid { grid-template-columns: 1fr; }
  .todo-issue-field { grid-column: auto; }
  .todo-list-toolbar,
  .todo-form-actions { align-items: stretch; }
  .todo-filter-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .todo-filter-tabs button { white-space: nowrap; }
  .todo-search-field { flex-basis: 100%; }
  .todo-card-actions { flex-wrap: wrap; padding-left: 33px; }
  .todo-media-editor-head { align-items: stretch; flex-direction: column; }
  .todo-media-editor-head > .small-button { width: 100%; }
}

/* Sprint status cards and board columns share one horizontal track. */
.sprint-dashboard-scroll {
  --dashboard-column-count: 1;
  --dashboard-content-width: 100%;
  display: grid;
  min-width: 0;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}

.sprint-dashboard-scroll > .dashboard-status-grid,
.sprint-dashboard-scroll > .dashboard-board {
  width: max(100%, var(--dashboard-content-width));
  min-width: var(--dashboard-content-width);
}

.sprint-dashboard-scroll > .dashboard-status-grid,
.sprint-dashboard-scroll .dashboard-columns {
  grid-template-columns: repeat(var(--dashboard-column-count), minmax(0, 1fr));
  grid-auto-columns: initial;
  grid-auto-flow: initial;
  gap: 12px;
  padding: 2px 2px 10px;
}

.sprint-dashboard-scroll .dashboard-columns {
  width: 100%;
  overflow: visible;
}

.meeting-operations-manual-input {
  display: block;
  min-height: 180px;
  resize: vertical;
  background: #fff;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.meeting-operations-manual-input:hover {
  border-color: #bfc5ef;
}

.meeting-operations-manual-input:focus {
  border-color: var(--brand);
  background: #fdfdff;
}

.meeting-operations-images,
.meeting-section-media {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid #dfe4ef;
  border-radius: var(--radius-panel);
  padding: 12px;
  background: #fbfcff;
}

.meeting-operations-images > header,
.meeting-section-media > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meeting-operations-images > header > div,
.meeting-section-media > header > div {
  display: grid;
  gap: 3px;
}

.meeting-operations-images strong,
.meeting-section-media strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.meeting-operations-images small,
.meeting-section-media small,
.meeting-operations-images-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.meeting-operations-image-upload {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  cursor: pointer;
}

#meetingOperationsImageInput,
[data-meeting-section-media-input],
#meetingInlineMediaInput {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.meeting-operations-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 10px;
}

.meeting-operations-image-item {
  overflow: hidden;
  margin: 0;
  border: 1px solid #dfe4ef;
  border-radius: 10px;
  background: #fff;
}

.meeting-operations-media-preview {
  display: grid;
  width: 100%;
  height: 128px;
  border: 0;
  padding: 0;
  place-items: center;
  background: #f5f7fb;
  cursor: zoom-in;
}

.meeting-operations-media-preview:hover {
  background: #eef2ff;
}

.meeting-operations-image-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.meeting-operations-video-preview {
  gap: 8px;
  color: #4d5bd1;
  font-size: 12px;
  font-weight: 800;
}

.meeting-operations-video-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  padding-left: 2px;
  background: #dfe4ff;
  color: #4f46e5;
  font-size: 17px;
}

.meeting-operations-media-list,
.meeting-section-media-list {
  min-width: 0;
}

.meeting-operations-image-item figcaption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  align-items: center;
  padding: 8px;
}

.meeting-operations-image-item figcaption > span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-operations-image-item figcaption > small {
  grid-column: 1;
  font-size: 10px;
}

.meeting-operations-image-delete {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: auto;
  padding: 4px 7px;
  font-size: 11px;
}

.meeting-operations-empty-field {
  width: 100%;
  min-height: 150px;
  border: 1px solid #dfe4ef;
  border-radius: 10px;
  background: #fff;
}

.meeting-document-media-block {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.meeting-document-media-block > strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.meeting-document-media-block .meeting-operations-image-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

/* Searchable workbench selects used by the ticket editor. */
.ui-select-field {
  position: relative;
  min-width: 0;
}

.ui-select-field.open {
  z-index: 6000;
}

.ui-select-native {
  display: none !important;
}

.ui-select-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  border: 1px solid #dbe2ec;
  border-radius: var(--radius-control);
  padding: 0 42px 0 13px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(25, 35, 58, 0.025);
}

.ui-select-toggle::after {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #475569;
  border-bottom: 2px solid #475569;
  content: "";
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.18s ease;
}

.ui-select-field.open .ui-select-toggle {
  border-color: #818cf8;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.ui-select-field.open .ui-select-toggle::after {
  transform: translateY(-28%) rotate(225deg);
}

.ui-select-toggle.placeholder {
  color: #94a3b8;
  font-weight: 600;
}

.ui-select-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  display: none;
  overflow: hidden;
  border: 1px solid #e0e7ff;
  border-radius: 14px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(43, 50, 87, 0.18);
  backdrop-filter: blur(14px);
}

.ui-select-field.open .ui-select-options {
  display: grid;
  gap: 7px;
  animation: ui-select-enter 0.16s ease-out both;
}

.ui-select-search {
  min-height: 38px;
  border-color: #c7d2fe;
  padding: 8px 10px;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.ui-select-list {
  display: grid;
  gap: 2px;
  max-height: 250px;
  overflow: auto;
  padding: 2px;
}

.ui-select-option {
  display: flex;
  align-items: center;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  background: transparent;
  color: #344054;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
}

.ui-select-option::before {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  margin-right: 9px;
  border: 1.5px solid #98a2b3;
  border-radius: 999px;
  background: #fff;
  content: "";
}

.ui-select-option:hover {
  background: #f3f4ff;
  color: var(--brand-strong);
  transform: none;
}

.ui-select-option.active {
  background: linear-gradient(90deg, #eef0ff, #f8f9ff);
  color: var(--brand-strong);
  font-weight: 800;
}

.ui-select-option.active::before {
  border-color: var(--brand);
  background: radial-gradient(circle, #fff 30%, var(--brand) 35%);
}

.ui-select-field[data-ui-select-multiple="true"] .ui-select-option::before {
  border-radius: 4px;
}

.ui-select-field[data-ui-select-multiple="true"] .ui-select-option.active::before {
  background: var(--brand);
  box-shadow: inset 0 0 0 3px #fff;
}

.ui-select-empty {
  margin: 2px;
  padding: 12px 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@keyframes ui-select-enter {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 560px) {
  .ui-select-options {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-height: min(420px, calc(100vh - 24px));
  }

  .ui-select-list {
    max-height: calc(100vh - 150px);
  }
}

/* Keep existing Sprint, filter, and batch pickers in the same dropdown family. */
.filter-sprint-options,
.sprint-options {
  border-color: #e0e7ff;
  border-radius: 14px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(43, 50, 87, 0.18);
  backdrop-filter: blur(14px);
}

.filter-sprint-options > input,
.sprint-options > input {
  min-height: 38px;
  border-color: #c7d2fe;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.filter-sprint-list,
.sprint-options {
  scrollbar-color: #c7d2fe transparent;
}

.filter-sprint-option,
.sprint-option {
  border-radius: 8px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.filter-sprint-option:hover,
.sprint-option:hover {
  background: #f3f4ff;
  color: var(--brand-strong);
}

.filter-sprint-option:has(input:checked),
.sprint-option.active {
  background: linear-gradient(90deg, #eef0ff, #f8f9ff);
  color: var(--brand-strong);
}

/* Crisp interface: deliberately remove every soft shadow and glass blur. */
*,
*::before,
*::after {
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Keep keyboard focus visible without reintroducing a diffuse glow. */
*:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

/* Structured weekly meeting report template. */
.meeting-notes-grid .meeting-wide-note {
  grid-column: 1 / -1;
}

.meeting-notes-grid .meeting-template-table textarea {
  font-variant-numeric: tabular-nums;
}

.meeting-document-section.meeting-document-wide {
  grid-column: 1 / -1;
}

.meeting-document-section.has-table > div {
  min-height: 0;
  padding: 0;
  white-space: normal;
}

.meeting-document-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.meeting-document-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.meeting-document-table th,
.meeting-document-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.meeting-document-table th:last-child,
.meeting-document-table td:last-child {
  border-right: 0;
}

.meeting-document-table tbody tr:last-child td {
  border-bottom: 0;
}

.meeting-document-table th {
  background: #f7f8f9;
  color: var(--brand-strong);
  font-weight: 850;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .meeting-notes-grid .meeting-wide-note,
  .meeting-document-section.meeting-document-wide {
    grid-column: auto;
  }
}

/* Weekly-report dashboard view. */
.meeting-dashboard-hero {
  display: grid;
  gap: 4px;
  border-bottom-width: 3px;
}

.meeting-dashboard-overview {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 16px;
  background: #fbfcff;
}

.meeting-dashboard-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meeting-dashboard-overview-head > div {
  display: grid;
  gap: 2px;
}

.meeting-dashboard-overview-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.meeting-dashboard-overview-head strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}

.meeting-dashboard-health {
  border: 1px solid var(--tone-border, var(--line));
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--tone-bg, #f7f8f9);
  color: var(--tone-text, var(--muted));
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

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

.meeting-dashboard-metric {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--tone-border, var(--line));
  border-top: 3px solid var(--tone, var(--brand));
  border-radius: var(--radius-control);
  padding: 12px;
  background: #fff;
}

.meeting-dashboard-metric > span,
.meeting-dashboard-metric > small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.meeting-dashboard-metric > strong {
  overflow-wrap: anywhere;
  color: var(--tone-text, var(--text));
  font-size: 22px;
  font-weight: 900;
  line-height: 1.15;
}

@media (max-width: 1100px) {
  .meeting-dashboard-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .meeting-dashboard-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

/* Retain the purple theme, but remove the thick left-side accent rails on cards. */
.dashboard-issue-card,
.dashboard-status-card,
.metric-card,
.batch-status-item,
.sprint-conclusion-card,
.meeting-document-section {
  border-left-width: 1px;
  border-left-color: var(--line);
}

.meeting-report-item.active {
  border-left-width: 1px;
}

.meeting-sprint-analysis-control {
  display: flex;
  min-width: 0;
  gap: 8px;
}

.meeting-sprint-analysis-control input {
  min-width: 0;
  flex: 1 1 auto;
}

.meeting-sprint-analysis-control .secondary {
  flex: 0 0 auto;
  white-space: nowrap;
}

.meeting-delivery-sprint-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meeting-delivery-sprint-control input {
  min-width: 0;
  flex: 1 1 auto;
}

.meeting-delivery-sprint-control .secondary {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* The delivery Sprint chooser is part of a dense editor section.  Keep its
   options in normal flow so an expanded list moves the delivery table down
   instead of layering over the table header and action controls. */
.meeting-delivery-sprint-control .meeting-sprint-multi-picker.open {
  z-index: 4;
}

.meeting-delivery-sprint-control .meeting-sprint-multi-menu {
  position: static;
  box-sizing: border-box;
  width: 100%;
  margin-top: 6px;
  box-shadow: none;
}

.meeting-template-table > small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.meeting-delivery-preview-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.meeting-quality-import-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  align-items: center;
  margin: 0 0 10px;
  border: 1px solid #d9e0f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fafbff;
}

.meeting-quality-import-copy {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.meeting-quality-import-copy > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.meeting-quality-import-kicker {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 26px;
  border: 1px solid #d9ddff;
  border-radius: 999px;
  padding: 0 8px;
  background: #f0f1ff;
  color: #5456cc;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
}

.meeting-quality-import-tool strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.meeting-quality-import-tool small,
.meeting-quality-import-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.meeting-quality-import-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
}

.meeting-quality-import-actions button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.meeting-quality-action-divider {
  display: block;
  width: 1px;
  height: 22px;
  background: #dfe4ef;
}

.meeting-quality-import-status {
  grid-column: 1 / -1;
  min-height: 18px;
}

.meeting-quality-import-status[data-tone="ok"] {
  color: #13795b;
}

.meeting-quality-import-status[data-tone="warn"] {
  color: #b42318;
}

/* Sidebar layouts leave the editor narrower than the browser viewport. Stack
   the explanatory copy before the action buttons before they start squeezing. */
@media (max-width: 1350px) {
  .meeting-quality-import-tool {
    grid-template-columns: 1fr;
  }

  .meeting-quality-import-actions {
    justify-content: flex-start;
  }
}

.meeting-delivery-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: #fff;
}

.meeting-delivery-preview[hidden] {
  display: none;
}

.meeting-delivery-preview .meeting-document-table-scroll {
  max-height: 520px;
  overflow: auto;
}

.meeting-delivery-preview .meeting-document-table {
  min-width: 760px;
}

.meeting-delivery-preview .meeting-document-table td.meeting-delivery-status-cell,
.meeting-delivery-preview .meeting-document-table td.meeting-delivery-acceptance-cell,
.meeting-document-section .meeting-document-table td.meeting-delivery-status-cell,
.meeting-document-section .meeting-document-table td.meeting-delivery-acceptance-cell {
  padding: 8px 10px;
  vertical-align: middle;
}

.meeting-delivery-status-summary,
.meeting-delivery-acceptance-summary {
  display: grid;
  gap: 5px;
  min-width: 118px;
}

.meeting-delivery-status-summary strong {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #bcebdc;
  border-radius: 999px;
  padding: 4px 7px;
  background: #e9fbf4;
  color: #08785b;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-delivery-status-summary.is-progress strong {
  border-color: #bfd5f3;
  background: #eef5ff;
  color: #2662a4;
}

.meeting-delivery-status-summary.is-pending strong {
  border-color: #f4d7a5;
  background: #fff7e8;
  color: #a85d08;
}

.meeting-delivery-status-summary > span {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.meeting-delivery-status-summary small,
.meeting-delivery-acceptance-summary small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.meeting-delivery-acceptance-summary header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.meeting-delivery-acceptance-summary header span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.meeting-delivery-acceptance-summary header strong {
  color: var(--text);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.meeting-delivery-progress-track {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #e7ebf2;
}

.meeting-delivery-progress-track > i {
  display: block;
  width: var(--meeting-delivery-rate, 0%);
  min-width: 3px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #12a978, #38c99b);
}

.meeting-delivery-acceptance-summary.is-progress .meeting-delivery-progress-track > i {
  background: linear-gradient(90deg, #3c7ccd, #72a7ea);
}

.meeting-delivery-acceptance-summary.is-pending .meeting-delivery-progress-track > i {
  background: linear-gradient(90deg, #d18a2c, #eab85e);
}

.meeting-delivery-acceptance-summary > b {
  color: #08785b;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.meeting-delivery-acceptance-summary.is-progress > b {
  color: #2662a4;
}

.meeting-delivery-acceptance-summary.is-pending > b {
  color: #a85d08;
}

.meeting-delivery-dashboard {
  display: grid;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--panel) 94%, #eef2ff), var(--panel));
}

.meeting-delivery-dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.meeting-delivery-dashboard-head > div {
  min-width: 0;
}

.meeting-delivery-dashboard-head span {
  display: block;
  margin-bottom: 3px;
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.meeting-delivery-dashboard-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.meeting-delivery-dashboard-head p {
  max-width: 780px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.meeting-delivery-dashboard-head > small {
  flex: 0 0 auto;
  max-width: 220px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.meeting-delivery-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.meeting-delivery-kpis article {
  display: grid;
  gap: 2px;
  min-width: 0;
  border-right: 1px solid var(--line);
  padding: 11px 13px;
}

.meeting-delivery-kpis article:last-child {
  border-right: 0;
}

.meeting-delivery-kpis span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.meeting-delivery-kpis strong {
  color: var(--text);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.meeting-delivery-kpis small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-delivery-kpis .is-complete strong {
  color: #128065;
}

.meeting-delivery-kpis .is-pending strong {
  color: #b56816;
}

.meeting-delivery-chart {
  display: grid;
  gap: 9px;
}

.meeting-delivery-chart > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.meeting-delivery-chart > header strong {
  color: var(--text);
  font-size: 12px;
}

.meeting-delivery-chart-rows {
  display: grid;
  gap: 7px;
}

.meeting-delivery-chart-row {
  display: grid;
  grid-template-columns: minmax(92px, 150px) minmax(100px, 1fr) 42px 40px;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

.meeting-delivery-chart-row > span {
  overflow: hidden;
  color: var(--text);
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-delivery-chart-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 70%, transparent);
}

.meeting-delivery-chart-track > i {
  display: block;
  width: var(--meeting-delivery-rate, 0%);
  min-width: 3px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #8b5cf6);
}

.meeting-delivery-chart-row b,
.meeting-delivery-chart-row em {
  font-size: 11px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.meeting-delivery-chart-row b {
  color: var(--text);
}

.meeting-delivery-chart-row em {
  color: var(--brand-strong);
  font-weight: 850;
}

@media (max-width: 720px) {
  .meeting-delivery-dashboard-head {
    flex-direction: column;
  }

  .meeting-delivery-dashboard-head > small {
    max-width: none;
    text-align: left;
  }

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

  .meeting-delivery-kpis article:nth-child(2) {
    border-right: 0;
  }

  .meeting-delivery-kpis article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 460px) {
  .meeting-delivery-dashboard {
    padding: 14px;
  }

  .meeting-delivery-chart-row {
    grid-template-columns: minmax(72px, 105px) minmax(72px, 1fr) 36px 36px;
    gap: 6px;
  }
}

.meeting-operations-table-preview.operations-overview-embedded {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.meeting-operations-table-preview.operations-overview-embedded .operations-summary-dashboard {
  margin: 0;
}

.meeting-delivery-preview.editing .meeting-delivery-editable-cell,
.meeting-operations-table-preview.editing .meeting-operations-editable-cell,
.meeting-quality-table-preview.editing .meeting-quality-editable-cell,
.meeting-risk-table-preview.editing .meeting-risk-editable-cell,
.meeting-next-week-table-preview.editing .meeting-next-week-editable-cell {
  cursor: text;
  background: #fff;
}

.meeting-delivery-preview.editing .meeting-delivery-editable-cell:focus-within,
.meeting-operations-table-preview.editing .meeting-operations-editable-cell:focus-within,
.meeting-quality-table-preview.editing .meeting-quality-editable-cell:focus-within,
.meeting-risk-table-preview.editing .meeting-risk-editable-cell:focus-within,
.meeting-next-week-table-preview.editing .meeting-next-week-editable-cell:focus-within {
  position: relative;
  z-index: 1;
  background: #f8f8ff;
}

.meeting-table-cell-editor {
  min-height: 26px;
  outline: 0;
  white-space: pre-wrap;
}

.meeting-table-cell-editor:focus {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.meeting-inline-media-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  gap: 10px;
  margin: 0;
  border-top: 1px solid #dfe4ef;
  padding: 9px 12px;
  background: #fafbff;
}

.meeting-inline-media-label {
  color: #35415d;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.meeting-inline-media-add {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #aeb9e8;
  border-radius: 7px;
  padding: 5px 10px;
  background: #f7f8ff;
  color: #5056c7;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.meeting-inline-media-add:hover,
.meeting-inline-media-add:focus-visible {
  border-color: var(--brand);
  background: #eef0ff;
  color: var(--brand-strong);
}

.meeting-inline-media-toolbar small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.meeting-inline-media {
  position: relative;
  display: inline-flex;
  max-width: min(190px, 100%);
  margin: 7px 7px 2px 0;
  vertical-align: middle;
  overflow: hidden;
  border: 1px solid #ccd5ef;
  border-radius: 8px;
  background: #f8f9ff;
}

.meeting-inline-media-preview {
  display: grid;
  width: min(170px, 100%);
  min-height: 76px;
  place-items: center;
  border: 0;
  padding: 0;
  background: #f5f7ff;
  cursor: zoom-in;
}

.meeting-inline-media-preview img {
  display: block;
  width: 100%;
  max-height: 126px;
  object-fit: contain;
}

.meeting-inline-video-preview {
  gap: 6px;
  color: #515ec8;
  font-size: 12px;
  font-weight: 800;
}

.meeting-inline-video-preview > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  padding-left: 2px;
  background: #dde3ff;
}

.meeting-inline-video-preview em {
  font-style: normal;
}

.meeting-inline-media-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid #f3b5b5;
  border-radius: 999px;
  padding: 0;
  background: #fff;
  color: #c53939;
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.meeting-inline-media-remove:hover,
.meeting-inline-media-remove:focus-visible {
  background: #fff0f0;
}

.meeting-narrative-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.meeting-narrative-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: #fff;
}

.meeting-narrative-preview[hidden] {
  display: none;
}

.meeting-narrative-lines {
  display: grid;
}

.meeting-narrative-line {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  background: #fff;
}

.meeting-narrative-line:last-child {
  border-bottom: 0;
}

.meeting-narrative-line em {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.meeting-narrative-line p {
  min-width: 0;
  margin: 2px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.meeting-narrative-hint {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.meeting-narrative-preview.editing .meeting-narrative-editable {
  cursor: text;
}

.meeting-narrative-preview.editing .meeting-narrative-editable:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  background: #f8f8ff;
}

/* Operations Sheet import: use an explicit, bounded range before summarising. */
.meeting-operations-sheet-tool {
  display: grid;
  gap: 12px;
  border: 1px solid #dfe4ef;
  border-radius: var(--radius-panel);
  padding: 14px;
  background: #fbfcff;
}

.meeting-operations-sheet-tool-head,
.meeting-operations-sheet-result-head,
.meeting-operations-sheet-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meeting-operations-sheet-tool-head > div,
.meeting-operations-sheet-result-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.meeting-operations-sheet-tool-head strong,
.meeting-operations-sheet-result-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.meeting-operations-sheet-tool-head small,
.meeting-operations-sheet-result-head span,
.meeting-operations-sheet-result-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.meeting-operations-sheet-tool-head > span {
  flex: 0 0 auto;
  border: 1px solid #d9dcff;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f3f4ff;
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 800;
}

.meeting-operations-sheet-controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.meeting-operations-sheet-file-control,
.meeting-operations-sheet-url-control,
.meeting-operations-sheet-name-control {
  grid-column: span 2;
}

.meeting-operations-sheet-control {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.meeting-operations-sheet-control > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.meeting-operations-sheet-control > small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.meeting-operations-sheet-control input,
.meeting-operations-sheet-control select {
  width: 100%;
  min-width: 0;
  height: 36px;
  border-color: #cfd8e8;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.meeting-operations-sheet-file-control input {
  padding: 5px 7px;
}

.meeting-operations-sheet-file-control input::file-selector-button {
  margin-right: 8px;
  border: 0;
  border-radius: 6px;
  padding: 4px 7px;
  background: #eef0ff;
  color: var(--brand-strong);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.meeting-operations-sheet-actions {
  min-height: 34px;
  border-top: 1px solid #e4e8f1;
  padding-top: 10px;
}

.meeting-operations-sheet-actions > span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.meeting-operations-sheet-actions > span[data-tone="ok"] {
  color: #13795b;
}

.meeting-operations-sheet-actions > span[data-tone="warn"] {
  color: #b42318;
}

.meeting-operations-overview-import {
  gap: 14px;
  background: linear-gradient(135deg, #fbfcff 0%, #f6fbff 100%);
}

.meeting-operations-jql-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  border: 1px solid #dce7f7;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.meeting-operations-jql-tool .field {
  gap: 6px;
}

.meeting-operations-jql-tool textarea {
  min-height: 76px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
}

.meeting-operations-jql-tool small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.meeting-operations-overview-source {
  display: grid;
  gap: 4px;
  min-height: 74px;
  box-sizing: border-box;
  border: 1px solid #dce7f7;
  border-radius: 10px;
  padding: 12px 13px;
  background: #fff;
}

.meeting-operations-overview-source strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.meeting-operations-overview-source span,
.meeting-operations-overview-source small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.meeting-operations-overview-source small {
  color: #63718a;
}

.meeting-operations-overview-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.meeting-operations-sheet-preview[hidden] {
  display: none;
}

.meeting-operations-sheet-result {
  display: grid;
  gap: 10px;
  overflow: hidden;
  border: 1px solid #dfe4ef;
  border-radius: 10px;
  background: #fff;
}

.meeting-operations-sheet-result-head {
  align-items: flex-start;
  border-bottom: 1px solid #e6eaf2;
  padding: 11px 12px 9px;
}

.meeting-operations-sheet-result-head small {
  max-width: 36%;
  overflow-wrap: anywhere;
  text-align: right;
}

.meeting-operations-sheet-result > p {
  margin: 0;
  padding: 0 12px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
}

.meeting-operations-analysis {
  display: grid;
  gap: 0;
  overflow: hidden;
  margin: 0 12px;
  border: 1px solid #dfe4ef;
  border-radius: 10px;
  background: #fff;
}

.meeting-operations-analysis > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #f7f8ff;
}

.meeting-operations-analysis > header > div {
  display: grid;
  gap: 3px;
}

.meeting-operations-analysis > header span {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.meeting-operations-analysis > header strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.meeting-operations-analysis > header em {
  flex: 0 0 auto;
  border: 1px solid #cfd3ff;
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff;
  color: var(--brand-strong);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.meeting-operations-analysis-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid #e5e8f1;
  border-bottom: 1px solid #e5e8f1;
}

.meeting-operations-analysis-stats > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  border-right: 1px solid #e5e8f1;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-align: center;
}

.meeting-operations-analysis-stats > span:last-child {
  border-right: 0;
}

.meeting-operations-analysis-stats b {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.meeting-operations-analysis-groups {
  max-height: 520px;
  overflow: auto;
  scrollbar-gutter: stable;
}

.meeting-operations-analysis-group {
  border-bottom: 1px solid #e5e8f1;
}

.meeting-operations-analysis-group:last-child {
  border-bottom: 0;
}

.meeting-operations-analysis-group > header {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid #e9ecf3;
  padding: 9px 13px;
  background: #fbfcff;
}

.meeting-operations-analysis-group > header strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.meeting-operations-analysis-group ol {
  counter-reset: meeting-operation-item;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meeting-operations-analysis-group li {
  counter-increment: meeting-operation-item;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  border-bottom: 1px solid #edf0f5;
  padding: 8px 13px;
}

.meeting-operations-analysis-group li:last-child {
  border-bottom: 0;
}

.meeting-operations-analysis-group li::before {
  content: counter(meeting-operation-item) ".";
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.meeting-operations-analysis-group li > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 7px;
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

.meeting-operations-analysis-group li > div strong {
  color: var(--brand-strong);
  font-weight: 900;
  white-space: nowrap;
}

.meeting-operations-analysis-group li > div strong::after {
  content: "－";
  margin-left: 6px;
  color: var(--muted);
}

.meeting-operations-analysis-group li > div span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.meeting-operations-analysis-group li > em {
  max-width: 180px;
  border-radius: 999px;
  padding: 3px 7px;
  background: #f3f4f8;
  color: #505a70;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}

.meeting-operations-sheet-source {
  border-top: 1px solid #e6eaf2;
}

.meeting-operations-sheet-source > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.meeting-operations-sheet-source > summary::-webkit-details-marker {
  display: none;
}

.meeting-operations-sheet-source > summary::before {
  content: "+";
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  margin-right: 2px;
  border: 1px solid #d9deea;
  border-radius: 50%;
  color: var(--brand-strong);
}

.meeting-operations-sheet-source[open] > summary::before {
  content: "−";
}

.meeting-operations-sheet-source > summary > span {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.meeting-operations-sheet-source[open] > summary {
  border-bottom: 1px solid #e6eaf2;
  background: #fafbfe;
}

.meeting-operations-sheet-source .meeting-operations-sheet-table-scroll {
  margin-top: 12px;
  margin-bottom: 12px;
}

.meeting-operations-sheet-table-scroll {
  max-height: 320px;
  margin: 0 12px;
  overflow: auto;
  border: 1px solid #e2e7f0;
  border-radius: 8px;
}

.meeting-operations-sheet-table {
  min-width: 720px;
  font-size: 12px;
}

.meeting-operations-sheet-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.meeting-operations-sheet-table td {
  max-width: 280px;
  overflow-wrap: anywhere;
}

.meeting-operations-sheet-more td {
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

.meeting-operations-sheet-result > footer {
  border-top: 1px solid #e6eaf2;
  padding: 9px 12px 11px;
}

.meeting-operations-sheet-result > footer span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.meeting-operations-document-section {
  grid-column: 1 / -1;
}

.meeting-operations-document-content {
  display: grid;
  gap: 14px;
  min-height: 0;
  padding: 14px;
}

.meeting-operations-narrative .meeting-narrative-lines {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.meeting-operations-narrative:not(:has(.meeting-narrative-lines)) {
  color: var(--text);
  white-space: pre-wrap;
}

.meeting-operations-document-section .meeting-operations-sheet-table-scroll {
  max-height: 420px;
}

@media (max-width: 1100px) {
  .meeting-operations-sheet-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .meeting-operations-sheet-file-control,
  .meeting-operations-sheet-url-control,
  .meeting-operations-sheet-name-control {
    grid-column: span 1;
  }

  .meeting-operations-analysis-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .meeting-operations-analysis-stats > span:nth-child(3) {
    border-right: 0;
  }

  .meeting-operations-analysis-stats > span:nth-child(-n + 3) {
    border-bottom: 1px solid #e5e8f1;
  }
}

@media (max-width: 680px) {
  .meeting-quality-import-tool {
    grid-template-columns: 1fr;
  }

  .meeting-quality-import-actions {
    justify-content: flex-start;
  }

  .meeting-quality-action-divider {
    display: none;
  }

  .meeting-inline-media-toolbar {
    grid-template-columns: 1fr auto;
    gap: 5px 10px;
  }

  .meeting-inline-media-toolbar small {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .meeting-operations-images > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .meeting-operations-sheet-tool-head,
  .meeting-operations-sheet-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .meeting-operations-overview-actions {
    flex-wrap: wrap;
  }

  .meeting-operations-jql-tool {
    grid-template-columns: 1fr;
  }

  .meeting-operations-jql-tool button {
    width: 100%;
  }

  .meeting-operations-sheet-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meeting-operations-sheet-file-control {
    grid-column: 1 / -1;
  }

  .meeting-operations-sheet-url-control,
  .meeting-operations-sheet-name-control {
    grid-column: 1 / -1;
  }

  .meeting-operations-sheet-result-head small {
    max-width: none;
    text-align: left;
  }

  .meeting-operations-analysis > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .meeting-operations-analysis-group li {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .meeting-operations-analysis-group li > em {
    grid-column: 2;
    justify-self: start;
  }
}

/* Meeting report workspace: denser hierarchy, crisp feedback, no glass effects. */
.meeting-workspace {
  gap: 20px;
  border-color: #dce2ef;
  background: linear-gradient(180deg, #fbfcff 0, #f6f8fc 100%);
}

.meeting-workspace-head {
  align-items: center;
  border-bottom: 1px solid #dfe4ef;
  padding-bottom: 16px;
}

.meeting-workspace-head h2 {
  letter-spacing: -0.02em;
}

.meeting-workspace-head .primary,
.meeting-editor-actions .primary,
.meeting-viewer-toolbar .primary {
  border-color: #5b5ce2;
  background: #5b5ce2;
}

.meeting-report-library {
  border-color: #dfe4ef;
  background: #f8f9fd;
}

.meeting-report-editor {
  border-color: #dfe4ef;
  padding: 18px;
  background: #fff;
}

.meeting-report-item {
  border-left-width: 1px;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.meeting-report-item:hover {
  border-color: #bfc5ec;
  background: #f4f5ff;
  transform: translateY(-1px);
}

.meeting-report-item.active {
  border-color: #7778ec;
  background: #eff0ff;
}

.meeting-notes-grid > .field,
.meeting-notes-grid > .meeting-version-progress-field {
  position: relative;
  border: 1px solid #dfe4ef;
  border-radius: 14px;
  padding: 15px;
  background: #fff;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.meeting-notes-grid > .field:hover,
.meeting-notes-grid > .meeting-version-progress-field:hover {
  border-color: #c8cdef;
  background: #fdfdff;
}

.meeting-notes-grid > .field:focus-within,
.meeting-notes-grid > .meeting-version-progress-field:focus-within {
  border-color: #7778ec;
  background: #fbfbff;
}

.meeting-notes-grid > .field > span,
.meeting-version-progress-heading > span {
  color: #242650;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.meeting-delivery-preview {
  border-color: #d8deec;
  background: #fff;
}

.meeting-delivery-preview .meeting-document-table-scroll {
  scrollbar-color: #aeb7cc transparent;
}

.meeting-delivery-preview .meeting-document-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f4f5fb;
}

.meeting-delivery-preview .meeting-document-table tbody tr {
  transition: background-color 150ms ease;
}

.meeting-delivery-preview .meeting-document-table tbody tr:hover td {
  background: #fafaff;
}

.meeting-delivery-preview.editing .meeting-document-table tbody tr:hover td {
  background: #f5f6ff;
}

.meeting-delivery-action-head,
.meeting-delivery-row-action,
.meeting-operations-action-head,
.meeting-operations-row-action,
.meeting-quality-action-head,
.meeting-quality-row-action,
.meeting-risk-action-head,
.meeting-risk-row-action,
.meeting-next-week-action-head,
.meeting-next-week-row-action {
  width: 72px;
  min-width: 72px;
  text-align: center !important;
}

.meeting-delivery-row-action,
.meeting-operations-row-action,
.meeting-quality-row-action,
.meeting-risk-row-action,
.meeting-next-week-row-action {
  vertical-align: middle !important;
  background: #fcfcfe;
}

.meeting-item-delete {
  min-width: 48px;
  border-color: #fecaca !important;
  background: #fff !important;
  color: #b42318 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

.meeting-item-delete:hover {
  border-color: #fca5a5 !important;
  background: #fff5f5 !important;
}

.meeting-editor-section-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff;
  color: #b42318;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

.meeting-editor-section-remove:hover {
  border-color: #fca5a5;
  background: #fff5f5;
  color: #8f1d16;
}

.meeting-notes-grid > .meeting-template-table > span,
.meeting-version-progress-heading {
  padding-right: 38px;
}

.meeting-removed-sections {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed #c8cdef;
  border-radius: 12px;
  background: #f8f9ff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.meeting-removed-sections > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}


.meeting-narrative-preview {
  border-color: #d8deec;
  background: #fff;
}

.meeting-narrative-line {
  transition: background-color 150ms ease;
}

.meeting-narrative-line:hover {
  background: #fafaff;
}

.meeting-narrative-preview.editing .meeting-narrative-line {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  background: #fcfcff;
}

.meeting-narrative-preview.editing .meeting-narrative-line em {
  border-color: #c9cdf3;
  background: #f2f3ff;
  color: #5557cb;
}

.meeting-editor-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin: 0 -18px -18px;
  border-top: 1px solid #dfe4ef;
  padding: 12px 18px;
  background: #fff;
}

.meeting-report-document {
  border-color: #dfe4ef;
  background: #fff;
}

.meeting-document-section {
  border-color: #dfe4ef;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.meeting-document-section:hover {
  border-color: #c8cdef;
  background: #fdfdff;
}

.meeting-sprint-multi-picker {
  position: relative;
  z-index: 2;
  flex: 1 1 430px;
  min-width: 0;
}

.meeting-sprint-multi-toggle {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line-strong, var(--line));
  border-radius: var(--radius-control);
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
}

.meeting-sprint-multi-toggle > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-sprint-multi-toggle > i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
}

.meeting-sprint-multi-picker.open .meeting-sprint-multi-toggle {
  border-color: var(--brand);
}

.meeting-sprint-multi-picker.open .meeting-sprint-multi-toggle > i {
  transform: rotate(225deg) translate(-3px, -1px);
}

.meeting-sprint-multi-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  display: grid;
  gap: 7px;
  max-height: 300px;
  overflow: hidden;
  border: 1px solid var(--line-strong, var(--line));
  border-radius: var(--radius-control);
  padding: 5px;
  background: #fff;
}

.meeting-sprint-multi-menu > input {
  min-height: 38px;
  border-color: #c7d2fe;
  padding: 8px 10px;
}

.meeting-sprint-multi-menu > div {
  display: grid;
  gap: 3px;
  max-height: 218px;
  overflow: auto;
  padding-right: 2px;
}

.meeting-sprint-multi-option {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 5px;
  padding: 7px 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
}

.meeting-sprint-multi-option .sprint-choice-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.meeting-sprint-multi-option:hover,
.meeting-sprint-multi-option.active {
  background: #eef0ff;
  color: var(--brand-strong);
}

.meeting-sprint-multi-check {
  display: grid;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  place-items: center;
  border: 1px solid var(--line-strong, var(--line));
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.meeting-sprint-multi-option.active .meeting-sprint-multi-check {
  border-color: var(--brand);
  background: var(--brand);
}

.meeting-sprint-multi-empty,
.meeting-sprint-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.meeting-version-progress-field {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 14px;
  background: #fbfcff;
}

.meeting-version-progress-heading,
.meeting-ai-sprint-layer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.meeting-version-progress-heading > span,
.meeting-version-custom-field > span {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.meeting-version-progress-heading > small,
.meeting-ai-sprint-layer-head small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.meeting-ai-sprint-layer {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 12px;
  background: #fff;
}

.meeting-ai-sprint-layer-head > div:first-child {
  display: grid;
  flex: 1 1 240px;
  gap: 3px;
}

.meeting-ai-sprint-layer-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.meeting-ai-sprint-layer-head .meeting-sprint-analysis-control {
  flex: 1 1 420px;
}

.meeting-ai-sprint-layer textarea[readonly] {
  min-height: 210px;
  resize: vertical;
  background: #fbfcff;
  color: var(--text);
  cursor: default;
}

.meeting-sprint-dashboard {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.meeting-sprint-dashboard-overview {
  display: grid;
  gap: 12px;
  min-width: 0;
  white-space: normal;
}

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

.meeting-sprint-dashboard-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  height: 350px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fff;
}

.meeting-sprint-dashboard-card > header,
.meeting-sprint-all-issues > header,
.meeting-sprint-issue-group > header,
.meeting-sprint-module-list section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.meeting-sprint-dashboard-card > header {
  min-height: 46px;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
}

.meeting-sprint-dashboard-card > header > span,
.meeting-sprint-all-issues > header strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.meeting-sprint-dashboard-card > header small,
.meeting-sprint-all-issues > header span,
.meeting-sprint-all-issues > header small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.meeting-sprint-donut-layout {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 12px;
  min-height: 0;
  padding: 14px;
}

.meeting-sprint-donut {
  display: grid;
  width: min(154px, 100%);
  aspect-ratio: 1;
  place-self: center;
  place-items: center;
  border-radius: 50%;
  background: var(--meeting-donut);
}

.meeting-sprint-donut::before {
  grid-area: 1 / 1;
  width: 58%;
  height: 58%;
  border-radius: 50%;
  background: var(--panel);
  content: "";
}

.meeting-sprint-donut > div {
  z-index: 1;
  display: grid;
  grid-area: 1 / 1;
  justify-items: center;
  color: var(--text);
}

.meeting-sprint-donut strong {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

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

.meeting-sprint-status-legend,
.meeting-sprint-module-list,
.meeting-sprint-results {
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.meeting-sprint-analyst-copy {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.72;
}

.meeting-sprint-analyst-copy > p {
  margin: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 11px;
}

.meeting-sprint-analyst-copy > p:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.meeting-sprint-analyst-copy strong {
  color: var(--brand-strong);
  font-weight: 850;
}

.meeting-sprint-result-copy > p:nth-child(3) strong {
  color: #b42318;
}

.meeting-sprint-status-legend {
  display: grid;
  align-content: center;
  gap: 8px;
}

.meeting-sprint-status-legend > div {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.meeting-sprint-status-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--meeting-status-color);
}

.meeting-sprint-status-legend span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-sprint-status-legend b {
  color: var(--text);
  font-size: 12px;
}

.meeting-sprint-status-legend em {
  min-width: 32px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  text-align: right;
}

.meeting-sprint-module-list {
  display: grid;
  align-content: start;
  gap: 10px;
}

.meeting-sprint-module-list section {
  display: grid;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.meeting-sprint-module-list section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.meeting-sprint-module-list section > header strong,
.meeting-sprint-results h4 {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.meeting-sprint-module-list section > header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.meeting-sprint-module-list ul,
.meeting-sprint-results ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meeting-sprint-more {
  color: var(--muted);
  font-size: 11px;
}

.meeting-sprint-results {
  display: grid;
  align-content: start;
  gap: 12px;
}

.meeting-sprint-results > p {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
}

.meeting-sprint-results > p b {
  color: var(--text);
  font-size: 12px;
}

.meeting-sprint-results > p strong {
  color: var(--brand-strong);
  font-size: 22px;
  line-height: 1;
}

.meeting-sprint-results > p span {
  text-align: right;
}

.meeting-sprint-results section {
  display: grid;
  gap: 7px;
}

.meeting-sprint-results h4 {
  margin: 0;
}

.meeting-sprint-results section > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.meeting-sprint-risk-list h4 {
  color: #b42318;
}

.meeting-sprint-all-issues {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  min-width: 0;
  height: 350px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  overflow: hidden;
  background: #fff;
}

.meeting-sprint-all-issues > header {
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  padding: 8px 12px;
}

.meeting-sprint-all-issues > header > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.meeting-sprint-all-issues-scroll {
  min-height: 0;
  height: auto;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px;
  background: #fbfcff;
}

.meeting-sprint-issue-group {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0 14px;
}

.meeting-sprint-issue-group:first-child {
  padding-top: 0;
}

.meeting-sprint-issue-group:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.meeting-sprint-issue-group > header strong {
  color: var(--tone-text, var(--text));
  font-size: 12px;
  font-weight: 850;
}

.meeting-sprint-issue-group > header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.meeting-sprint-issue-group > div {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 7px;
}

.meeting-sprint-issue-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.meeting-sprint-issue-card:hover,
.meeting-sprint-issue-card.open {
  border-color: var(--brand);
  background: #f7f8ff;
}

.meeting-sprint-issue-card-main {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.meeting-sprint-issue-card-main em {
  color: var(--brand-strong);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.meeting-sprint-issue-card-main strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-sprint-issue-card-meta {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 5px;
}

.meeting-sprint-issue-card small {
  align-self: start;
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.meeting-version-custom-field {
  display: grid;
  gap: 7px;
  padding-top: 2px;
}

.meeting-markdown-file-editor {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 14px;
  background: #f8faff;
}

.meeting-markdown-file-editor > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meeting-markdown-file-editor > header > div:first-child {
  display: grid;
  gap: 3px;
}

.meeting-markdown-file-editor strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.meeting-markdown-file-editor small,
.meeting-markdown-file-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.meeting-markdown-file-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.meeting-version-custom-field textarea {
  min-height: 160px;
  resize: vertical;
  background: #fff;
}

.meeting-markdown-preview {
  overflow: auto;
  max-height: 480px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 14px 16px;
  background: #fbfcff;
}

.meeting-markdown-preview::before {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  content: "Markdown 预览";
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

.meeting-markdown-file-preview {
  max-height: 560px;
  background: #fff;
}

.meeting-markdown-file-preview::before {
  content: "Markdown 文件内容";
}

.meeting-markdown-content {
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  word-break: break-word;
}

.meeting-markdown-content > :first-child { margin-top: 0; }
.meeting-markdown-content > :last-child { margin-bottom: 0; }

.meeting-markdown-content :is(h1, h2, h3, h4, h5, h6) {
  margin: 1.1em 0 .55em;
  color: var(--text);
  font-weight: 850;
  line-height: 1.35;
}

.meeting-markdown-content h1 { font-size: 1.38em; }
.meeting-markdown-content h2 { font-size: 1.24em; }
.meeting-markdown-content h3 { font-size: 1.12em; }
.meeting-markdown-content :is(h4, h5, h6) { font-size: 1em; }

.meeting-markdown-content p { margin: .7em 0; }
.meeting-markdown-content :is(ul, ol) { margin: .7em 0; padding-left: 1.55em; }
.meeting-markdown-content li + li { margin-top: .28em; }
.meeting-markdown-content hr { margin: 1em 0; border: 0; border-top: 1px solid var(--line); }

.meeting-markdown-content blockquote {
  margin: .9em 0;
  border-left: 3px solid var(--brand);
  border-radius: 0 8px 8px 0;
  padding: 8px 12px;
  background: var(--brand-soft);
  color: var(--text);
}

.meeting-markdown-content :is(code, pre) {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.meeting-markdown-content code {
  border-radius: 5px;
  padding: .12em .35em;
  background: #eef1f7;
  color: #39465c;
  font-size: .91em;
}

.meeting-markdown-content pre {
  overflow: auto;
  margin: .9em 0;
  border-radius: 9px;
  padding: 12px;
  background: #202631;
  color: #edf3ff;
  line-height: 1.55;
}

.meeting-markdown-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.meeting-markdown-content a {
  color: var(--brand-strong);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.meeting-markdown-content img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 560px;
  margin: .9em 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
}

.meeting-markdown-table-wrap {
  overflow: auto;
  margin: .9em 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.meeting-markdown-table-wrap table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  background: #fff;
}

.meeting-markdown-table-wrap :is(th, td) {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.meeting-markdown-table-wrap th {
  background: #f3f5fb;
  color: var(--text);
  font-weight: 800;
}

.meeting-markdown-table-wrap tr > :last-child { border-right: 0; }
.meeting-markdown-table-wrap tbody tr:last-child > * { border-bottom: 0; }

.meeting-version-progress-document-layers {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.meeting-version-progress-document-layer {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 13px;
  background: #fff;
}

.meeting-version-progress-document-layer header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.meeting-version-progress-document-layer header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.meeting-version-progress-document-layer header strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  text-align: right;
}

.meeting-version-progress-document-layer > div {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  font-size: 13px;
  line-height: 1.72;
}

.meeting-version-progress-document-layer > .meeting-markdown-content {
  white-space: normal;
}

:root[data-theme="dark"] .meeting-markdown-preview {
  border-color: #49505b;
  background: #242932;
}

:root[data-theme="dark"] .meeting-markdown-file-editor {
  border-color: #454d59;
  background: #2a3039;
}

:root[data-theme="dark"] .meeting-markdown-file-editor strong,
:root[data-theme="dark"] .meeting-markdown-content,
:root[data-theme="dark"] .meeting-markdown-content :is(h1, h2, h3, h4, h5, h6) {
  color: #f2f4f7;
}

:root[data-theme="dark"] .meeting-markdown-file-editor small,
:root[data-theme="dark"] .meeting-markdown-file-status {
  color: #b8c0cb;
}

:root[data-theme="dark"] .meeting-markdown-content blockquote {
  border-left-color: #7ea2ff;
  background: #263654;
  color: #eaf1ff;
}

:root[data-theme="dark"] .meeting-markdown-content hr,
:root[data-theme="dark"] .meeting-markdown-table-wrap,
:root[data-theme="dark"] .meeting-markdown-table-wrap :is(th, td),
:root[data-theme="dark"] .meeting-markdown-content img {
  border-color: #424a56;
}

:root[data-theme="dark"] .meeting-markdown-content code {
  background: #363d48;
  color: #dce8ff;
}

:root[data-theme="dark"] .meeting-markdown-table-wrap table { background: #252b34; }
:root[data-theme="dark"] .meeting-markdown-table-wrap th { background: #303741; color: #f2f4f7; }
:root[data-theme="dark"] .meeting-markdown-content img { background: #1e242d; }

@media (max-width: 560px) {
  .meeting-markdown-file-editor > header {
    align-items: stretch;
    flex-direction: column;
  }

  .meeting-markdown-file-actions,
  .meeting-markdown-file-actions .secondary {
    width: 100%;
  }

  .meeting-sprint-analysis-control {
    flex-direction: column;
  }

  .meeting-sprint-analysis-control .secondary {
    width: 100%;
  }

  .meeting-delivery-sprint-control {
    align-items: stretch;
    flex-direction: column;
  }

  .meeting-delivery-sprint-control .secondary {
    width: 100%;
  }

  .meeting-version-progress-heading,
  .meeting-ai-sprint-layer-head {
    flex-direction: column;
  }

  .meeting-ai-sprint-layer-head .meeting-sprint-analysis-control {
    width: 100%;
  }

}

@media (max-width: 1050px) {
  .meeting-sprint-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .meeting-sprint-dashboard-card,
  .meeting-sprint-all-issues {
    height: 330px;
  }
}

@media (max-width: 560px) {
  .meeting-sprint-multi-picker {
    flex-basis: 100%;
  }

  .meeting-sprint-donut-layout {
    grid-template-columns: 1fr;
  }

  .meeting-sprint-donut {
    width: 140px;
  }

  .meeting-sprint-all-issues > header {
    align-items: flex-start;
    flex-direction: column;
  }

.meeting-sprint-all-issues-scroll {
    height: auto;
  }
}

/* Meeting report reading interactions: crisp motion without blur or soft shadows. */
.meeting-report-document {
  --meeting-read-progress: 0%;
  box-shadow: none;
  scroll-behavior: smooth;
}

.meeting-document-hero h1 {
  animation: meeting-report-title-in 320ms cubic-bezier(.2, .8, .2, 1) both;
}

.meeting-document-meta > div {
  transition: background-color 160ms ease, color 160ms ease;
}

.meeting-document-meta > div:hover {
  background: #f4f5ff;
}

.meeting-document-meta > div:hover dd {
  color: var(--brand-strong);
}

.meeting-report-quick-nav {
  position: sticky;
  top: 8px;
  z-index: 8;
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #dfe4ef;
  border-radius: 12px;
  background: #fff;
}

.meeting-report-reading-progress {
  height: 3px;
  background: #eef1f7;
}

.meeting-report-reading-progress i {
  display: block;
  width: var(--meeting-read-progress);
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width 120ms linear;
}

.meeting-report-quick-nav-items {
  display: grid;
  grid-template-columns: repeat(var(--meeting-nav-columns, 6), minmax(0, 1fr));
}

.meeting-report-quick-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 46px;
  border: 0;
  border-right: 1px solid #e7eaf2;
  border-radius: 0;
  padding: 8px 10px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.meeting-report-quick-nav button:last-child {
  border-right: 0;
}

.meeting-report-quick-nav button em {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #d9deea;
  border-radius: 50%;
  color: #667085;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.meeting-report-quick-nav button span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-report-quick-nav button:hover {
  background: #f7f7ff;
  color: var(--brand-strong);
  transform: translateY(-1px);
}

.meeting-report-quick-nav button[aria-current="true"] {
  background: #f0f1ff;
  color: var(--brand-strong);
}

.meeting-report-quick-nav button[aria-current="true"] em {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.meeting-report-quick-nav button:focus-visible,
.meeting-document-section-toggle:focus-visible {
  position: relative;
  z-index: 2;
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.meeting-document-section {
  grid-template-rows: auto minmax(0, 1fr);
  scroll-margin-top: 78px;
  box-shadow: none;
  animation: meeting-report-section-in 360ms cubic-bezier(.2, .8, .2, 1) both;
  transition: grid-template-rows 220ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.meeting-document-section:nth-child(2) { animation-delay: 35ms; }
.meeting-document-section:nth-child(3) { animation-delay: 70ms; }
.meeting-document-section:nth-child(4) { animation-delay: 105ms; }
.meeting-document-section:nth-child(5) { animation-delay: 140ms; }
.meeting-document-section:nth-child(6) { animation-delay: 175ms; }

.meeting-document-section:hover {
  border-color: #bfc5ef;
  background: #fefeff;
  transform: translateY(-2px);
}

.meeting-document-section h2 {
  padding: 0;
}

.meeting-document-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 0;
  padding: 12px 14px;
  background: #f7f8f9;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.meeting-document-section-toggle:hover {
  background: #f0f1ff;
  color: var(--brand-strong);
}

.meeting-document-section-toggle i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 200ms ease;
}

.meeting-document-section.collapsed {
  grid-template-rows: auto 0fr;
}

.meeting-document-section.collapsed .meeting-document-section-toggle i {
  transform: rotate(-45deg);
}

.meeting-document-section > .meeting-document-section-body {
  min-height: 0;
  overflow: hidden;
  opacity: 1;
  transition: opacity 160ms ease, padding-top 200ms ease, padding-bottom 200ms ease;
}

.meeting-document-section.collapsed > .meeting-document-section-body {
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
}

.meeting-document-table tbody tr,
.meeting-sprint-issue-card {
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.meeting-document-table tbody tr:hover td {
  background: #f7f8ff;
}

.meeting-sprint-issue-card:hover {
  transform: translateX(3px);
}

.meeting-sprint-donut {
  animation: meeting-report-donut-in 420ms cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes meeting-report-title-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes meeting-report-section-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes meeting-report-donut-in {
  from { opacity: 0; transform: scale(.92) rotate(-8deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@media (max-width: 900px) {
  .meeting-report-quick-nav-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .meeting-report-quick-nav button:nth-child(3) {
    border-right: 0;
  }

  .meeting-report-quick-nav button:nth-child(-n + 3) {
    border-bottom: 1px solid #e7eaf2;
  }
}

@media (max-width: 600px) {
  .meeting-report-quick-nav {
    overflow-x: auto;
  }

  .meeting-report-quick-nav-items {
    width: max-content;
    grid-template-columns: repeat(var(--meeting-nav-columns, 6), 132px);
  }

  .meeting-report-quick-nav button,
  .meeting-report-quick-nav button:nth-child(3) {
    width: auto;
    border-right: 1px solid #e7eaf2;
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .meeting-document-hero h1,
  .meeting-document-section,
  .meeting-sprint-donut {
    animation: none;
  }

  .meeting-report-quick-nav button,
  .meeting-document-section,
  .meeting-document-section-toggle i,
  .meeting-document-section > .meeting-document-section-body,
  .meeting-sprint-issue-card {
    transition: none;
  }
}

/* Final workspace alignment -------------------------------------------------
   Keep every view on the same compact rhythm as 项目总览.  This deliberately
   lives after the feature styles so legacy workspace rules cannot stretch a
   heading or a data card on wide screens. */
.product-main,
.product-main > *,
.workspace,
.overview-workspace,
.query-workspace,
.personal-workspace,
.telegram-workspace,
.operations-workspace,
.meeting-workspace,
.todo-workspace {
  min-width: 0;
}

.query-workspace,
.personal-workspace,
.telegram-workspace,
.operations-workspace,
.meeting-workspace,
.todo-workspace {
  align-content: start;
}

.section-head,
.meeting-workspace-head,
.operations-workspace-head {
  min-width: 0;
}

.section-head > div,
.meeting-workspace-head > div,
.operations-workspace-head > div {
  min-width: 0;
}

.section-head h2,
.meeting-workspace-head h2,
.operations-workspace-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.section-head p,
.meeting-workspace-head p,
.operations-workspace-head p {
  margin: 6px 0 0;
  max-width: 760px;
  line-height: 1.55;
}

/* Todo: same compact header, status-card rhythm and list treatment as the
   project overview.  Flex prevents the old implicit grid rows from expanding
   into the blank vertical space seen on the action-list page. */
.todo-workspace {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  min-height: 0;
  padding: var(--space-panel);
  /* 下拉筛选要能浮在待办卡片及容器外，不能被内容区裁切。 */
  overflow: visible;
  border-color: rgba(226, 232, 240, 0.92);
  background: #fff;
  box-shadow: 0 10px 28px rgba(25, 35, 58, 0.045);
}

.todo-head {
  flex: 0 0 auto;
  align-items: center;
  gap: 16px;
  min-height: 0;
  margin: 0;
  padding: 0 0 14px;
  border-bottom: 1px solid #edf0f5;
}

.todo-head h2 {
  font-size: 24px;
}

.todo-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.todo-head .primary {
  min-width: 104px;
  flex: 0 0 auto;
}

.todo-kicker {
  gap: 6px;
  margin: 0 0 7px;
  padding: 4px 8px;
  border-color: #d7dcff;
  background: #f1f2ff;
  color: #554ad8;
  font-size: 11px;
}

.todo-kicker span {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  font-size: 10px;
}

.todo-metric-grid {
  flex: 0 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.todo-metric-card {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 94px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid #7a70ef;
  border-radius: var(--radius-panel);
  background: #fff;
  box-shadow: none;
}

.todo-metric-card::before {
  display: none;
}

.todo-metric-open { border-left-color: #5e69ec; }
.todo-metric-doing { border-left-color: #2584e8; }
.todo-metric-overdue { border-left-color: #e66a53; }
.todo-metric-done { border-left-color: #1d9d75; }

.todo-metric-card span,
.todo-metric-card small {
  color: #748199;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.todo-metric-card strong {
  margin: 1px 0;
  color: var(--text);
  font-size: 29px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.todo-composer {
  flex: 0 0 auto;
  gap: 12px;
  padding: 16px;
  border-color: #dfe4ef;
  border-radius: var(--radius-panel);
  background: #fbfcff;
  box-shadow: none;
}

.todo-list-panel {
  flex: 0 0 auto;
  min-height: 0;
  /* Keep the panel's rounded frame intact.  The earlier visible overflow
     caused the list toolbar to lose its top-left corner. */
  overflow: hidden;
  border-color: #dfe4ef;
  border-radius: var(--radius-panel);
  box-shadow: none;
}

/* The native progress selector needs to sit above the following card while it
   is open; restore overflow only for that short-lived interaction state. */
.todo-list-panel:has(.ui-select-field.open) {
  overflow: visible;
}

/* 待办卡片中的进度下拉属于浮层；保持在卡片和后续列表行之上。 */
.todo-card:has(.ui-select-field.open) {
  position: relative;
  z-index: 6100;
}

.todo-list-toolbar {
  min-height: 58px;
  padding: 10px 12px;
  border-bottom-color: #edf0f5;
  background: #fbfcff;
}

.todo-card {
  align-items: start;
  gap: 14px;
  min-height: 0;
  padding: 14px 16px;
}

.todo-card-main {
  align-items: flex-start;
  gap: 11px;
}

.todo-card-content p {
  margin: 5px 0 8px;
}

.todo-card-actions {
  align-items: flex-start;
  justify-content: flex-end;
  min-width: max-content;
}

/* 待办清单的状态控件与编辑/删除按钮使用同一行高，选项保持单行。 */
.todo-card-actions .todo-status-select {
  display: block;
  width: 116px;
  flex: 0 0 116px;
}

.todo-card-actions .todo-status-select .ui-select-field {
  width: 100%;
}

.todo-card-actions .todo-status-select .ui-select-toggle,
.todo-card-actions .small-button,
.todo-card-actions .todo-delete-button {
  box-sizing: border-box;
  min-height: 38px;
  height: 38px;
  line-height: 1;
  white-space: nowrap;
}

.todo-card-actions .todo-status-select .ui-select-toggle {
  padding: 0 31px 0 10px;
  font-size: 12px;
}

.todo-card-actions .todo-status-select .ui-select-options {
  right: 0;
  left: auto;
  width: 154px;
  min-width: 154px;
}

.todo-card-actions .todo-status-select .ui-select-option {
  min-height: 34px;
  white-space: nowrap;
}

/* 独立待办分享页：完全移除应用壳与所有写入操作，只保留内容阅读。 */
.todo-public-share-view {
  width: min(920px, calc(100% - 32px));
  margin: 48px auto;
}

body.todo-public-share-mode {
  min-height: 100vh;
  background: linear-gradient(135deg, #f1f6ff, #fbfcff 48%, #f3f8f5);
}

body.todo-public-share-mode .app-shell,
body.todo-public-share-mode .mobile-actionbar,
body.todo-public-share-mode .file-warning,
body.todo-public-share-mode #actionStatus,
body.todo-public-share-mode > .mention-menu {
  display: none !important;
}

.todo-public-card,
.todo-public-loading {
  border: 1px solid #dce4f0;
  border-radius: 20px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 48px rgba(38, 58, 94, .12);
}

.todo-public-card { padding: clamp(24px, 5vw, 46px); }
.todo-public-loading { padding: 36px; color: #5d6f8d; text-align: center; }
.todo-public-label { color: #5e55dd; font-size: 13px; font-weight: 800; letter-spacing: .05em; }
.todo-public-card h1 { margin: 9px 0 12px; color: #18233d; font-size: clamp(25px, 4vw, 34px); line-height: 1.25; }
.todo-public-badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 22px; }
.todo-public-badges > span,
.todo-public-details > span { display: inline-flex; align-items: center; }
.todo-public-badges .todo-status { padding: 5px 10px; border-radius: 999px; background: #edf1f8; color: #40516f; font-size: 13px; font-weight: 750; }
.todo-public-badges .todo-status.status-done { background: #ddf7e9; color: #13744d; }
.todo-public-badges .todo-status.status-doing { background: #e4f0ff; color: #1761bb; }
.todo-public-description { color: #2f3e5a; line-height: 1.8; white-space: normal; }
.todo-public-card .todo-card-media { margin: 20px 0; }
.todo-public-details { display: flex; flex-wrap: wrap; gap: 9px; margin: 24px 0 0; padding-top: 18px; border-top: 1px solid #edf0f5; }
.todo-public-details > span { gap: 6px; padding: 7px 10px; border-radius: 8px; background: #f7f9fc; color: #52617a; font-size: 13px; }
.todo-public-details b { color: #7a879e; font-weight: 700; }
.todo-public-discussion { margin-top: 30px; padding-top: 22px; border-top: 1px solid #e6eaf1; }
.todo-public-discussion-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.todo-public-discussion-head h2 { margin: 0; color: #1c2943; font-size: 19px; }
.todo-public-discussion-head span { color: #74839b; font-size: 13px; }
.todo-public-reply { background: #fbfcff; }
.todo-public-unavailable { max-width: 640px; margin: 0 auto; text-align: center; }
.todo-public-unavailable p { margin: 14px auto 0; color: #687791; line-height: 1.7; }

@media (max-width: 600px) {
  .todo-public-share-view { width: min(100% - 20px, 920px); margin: 20px auto; }
  .todo-public-card { padding: 22px 18px; border-radius: 15px; }
}

.todo-empty-state {
  min-height: 168px;
}

@media (max-width: 820px) {
  .todo-head {
    align-items: flex-start;
  }

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

@media (max-width: 600px) {
  .todo-workspace {
    padding: 14px;
  }

  .todo-head {
    align-items: stretch;
    flex-direction: column;
  }

  .todo-head .primary {
    width: 100%;
  }

  .todo-metric-grid {
    grid-template-columns: 1fr;
  }
}

/* 待办卡片内的团队回复。 */
.todo-card-discussion {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin: 0 0 0 33px;
  padding: 12px 13px;
  /* A long discussion must not stretch a single todo across the entire page. */
  max-height: clamp(320px, 58vh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid #e4e8f2;
  border-radius: 13px;
  background: #fbfcff;
}

.todo-reply-panel-head,
.todo-reply-actions,
.todo-reply-entry header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.todo-reply-panel-head > div {
  display: grid;
  gap: 2px;
}

.todo-reply-panel-head strong {
  color: #39465e;
  font-size: 13px;
  font-weight: 850;
}

.todo-reply-panel-head span,
.todo-reply-empty {
  margin: 0;
  color: #79869a;
  font-size: 12px;
  line-height: 1.5;
}

.todo-reply-panel-head .small-button,
.todo-reply-actions .small-button {
  min-height: 34px;
  height: 34px;
  white-space: nowrap;
}

.todo-reply-list {
  display: grid;
  gap: 8px;
}

.todo-reply-entry {
  display: grid;
  gap: 7px;
  padding: 10px 11px;
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  background: #fff;
}

.todo-reply-entry header {
  align-items: baseline;
}

.todo-reply-entry-meta,
.todo-reply-entry-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.todo-reply-entry-meta {
  flex-wrap: wrap;
}

.todo-reply-entry-actions {
  flex: 0 0 auto;
}

.todo-reply-entry-actions .tiny-button {
  min-height: 28px;
  height: 28px;
  padding: 4px 9px;
  font-size: 11px;
  white-space: nowrap;
}

.todo-reply-entry header strong {
  color: #46536c;
  font-size: 12px;
  font-weight: 850;
}

.todo-reply-entry header time {
  color: #8b97aa;
  font-size: 11px;
  white-space: nowrap;
}

.todo-reply-edited {
  padding: 2px 6px;
  border-radius: 999px;
  background: #f1f3f8;
  color: #788398;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.todo-reply-entry p {
  margin: 0;
  color: #40506a;
  font-size: 13px;
  line-height: 1.65;
  word-break: break-word;
}

.todo-reply-entry .todo-card-media {
  margin: 0;
}

.todo-reply-mentions {
  justify-self: start;
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f0efff;
  color: #5c51d4;
  font-size: 11px;
  font-weight: 800;
}

.todo-reply-form {
  display: grid;
  gap: 9px;
  padding-top: 10px;
  border-top: 1px solid #e7ebf4;
}

.todo-reply-form textarea {
  min-height: 76px;
  resize: vertical;
  line-height: 1.55;
}

.todo-reply-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.todo-reply-actions [data-todo-reply-add-media-id] {
  margin-right: auto;
}

.todo-reply-media-preview:empty {
  display: none;
}

.todo-reply-media-grid {
  margin-top: -1px;
}

@media (max-width: 600px) {
  .todo-card-discussion {
    margin-left: 0;
  }

  .todo-reply-panel-head {
    align-items: flex-start;
  }

  .todo-reply-entry header {
    align-items: flex-start;
  }

  .todo-reply-entry-actions {
    gap: 5px;
  }

  .todo-reply-actions {
    justify-content: flex-start;
  }

  .todo-reply-actions [data-todo-reply-add-media-id] {
    margin-right: 0;
  }
}

/* Keep the issue editor readable when a Jira drawer shares the screen with
   navigation.  Auto-fit could squeeze six fields into one row, leaving the
   Sprint picker too narrow and visually detached from the rest of the form. */
@media (max-width: 980px) {
  .issue-edit-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .issue-card-edit-head {
    grid-template-columns: 1fr;
  }

  .issue-head-actions {
    justify-content: stretch;
    margin-left: 0;
  }

  .issue-head-actions button {
    flex: 1 1 0;
  }

  .issue-edit-meta-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Eye-comfort dark theme.  The palette intentionally uses blue-grey surfaces
   instead of pure black, which keeps dense Jira tables readable at night.
   -------------------------------------------------------------------------- */
.theme-toggle {
  min-width: 62px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1f2329;
  --panel: #252a31;
  --panel-soft: #2b3038;
  --text: #f2f3f5;
  --ink: #f2f3f5;
  --muted: #c9cdd4;
  --line: #3b4048;
  --line-strong: #565c66;
  --brand: #3265d6;
  --brand-strong: #91afff;
  --accent: #ff9a8f;
  --ok: #6fd6a6;
  --warn: #f5bb73;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 3px 12px rgba(0, 0, 0, 0.18);
  --tone-backlog: #c9cdd4;
  --tone-backlog-bg: #363b43;
  --tone-backlog-border: #505662;
  --tone-backlog-text: #e3e5e8;
  --tone-todo: #ffca6b;
  --tone-todo-bg: #4a3a1a;
  --tone-todo-border: #7c5f29;
  --tone-todo-text: #ffdc9b;
  --tone-dev: #8eb5ff;
  --tone-dev-bg: #293d66;
  --tone-dev-border: #496da8;
  --tone-dev-text: #c9d9ff;
  --tone-test: #c6a5ff;
  --tone-test-bg: #40315f;
  --tone-test-border: #7258a5;
  --tone-test-text: #e0d3ff;
  --tone-pass: #7dd4a9;
  --tone-pass-bg: #1f4035;
  --tone-pass-border: #3c7964;
  --tone-pass-text: #c0eed9;
  --tone-done: #7dd4a9;
  --tone-done-bg: #1f4035;
  --tone-done-border: #3c7964;
  --tone-done-text: #c0eed9;
  --tone-risk: #ff9c9e;
  --tone-risk-bg: #4c2c30;
  --tone-risk-border: #895257;
  --tone-risk-text: #ffd1d2;
  --tone-neutral: #c9cdd4;
  --tone-neutral-bg: #333941;
  --tone-neutral-border: #4d555f;
  --tone-neutral-text: #e0e3e7;
  --tone-module: #70d5e7;
  --tone-module-bg: #1d4350;
  --tone-module-border: #3b7380;
  --tone-module-text: #b9f1fa;
  --tone-owner: #bea8ff;
  --tone-owner-bg: #3d335c;
  --tone-owner-border: #6d5c9b;
  --tone-owner-text: #e1d9ff;
  --surface-raised: #303640;
  --focus-ring: rgba(51, 112, 255, 0.28);
  --focus-color: #a9c5ff;
  --placeholder: #a9b3c3;
  --control-border: #6d788a;
  --disabled-text: #a4adbb;
  --surface-hover: #363c47;
}

:root[data-theme="dark"] html,
:root[data-theme="dark"] body {
  background: var(--bg);
  color: var(--text);
}

:root[data-theme="dark"] ::selection {
  background: #365f9d;
  color: #fff;
}

:root[data-theme="dark"] a,
:root[data-theme="dark"] .dashboard-issue-card em,
:root[data-theme="dark"] .sprint-issue-key,
:root[data-theme="dark"] .issue-key {
  color: var(--brand-strong);
}

:root[data-theme="dark"] .topbar {
  background: rgba(20, 31, 40, 0.94);
  border-color: var(--line);
}

:root[data-theme="dark"] .app-mark,
:root[data-theme="dark"] .project-avatar {
  background: #213b59;
  border-color: #41678d;
  color: #c9ddff;
}

:root[data-theme="dark"] .project-summary,
:root[data-theme="dark"] .sidebar-context,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .notification-panel,
:root[data-theme="dark"] .status-pill,
:root[data-theme="dark"] .notification-bell,
:root[data-theme="dark"] .dashboard-status-card,
:root[data-theme="dark"] .dashboard-issue-card,
:root[data-theme="dark"] .sprint-context-card,
:root[data-theme="dark"] .sprint-issue-item,
:root[data-theme="dark"] .issue-detail-shell,
:root[data-theme="dark"] .issue-readonly-drawer,
:root[data-theme="dark"] .issue-drawer-panel,
:root[data-theme="dark"] .media-lightbox-panel,
:root[data-theme="dark"] .todo-card,
:root[data-theme="dark"] .todo-public-card,
:root[data-theme="dark"] .todo-card-discussion,
:root[data-theme="dark"] .todo-reply-entry,
:root[data-theme="dark"] .meeting-section,
:root[data-theme="dark"] .meeting-editor-section,
:root[data-theme="dark"] .operations-section,
:root[data-theme="dark"] .report-section {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] .project-sidebar .mode-switch button {
  color: var(--muted);
}

:root[data-theme="dark"] .project-sidebar .mode-switch button:hover,
:root[data-theme="dark"] .sprint-issue-row:hover,
:root[data-theme="dark"] .sprint-issue-row.open,
:root[data-theme="dark"] .lookup-section,
:root[data-theme="dark"] .batch-status-panel,
:root[data-theme="dark"] .issue-filter-grid {
  background: #1d2a34;
  color: var(--text);
}

:root[data-theme="dark"] .project-sidebar .mode-switch button.active,
:root[data-theme="dark"] .sprint-sort-button:hover,
:root[data-theme="dark"] .sprint-sort-button.active,
:root[data-theme="dark"] .dashboard-column.drop-target {
  background: #203d61;
  color: #d8e8ff;
}

:root[data-theme="dark"] .dashboard-column,
:root[data-theme="dark"] .sprint-issue-meta em,
:root[data-theme="dark"] .sprint-issue-item.selected .sprint-issue-row,
:root[data-theme="dark"] .sprint-context-info,
:root[data-theme="dark"] .sprint-choice-copy,
:root[data-theme="dark"] .issue-links-empty,
:root[data-theme="dark"] .empty-lookup {
  background: var(--panel-soft);
  color: var(--text);
}

:root[data-theme="dark"] :is(input, select, textarea, .rich-description-editor, .filter-sprint-toggle, .related-issue-toggle, .sprint-toggle, .segmented-field span, fieldset.role-switch, fieldset.role-switch span) {
  background: #15212a;
  border-color: #425667;
  color: var(--text);
}

:root[data-theme="dark"] :is(input, select, textarea, .rich-description-editor)::placeholder {
  color: #91a3b4;
  opacity: 1;
}

:root[data-theme="dark"] :is(input, select, textarea, .rich-description-editor):focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(120, 169, 255, 0.28);
}

:root[data-theme="dark"] .secondary {
  background: #1a2934;
  border-color: #4b6173;
  color: var(--text);
}

:root[data-theme="dark"] .secondary:hover {
  background: #263947;
  border-color: #7891a5;
  color: #fff;
}

:root[data-theme="dark"] .danger {
  background: #3c2528;
  border-color: #914d52;
  color: #ffbeb8;
}

:root[data-theme="dark"] .danger:hover {
  background: #552d31;
  border-color: #e47770;
  color: #ffe1de;
}

:root[data-theme="dark"] .notice,
:root[data-theme="dark"] .result-box,
:root[data-theme="dark"] .cookie-help,
:root[data-theme="dark"] .issue-edit-block,
:root[data-theme="dark"] .issue-description,
:root[data-theme="dark"] .jira-rendered-content,
:root[data-theme="dark"] .html-preview,
:root[data-theme="dark"] .comment-item,
:root[data-theme="dark"] .upload-item,
:root[data-theme="dark"] .created-issue-link,
:root[data-theme="dark"] .issue-links-block,
:root[data-theme="dark"] .issue-link-item,
:root[data-theme="dark"] .todo-reply-form {
  background: #182630;
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] .issue-edit-block,
:root[data-theme="dark"] .issue-description,
:root[data-theme="dark"] .issue-card-head,
:root[data-theme="dark"] .todo-reply-form,
:root[data-theme="dark"] .todo-card-discussion {
  border-color: var(--line);
}

:root[data-theme="dark"] table,
:root[data-theme="dark"] th,
:root[data-theme="dark"] td {
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] th,
:root[data-theme="dark"] thead tr {
  background: #202e3a;
  color: #dce8f3;
}

:root[data-theme="dark"] tr:nth-child(even) td {
  background: rgba(28, 42, 53, 0.54);
}

:root[data-theme="dark"] .issue-drawer-backdrop,
:root[data-theme="dark"] .media-lightbox-backdrop {
  background: rgba(3, 8, 13, 0.7);
}

:root[data-theme="dark"] .file-warning {
  background: #4b3817;
  border-color: #8c6b2b;
  color: #ffe2a3;
}

:root[data-theme="dark"] ::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

:root[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #121d25;
}

:root[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #4a6173;
  border: 2px solid #121d25;
  border-radius: 999px;
}

:root[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #6c879d;
}

/* Keep the eye-comfort switch reachable before Jira login.  Notifications and
   logout remain unavailable until authentication, as before. */
body.auth-locked .top-actions {
  display: flex !important;
}

body.auth-locked .notification-wrap,
body.auth-locked #logoutTop {
  display: none !important;
}

/* --------------------------------------------------------------------------
   NX Slate — a restrained, high-legibility dark workspace.
   This final layer deliberately redefines the previous dark palette as a
   complete design system, so the older light-theme component rules cannot
   leak white panels or low-contrast navy copy into the dark interface.
   -------------------------------------------------------------------------- */


:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 82% -18%, rgba(99, 102, 241, 0.14), transparent 33rem),
    radial-gradient(circle at 2% 10%, rgba(56, 189, 248, 0.065), transparent 26rem),
    var(--bg);
  color: var(--text);
}

:root[data-theme="dark"] .topbar {
  background: rgba(14, 22, 36, 0.9);
  border-bottom-color: rgba(64, 83, 109, 0.72);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

:root[data-theme="dark"] .topbar h1,
:root[data-theme="dark"] .topbar .eyebrow,
:root[data-theme="dark"] .project-summary strong,
:root[data-theme="dark"] .project-summary span,
:root[data-theme="dark"] .sidebar-context,
:root[data-theme="dark"] .sidebar-context strong,
:root[data-theme="dark"] .sidebar-context small,
:root[data-theme="dark"] .sidebar-version,
:root[data-theme="dark"] .section-head h2,
:root[data-theme="dark"] .overview-hero h2,
:root[data-theme="dark"] .personal-head h2,
:root[data-theme="dark"] .meeting-workspace h2,
:root[data-theme="dark"] .dashboard-title-row h2,
:root[data-theme="dark"] .field > span,
:root[data-theme="dark"] .field label,
:root[data-theme="dark"] label,
:root[data-theme="dark"] legend,
:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] h4 {
  color: var(--text);
}

:root[data-theme="dark"] .topbar .eyebrow,
:root[data-theme="dark"] .project-summary span,
:root[data-theme="dark"] .sidebar-context span,
:root[data-theme="dark"] .sidebar-context small,
:root[data-theme="dark"] .sidebar-version,
:root[data-theme="dark"] .section-head p,
:root[data-theme="dark"] .meeting-workspace-head p,
:root[data-theme="dark"] .meeting-editor-head p,
:root[data-theme="dark"] .field-help,
:root[data-theme="dark"] small {
  color: var(--muted);
}

:root[data-theme="dark"] .sidebar-toggle {
  background: #1b2940;
  color: #c6d2e3;
}

:root[data-theme="dark"] .sidebar-toggle:hover {
  border-color: #425876;
  background: #233451;
  color: #dbe4ff;
}

:root[data-theme="dark"] .project-sidebar {
  border-color: #2a3a51;
  background: rgba(18, 28, 44, 0.9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

:root[data-theme="dark"] .project-summary {
  background: linear-gradient(135deg, #1b2940, #152238);
}

:root[data-theme="dark"] .project-sidebar .mode-switch button {
  background: transparent;
  color: #b5c1d1;
}

:root[data-theme="dark"] .project-sidebar .mode-switch button::before {
  background: #223149;
  color: #b7c8df;
}

:root[data-theme="dark"] .project-sidebar .mode-switch button:hover {
  background: #1a2940;
  color: #e3eaff;
  transform: none;
}

:root[data-theme="dark"] .project-sidebar .mode-switch button.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.3), rgba(99, 102, 241, 0.09));
  box-shadow: inset 3px 0 0 #9ba5ff;
  color: #e9edff;
}

:root[data-theme="dark"] .project-sidebar .mode-switch button.active::before {
  background: #6975e8;
  box-shadow: 0 5px 12px rgba(105, 117, 232, 0.25);
  color: #fff;
}

:root[data-theme="dark"] .sidebar-context {
  border-top-color: #293950;
}

:root[data-theme="dark"] .sidebar-version {
  background: #1a2940;
}

:root[data-theme="dark"] .sidebar-version strong {
  color: #b8c1ff;
}

:root[data-theme="dark"] :is(
  .panel, .program-dashboard, .sprint-summary-panel, .dashboard-widget,
  .sprint-conclusion-card, .conclusion-block, .telegram-section,
  .issue-lookup-result, .batch-status-panel, .lookup-section,
  .issue-filter-grid, .top-auth-panel, .sprint-control-panel,
  .sprint-board-panel, .sprint-management-panel, .sprint-dashboard-panel,
  .editor-panel, .preview-panel, .insight-panel, .agent-panel,
  .meeting-report-library, .meeting-report-editor, .meeting-report-document,
  .sprint-context-card, .dashboard-status-card, .dashboard-issue-card,
  .sprint-issue-item, .todo-card, .todo-public-card, .todo-card-discussion,
  .meeting-section, .meeting-editor-section, .operations-section, .report-section
) {
  border-color: var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  color: var(--text);
}

:root[data-theme="dark"] :is(
  .sprint-context-info, .sprint-choice-copy, .dashboard-column,
  .issue-links-empty, .empty-lookup, .lookup-section, .batch-status-panel,
  .issue-filter-grid, .notice, .result-box, .cookie-help, .issue-edit-block,
  .issue-description, .jira-rendered-content, .html-preview, .comment-item,
  .upload-item, .created-issue-link, .issue-links-block, .issue-link-item,
  .todo-reply-form, .sprint-issue-meta em
) {
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--text);
}

:root[data-theme="dark"] .app-notice {
  border-color: #356758;
  background: #142c29;
  color: #c8f1df;
}

:root[data-theme="dark"] :is(input, select, textarea, .rich-description-editor, .filter-sprint-toggle, .related-issue-toggle, .sprint-toggle, .segmented-field span, fieldset.role-switch, fieldset.role-switch span) {
  border-color: #344861;
  background: #0f1928;
  color: var(--text);
}

:root[data-theme="dark"] :is(input, select, textarea, .rich-description-editor)::placeholder {
  color: #7e90a8;
}

:root[data-theme="dark"] :is(input, select, textarea, .rich-description-editor):focus {
  border-color: #8b95ff;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

:root[data-theme="dark"] .secondary,
:root[data-theme="dark"] .top-actions > button,
:root[data-theme="dark"] .notification-bell,
:root[data-theme="dark"] .logout-button {
  border-color: #344861;
  background: #17243a;
  color: #d5deeb;
}

:root[data-theme="dark"] .secondary:hover,
:root[data-theme="dark"] .top-actions > button:hover,
:root[data-theme="dark"] .notification-bell:hover,
:root[data-theme="dark"] .logout-button:hover {
  border-color: #596f90;
  background: #21314c;
  color: #f2f6ff;
}

:root[data-theme="dark"] .notification-count {
  border-color: #17243a;
}

:root[data-theme="dark"] .primary {
  background: linear-gradient(135deg, #737df0, #5862d8);
  box-shadow: 0 7px 16px rgba(76, 87, 203, 0.24);
}

:root[data-theme="dark"] .primary:hover {
  background: linear-gradient(135deg, #858ef8, #6570e6);
  box-shadow: 0 9px 20px rgba(76, 87, 203, 0.32);
}

:root[data-theme="dark"] table,
:root[data-theme="dark"] th,
:root[data-theme="dark"] td {
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] th,
:root[data-theme="dark"] thead tr {
  background: #1a2940;
  color: #d9e3f2;
}

:root[data-theme="dark"] tr:nth-child(even) td {
  background: rgba(24, 36, 56, 0.55);
}

:root[data-theme="dark"] :is(.issue-drawer-panel, .issue-readonly-drawer, .media-lightbox-panel) {
  background: #121c2c;
  border-color: var(--line);
}

:root[data-theme="dark"] .issue-drawer-backdrop,
:root[data-theme="dark"] .media-lightbox-backdrop {
  background: rgba(2, 6, 14, 0.74);
}

:root[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #0b1220;
}

:root[data-theme="dark"] ::-webkit-scrollbar-thumb {
  border-color: #0b1220;
  background: #40536d;
}

/* Lark Night colour calibration.  Layout is intentionally untouched: this
   final layer follows Lark's quiet charcoal workspace, subdued borders and
   focused blue actions instead of turning the entire product into a blue bar. */


:root[data-theme="dark"] body {
  background: var(--bg);
}

:root[data-theme="dark"] .topbar {
  background: var(--bg);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 4px 16px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .topbar :is(h1, .eyebrow) {
  color: var(--text);
}

:root[data-theme="dark"] .app-mark,
:root[data-theme="dark"] .project-avatar {
  background: var(--brand);
  border-color: rgba(145, 175, 255, 0.36);
  color: #fff;
}

:root[data-theme="dark"] .sidebar-toggle,
:root[data-theme="dark"] .top-actions > button,
:root[data-theme="dark"] .notification-bell,
:root[data-theme="dark"] .logout-button {
  border-color: #454b55;
  background: var(--panel-soft);
  color: #dce0e6;
}

:root[data-theme="dark"] .sidebar-toggle:hover,
:root[data-theme="dark"] .top-actions > button:hover,
:root[data-theme="dark"] .notification-bell:hover,
:root[data-theme="dark"] .logout-button:hover {
  border-color: #667085;
  background: var(--surface-hover);
  color: #fff;
}

:root[data-theme="dark"] .project-sidebar {
  border-color: var(--line);
  background: #1b1f24;
  box-shadow: none;
}

:root[data-theme="dark"] .project-summary {
  background: var(--panel);
}

:root[data-theme="dark"] .project-sidebar .mode-switch button {
  color: var(--muted);
}

:root[data-theme="dark"] .project-sidebar .mode-switch button::before {
  background: var(--surface-raised);
  color: var(--muted);
}

:root[data-theme="dark"] .project-sidebar .mode-switch button:hover {
  background: var(--panel-soft);
  color: #fff;
}

:root[data-theme="dark"] .project-sidebar .mode-switch button.active {
  background: #2b4270;
  box-shadow: inset 3px 0 0 #5c8dff;
  color: #fff;
}

:root[data-theme="dark"] .project-sidebar .mode-switch button.active::before {
  background: var(--brand);
  color: #fff;
}

:root[data-theme="dark"] .sidebar-context {
  border-top-color: var(--line);
}

:root[data-theme="dark"] .sidebar-version {
  background: var(--panel-soft);
}

:root[data-theme="dark"] .sidebar-version strong {
  color: var(--brand-strong);
}

:root[data-theme="dark"] :is(
  .panel, .program-dashboard, .sprint-summary-panel, .dashboard-widget,
  .sprint-conclusion-card, .conclusion-block, .telegram-section,
  .issue-lookup-result, .batch-status-panel, .lookup-section,
  .issue-filter-grid, .top-auth-panel, .sprint-control-panel,
  .sprint-board-panel, .sprint-management-panel, .sprint-dashboard-panel,
  .editor-panel, .preview-panel, .insight-panel, .agent-panel,
  .meeting-report-library, .meeting-report-editor, .meeting-report-document,
  .sprint-context-card, .dashboard-status-card, .dashboard-issue-card,
  .sprint-issue-item, .todo-card, .todo-public-card, .todo-card-discussion,
  .meeting-section, .meeting-editor-section, .operations-section, .report-section
) {
  border-color: var(--line);
  background: var(--panel);
}

:root[data-theme="dark"] :is(
  .sprint-context-info, .sprint-choice-copy, .dashboard-column,
  .issue-links-empty, .empty-lookup, .lookup-section, .batch-status-panel,
  .issue-filter-grid, .notice, .result-box, .cookie-help, .issue-edit-block,
  .issue-description, .jira-rendered-content, .html-preview, .comment-item,
  .upload-item, .created-issue-link, .issue-links-block, .issue-link-item,
  .todo-reply-form, .sprint-issue-meta em
) {
  border-color: var(--line);
  background: var(--panel-soft);
}

:root[data-theme="dark"] :is(input, select, textarea, .rich-description-editor, .filter-sprint-toggle, .related-issue-toggle, .sprint-toggle, .segmented-field span, fieldset.role-switch, fieldset.role-switch span) {
  border-color: #414751;
  background: var(--panel-soft);
  color: var(--text);
}

:root[data-theme="dark"] :is(input, select, textarea, .rich-description-editor):focus {
  border-color: #5c8dff;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

:root[data-theme="dark"] .secondary {
  border-color: #454b55;
  background: var(--panel-soft);
  color: #e7e9ed;
}

:root[data-theme="dark"] .secondary:hover {
  border-color: #667085;
  background: var(--surface-hover);
  color: #fff;
}

:root[data-theme="dark"] .primary {
  background: var(--brand);
  box-shadow: 0 4px 12px rgba(51, 112, 255, 0.28);
}

:root[data-theme="dark"] .primary:hover {
  background: #4e83fd;
}

:root[data-theme="dark"] th,
:root[data-theme="dark"] thead tr {
  background: var(--surface-raised);
  color: #e5e6eb;
}

:root[data-theme="dark"] tr:nth-child(even) td {
  background: rgba(48, 54, 64, 0.48);
}

:root[data-theme="dark"] .app-notice {
  border-color: #396c5a;
  background: #203b33;
  color: #c5eedc;
}

:root[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--bg);
}

:root[data-theme="dark"] ::-webkit-scrollbar-thumb {
  border-color: var(--bg);
  background: #515763;
}

/* Expanded Sprint controls and populated summary tables need themed surfaces
   in both pointer and keyboard interaction states. */
:root[data-theme="dark"] .sprint-edit-picker {
  background: var(--panel-soft);
}

:root[data-theme="dark"] :is(.dashboard-table, .incomplete-table) tbody tr:is(:hover, :focus-within) > td {
  background: var(--surface-hover);
}

:root[data-theme="dark"] .incomplete-missing-cell em {
  background: var(--tone-todo-bg);
  color: var(--tone-todo-text);
}

/* Query, Sprint and personal-result rows have an explicit light background in
   the base component.  Keep that density in dark mode, but place the text on
   Lark's charcoal surface so issue titles never disappear against white. */
:root[data-theme="dark"] :is(.sprint-issue-item, .personal-issue-result) {
  border-color: var(--line);
  background: var(--panel);
}

:root[data-theme="dark"] .sprint-issue-line,
:root[data-theme="dark"] .sprint-issue-row,
:root[data-theme="dark"] .personal-issue-row {
  background: var(--panel);
  color: var(--text);
}

:root[data-theme="dark"] .sprint-issue-main strong,
:root[data-theme="dark"] .personal-issue-row .sprint-issue-main strong {
  color: var(--text);
}

:root[data-theme="dark"] .sprint-issue-select {
  border-right-color: var(--line);
  background: var(--panel-soft);
}

:root[data-theme="dark"] :is(.sprint-issue-row, .personal-issue-row):hover,
:root[data-theme="dark"] :is(.sprint-issue-row, .personal-issue-row).open,
:root[data-theme="dark"] .sprint-issue-item.selected .sprint-issue-line,
:root[data-theme="dark"] .sprint-issue-item.selected .sprint-issue-row {
  background: #2b3f67;
}

:root[data-theme="dark"] .sprint-issue-item.selected {
  border-color: #5c8dff;
  background: #2b3f67;
  box-shadow: inset 3px 0 0 #5c8dff;
}

/* Meeting reports are documents first: keep the working and reading text at a
   comfortable, consistent size without flattening the heading hierarchy. */
.meeting-report-editor :is(label, input, select, textarea, button, small, p, span, td, th, li, dt, dd, strong, b, em),
.meeting-report-viewer :is(label, input, select, textarea, button, small, p, span, td, th, li, dt, dd, strong, b, em) {
  font-size: 14px !important;
}

.meeting-report-editor :is(td, th, p, li, small),
.meeting-report-viewer :is(td, th, p, li, small) {
  line-height: 1.6;
}

/* The custom-summary block has its own compact typography, so explicitly
   keep both its editor and published document copy aligned at 15px. */
#meetingReportSummary,
.meeting-version-custom-field > span,
.meeting-version-progress-document-layer header span,
.meeting-version-progress-document-layer header strong,
.meeting-version-progress-document-layer > div {
  font-size: 14px !important;
}

.meeting-version-progress-document-layer > div {
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Mobile application shell
   The desktop workspace is dense by design.  On phones the navigation turns
   into a compact horizontal rail, forms stack vertically and data-heavy
   tables retain an intentional horizontal scroll instead of squeezing text.
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    min-width: 320px;
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
    overflow-x: hidden;
  }

  .app-shell {
    overflow-x: clip;
    padding-bottom: 0;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    min-height: 62px;
    gap: 8px;
    padding: 9px 12px;
  }

  .sidebar-toggle {
    display: none;
  }

  .brand-block {
    min-width: 0;
    gap: 8px;
  }

  .app-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 10px;
    font-size: 12px;
  }

  .brand-block > div:last-child {
    min-width: 0;
  }

  .topbar .eyebrow {
    display: none;
  }

  .topbar h1 {
    overflow: hidden;
    max-width: min(45vw, 210px);
    font-size: 17px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .top-actions > button,
  .notification-wrap,
  .notification-bell,
  .logout-button,
  .theme-toggle {
    min-width: 38px;
  }

  .theme-toggle,
  .logout-button {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    font-size: 0;
  }

  .theme-toggle::before {
    color: currentColor;
    content: "◐";
    font-size: 18px;
    line-height: 1;
  }

  .logout-button::before {
    color: currentColor;
    content: "↪";
    font-size: 19px;
    line-height: 1;
  }

  .notification-wrap {
    width: 42px;
    flex: 0 0 42px !important;
  }

  .notification-bell {
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    height: 38px;
    min-height: 38px;
    padding: 0;
  }

  .bell-mark {
    font-size: 0;
  }

  .bell-mark::before {
    content: "铃";
    font-size: 14px;
    line-height: 1;
  }

  .notification-count {
    top: 7px;
    right: 3px;
    min-width: 17px;
    height: 17px;
    border-width: 1px;
    font-size: 9px;
    transform: none;
  }

  .notification-panel {
    position: fixed;
    top: 68px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: min(70dvh, 520px);
    padding: 12px;
    border-radius: 14px;
  }

  .notification-list {
    max-height: calc(min(70dvh, 520px) - 62px);
  }

  .product-layout {
    display: block;
    width: 100%;
    padding: 0 10px 16px;
  }

  .project-sidebar {
    position: sticky;
    top: 62px;
    z-index: 800;
    display: flex;
    width: calc(100% + 20px);
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    margin: 0 -10px 12px;
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    box-shadow: 0 6px 15px rgba(25, 35, 58, 0.05);
    backdrop-filter: blur(14px);
    scrollbar-width: none;
  }

  .project-sidebar::-webkit-scrollbar {
    display: none;
  }

  .project-summary,
  .sidebar-context,
  .sidebar-version {
    display: none;
  }

  .project-switcher {
    width: 144px;
    min-width: 144px;
    flex: 0 0 144px;
    margin: 0;
    padding: 3px;
  }

  .project-switch-tab {
    min-height: 34px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .project-switch-mark {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
    border-radius: 6px;
    font-size: 9px;
  }

  .project-sidebar .mode-switch {
    display: flex;
    width: max-content;
    min-width: max-content;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .project-sidebar .mode-switch button {
    width: auto;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    color: var(--muted);
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }

  .project-sidebar .mode-switch button::before {
    display: none;
  }

  .project-sidebar .mode-switch button.active {
    border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
    background: color-mix(in srgb, var(--brand) 12%, var(--panel));
    box-shadow: none;
    color: var(--brand-strong);
  }

  .mobile-jump {
    display: none !important;
  }

  .product-main {
    gap: 12px;
  }

  .product-main > :is(.panel, .program-dashboard, .query-workspace, .personal-workspace, .telegram-workspace, .operations-workspace, .meeting-workspace, .todo-workspace) {
    border-radius: 14px;
    padding: 14px;
  }

  .section-head,
  .meeting-workspace-head,
  .operations-workspace-head,
  .dashboard-title-row,
  .todo-head,
  .telegram-section-head,
  .meeting-viewer-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .section-head h2,
  .meeting-workspace-head h2,
  .operations-workspace-head h2,
  .todo-head h2 {
    font-size: 21px;
  }

  .section-head > :is(button, .primary, .secondary),
  .dashboard-title-row .overview-actions,
  .todo-head > .primary,
  .meeting-viewer-toolbar > div {
    width: 100%;
  }

  .dashboard-title-row .overview-actions button,
  .meeting-viewer-toolbar button {
    width: 100%;
  }

  .account-login-grid,
  .sprint-create-grid,
  .issue-filter-grid,
  .issue-edit-meta-grid,
  .required-grid,
  .format-section,
  .meeting-report-grid,
  .meeting-notes-grid,
  .meeting-workspace-layout,
  .telegram-grid,
  .sprint-conclusion-grid,
  .program-dashboard-grid,
  .klive-bi-grid,
  .klive-dashboard-grid,
  .project-setup-cards,
  .meeting-sprint-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .todo-metric-grid,
  .dashboard-status-grid,
  .personal-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .metric-card,
  .dashboard-status-card,
  .todo-metric-card {
    min-height: 84px;
    padding: 11px;
  }

  .metric-card strong,
  .todo-metric-card strong {
    font-size: 25px;
  }

  .sprint-edit-picker,
  .sprint-create-actions,
  .meeting-editor-actions,
  .meeting-quality-import-actions,
  .meeting-delivery-preview-actions,
  .meeting-operations-overview-actions,
  .meeting-operations-sheet-actions,
  .top-auth-actions,
  .issue-head-actions,
  .batch-actions,
  .todo-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .sprint-edit-picker > *,
  .sprint-create-actions > *,
  .meeting-editor-actions > *,
  .meeting-quality-import-actions > *,
  .meeting-delivery-preview-actions > *,
  .meeting-operations-overview-actions > *,
  .meeting-operations-sheet-actions > *,
  .top-auth-actions > *,
  .issue-head-actions > *,
  .batch-actions > *,
  .todo-form-actions > * {
    width: 100%;
  }

  .lookup-row,
  .sprint-picker,
  .related-issue-picker,
  .meeting-delivery-sprint-control,
  .meeting-operations-jql-tool {
    grid-template-columns: 1fr;
  }

  .sprint-picker > button,
  .related-issue-picker > button,
  .lookup-row > button,
  .lookup-row > .jira-filter-link,
  .meeting-delivery-sprint-control > button,
  .meeting-operations-jql-tool > button {
    width: 100%;
  }

  .todo-card {
    gap: 12px;
    padding: 13px;
  }

  .todo-card-actions {
    width: 100%;
    padding-left: 0;
  }

  .todo-card-actions > * {
    flex: 1 1 auto;
  }

  .todo-card-discussion {
    margin-left: 0;
  }

  .sprint-issue-row,
  .sprint-issue-head,
  .sprint-sort-bar,
  .issue-card-edit-head {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .sprint-issue-side,
  .sprint-issue-meta,
  .sprint-sort-buttons {
    justify-content: flex-start;
    max-width: none;
  }

  .sprint-sort-button {
    flex: 1 1 calc(50% - 5px);
  }

  .sprint-dashboard-scroll,
  .dashboard-table-wrap,
  .incomplete-table-wrap,
  .klive-overview-table-wrap,
  .operations-summary-table-scroll,
  .meeting-document-table-scroll,
  .meeting-operations-sheet-table-scroll,
  .attachment-list {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .dashboard-table,
  .incomplete-table,
  .klive-overview-table,
  .operations-summary-table-scroll table,
  .meeting-document-table,
  .meeting-operations-sheet-table {
    min-width: 640px;
  }

  .issue-drawer-panel,
  .media-lightbox-panel {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 12px);
    border-radius: 18px 18px 0 0;
  }

  .issue-drawer-head,
  .media-lightbox-head {
    padding: 14px;
  }

  .issue-drawer-body,
  .media-lightbox-body {
    padding: 14px;
  }

  .mobile-actionbar {
    z-index: 850;
    grid-template-columns: 1fr;
    padding: 9px 12px max(9px, env(safe-area-inset-bottom));
  }

  .mobile-actionbar button {
    min-height: 48px;
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  .topbar h1 {
    max-width: 36vw;
    font-size: 16px;
  }

  .project-switcher {
    width: 126px;
    min-width: 126px;
    flex-basis: 126px;
  }

  .project-switch-tab {
    gap: 4px;
    padding: 5px;
    font-size: 10px;
  }

  .metric-grid,
  .todo-metric-grid,
  .dashboard-status-grid,
  .personal-status-grid {
    grid-template-columns: 1fr;
  }

  .product-main > :is(.panel, .program-dashboard, .query-workspace, .personal-workspace, .telegram-workspace, .operations-workspace, .meeting-workspace, .todo-workspace) {
    padding: 12px;
  }
}

/* The older small-screen rule intentionally makes ordinary buttons fill a
   row.  The persistent header controls are exceptions: keep them as compact
   icon buttons so the login screen and every mobile page retain one clean bar. */
@media (max-width: 760px) {
  .topbar .top-actions {
    display: flex !important;
    width: auto !important;
    min-width: 38px;
    margin-left: auto;
  }

  .topbar .top-actions > .theme-toggle,
  .topbar .top-actions > .logout-button {
    display: grid !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    flex: 0 0 38px !important;
    padding: 0 !important;
    place-items: center;
  }
}

/* iOS Safari zooms the viewport whenever a text control is smaller than
   16px.  Keep controls at that threshold so opening a search/filter never
   enlarges the full page or shifts its left/right edges. */
@media (max-width: 760px) {
  html,
  body,
  .app-shell,
  .topbar,
  .product-layout,
  .product-main,
  .product-main > * {
    max-width: 100%;
    min-width: 0;
  }

  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  [contenteditable="true"],
  .filter-sprint-options > input,
  .ui-select-options input,
  .meeting-sprint-multi-menu > input {
    font-size: 16px !important;
  }

  .filter-sprint-options,
  .sprint-options,
  .ui-select-options,
  .meeting-sprint-multi-menu {
    max-width: calc(100vw - 24px);
  }
}

/* Mobile header actions: three equal, quiet controls with a notification
   badge that sits outside the icon instead of covering its label. */
@media (max-width: 760px) {
  .topbar {
    background: var(--panel) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .topbar .top-actions {
    gap: 6px;
    padding-right: 2px;
  }

  .topbar .top-actions > .theme-toggle,
  .topbar .top-actions > .logout-button,
  .topbar .notification-wrap {
    flex: 0 0 42px !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
  }

  .topbar .top-actions > .theme-toggle,
  .topbar .top-actions > .logout-button,
  .topbar .notification-bell {
    display: grid !important;
    place-items: center;
    border: 1px solid var(--line) !important;
    border-radius: 13px !important;
    background: var(--panel-soft) !important;
    color: var(--brand-strong) !important;
  }

  .topbar .notification-wrap {
    position: relative;
    overflow: visible;
  }

  .topbar .notification-bell {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
  }

  .topbar .theme-toggle::before {
    content: "◐";
    font-size: 20px;
    font-weight: 800;
  }

  .topbar .logout-button::before {
    content: "⇥";
    font-size: 23px;
    font-weight: 900;
  }

  .topbar .bell-mark {
    font-size: 0 !important;
    line-height: 0;
  }

  .topbar .bell-mark::before {
    content: "🔔";
    display: block;
    font-size: 18px;
    line-height: 1;
  }

  .topbar .notification-count {
    top: -7px;
    right: -7px;
    z-index: 2;
    min-width: 21px;
    height: 21px;
    border: 2px solid var(--panel);
    padding: 0 5px;
    background: #c9363e;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    line-height: 17px;
    transform: none;
  }
}

/* On phones one compact project selector replaces the two project tabs,
   leaving the horizontal rail for actual workspace navigation. */
.mobile-project-switcher {
  display: none;
}

@media (max-width: 760px) {
  .project-sidebar > .project-switcher {
    display: none;
  }

  .project-sidebar > .mobile-project-switcher {
    display: block;
    width: 88px;
    min-width: 88px;
    flex: 0 0 88px;
    margin: 0;
  }

  .project-sidebar > .mobile-project-switcher select {
    width: 100%;
    min-height: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 25px 0 9px;
    background: var(--panel-soft);
    color: var(--brand-strong);
    font-size: 16px;
    font-weight: 850;
    line-height: 1;
  }
}

/* Sprint controls are a strict one-column mobile form.  Native date/time
   inputs may otherwise use their intrinsic width and push the page sideways. */
@media (max-width: 760px) {
  .sprint-create-area,
  .sprint-create-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .sprint-create-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .sprint-create-grid > .sprint-name-field,
  .sprint-create-grid > .sprint-date-field,
  .sprint-create-grid > .sprint-goal-field,
  .sprint-create-grid > .sprint-release-field,
  .sprint-create-grid > .sprint-state-field {
    grid-column: 1 / -1 !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .sprint-create-grid :is(input, select, textarea),
  .sprint-create-grid input[type="date"],
  .sprint-create-grid input[type="datetime-local"] {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .sprint-create-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .sprint-create-actions > button {
    width: 100%;
    min-width: 0;
  }
}

/* Keep the quick metadata scanable in Lark Night.  Each chip draws from its
   semantic tone (status / priority / module / people) instead of inheriting
   the neutral container background.  This also comes last so the light-mode
   base styles can never flatten the dark-mode chips into a single colour. */
:root[data-theme="dark"] .sprint-issue-meta .status-chip {
  border: 1px solid var(--tone-border, var(--line));
  background: var(--tone-bg, var(--panel-soft));
  color: var(--tone-text, var(--text));
  box-shadow: none;
}

:root[data-theme="dark"] .sprint-issue-meta .status-chip :is(span, b) {
  color: inherit;
}

/* Lark-like data tags: a compact, semantic colour cue at scan speed. */
:root[data-theme="dark"] .sprint-issue-meta .status-chip.tone-backlog {
  border-color: #5b626d;
  background: var(--line);
  color: #e4e7eb;
}

:root[data-theme="dark"] .sprint-issue-meta .status-chip.tone-todo {
  border-color: #966527;
  background: #5a401b;
  color: #ffe3ae;
}

:root[data-theme="dark"] .sprint-issue-meta .status-chip.tone-dev {
  border-color: #3e70d2;
  background: #294e93;
  color: #d5e2ff;
}

:root[data-theme="dark"] .sprint-issue-meta .status-chip.tone-test {
  border-color: #7157bd;
  background: #483877;
  color: #e5dcff;
}

:root[data-theme="dark"] .sprint-issue-meta .status-chip.tone-pass,
:root[data-theme="dark"] .sprint-issue-meta .status-chip.tone-done {
  border-color: #367b54;
  background: #245c3b;
  color: #c9f0d8;
}

:root[data-theme="dark"] .sprint-issue-meta .status-chip.tone-risk {
  border-color: #a75257;
  background: #653338;
  color: #ffd5d6;
}

:root[data-theme="dark"] .sprint-issue-meta .status-chip.tone-module {
  border-color: #377d92;
  background: #1f5260;
  color: #c2f2fa;
}

:root[data-theme="dark"] .sprint-issue-meta .status-chip.tone-owner {
  border-color: #7459aa;
  background: #49396f;
  color: #e5dcff;
}

:root[data-theme="dark"] .sprint-issue-meta .status-chip.tone-neutral {
  border-color: #59616d;
  background: #363c46;
  color: #e2e6eb;
}

:root[data-theme="dark"] :is(.sprint-issue-item, .personal-issue-result),
:root[data-theme="dark"] :is(.sprint-issue-line, .sprint-issue-row, .personal-issue-row) {
  border-color: var(--line);
  background-color: var(--panel);
  color: var(--text);
}

/* The Jira detail drawer is rendered as a separate editing surface and has
   several intentionally white base controls.  Give every editable field the
   same Lark Night surface so no white-on-white / white-on-dark text leaks in. */
:root[data-theme="dark"] .issue-drawer-head {
  border-bottom-color: var(--line);
  background: var(--panel);
  color: var(--text);
}

/* Continue the detail surface through the padding, scroll gutter and empty space. */
:root[data-theme="dark"] :is(.issue-drawer-panel, .issue-drawer-body) {
  background: var(--panel);
  color: var(--text);
}

:root[data-theme="dark"] .issue-drawer-body :is(
  input, select, textarea, .rich-description-editor, .rich-comment-editor,
  .issue-edit-block, .issue-description, .issue-edit-details summary,
  .issue-rendered-description, .comment-composer
) {
  border-color: #414751;
  background: var(--panel-soft);
  color: var(--text);
}

:root[data-theme="dark"] .issue-drawer-body :is(input, select, textarea)::placeholder {
  color: #98a0aa;
}

:root[data-theme="dark"] .issue-drawer-body .issue-edit-meta-grid #lookupIssueReporter {
  border-color: #414751;
  background: var(--panel-soft);
  color: var(--text);
}

:root[data-theme="dark"] .issue-drawer-body :is(input, select, textarea, .rich-description-editor, .rich-comment-editor):focus {
  border-color: #5c8dff;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* --------------------------------------------------------------------------
   Dashboard surfaces — final Lark Night pass
   These widgets were originally introduced with literal white surfaces. Keep
   the dashboard data-dense, but let every surface and status retain a clear,
   readable semantic colour in dark mode.
   -------------------------------------------------------------------------- */
:root[data-theme="dark"] .release-summary .summary-card {
  border-color: var(--tone-border, var(--line)) !important;
  border-left-color: var(--tone, var(--brand)) !important;
  background: var(--tone-bg, var(--panel-soft)) !important;
  box-shadow: none;
}

:root[data-theme="dark"] .release-summary .summary-card.tone-brand {
  --tone: #78a7ff;
  --tone-bg: #293f72;
  --tone-border: #527fd3;
  --tone-text: #d6e3ff;
}

:root[data-theme="dark"] .release-summary .summary-card :is(span, strong, small) {
  color: var(--tone-text, var(--text)) !important;
}

:root[data-theme="dark"] .release-summary .summary-card small {
  color: color-mix(in srgb, var(--tone-text, var(--muted)) 78%, var(--muted)) !important;
}

:root[data-theme="dark"] .dashboard-status-card {
  border-color: var(--tone-border, var(--line)) !important;
  border-left-color: var(--tone, var(--brand)) !important;
  background: var(--tone-bg, var(--panel-soft)) !important;
  box-shadow: none;
}

:root[data-theme="dark"] .dashboard-status-card :is(strong, span) {
  color: var(--tone-text, var(--text)) !important;
}

:root[data-theme="dark"] .dashboard-column {
  border-color: var(--tone-border, var(--line)) !important;
  border-top-color: var(--tone, var(--brand)) !important;
  background: color-mix(in srgb, var(--tone-bg, var(--panel-soft)) 66%, var(--panel)) !important;
}

:root[data-theme="dark"] .dashboard-column-head {
  color: var(--tone-text, var(--text)) !important;
}

:root[data-theme="dark"] .dashboard-issue-card {
  border-color: #434a54 !important;
  background: var(--surface-raised) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28) !important;
  color: var(--text) !important;
}

:root[data-theme="dark"] .dashboard-issue-card:hover,
:root[data-theme="dark"] .dashboard-issue-card.open {
  border-color: #5c8dff !important;
  background: #343b46 !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24) !important;
}

:root[data-theme="dark"] :is(.sprint-issue-meta, .dashboard-issue-meta) .status-chip {
  border: 1px solid var(--tone-border, var(--line)) !important;
  background: var(--tone-bg, var(--panel-soft)) !important;
  color: var(--tone-text, var(--text)) !important;
  box-shadow: none;
}

:root[data-theme="dark"] :is(.sprint-issue-meta, .dashboard-issue-meta) .status-chip :is(span, b) {
  color: inherit !important;
}

:root[data-theme="dark"] :is(.sprint-issue-meta, .dashboard-issue-meta) .status-chip.tone-backlog {
  border-color: #5b626d !important;
  background: var(--line) !important;
  color: #e4e7eb !important;
}

:root[data-theme="dark"] :is(.sprint-issue-meta, .dashboard-issue-meta) .status-chip.tone-todo {
  border-color: #966527 !important;
  background: #5a401b !important;
  color: #ffe3ae !important;
}

:root[data-theme="dark"] :is(.sprint-issue-meta, .dashboard-issue-meta) .status-chip.tone-dev {
  border-color: #3e70d2 !important;
  background: #294e93 !important;
  color: #d5e2ff !important;
}

:root[data-theme="dark"] :is(.sprint-issue-meta, .dashboard-issue-meta) .status-chip.tone-test {
  border-color: #7157bd !important;
  background: #483877 !important;
  color: #e5dcff !important;
}

:root[data-theme="dark"] :is(.sprint-issue-meta, .dashboard-issue-meta) .status-chip:is(.tone-pass, .tone-done) {
  border-color: #367b54 !important;
  background: #245c3b !important;
  color: #c9f0d8 !important;
}

:root[data-theme="dark"] :is(.sprint-issue-meta, .dashboard-issue-meta) .status-chip.tone-risk {
  border-color: #a75257 !important;
  background: #653338 !important;
  color: #ffd5d6 !important;
}

:root[data-theme="dark"] :is(.sprint-issue-meta, .dashboard-issue-meta) .status-chip.tone-module {
  border-color: #377d92 !important;
  background: #1f5260 !important;
  color: #c2f2fa !important;
}

:root[data-theme="dark"] :is(.sprint-issue-meta, .dashboard-issue-meta) .status-chip.tone-owner {
  border-color: #7459aa !important;
  background: #49396f !important;
  color: #e5dcff !important;
}

:root[data-theme="dark"] :is(.sprint-issue-meta, .dashboard-issue-meta) .status-chip.tone-neutral {
  border-color: #59616d !important;
  background: #363c46 !important;
  color: #e2e6eb !important;
}

:root[data-theme="dark"] .donut-chart {
  border-color: #454c57 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
}

:root[data-theme="dark"] .donut-chart::after {
  background: var(--surface-raised) !important;
  box-shadow: 0 0 0 1px #454c57 !important;
}

:root[data-theme="dark"] .donut-center strong {
  color: var(--text) !important;
}

:root[data-theme="dark"] .donut-center span {
  color: var(--muted) !important;
}

:root[data-theme="dark"] .donut-legend-row {
  border-bottom-color: var(--line) !important;
  color: var(--text) !important;
}

:root[data-theme="dark"] .donut-legend-main span,
:root[data-theme="dark"] .donut-legend-metric b {
  color: var(--text) !important;
}

:root[data-theme="dark"] .donut-legend-metric,
:root[data-theme="dark"] .donut-legend-metric em {
  color: var(--muted) !important;
}

:root[data-theme="dark"] .donut-legend-track {
  background: #3a4049 !important;
}

:root[data-theme="dark"] .change-log-filter input {
  border-color: #454c57 !important;
  background: var(--surface-raised) !important;
  color: var(--text) !important;
}

:root[data-theme="dark"] .change-log-items li {
  border-color: #454c57 !important;
  background: var(--surface-raised) !important;
  color: var(--text) !important;
}

:root[data-theme="dark"] .change-log-title strong,
:root[data-theme="dark"] .change-log-items p {
  color: var(--text) !important;
}

:root[data-theme="dark"] .change-log-items p {
  color: var(--muted) !important;
}

:root[data-theme="dark"] .change-log-meta span {
  border: 1px solid #4a525e !important;
  background: #252b34 !important;
  color: #d9dde3 !important;
}

/* Unified dropdown layer.  Custom pickers are used across Sprint, filters,
   batch edits, issue editing and meeting reports; none may fall back to the
   old white menu when Lark Night is active. */
:root[data-theme="dark"] select,
:root[data-theme="dark"] option {
  color-scheme: dark;
}

:root[data-theme="dark"] :is(
  .filter-sprint-toggle, .related-issue-toggle, .sprint-toggle,
  .ui-select-toggle, .meeting-sprint-multi-toggle, .klive-status-filter-trigger
) {
  border-color: #454c57 !important;
  background: var(--surface-raised) !important;
  color: var(--text) !important;
}

:root[data-theme="dark"] :is(
  .filter-sprint-toggle, .related-issue-toggle, .sprint-toggle,
  .ui-select-toggle, .meeting-sprint-multi-toggle, .klive-status-filter-trigger
):hover {
  border-color: #667085 !important;
  background: #343b46 !important;
}

:root[data-theme="dark"] .filter-sprint-toggle::after,
:root[data-theme="dark"] .sprint-toggle::before,
:root[data-theme="dark"] .related-issue-toggle::before,
:root[data-theme="dark"] .ui-select-toggle::after {
  border-color: var(--muted) !important;
}

:root[data-theme="dark"] :is(
  .filter-sprint-options, .sprint-options, .related-issue-options,
  .ui-select-options, .meeting-sprint-multi-menu, .klive-status-filter-menu
) {
  border-color: #505762 !important;
  background: var(--panel) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42) !important;
}

:root[data-theme="dark"] .ui-select-options {
  backdrop-filter: none;
}

:root[data-theme="dark"] :is(
  .filter-sprint-options, .ui-select-options, .meeting-sprint-multi-menu
) > input,
:root[data-theme="dark"] .ui-select-search,
:root[data-theme="dark"] .klive-status-filter-search input {
  border-color: #505762 !important;
  background: #20252c !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

:root[data-theme="dark"] :is(
  .filter-sprint-option, .sprint-option, .related-issue-option,
  .ui-select-option, .meeting-sprint-multi-option, .klive-status-filter-option
) {
  background: transparent !important;
  color: var(--text) !important;
}

:root[data-theme="dark"] :is(
  .filter-sprint-option, .sprint-option, .related-issue-option,
  .ui-select-option, .meeting-sprint-multi-option, .klive-status-filter-option
):hover {
  background: #343b46 !important;
  color: #ffffff !important;
}

:root[data-theme="dark"] :is(
  button.filter-sprint-option[aria-pressed="true"], .sprint-option.selected,
  .ui-select-option.active, .meeting-sprint-multi-option.active,
  .klive-status-filter-option.is-selected
) {
  background: #263f70 !important;
  color: #d9e6ff !important;
}

:root[data-theme="dark"] .related-issue-option strong,
:root[data-theme="dark"] .sprint-option.selected::before {
  color: var(--brand-strong) !important;
}

:root[data-theme="dark"] :is(.related-issue-option em, .related-issue-empty, .ui-select-empty, .meeting-sprint-multi-empty, .meeting-sprint-empty) {
  color: var(--muted) !important;
}

:root[data-theme="dark"] .ui-select-option::before,
:root[data-theme="dark"] .meeting-sprint-multi-option .meeting-sprint-multi-check {
  border-color: #737b87 !important;
  background-color: #252b34;
}

:root[data-theme="dark"] .ui-select-option.active::before {
  border-color: #78a7ff !important;
  background: radial-gradient(circle, #252b34 30%, #5c8dff 35%) !important;
}

:root[data-theme="dark"] .ui-select-field[data-ui-select-multiple="true"] .ui-select-option.active::before,
:root[data-theme="dark"] .meeting-sprint-multi-option.active .meeting-sprint-multi-check,
:root[data-theme="dark"] .klive-status-filter-option.is-selected .klive-status-filter-check {
  border-color: #78a7ff !important;
  background: var(--brand) !important;
  box-shadow: inset 0 0 0 3px #263f70 !important;
}

:root[data-theme="dark"] :is(.filter-sprint-options, .sprint-options, .related-issue-options, .ui-select-options, .meeting-sprint-multi-menu, .klive-status-filter-menu) input[type="checkbox"] {
  accent-color: #5c8dff;
}

/* Dynamic checkbox entries can otherwise retain a light-theme foreground in
   Chromium.  Give every dropdown copy node the Lark Night foreground instead
   of relying on inheritance from the menu shell. */
:root[data-theme="dark"] :is(
  .filter-sprint-options, .sprint-options, .related-issue-options,
  .ui-select-options, .meeting-sprint-multi-menu, .klive-status-filter-menu
) {
  background: var(--panel) !important;
  color: #eef2f6 !important;
}

:root[data-theme="dark"] :is(
  .filter-sprint-options, .sprint-options, .related-issue-options,
  .ui-select-options, .meeting-sprint-multi-menu, .klive-status-filter-menu
) :is(.filter-sprint-option, .sprint-option, .related-issue-option, .ui-select-option, .meeting-sprint-multi-option, .klive-status-filter-option, span, strong, label, button) {
  color: #eef2f6 !important;
  -webkit-text-fill-color: #eef2f6;
  opacity: 1 !important;
}

:root[data-theme="dark"] :is(.filter-sprint-option, .sprint-option, .related-issue-option, .ui-select-option, .meeting-sprint-multi-option, .klive-status-filter-option):hover {
  background: #353c46 !important;
}

:root[data-theme="dark"] .filter-sprint-option:has(input:checked),
:root[data-theme="dark"] .ui-select-option.active,
:root[data-theme="dark"] .meeting-sprint-multi-option.active,
:root[data-theme="dark"] .klive-status-filter-option.is-selected {
  background: #2b4774 !important;
}

:root[data-theme="dark"] .sprint-state-badge.state-active {
  border-color: #31755c !important;
  background: #173d32 !important;
  color: #b7f2d5 !important;
  -webkit-text-fill-color: #b7f2d5;
}

:root[data-theme="dark"] .sprint-state-badge.state-future {
  border-color: #6756a4 !important;
  background: #302958 !important;
  color: #ded7ff !important;
  -webkit-text-fill-color: #ded7ff;
}

:root[data-theme="dark"] .sprint-state-badge.state-closed {
  border-color: #566270 !important;
  background: #2d353e !important;
  color: #d3dbe4 !important;
  -webkit-text-fill-color: #d3dbe4;
}

:root[data-theme="dark"] .sprint-state-badge.state-default {
  border-color: #586674 !important;
  background: #2d3742 !important;
  color: #d6e0ea !important;
  -webkit-text-fill-color: #d6e0ea;
}

/* Team actions / To-do workspace — no light cards may remain inside the
   Lark Night canvas, otherwise its inherited light foreground disappears. */
:root[data-theme="dark"] .todo-metric-card {
  border-color: #424a56 !important;
  background: #2a3038 !important;
  box-shadow: none !important;
}

:root[data-theme="dark"] .todo-metric-card :is(span, small) {
  color: #acb8c8 !important;
}

:root[data-theme="dark"] .todo-metric-card strong {
  color: #f3f6fa !important;
}

:root[data-theme="dark"] .todo-composer,
:root[data-theme="dark"] .todo-list-panel {
  border-color: #424a56 !important;
  background: var(--panel) !important;
  box-shadow: none !important;
}

:root[data-theme="dark"] .todo-list-toolbar {
  border-color: #424a56 !important;
  background: #2a3038 !important;
}

:root[data-theme="dark"] .todo-filter-tabs button {
  color: #c7d0db !important;
}

:root[data-theme="dark"] .todo-filter-tabs button:hover {
  background: #343c47 !important;
  color: #f4f7fa !important;
}

:root[data-theme="dark"] .todo-filter-tabs button.active {
  border-color: #516fba !important;
  background: #263f70 !important;
  color: #dbe8ff !important;
}

:root[data-theme="dark"] .todo-card {
  border-color: #3b434e !important;
  background: var(--panel) !important;
}

:root[data-theme="dark"] .todo-card:hover,
:root[data-theme="dark"] .todo-card.is-done {
  background: #2a3038 !important;
}

:root[data-theme="dark"] .todo-card-title-row h3 {
  color: #f1f4f8 !important;
}

:root[data-theme="dark"] .todo-card.is-done h3 {
  color: #94a2b5 !important;
}

:root[data-theme="dark"] .todo-card-content p {
  color: #bdc7d4 !important;
}

:root[data-theme="dark"] .todo-card-content p.todo-card-empty {
  color: #8e9bad !important;
}

:root[data-theme="dark"] .todo-card-meta span {
  border: 1px solid #424a56 !important;
  background: #303741 !important;
  color: #d4dce6 !important;
}

:root[data-theme="dark"] .todo-card-meta .todo-due.overdue {
  border-color: #8d504a !important;
  background: #4a292a !important;
  color: #ffc3bc !important;
}

:root[data-theme="dark"] .todo-card-meta .todo-created {
  border-color: #3c586e !important;
  background: #263a4a !important;
  color: #b9ddf9 !important;
}

:root[data-theme="dark"] .todo-card-meta .todo-creator,
:root[data-theme="dark"] .todo-card-meta .todo-issue-key {
  border-color: #5f5595 !important;
  background: #332e57 !important;
  color: #ded8ff !important;
}

:root[data-theme="dark"] .todo-card-discussion {
  border-color: #424a56 !important;
  background: #2a3038 !important;
}

:root[data-theme="dark"] .todo-reply-panel-head strong,
:root[data-theme="dark"] .todo-reply-entry header strong,
:root[data-theme="dark"] .todo-reply-entry p {
  color: #e5eaf0 !important;
}

:root[data-theme="dark"] :is(.todo-reply-panel-head span, .todo-reply-empty, .todo-reply-entry header time) {
  color: #aeb9c7 !important;
}

:root[data-theme="dark"] .todo-reply-entry {
  border-color: #424a56 !important;
  background: #303741 !important;
}

/* Query results grouped by Sprint have their own header layer; keep that
   layer on the Night surface rather than the former light result strip. */
:root[data-theme="dark"] .sprint-query-group {
  border-color: #424a56 !important;
  background: var(--panel) !important;
}

:root[data-theme="dark"] .sprint-query-group-head {
  border-color: #424a56 !important;
  background: #2a3038 !important;
  color: #edf2f7 !important;
}

:root[data-theme="dark"] .sprint-query-group-head:hover {
  background: #343c47 !important;
}

:root[data-theme="dark"] .sprint-query-group-title {
  color: #a8c7ff !important;
}

:root[data-theme="dark"] .sprint-query-group-count {
  color: #aeb9c7 !important;
}

:root[data-theme="dark"] .sprint-query-group-state {
  border: 1px solid #566270 !important;
  background: #2d3742 !important;
  color: #d6e0ea !important;
}

:root[data-theme="dark"] .sprint-query-group-state.state-active {
  border-color: #3b8d6c !important;
  background: #173d32 !important;
  color: #b7f2d5 !important;
}

:root[data-theme="dark"] .sprint-query-group-state.state-future {
  border-color: #6756a4 !important;
  background: #302958 !important;
  color: #ded7ff !important;
}

/* The drawer host covers the full viewport.  It must remain transparent so
   the application is merely dimmed by its backdrop, not replaced by black. */
:root[data-theme="dark"] .issue-readonly-drawer {
  background: transparent !important;
}

:root[data-theme="dark"] .issue-drawer-backdrop {
  background: rgba(20, 28, 38, 0.42) !important;
  backdrop-filter: blur(2px);
}

/* Comment metadata used fixed light-theme ink, which made the author and
   timestamp disappear on the Night surface.  Keep hierarchy without losing
   contrast in both the editable and read-only issue detail views. */
:root[data-theme="dark"] .comment-title strong,
:root[data-theme="dark"] .comment-meta strong,
:root[data-theme="dark"] .readonly-comment-head strong {
  color: #f1f5f9 !important;
}

:root[data-theme="dark"] .comment-title span,
:root[data-theme="dark"] .comment-meta span,
:root[data-theme="dark"] .readonly-comment-head span {
  color: #b8c4d1 !important;
  opacity: 1;
}

/* Meeting reports use several document-specific surfaces that were introduced
   after the shared Night theme.  Give every editor and document layer the
   same Lark-style charcoal hierarchy so no light panel or pale text remains. */
:root[data-theme="dark"] .meeting-workspace {
  border-color: #3a3f47 !important;
  background: var(--bg) !important;
  color: #eef1f5;
}

:root[data-theme="dark"] .meeting-workspace-head {
  border-bottom-color: #3a3f47 !important;
}

:root[data-theme="dark"] :is(
  .meeting-report-library,
  .meeting-report-editor,
  .meeting-report-document,
  .meeting-section,
  .meeting-editor-section,
  .meeting-document-section,
  .meeting-dashboard-overview,
  .meeting-delivery-preview,
  .meeting-narrative-preview,
  .meeting-quality-table-preview,
  .meeting-operations-table-preview,
  .meeting-version-progress-field,
  .meeting-ai-sprint-layer,
  .meeting-sprint-dashboard-card,
  .meeting-sprint-all-issues,
  .meeting-sprint-issue-group,
  .meeting-sprint-module-list section,
  .meeting-version-progress-document-layer,
  .meeting-operations-images,
  .meeting-section-media
) {
  border-color: #3a3f47 !important;
  background: #272b33 !important;
  color: #eef1f5 !important;
  box-shadow: none;
}

:root[data-theme="dark"] :is(
  .meeting-notes-grid > .field,
  .meeting-notes-grid > .meeting-version-progress-field,
  .meeting-report-batch-actions,
  .meeting-report-item,
  .meeting-document-meta,
  .meeting-sprint-multi-menu,
  .meeting-operations-image-item
) {
  border-color: #3f454e !important;
  background: var(--panel-soft) !important;
  color: #eef1f5 !important;
}

:root[data-theme="dark"] .meeting-report-item:hover,
:root[data-theme="dark"] .meeting-report-item.active,
:root[data-theme="dark"] .meeting-notes-grid > .field:hover,
:root[data-theme="dark"] .meeting-notes-grid > .meeting-version-progress-field:hover,
:root[data-theme="dark"] .meeting-document-meta > div:hover {
  border-color: #5a6d88 !important;
  background: #333a44 !important;
}

:root[data-theme="dark"] .meeting-report-item.active {
  border-left-color: #6a8dff !important;
  box-shadow: inset 3px 0 0 #6a8dff;
}

:root[data-theme="dark"] :is(
  .meeting-workspace h2,
  .meeting-editor-head h3,
  .meeting-report-library-head strong,
  .meeting-report-item strong,
  .meeting-notes-grid > .field > span,
  .meeting-version-progress-heading > span,
  .meeting-version-custom-field > span,
  .meeting-ai-sprint-layer-head strong,
  .meeting-document-section h2,
  .meeting-document-section > div,
  .meeting-document-meta dd,
  .meeting-version-progress-document-layer header strong,
  .meeting-version-progress-document-layer > div,
  .meeting-sprint-dashboard-card > header > span,
  .meeting-sprint-all-issues > header strong,
  .meeting-section-media strong,
  .meeting-operations-images strong
) {
  color: #f2f4f7 !important;
}

:root[data-theme="dark"] :is(
  .meeting-workspace-head p,
  .meeting-editor-head p,
  .meeting-report-library-head span,
  .meeting-report-updated,
  .meeting-report-item span,
  .meeting-report-item small,
  .meeting-report-batch-actions small,
  .meeting-version-progress-heading > small,
  .meeting-ai-sprint-layer-head small,
  .meeting-document-meta dt,
  .meeting-document-hero p,
  .meeting-version-progress-document-layer header span,
  .meeting-sprint-dashboard-card > header small,
  .meeting-sprint-all-issues > header span,
  .meeting-sprint-all-issues > header small,
  .meeting-section-media small,
  .meeting-operations-images small,
  .meeting-operations-images-empty
) {
  color: #b8c0cb !important;
}

:root[data-theme="dark"] .meeting-editor-actions {
  border-top-color: #3a3f47 !important;
  background: #272b33 !important;
}

:root[data-theme="dark"] .meeting-document-section h2,
:root[data-theme="dark"] .meeting-document-table th,
:root[data-theme="dark"] .meeting-delivery-preview .meeting-document-table thead th {
  border-color: #3f454e !important;
  background: var(--surface-raised) !important;
  color: #dbe6f6 !important;
}

:root[data-theme="dark"] :is(
  .meeting-document-table td,
  .meeting-delivery-row-action,
  .meeting-operations-row-action,
  .meeting-quality-row-action,
  .meeting-risk-row-action,
  .meeting-next-week-row-action
) {
  border-color: #3a3f47 !important;
  background: var(--panel-soft) !important;
  color: #eef1f5 !important;
}

:root[data-theme="dark"] .meeting-document-table tbody tr:hover td,
:root[data-theme="dark"] .meeting-delivery-preview .meeting-document-table tbody tr:hover td,
:root[data-theme="dark"] .meeting-narrative-line:hover {
  background: #333a44 !important;
}

:root[data-theme="dark"] .meeting-sprint-multi-toggle,
:root[data-theme="dark"] .meeting-sprint-multi-option,
:root[data-theme="dark"] .meeting-ai-sprint-layer textarea[readonly],
:root[data-theme="dark"] .meeting-version-custom-field textarea,
:root[data-theme="dark"] .meeting-operations-media-preview {
  border-color: #49505b !important;
  background: #242932 !important;
  color: #eef1f5 !important;
}

:root[data-theme="dark"] .meeting-sprint-multi-option:hover,
:root[data-theme="dark"] .meeting-sprint-multi-option.active {
  background: #36445b !important;
  color: #dce8ff !important;
}

:root[data-theme="dark"] :is(.meeting-editor-section-remove, .meeting-item-delete) {
  border-color: #a75b60 !important;
  background: #3a292d !important;
  color: #ffb8b1 !important;
}

:root[data-theme="dark"] :is(.meeting-editor-section-remove, .meeting-item-delete):hover {
  border-color: #e07a72 !important;
  background: #513137 !important;
  color: #ffe0dc !important;
}

/* Telegram settings cards were still using their later light-theme fills.
   Keep settings, checked choices and export controls readable in Night mode. */
:root[data-theme="dark"] :is(
  .telegram-section,
  .telegram-toggle,
  .telegram-event-card,
  .telegram-action-card,
  .telegram-action-card.secondary,
  .telegram-action-card.primary,
  .telegram-board-status-filter,
  .telegram-daily-schedule,
  .telegram-change-log-range
) {
  border-color: #3f454e !important;
  background: var(--panel-soft) !important;
  color: #eef1f5 !important;
  box-shadow: none;
}

:root[data-theme="dark"] :is(
  .telegram-toggle-primary,
  .telegram-toggle:has(input:checked),
  .telegram-event-card:has(input:checked),
  .telegram-action-primary
) {
  border-color: #4c78ba !important;
  background: #263c5c !important;
  color: #eef5ff !important;
}

:root[data-theme="dark"] :is(
  .telegram-toggle:hover,
  .telegram-event-card:hover,
  .telegram-action-card:hover,
  .telegram-action-card.primary:hover
) {
  border-color: #638cd0 !important;
  background: #34445a !important;
  color: #f4f7fb !important;
}

:root[data-theme="dark"] :is(
  .telegram-section-title span,
  .telegram-toggle-copy strong,
  .telegram-action-copy strong,
  .telegram-export-heading strong,
  .telegram-board-status-heading strong,
  .telegram-daily-schedule-head strong,
  .telegram-daily-time-field > span,
  .telegram-change-log-range > span
) {
  color: #f2f4f7 !important;
}

:root[data-theme="dark"] :is(
  .telegram-section-title p,
  .telegram-toggle-copy small,
  .telegram-action-copy small,
  .telegram-export-heading span,
  .telegram-board-status-heading small
  ,.telegram-daily-schedule-head small
  ,.telegram-daily-status
) {
  color: #b8c0cb !important;
}

:root[data-theme="dark"] .telegram-daily-enabled {
  color: #eef1f5 !important;
}

:root[data-theme="dark"] .telegram-daily-status[data-state="ready"] {
  color: #8de0bb !important;
}

:root[data-theme="dark"] .telegram-daily-status[data-state="error"] {
  color: #ffb4a8 !important;
}

:root[data-theme="dark"] .telegram-toggle-box {
  border-color: #8290a2 !important;
  background: var(--panel) !important;
}

:root[data-theme="dark"] .telegram-toggle input:checked + .telegram-toggle-box {
  border-color: #6a95ff !important;
  background: #4d78df !important;
}

:root[data-theme="dark"] .telegram-export-tools,
:root[data-theme="dark"] .telegram-help[open] summary {
  border-color: #3a3f47 !important;
}

:root[data-theme="dark"] .telegram-status[data-state="ready"] {
  border-color: #3b8067 !important;
  background: #1d3b32 !important;
  color: #b8ebd3 !important;
}

:root[data-theme="dark"] .telegram-status[data-state="paused"] {
  border-color: #886d35 !important;
  background: #41351f !important;
  color: #f2d998 !important;
}

/* Meeting report: manual progress items in the custom-summary area. */
.meeting-custom-progress-editor {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #f8f9ff;
}

.meeting-custom-progress-editor > header,
.meeting-custom-progress-display > header,
.meeting-custom-progress-display-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meeting-custom-progress-editor strong,
.meeting-custom-progress-display strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.meeting-custom-progress-editor small,
.meeting-custom-progress-display > header span,
.meeting-custom-progress-display small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.meeting-custom-progress-list {
  display: grid;
  gap: 8px;
}

.meeting-custom-progress-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.meeting-custom-progress-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.15fr) 112px minmax(190px, 1.4fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.meeting-custom-progress-row label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.meeting-custom-progress-row label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.meeting-custom-progress-row input {
  min-width: 0;
  height: 37px;
}

.meeting-custom-progress-value > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meeting-custom-progress-value input {
  width: 100%;
}

.meeting-custom-progress-value b {
  color: var(--brand-strong);
  font-size: 13px;
}

.meeting-custom-progress-remove {
  min-height: 37px;
  white-space: nowrap;
}

.meeting-custom-progress-display {
  display: grid;
  gap: 10px;
  margin-top: 3px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.meeting-custom-progress-display > header span {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-weight: 750;
}

.meeting-custom-progress-display-list {
  display: grid;
  gap: 10px;
}

.meeting-custom-progress-display-item {
  display: grid;
  gap: 6px;
}

.meeting-custom-progress-display-title strong {
  font-size: 13px;
}

.meeting-custom-progress-display-title b {
  color: var(--brand-strong);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.meeting-custom-progress-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e7eaf5;
}

.meeting-custom-progress-track > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6b63ff 0%, #4285f4 100%);
  transition: width .2s ease;
}

:root[data-theme="dark"] .meeting-custom-progress-editor,
:root[data-theme="dark"] .meeting-custom-progress-row,
:root[data-theme="dark"] .meeting-custom-progress-display {
  border-color: #424a56;
  background: #292f38;
}

:root[data-theme="dark"] .meeting-custom-progress-row {
  background: #242a32;
}

:root[data-theme="dark"] .meeting-custom-progress-editor strong,
:root[data-theme="dark"] .meeting-custom-progress-display strong,
:root[data-theme="dark"] .meeting-custom-progress-display-title b {
  color: #f3f6fb;
}

:root[data-theme="dark"] .meeting-custom-progress-editor small,
:root[data-theme="dark"] .meeting-custom-progress-row label > span,
:root[data-theme="dark"] .meeting-custom-progress-display > header span,
:root[data-theme="dark"] .meeting-custom-progress-display small,
:root[data-theme="dark"] .meeting-custom-progress-empty {
  color: #b9c3d1;
}

:root[data-theme="dark"] .meeting-custom-progress-display > header span {
  background: #293d62;
  color: #bcd3ff;
}

:root[data-theme="dark"] .meeting-custom-progress-track {
  background: #3a424e;
}

/* Operations overview and the embedded meeting-report import were added after
   the shared Night palette.  Keep every nested source, result and table layer
   on the same charcoal surfaces so a light card never carries light text. */
:root[data-theme="dark"] :is(
  .operations-workspace,
  .operations-overview-card,
  .operations-overview-empty,
  .operations-summary-dashboard,
  .meeting-operations-sheet-tool,
  .meeting-operations-overview-import,
  .meeting-operations-jql-tool,
  .meeting-operations-overview-source,
  .meeting-operations-sheet-result,
  .meeting-operations-analysis,
  .meeting-operations-manual-input,
  .operations-overview-table
) {
  border-color: #404854 !important;
  background: #292f38 !important;
  color: #eef3f8 !important;
  box-shadow: none !important;
}

:root[data-theme="dark"] :is(
  .meeting-operations-jql-tool,
  .meeting-operations-overview-source,
  .meeting-operations-sheet-result,
  .meeting-operations-analysis,
  .operations-overview-table,
  .operations-overview-editor-scroll
) {
  background: #242a32 !important;
}

:root[data-theme="dark"] :is(
  .meeting-operations-analysis > header,
  .meeting-operations-analysis-group > header,
  .meeting-operations-sheet-source[open] > summary,
  .operations-overview-editor-note
) {
  border-color: #46505d !important;
  background: #303743 !important;
  color: #eef3f8 !important;
}

:root[data-theme="dark"] :is(
  .meeting-operations-sheet-tool-head strong,
  .meeting-operations-sheet-result-head strong,
  .meeting-operations-overview-source strong,
  .meeting-operations-analysis > header span,
  .meeting-operations-analysis-stats b,
  .meeting-operations-analysis-group > header strong,
  .meeting-operations-analysis-group li > div,
  .meeting-operations-sheet-source > summary,
  .operations-workspace h2,
  .operations-overview-card > header strong,
  .operations-overview-images h3,
  .operations-summary-heading h3
) {
  color: #f4f7fb !important;
}

:root[data-theme="dark"] :is(
  .operations-workspace-head p,
  .operations-overview-card > header span,
  .operations-overview-card > header small,
  .operations-overview-empty p,
  .operations-overview-empty-table,
  .operations-overview-editor > footer small,
  .meeting-operations-sheet-tool-head small,
  .meeting-operations-sheet-result-head span,
  .meeting-operations-sheet-result-head small,
  .meeting-operations-sheet-control > span,
  .meeting-operations-sheet-control > small,
  .meeting-operations-sheet-actions > span,
  .meeting-operations-jql-tool small,
  .meeting-operations-overview-source span,
  .meeting-operations-overview-source small,
  .meeting-operations-sheet-result > p,
  .meeting-operations-analysis > header strong,
  .meeting-operations-analysis-stats > span,
  .meeting-operations-analysis-group li::before,
  .meeting-operations-sheet-source > summary > span,
  .operations-overview-editor-note
) {
  color: #b9c4d2 !important;
}

:root[data-theme="dark"] :is(
  .meeting-operations-sheet-control input,
  .meeting-operations-sheet-control select,
  .meeting-operations-jql-tool textarea,
  .meeting-operations-manual-input,
  .operations-overview-editor-scroll input,
  .operations-overview-editor-scroll textarea
) {
  border-color: #4b5665 !important;
  background: #303743 !important;
  color: #f1f5f9 !important;
}

:root[data-theme="dark"] :is(
  .meeting-operations-sheet-control input,
  .meeting-operations-sheet-control select,
  .meeting-operations-jql-tool textarea,
  .meeting-operations-manual-input,
  .operations-overview-editor-scroll input,
  .operations-overview-editor-scroll textarea
)::placeholder {
  color: #94a3b8 !important;
  opacity: 1;
}

:root[data-theme="dark"] :is(
  .meeting-operations-sheet-actions,
  .meeting-operations-sheet-result-head,
  .meeting-operations-analysis-stats,
  .meeting-operations-analysis-group,
  .meeting-operations-analysis-group > header,
  .meeting-operations-analysis-group li,
  .meeting-operations-sheet-source,
  .meeting-operations-sheet-source[open] > summary
) {
  border-color: #404854 !important;
}

:root[data-theme="dark"] .meeting-operations-analysis-group li > em {
  background: #343c47 !important;
  color: #cbd5e1 !important;
}

:root[data-theme="dark"] .meeting-operations-sheet-source > summary::before {
  border-color: #566273 !important;
  color: #a9c7ff !important;
}

:root[data-theme="dark"] .operations-summary-metrics article {
  border-color: #404854 !important;
  background: #2b323c !important;
  box-shadow: none !important;
}

:root[data-theme="dark"] .operations-summary-metrics article::after {
  opacity: .45;
}

/* 运营问题总览的表格由原始资料动态产生，需明确覆盖浅色表格底色与文字色，
   否则深色模式会出现白底白字或灰底深字。 */
:root[data-theme="dark"] .operations-summary-metrics span {
  color: #bdc8d8 !important;
}

:root[data-theme="dark"] .operations-summary-metrics strong {
  color: #f3f6fb !important;
}

:root[data-theme="dark"] .operations-summary-metrics small {
  color: #aeb9c8 !important;
}

:root[data-theme="dark"] .operations-summary-metrics .is-period i {
  background: #394355 !important;
  color: #aebcff !important;
}

:root[data-theme="dark"] .operations-summary-list,
:root[data-theme="dark"] .operations-summary-table-scroll,
:root[data-theme="dark"] .operations-summary-table-scroll table {
  border-color: #404854 !important;
  background: #242a32 !important;
  color: #eef3f8 !important;
}

:root[data-theme="dark"] .operations-summary-list > header {
  border-bottom-color: #404854 !important;
  background: #2b323c !important;
}

:root[data-theme="dark"] .operations-summary-list > header strong {
  color: #f4f7fb !important;
}

:root[data-theme="dark"] .operations-summary-list > header span {
  color: #b9c4d2 !important;
}

:root[data-theme="dark"] .operations-summary-table-scroll th {
  border-bottom-color: #46505d !important;
  background: #303743 !important;
  color: #c8d7ec !important;
}

:root[data-theme="dark"] .operations-summary-table-scroll td {
  border-bottom-color: #3d4652 !important;
  background: #292f38 !important;
  color: #e9eef5 !important;
}

:root[data-theme="dark"] .operations-summary-table-scroll tbody tr:nth-child(even):not(.operations-summary-group) td {
  background: #272d36 !important;
}

:root[data-theme="dark"] .operations-summary-table-scroll .operations-summary-problem,
:root[data-theme="dark"] .operations-summary-table-scroll .operations-summary-reply {
  color: #d7e0eb !important;
}

:root[data-theme="dark"] .operations-summary-table-scroll a {
  color: #9ab9ff !important;
}

:root[data-theme="dark"] .operations-summary-group td {
  border-bottom-color: #3b5574 !important;
  background: #26394f !important;
  color: #bdd8ff !important;
}

:root[data-theme="dark"] .operations-summary-group span {
  color: #a9c7f7 !important;
}

:root[data-theme="dark"] .operations-summary-status.updated,
:root[data-theme="dark"] .operations-summary-status.done {
  color: #8ce7c6 !important;
  background: #164c40 !important;
}

:root[data-theme="dark"] .operations-summary-status.tracking {
  color: #ffd991 !important;
  background: #5a4019 !important;
}

/* Meeting report reader: these controls are rendered inside their own
   components, so they need an explicit Night surface rather than inheriting
   the former white document controls. */
:root[data-theme="dark"] :is(
  .meeting-report-quick-nav,
  .meeting-document-section-toggle,
  .meeting-quality-import-tool
) {
  border-color: #404854 !important;
  background: #2b323c !important;
  color: #eef3f8 !important;
}

:root[data-theme="dark"] .meeting-report-reading-progress {
  background: #3a4350 !important;
}

:root[data-theme="dark"] .meeting-report-quick-nav button {
  border-right-color: #404854 !important;
  background: #2b323c !important;
  color: #bdc8d7 !important;
}

:root[data-theme="dark"] .meeting-report-quick-nav button em {
  border-color: #586474 !important;
  background: #343d49 !important;
  color: #c8d4e2 !important;
}

:root[data-theme="dark"] .meeting-report-quick-nav button:hover {
  background: #35445a !important;
  color: #cfe0ff !important;
}

:root[data-theme="dark"] .meeting-report-quick-nav button[aria-current="true"] {
  background: #293f66 !important;
  color: #d9e6ff !important;
}

:root[data-theme="dark"] .meeting-report-quick-nav button[aria-current="true"] em {
  border-color: #6d97ff !important;
  background: var(--brand) !important;
  color: #fff !important;
}

:root[data-theme="dark"] .meeting-document-section-toggle:hover {
  background: #343d49 !important;
  color: #d7e5ff !important;
}

:root[data-theme="dark"] .meeting-quality-import-kicker {
  border-color: #526c9d !important;
  background: #293f66 !important;
  color: #bcd5ff !important;
}

:root[data-theme="dark"] :is(
  .meeting-quality-import-tool strong,
  .meeting-quality-import-tool .meeting-quality-import-copy > div,
  .meeting-quality-import-tool .meeting-quality-import-status
) {
  color: #f1f5f9 !important;
}

:root[data-theme="dark"] .meeting-quality-import-tool small {
  color: #b9c4d2 !important;
}

:root[data-theme="dark"] .meeting-quality-action-divider {
  background: #4b5665 !important;
}

@media (max-width: 760px) {
  .meeting-custom-progress-editor > header {
    align-items: flex-start;
  }

  .meeting-custom-progress-row {
    grid-template-columns: minmax(0, 1fr) 90px;
  }

  .meeting-custom-progress-row > label:nth-of-type(3) {
    grid-column: 1 / -1;
  }

  .meeting-custom-progress-remove {
    grid-column: 1 / -1;
    width: 100%;
  }

  .jira-monitor-head {
    align-items: stretch;
    flex-direction: column;
  }

  .jira-monitor-grid {
    grid-template-columns: 1fr;
  }

  .jira-monitor-actions {
    justify-content: stretch;
  }

  .jira-monitor-actions button {
    flex: 1 1 130px;
  }
}

/* Shared interaction states. Keep native controls, generated menus and
   browser autofill on the same palette as the surrounding workspace. */
@media screen {
  :root:not([data-theme="dark"]) :is(
    .todo-metric-card span, .todo-metric-card small,
    .todo-filter-tabs button:not(.active), .todo-card-meta .todo-assignee,
    .todo-reply-panel-head span, .todo-reply-empty, .todo-reply-entry header time,
    .todo-reply-edited, .todo-composer-head small, .todo-form-actions > span,
    .todo-media-editor-head small, .todo-media-empty, .todo-media-item figcaption small,
    .todo-audit-head small, .todo-audit-empty, .todo-audit-entry-head time,
    .todo-audit-change-list span, .todo-card-content p.todo-card-empty,
    .todo-priority.priority-p3, .operations-summary-group span, .meeting-editor-head p
  ) { color: var(--muted); }

  :root:not([data-theme="dark"]) :is(.todo-priority.priority-p0, .todo-card-meta .todo-due.overdue, .todo-delete-button, .todo-media-remove) {
    color: #ab392b;
  }
  :root:not([data-theme="dark"]) :is(.todo-priority.priority-p1, .operations-summary-status.tracking) { color: #89580c; }
  :root:not([data-theme="dark"]) :is(.operations-summary-status.done, .operations-summary-status.updated, .sprint-state-badge.state-active) { color: #096d51; }
  :root:not([data-theme="dark"]) .todo-audit-change-list i { color: var(--brand-strong); }
  :root:not([data-theme="dark"]) .meeting-sprint-multi-option.active .meeting-sprint-multi-check { color: #fff; }

  :root[data-theme="dark"] .notification-panel {
    --notification-bg: var(--panel-soft);
    --notification-hover: var(--surface-hover);
    --notification-unread: var(--tone-dev-bg);
    --notification-muted: var(--muted);
    color: var(--text);
  }

  :root[data-theme="dark"] .notification-item.unread {
    border-color: var(--tone-dev-border);
  }

  :root[data-theme="dark"] .notification-item :is(strong, .notification-summary) {
    color: var(--text);
  }

  :root[data-theme="dark"] .notification-item :is(span, time) {
    color: var(--notification-muted);
  }

  :root[data-theme="dark"] #notificationList .notification-item[role="button"]:is(:hover, :focus-visible) {
    background: var(--notification-hover);
    border-color: var(--brand-strong);
    outline-offset: -3px;
  }

  :root[data-theme="dark"] .mobile-actionbar {
    background: var(--panel) !important;
    border-color: var(--line) !important;
  }

  :root[data-theme="dark"] :is(#meetingDeliverySprintLabel, summary) {
    color: var(--text) !important;
  }

  :root[data-theme="dark"] .meeting-operations-sheet-tool-head > span {
    color: var(--tone-dev-text) !important;
    background: var(--tone-dev-bg) !important;
    border-color: var(--tone-dev-border) !important;
  }

  :root:not([data-theme="dark"]) :is(.ui-select-toggle.placeholder, .section-head p) {
    color: var(--muted);
  }

  :root[data-theme="dark"] :is(.eyebrow, .description-title) {
    color: var(--muted) !important;
  }

  :root[data-theme="dark"] :is(.summary-issue-link, .table-issue-link) {
    color: var(--brand-strong) !important;
  }

  :root[data-theme="dark"] .todo-delete-button {
    color: var(--tone-risk-text) !important;
    background: var(--tone-risk-bg) !important;
    border-color: var(--tone-risk-border) !important;
  }

  :root[data-theme="dark"] .todo-delete-button:hover {
    background: #63383d !important;
  }

  :root[data-theme="dark"] :is(input, textarea, select, .ui-select-toggle) {
    color-scheme: dark;
    caret-color: var(--text);
    border-color: var(--control-border) !important;
  }

  :root[data-theme="dark"] :is(input, textarea, [contenteditable="true"])::placeholder {
    color: var(--placeholder) !important;
    opacity: 1;
  }

  :root[data-theme="dark"] :is(input, textarea):autofill {
    -webkit-text-fill-color: var(--text) !important;
    caret-color: var(--text);
    box-shadow: 0 0 0 1000px var(--panel-soft) inset !important;
  }

  :root[data-theme="dark"] input::-webkit-calendar-picker-indicator {
    opacity: 0.9;
  }

  :root[data-theme="dark"] :is(input, textarea, select, button):disabled {
    color: var(--disabled-text) !important;
    -webkit-text-fill-color: var(--disabled-text);
    background: var(--panel-soft) !important;
    border-color: var(--line) !important;
    opacity: 1;
    cursor: not-allowed;
  }

  :root[data-theme="dark"] :is(button, a, input, textarea, select, [tabindex], [contenteditable="true"]):focus-visible {
    outline: 2px solid var(--focus-color) !important;
    outline-offset: 3px;
  }

  :root[data-theme="dark"] :is(input[type="checkbox"], input[type="radio"]) {
    accent-color: var(--brand-strong);
  }

  :root[data-theme="dark"] :is(.ui-select-options, .ui-select-list) {
    background: var(--panel) !important;
    color: var(--text) !important;
    border-color: var(--control-border) !important;
  }

  :root[data-theme="dark"] .ui-select-option:not(:disabled):is(:hover, :focus-visible) {
    background: var(--surface-hover) !important;
    color: var(--text) !important;
  }

  :root[data-theme="dark"] .ui-select-option[aria-selected="true"] {
    background: var(--tone-dev-bg) !important;
    color: var(--tone-dev-text) !important;
    border-color: var(--tone-dev-border) !important;
  }

  :root[data-theme="dark"] :is(pre, .rich-description-editor pre, .jira-rendered pre) {
    background: var(--bg) !important;
    color: var(--text) !important;
    border-color: var(--line) !important;
  }

  :root[data-theme="dark"] ::selection {
    background: #365686;
    color: #fff;
  }

  :root[data-theme="dark"] {
    scrollbar-color: #788496 var(--bg);
  }
}

/* Populated content shares the same surface and status tokens as the page.
   Screen-only rules leave exported/printed documents on their paper palette. */
@media screen {
  :root[data-theme="dark"] :is(
    .issue-readonly-title, .issue-readonly-meta, .issue-readonly-section,
    .readonly-comment, .comment-composer, .todo-audit-log, .todo-media-item
  ) {
    background: var(--panel) !important;
    border-color: var(--line) !important;
    color: var(--text);
  }

  :root[data-theme="dark"] :is(
    .todo-media-editor, .todo-audit-entry, .meeting-sprint-all-issues-scroll,
    .meeting-sprint-issue-card, .sprint-sort-button, .todo-media-preview-button
  ) {
    background: var(--panel-soft) !important;
    border-color: var(--line) !important;
    color: var(--text);
  }

  :root[data-theme="dark"] :is(
    .todo-composer-head strong, .todo-media-editor-head strong,
    .todo-audit-head strong, .todo-audit-entry-head strong,
    .todo-audit-change-list b, .todo-audit-change-list em,
    .todo-media-item figcaption > span, .attachment-block > strong,
    .issue-links-head, .attachment-link, .section-title-row > strong
  ) { color: var(--text) !important; }

  :root[data-theme="dark"] :is(
    .todo-composer-head small, .todo-form-actions > span,
    .todo-media-editor-head small, .todo-media-empty,
    .todo-audit-head small, .todo-audit-empty, .todo-audit-entry-head time,
    .todo-audit-change-list li, .todo-audit-change-list span,
    .todo-media-item figcaption small
  ) { color: var(--muted) !important; }

  :root[data-theme="dark"] .todo-audit-change-list i { color: var(--brand-strong); }
  :root[data-theme="dark"] .todo-composer { box-shadow: none; }
  :root[data-theme="dark"] .issue-edit-meta-grid #lookupIssueReporter {
    background: var(--panel-soft) !important;
  }
  :root[data-theme="dark"] :is(.bar-track, .attachment-link img) {
    background: var(--surface-raised);
  }

  :root[data-theme="dark"] :is(
    .meeting-sprint-issue-card, .sprint-sort-button, .attachment-link,
    .todo-media-preview-button, .mention-menu button
  ):is(:hover, :focus-visible, .active, .open) {
    background: var(--surface-hover) !important;
    border-color: var(--brand-strong) !important;
    color: var(--text) !important;
  }

  :root[data-theme="dark"] :is(.todo-kicker, .todo-audit-head > span, .todo-reply-mentions, .issue-link-relation) {
    background: var(--tone-test-bg);
    color: var(--tone-test-text);
    border-color: var(--tone-test-border);
  }
  :root[data-theme="dark"] :is(.todo-reply-edited, .todo-priority.priority-p3, .issue-link-status) {
    background: var(--tone-neutral-bg);
    color: var(--tone-neutral-text);
  }
  :root[data-theme="dark"] .todo-priority.priority-p0 {
    background: var(--tone-risk-bg);
    color: var(--tone-risk-text);
  }
  :root[data-theme="dark"] :is(.todo-priority.priority-p1, .issue-link-status.tone-todo) {
    background: var(--tone-todo-bg);
    color: var(--tone-todo-text);
  }
  :root[data-theme="dark"] :is(.todo-priority.priority-p2, .issue-link-status.tone-dev) {
    background: var(--tone-dev-bg);
    color: var(--tone-dev-text);
  }
  :root[data-theme="dark"] .issue-link-status.tone-test {
    background: var(--tone-test-bg);
    color: var(--tone-test-text);
  }
  :root[data-theme="dark"] .meeting-delivery-status-summary strong {
    background: var(--tone-done-bg);
    color: var(--tone-done-text);
    border-color: var(--tone-done-border);
  }
  :root[data-theme="dark"] .meeting-delivery-status-summary.is-progress strong {
    background: var(--tone-dev-bg);
    color: var(--tone-dev-text);
    border-color: var(--tone-dev-border);
  }
  :root[data-theme="dark"] .meeting-delivery-status-summary.is-pending strong {
    background: var(--tone-todo-bg);
    color: var(--tone-todo-text);
    border-color: var(--tone-todo-border);
  }
  :root[data-theme="dark"] .meeting-delivery-acceptance-summary > b { color: var(--tone-done-text); }
  :root[data-theme="dark"] .meeting-delivery-acceptance-summary.is-progress > b { color: var(--tone-dev-text); }
  :root[data-theme="dark"] .meeting-delivery-acceptance-summary.is-pending > b { color: var(--tone-todo-text); }
  :root[data-theme="dark"] .meeting-delivery-progress-track { background: var(--surface-raised); }
  :root[data-theme="dark"] :is(.issue-link-status.tone-done, .issue-link-status.tone-pass, .operations-summary-heading > span) {
    background: var(--tone-done-bg);
    color: var(--tone-done-text);
    border-color: var(--tone-done-border);
  }
  :root[data-theme="dark"] :is(.todo-media-remove, .meeting-sprint-result-copy > p:nth-child(3) strong, .meeting-sprint-risk-list h4) {
    color: var(--tone-risk-text);
  }

  /* Imported Jira formatting can contain its own light foreground/background.
     Adapt rendered text only; source formatting and image pixels stay intact. */
  :root[data-theme="dark"] .jira-rendered-content :is(span, font, p, div, strong, em, b, i, li, blockquote):is([style], [color], [bgcolor]) {
    color: inherit !important;
    background-color: transparent !important;
  }
  :root[data-theme="dark"] .jira-rendered-content a[style] {
    color: var(--brand-strong) !important;
    background-color: transparent !important;
  }

  :root[data-theme="dark"] #actionStatus.app-notice {
    background: var(--panel);
    color: var(--text);
    border-color: var(--line-strong);
  }
  :root[data-theme="dark"] #actionStatus.app-notice.ok {
    background: var(--tone-done-bg);
    color: var(--tone-done-text);
    border-color: var(--tone-done-border);
  }
  :root[data-theme="dark"] #actionStatus.app-notice.warn {
    background: var(--tone-todo-bg);
    color: var(--tone-todo-text);
    border-color: var(--tone-todo-border);
  }
  :root[data-theme="dark"] #actionStatus.app-notice.loading {
    background: var(--tone-dev-bg);
    color: var(--tone-dev-text);
    border-color: var(--tone-dev-border);
  }
  :root[data-theme="dark"] .toast-progress-value { color: var(--tone-dev-text); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
